/* ============================================================
   Krishi AI — site stylesheet
   Design language: dawn-field hero (deep green → wheat gold)
   giving way to a warm paper body. Mono type marks anything
   that is a real number pulled from the mandi (market).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --field-deep: #16220C;
  --field: #2E6510;
  --field-bright: #4C8A1E;
  --wheat: #E3A93E;
  --wheat-soft: #F0CE8C;
  --paper: #F4EFE1;
  --paper-raised: #FFFFFF;
  --ink: #1B2410;
  --ink-soft: #55604A;
  --line: rgba(27, 36, 16, 0.14);
  --sky: #3B7EA6;
  --clay: #B5482F;

  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --max: 1100px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--field-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Nav ---------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--field-deep);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(155deg, var(--wheat) 0%, var(--field-bright) 78%);
  display: grid;
  place-items: center;
  font-size: 15px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(244,239,225,0.78);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.is-current {
  color: var(--wheat);
}

/* ---------------- Hero ---------------- */

.hero {
  background:
    radial-gradient(120% 140% at 15% -10%, rgba(76,138,30,0.55), transparent 55%),
    linear-gradient(180deg, var(--field-deep) 0%, #1D2E10 100%);
  color: var(--paper);
  padding: 76px 0 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: 20px;
  max-width: 720px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wheat);
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--wheat);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero h1 em {
  font-style: normal;
  color: var(--wheat);
}

.hero p.lede {
  font-size: 18px;
  color: rgba(244,239,225,0.82);
  max-width: 54ch;
  margin: 0;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 22px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--wheat);
  color: var(--field-deep);
}

.btn-primary:hover {
  box-shadow: 0 10px 24px -8px rgba(227,169,62,0.55);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(244,239,225,0.35);
  color: var(--paper);
}

.btn-ghost:hover {
  border-color: var(--wheat);
}

/* ---------------- Mandi ticker (signature element) ---------------- */

.ticker-shell {
  margin-top: 56px;
  border-top: 1px solid rgba(244,239,225,0.14);
  background: rgba(0,0,0,0.16);
}

.ticker-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244,239,225,0.55);
  padding: 10px 24px 0;
  max-width: var(--max);
  margin: 0 auto;
}

.ticker-track-wrap {
  overflow: hidden;
  padding: 8px 0 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 36px;
  animation: ticker-scroll 32s linear infinite;
  padding: 0 18px;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.tick {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
  color: rgba(244,239,225,0.9);
}

.tick .crop { color: var(--wheat-soft); font-weight: 500; }
.tick .price { font-weight: 600; }
.tick .up { color: #8FD16A; }
.tick .down { color: #E88A73; }

/* ---------------- Sections ---------------- */

section {
  padding: 88px 0;
}

.section-head {
  max-width: 60ch;
  margin: 0 0 44px;
}

.section-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--field);
  margin: 0 0 10px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--ink);
}

.section-head p {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0;
}

/* Flow / how-it-works: real sequence, numbering earned */

.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.flow-step {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
}

.flow-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--field);
  background: rgba(46,101,16,0.09);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.flow-step h3 {
  font-family: var(--display);
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--ink);
}

.flow-step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}

.flow-connector {
  display: none;
}

/* Feature grid */

.features {
  background: var(--paper-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.feature-card {
  background: var(--paper-raised);
  padding: 28px 26px;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 17px;
  background: rgba(227,169,62,0.16);
  color: var(--field);
}

.feature-card h3 {
  font-family: var(--display);
  font-size: 15.5px;
  margin: 0 0 6px;
  color: var(--ink);
}

.feature-card p {
  margin: 0;
  font-size: 13.8px;
  color: var(--ink-soft);
}

/* Languages strip */

.lang-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.lang-chip {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--paper);
}

/* CTA band */

.cta-band {
  background:
    radial-gradient(90% 140% at 85% 0%, rgba(227,169,62,0.16), transparent 60%),
    var(--field-deep);
  color: var(--paper);
  border-radius: 22px;
  margin: 0 24px;
  padding: 56px 40px;
  text-align: center;
  max-width: calc(var(--max) - 48px);
  margin-left: auto;
  margin-right: auto;
}

.cta-band h2 {
  font-family: var(--display);
  font-size: clamp(24px, 4vw, 32px);
  margin: 0 0 12px;
}

.cta-band p {
  color: rgba(244,239,225,0.78);
  max-width: 48ch;
  margin: 0 auto 26px;
}

.badge-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(244,239,225,0.08);
  border: 1px solid rgba(244,239,225,0.24);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13.5px;
}

.store-badge .store-sub {
  display: block;
  font-size: 10.5px;
  color: rgba(244,239,225,0.6);
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.store-badge .store-main {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14.5px;
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 32px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.footer-tag {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin-top: 6px;
  max-width: 32ch;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 13.8px;
}

.footer-links a:hover { color: var(--field); }

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-soft);
  font-family: var(--mono);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------------- Legal (Privacy / Terms) pages ---------------- */

.legal-header {
  background: var(--field-deep);
  color: var(--paper);
  padding: 52px 0 40px;
}

.legal-header .wrap { max-width: 760px; }

.legal-header h1 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 38px);
  margin: 0 0 10px;
}

.legal-meta {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--wheat-soft);
  letter-spacing: 0.04em;
}

.legal-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.legal-content {
  font-size: 15.5px;
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.75;
}

.legal-content strong,
.legal-content b {
  font-family: var(--display);
}

.legal-state {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  padding: 40px 0;
}

/* Zaroori: yeh genuinely-zaroori-hai — .legal-state ka apna "display:flex"
   genuinely browser ke [hidden]-attribute-ko-override kar raha tha, isliye
   loading-spinner genuinely gayab hi nahi ho raha tha content load hone ke
   baad bhi */
.legal-state[hidden] {
  display: none;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--field);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--field);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 18px;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 860px) {
  .flow,
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .cta-band { padding: 44px 24px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding-top: 56px; }
  section { padding: 64px 0; }
  .footer-grid { flex-direction: column; }
}
