/* KrushiSarva company website. Plain CSS, no build step. */

:root {
  --green-900: #0a3d1a;
  --green-800: #0f5a26;
  --green-600: #1f7a37;
  --green-100: #e3f0e2;
  --green-50: #f1f7ef;
  --gold: #e9b93b;
  --gold-dark: #c99a1c;
  --gold-ink: #96700c; /* gold that is dark enough to read as text on white (4.5:1) */
  --cream: #fbf9f3;
  --ink: #17231a;
  --ink-soft: #4d5b50;
  --line: #e2e6dc;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(16, 40, 22, .06), 0 12px 32px -12px rgba(16, 40, 22, .18);
  --font-display: Georgia, 'Times New Roman', 'Noto Serif', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Nirmala UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; line-height: 1.15; color: var(--green-900); }
h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; font-weight: 700; text-wrap: balance; }
p { margin: 0; }

a { color: var(--green-800); }
/* Dark green ring: about 8:1 on the light backgrounds, where the gold ring was under 2:1. */
:focus-visible { outline: 3px solid var(--green-800); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--white); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-600);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.btn-sm { min-height: 44px; padding: 0 18px; font-size: .95rem; }
.btn-primary { background: var(--green-800); color: var(--white); }
.btn-primary:hover { background: var(--green-900); }
.btn-outline { border-color: var(--green-800); color: var(--green-800); }
.btn-outline:hover { background: var(--green-100); }
.btn-gold { background: var(--gold); color: var(--green-900); }
.btn-gold:hover { background: var(--gold-dark); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 249, 243, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; flex: none; min-height: 44px; }
.brand img { width: 170px; }
/* Each link is a 44px tap target with 4px side padding, so the gap is 8px smaller to keep the same spacing.
   If the row ever runs out of room, whole links drop to a second line instead of breaking mid-label. */
.site-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 18px; }
.site-nav a { white-space: nowrap; }
.site-nav a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.site-nav a:not(.btn):hover { color: var(--green-600); }
.site-nav .btn { margin-left: 4px; }
.nav-toggle { display: none; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); background: linear-gradient(180deg, var(--green-50), var(--cream)); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-top: 14px; }
.lead { margin-top: 20px; font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--line); max-width: 520px; }
.facts div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.facts dt { font-size: .85rem; color: var(--ink-soft); line-height: 1.35; }
.facts dd { margin: 0; font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; color: var(--green-800); line-height: 1.1; }

.hero-media { position: relative; }
.hero-media > img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); }
.hero-chip {
  position: absolute; display: flex; align-items: center; gap: 12px;
  background: var(--white); border-radius: 16px; padding: 10px 16px 10px 10px; box-shadow: var(--shadow);
  font-size: .85rem; color: var(--ink-soft); line-height: 1.35;
}
.hero-chip img { width: 46px; height: 46px; object-fit: contain; }
.hero-chip strong { display: block; color: var(--green-900); font-size: .95rem; }
.chip-top { top: 26px; left: -28px; }
.chip-bottom { bottom: 30px; right: -18px; }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tint { background: var(--green-50); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head h2 { margin-top: 12px; }
.section-head p:not(.eyebrow) { margin-top: 16px; color: var(--ink-soft); font-size: 1.08rem; }
.section-head.left { text-align: left; margin: 0; }

/* What we do */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pillar { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 30px; }
.pillar img { width: 100%; max-width: 250px; margin: 0 auto 14px; }
/* The scan artwork runs off its right edge; fade it out instead of a hard cut. */
.pillar img.fade-right {
  -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
  mask-image: linear-gradient(to right, #000 82%, transparent);
}
.pillar p { margin-top: 8px; color: var(--ink-soft); }

/* Product */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
/* Rows are "auto 1fr" so that in a card stretched to match a taller neighbour the spare height
   goes below the paragraph, not between the heading and the paragraph. */
.feature {
  display: grid; grid-template-columns: 68px 1fr; grid-template-rows: auto 1fr; column-gap: 18px; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.feature img { grid-row: span 2; width: 68px; height: 68px; object-fit: contain; }
.feature p { margin-top: 6px; color: var(--ink-soft); font-size: .97rem; line-height: 1.55; }
.also { margin-top: 28px; text-align: center; color: var(--ink-soft); }

/* Who uses it */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.role { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.role-top { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.role-top img, .role-mark { width: 60px; height: 60px; border-radius: 15px; flex: none; }
.role-mark { display: grid; place-items: center; background: var(--green-800); color: var(--white); font-weight: 800; letter-spacing: .04em; }
.role-top p { color: var(--ink-soft); font-size: .92rem; margin-top: 2px; }
.role ul { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.role li { position: relative; padding-left: 28px; line-height: 1.5; }
.role li::before {
  content: ''; position: absolute; left: 0; top: .32em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--green-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='%231f7a37' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Languages band */
.band {
  position: relative; padding: clamp(60px, 8vw, 100px) 0; text-align: center; color: var(--white);
  background: linear-gradient(rgba(8, 44, 20, .84), rgba(8, 44, 20, .9)), url('img/field-sunrise.jpg') center / cover no-repeat;
}
.band .eyebrow { color: var(--gold); }
.band h2 { color: var(--white); margin-top: 12px; }
.langs { list-style: none; margin: 34px auto 0; padding: 0; max-width: 820px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.langs li { padding: 9px 20px; border: 1px solid rgba(255, 255, 255, .32); border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 1.08rem; font-weight: 600; }
.langs li.done { background: var(--white); border-color: var(--white); color: var(--green-900); }
.band-note { max-width: 640px; margin: 30px auto 0; color: #d5e6d4; }
.band-note + .band-note { margin-top: 10px; }

/* How it is built */
.build { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.build div { padding: 28px 26px; border-left: 1px solid var(--line); }
.build div:first-child { border-left: 0; }
.build h3::before { content: ''; display: block; width: 32px; height: 4px; border-radius: 2px; background: var(--gold); margin-bottom: 16px; }
.build p { margin-top: 8px; color: var(--ink-soft); font-size: .97rem; line-height: 1.55; }
/* Side by side (three role cards, four build cells): share the heading row, so a heading that
   wraps on a narrow laptop keeps the dividers and paragraphs level across the row.
   The role cards are one row, so their row gap is 0; restore it if a fourth card is added. */
@media (min-width: 1000.02px) {
  .roles { row-gap: 0; }
  @supports (grid-template-rows: subgrid) {
    .role, .build div { display: grid; grid-template-rows: subgrid; grid-row: span 2; }
    .role { grid-row: span 3; } /* heading, list, guide button */
    .role ul { align-self: start; }
  }
}

/* Goals */
.goals-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.goals-img { margin-top: 30px; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.goals { list-style: none; margin: 0; padding: 0; counter-reset: goal; display: grid; gap: 16px; }
.goals li {
  counter-increment: goal; position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px 22px 84px;
}
.goals li::before {
  content: '0' counter(goal); position: absolute; left: 24px; top: 20px;
  font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--gold-ink); line-height: 1;
}
.goals p { margin-top: 6px; color: var(--ink-soft); }

/* Team */
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; gap: 24px; }
.person { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 24px; text-align: center; }
.avatar {
  display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--green-800); color: var(--white); font-family: var(--font-display); font-size: 1.9rem; font-weight: 700;
}
.person p { margin-top: 4px; color: var(--ink-soft); }

/* Contact */
.contact { background: var(--green-800); color: var(--white); padding: clamp(60px, 8vw, 96px) 0; text-align: center; }
.contact-inner { max-width: 760px; }
.contact h2 { color: var(--white); }
.contact p { margin-top: 14px; color: #d5e6d4; font-size: 1.08rem; }
.contact .btn { margin-top: 30px; font-size: 1.08rem; padding: 0 28px; min-height: 54px; }
.contact :focus-visible { outline-color: var(--gold); }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--line); padding: 30px 0; font-size: .93rem; color: var(--ink-soft); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-row img { width: 150px; }
/* 44px tap targets; the 6px side padding plus the 10px gap keeps the old 22px between labels. */
.footer-row nav { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.footer-row a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--ink-soft); text-decoration: none; }
.footer-row a:hover { color: var(--green-800); }

/* Narrow laptop and tablet on its side: the page margin is only 20px here, so the lower chip
   hangs out less and stays clear of the screen edge. */
@media (max-width: 1240px) {
  .chip-bottom { right: -8px; }
}

/* Tablet */
@media (max-width: 1000px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .roles { grid-template-columns: 1fr; max-width: 620px; margin-inline: auto; }
  .build { grid-template-columns: repeat(2, 1fr); }
  .build div:nth-child(3) { border-left: 0; }
  .build div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  /* One column, kept to the width of the heading block so the photo and the list line up. */
  .goals-grid { grid-template-columns: 1fr; max-width: 760px; }
  .chip-top { left: 12px; }
  .chip-bottom { right: 12px; }
}

/* Tablet only (not phone). 760.02px, not 761px, so a zoomed window that is 760.5px wide is still covered. */
@media (min-width: 760.02px) and (max-width: 1000px) {
  /* Nine cards in two columns leave one over: centre it rather than leave a hole beside it. */
  .feature:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 10px); }

  /* One row of three cards. Gap and padding ease down with the screen so the text column keeps its width,
     and the cards share their rows so a heading that wraps to two lines does not push its paragraph
     out of line with the cards beside it. A one-line heading sits at the bottom of the shared row,
     next to its paragraph. The row gap is 0 because there is one row; restore it if a fourth card is added. */
  .pillars { gap: 0 clamp(16px, 2.4vw, 28px); }
  .pillar { padding: clamp(20px, 2.6vw, 26px) clamp(20px, 2.6vw, 26px) clamp(24px, 3vw, 30px); }
  @supports (grid-template-rows: subgrid) {
    .pillar { display: grid; grid-template-rows: subgrid; grid-row: span 3; }
    .pillar h3 { align-self: end; }
  }
}

/* Small tablet, 761 to 860px: the tightest two- and three-column layouts */
@media (min-width: 760.02px) and (max-width: 860px) {
  /* The full-size nav needs about 730px, more than is left beside a scrollbar at this width. */
  .header-row { gap: 16px; }
  .brand img { width: 150px; }
  .site-nav { column-gap: 10px; }

  /* The photo is only about 300 to 350px wide here: compact chips, and buttons that share the row
     (or stack full width if they cannot). */
  .actions .btn { flex: 1 1 auto; padding: 0 16px; }
  .hero-chip { padding: 8px 12px 8px 8px; font-size: .78rem; }
  .hero-chip img { width: 38px; height: 38px; }

  .pillar p { font-size: .97rem; line-height: 1.55; }
}

/* Phone */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { width: min(1160px, 100% - 32px); }
  .brand img { width: 140px; }

  .nav-toggle {
    display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
    border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer;
  }
  .bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--green-900); }
  .bars { position: relative; }
  .bars::before, .bars::after { content: ''; position: absolute; left: 0; }
  .bars::before { top: -6px; }
  .bars::after { top: 6px; }

  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; align-items: stretch; gap: 0; padding: 8px 16px 18px;
    background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    /* A phone held sideways is shorter than the open menu: scroll inside it so the last items stay reachable. */
    max-height: calc(100vh - 68px); max-height: calc(100dvh - 68px); overflow-y: auto; overscroll-behavior: contain;
  }
  .site-nav.open { display: flex; }
  .site-nav a { flex: none; white-space: normal; }
  .site-nav a:not(.btn) { padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .site-nav .btn { margin: 14px 0 0; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 460px; margin-inline: auto; }
  .actions .btn { flex: 1 1 auto; }
  .facts { gap: 14px; }
  .facts dd { font-size: 1.9rem; }
  .hero-chip { padding: 8px 12px 8px 8px; font-size: .78rem; }
  .hero-chip img { width: 38px; height: 38px; }

  .pillars, .features { grid-template-columns: 1fr; }
  .pillar img { max-width: 200px; }
  .build { grid-template-columns: 1fr; }
  .build div { border-left: 0; }
  .build div:nth-child(n + 2) { border-top: 1px solid var(--line); }
  .team { grid-template-columns: 1fr; max-width: 320px; margin-inline: auto; }
  .goals li { padding: 20px 20px 20px 70px; }
  .goals li::before { left: 18px; font-size: 1.6rem; }
  .footer-row { flex-direction: column; text-align: center; gap: 14px; }
  .footer-row nav { justify-content: center; }
}

/* Small phone: a smaller icon leaves the card text about 24px more room */
@media (max-width: 380px) {
  .feature { grid-template-columns: 56px 1fr; column-gap: 14px; padding: 18px; }
  .feature img { width: 56px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* User guide button on each role card */
.role-guide { justify-self: start; align-self: end; margin-top: 24px; gap: 6px; }

/* ── User guide page ─────────────────────────────────────────────── */
.guide-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 72px); background: linear-gradient(180deg, var(--green-50), var(--cream)); }
.crumbs { font-size: .92rem; color: var(--ink-soft); margin-bottom: 18px; }
.crumbs a { color: var(--green-800); font-weight: 600; }
.guide-hero h1 { margin-top: 12px; font-size: clamp(2.1rem, 4.6vw, 3.2rem); }
.guide-hero .lead { max-width: 40em; }
.picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.pick {
  display: flex; align-items: center; gap: 14px; padding: 18px; min-height: 44px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s;
}
.pick:hover { border-color: var(--green-600); }
.pick img, .pick .role-mark { width: 52px; height: 52px; border-radius: 13px; flex: none; }
.pick strong { display: block; color: var(--green-900); font-size: 1.05rem; }
.pick span span { color: var(--ink-soft); font-size: .9rem; }

.guide { padding: clamp(48px, 7vw, 88px) 0; scroll-margin-top: 72px; }
.guide:nth-of-type(odd) { background: var(--green-50); border-block: 1px solid var(--line); }
.guide-head { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.guide-head img, .guide-head .role-mark { width: 64px; height: 64px; border-radius: 16px; flex: none; }
.guide-head p { color: var(--ink-soft); margin-top: 4px; }
.guide-intro { max-width: 46em; color: var(--ink-soft); margin-bottom: 32px; }
.tasks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; }
.task { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.task h3 { font-size: 1.15rem; }
.task-why { margin-top: 6px; color: var(--ink-soft); }
.steps { list-style: none; counter-reset: step; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; line-height: 1.5; min-height: 28px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--green-800); color: var(--white); font-size: .85rem; font-weight: 700;
}
.tip { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: #fdf6e3; border-left: 4px solid var(--gold); font-size: .95rem; }
.tip strong { color: var(--green-900); }
.back-top { display: inline-block; margin-top: 28px; font-weight: 600; }
.site-nav a[aria-current="page"] { color: var(--green-600); }

@media (max-width: 1000px) {
  .tasks { grid-template-columns: 1fr; max-width: 720px; }
}
@media (max-width: 760px) {
  .picker { grid-template-columns: 1fr; }
  .task { padding: 20px; }
  .guide-head img, .guide-head .role-mark { width: 52px; height: 52px; }
}
