/* ═══════════════════════════════════════════════════════════════════════════
   AiGenAgri — Global Styles
   Modern · Animated · India-first agriculture platform
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Brand green ramp */
  --brand-950:      #030d06;
  --brand-900:      #061209;
  --brand-800:      #071a0e;
  --brand-700:      #0a2413;
  --brand-600:      #0d3019;
  --brand-500:      #16a34a;
  --brand-400:      #22c55e;
  --brand-300:      #4ade80;
  --brand-200:      #86efac;
  --brand-100:      #dcfce7;
  --brand-50:       #f0fdf4;

  /* AI accent */
  --ai:             #0ea5e9;
  --ai-dark:        #0369a1;
  --ai-dim:         #e0f2fe;

  /* Semantic shortcuts */
  --primary:        var(--brand-500);
  --primary-dark:   var(--brand-700);
  --primary-deep:   var(--brand-800);
  --primary-dim:    var(--brand-100);
  --primary-glow:   rgba(22,163,74,.15);

  /* Neutral */
  --surface:        #ffffff;
  --surface-raised: #f8fafc;
  --bg:             #f0fdf4;
  --ink:            #0f172a;
  --ink-sec:        #475569;
  --muted:          #64748b;
  --placeholder:    #94a3b8;
  --border:         #e2e8f0;
  --border-focus:   var(--brand-500);
  --danger:         #ef4444;
  --warning:        #f59e0b;
  --success:        #22c55e;

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md:      0 4px 16px rgba(15,23,42,.08), 0 1px 4px rgba(15,23,42,.04);
  --shadow-lg:      0 12px 40px rgba(15,23,42,.12), 0 4px 16px rgba(15,23,42,.06);
  --shadow-xl:      0 24px 64px rgba(15,23,42,.16), 0 8px 24px rgba(15,23,42,.08);
  --shadow-primary: 0 4px 16px rgba(22,163,74,.32);
  --shadow-glow:    0 0 20px rgba(74,222,128,.35);

  /* Border radius */
  --radius-xs:      6px;
  --radius-sm:      10px;
  --radius:         14px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --radius-logo:    22px;
  --radius-pill:    9999px;

  /* Typography */
  --font:           'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Gradients */
  --grad-brand-panel: linear-gradient(150deg, #071a0e 0%, #0a2413 45%, #0d3019 100%);
  --grad-primary-btn: linear-gradient(135deg, #16a34a 0%, #0d3019 100%);
  --grad-wordmark:    linear-gradient(135deg, #4ade80, #22c55e, #86efac);
  --grad-ai-btn:      linear-gradient(135deg, #0ea5e9, #0369a1);
  --grad-hero:        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(22,163,74,.10), transparent);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Animations ─────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes shimmer {
  from { background-position: -400px 0; }
  to   { background-position: 400px 0; }
}
@keyframes pulse-ring {
  0%   { transform: scale(.9); opacity: .6; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(.9); opacity: 0; }
}
@keyframes gradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Container ──────────────────────────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
  letter-spacing: -.01em;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--sm { padding: 9px 20px; font-size: .86rem; }
.btn--primary {
  background: var(--grad-primary-btn);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn--primary:hover { box-shadow: 0 8px 28px rgba(22,163,74,.42); }
.btn--ghost {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn--ghost:hover { background: var(--primary-dim); }
.btn--ai {
  background: linear-gradient(135deg, var(--ai) 0%, #0284c7 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(14,165,233,.3);
}

/* ── Navigation ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226,232,240,.7);
  transition: box-shadow .2s ease;
}
.nav.scrolled { box-shadow: 0 4px 24px rgba(15,23,42,.06); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.nav__logo {
  display: flex;
  align-items: center;
  font-size: 1.35rem;
  font-weight: 900;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -.04em;
}
.nav__logo span { color: var(--primary); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav__links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: all .15s ease;
}
.nav__links a:hover { color: var(--ink); background: var(--surface-raised); }
.nav__links a.active { color: var(--primary); font-weight: 600; }

.nav__cta { display: flex; align-items: center; gap: 10px; }

/* Language Selector Styles */
.nav__lang {
  margin-left: 8px;
}
.lang-select-简约 {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-sec);
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  font-family: var(--font);
}
.lang-select-简约:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}
.lang-select-简约:hover {
  background: var(--surface);
  border-color: var(--muted);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(22,163,74,.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 50%, rgba(14,165,233,.07), transparent),
    var(--surface);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px; right: -60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--ai), var(--primary));
  background-size: 200% 100%;
  animation: gradientMove 4s ease infinite;
}

.hero__inner {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  animation: fadeUp .6s ease both;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-dim);
  color: var(--primary-dark);
  border: 1px solid rgba(22,163,74,.2);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: fadeUp .5s ease .1s both;
}
.hero__badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  position: relative;
}
.hero__badge-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-ring 2s ease-out infinite;
}

.hero__heading {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -.04em;
  margin-bottom: 22px;
  animation: fadeUp .5s ease .15s both;
}
.hero__heading .highlight {
  background: linear-gradient(135deg, var(--primary), var(--ai));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto 36px;
  animation: fadeUp .5s ease .2s both;
}

.hero__cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeUp .5s ease .25s both;
}

/* Google Play Store badge — used in hero, CTA, and login app-downloads.
   Image is Google's official 180x56 PNG; we just center + give it room
   to breathe. Hover lifts it like the buttons next to it. */
.play-store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  text-decoration: none;
  border-radius: 8px;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.play-store-badge img {
  display: block;
  height: 56px;
  width: auto;
}
.play-store-badge:hover  { transform: translateY(-2px); filter: brightness(1.04); }
.play-store-badge:active { transform: translateY(0); }
.play-store-badge:focus-visible {
  outline: 2px solid var(--primary, #16a34a);
  outline-offset: 3px;
}

/* Bottom CTA row that pairs the email form with the Play Store badge. */
.cta__app-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 22px;
}
.cta__app-or {
  font-size: .8rem;
  color: rgba(255,255,255,.7);
  letter-spacing: .02em;
}
.cta__app-row .play-store-badge { margin-top: 6px; }

.hero__trust {
  margin-top: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  animation: fadeUp .5s ease .35s both;
}
.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--muted);
  font-weight: 500;
}
.hero__trust-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}

/* ── AI-first section ───────────────────────────────────────────────────────── */
.ai-first {
  padding: 100px 0;
  background: var(--surface);
  position: relative;
}
.ai-first__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.ai-first__text .tag {
  display: inline-block;
  background: var(--ai-dim);
  color: #0369a1;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.ai-first__text h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -.03em;
  margin-bottom: 16px;
}
.ai-first__text p {
  color: var(--muted);
  line-height: 1.7;
  font-size: .96rem;
  margin-bottom: 28px;
}
.ai-first__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-first__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .9rem;
  color: var(--muted);
}
.ai-first__list-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary-dim);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 800;
  margin-top: 1px;
}

/* AI visual card */
.ai-first__visual {
  position: relative;
}
.ai-card {
  background: linear-gradient(135deg, #0c1f14, #0f2d1a);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.06);
  animation: float 5s ease-in-out infinite;
}
.ai-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22,163,74,.25), transparent 70%);
}
.ai-card__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(22,163,74,.15);
  border: 1px solid rgba(22,163,74,.3);
  color: #4ade80;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.ai-card__chip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
}
.ai-card__text { font-size: .96rem; line-height: 1.65; color: rgba(255,255,255,.88); }
.ai-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.ai-card__stat {
  background: rgba(255,255,255,.07);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.07);
}
.ai-card__stat-val { font-size: 1.4rem; font-weight: 800; color: #4ade80; line-height: 1; }
.ai-card__stat-lbl { font-size: .68rem; color: rgba(255,255,255,.5); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* ── Features grid ──────────────────────────────────────────────────────────── */
.features {
  padding: 100px 0;
  background: var(--surface-raised);
}
.features__header {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 56px;
}
.features__header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.features__header p { color: var(--muted); font-size: .96rem; }

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  transition: all .25s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
  animation: fadeUp .4s ease both;
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-glow), transparent 50%);
  opacity: 0;
  transition: opacity .25s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(22,163,74,.2);
}
.feature-card:hover::before { opacity: 1; }

.feature-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(22,163,74,.25);
  position: relative;
  z-index: 1;
}
.feature-card__icon svg { color: #fff; }

.feature-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  letter-spacing: -.01em;
}
.feature-card__body {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

/* ── How it works ───────────────────────────────────────────────────────────── */
.how-it-works {
  padding: 100px 0;
  background: var(--surface);
}
.how-it-works h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.03em;
  margin-bottom: 56px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-dim), var(--primary), var(--primary-dim));
}

.step {
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--radius);
  transition: var(--transition);
  animation: fadeUp .4s ease both;
  position: relative;
  background: var(--surface);
}
.step:hover { background: var(--surface-raised); transform: translateY(-4px); }

.step__num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(22,163,74,.3);
  position: relative;
  z-index: 1;
}
.step__title { font-weight: 700; color: var(--ink); margin-bottom: 8px; font-size: .95rem; }
.step__body { font-size: .84rem; color: var(--muted); line-height: 1.6; }

/* ── CTA ─────────────────────────────────────────────────────────────────────── */
.cta-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #0c1f14, #0f2d1a);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22,163,74,.18), transparent 70%);
  pointer-events: none;
}

.cta-section__inner {
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeUp .5s ease;
}
.cta-section__inner h2 {
  font-size: 2.4rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.04em;
  margin-bottom: 16px;
  line-height: 1.15;
}
.cta-section__inner p {
  color: rgba(255,255,255,.65);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.cta-section__btns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn--white {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255,255,255,.2);
}
.btn--white:hover { box-shadow: 0 8px 28px rgba(255,255,255,.3); }
.btn--outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.35);
}
.btn--outline-white:hover { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.08); }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.55);
  padding: 60px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}
.footer__brand .nav__logo { color: #fff !important; font-size: 1.3rem; }
.footer__brand p { font-size: .85rem; margin-top: 12px; line-height: 1.65; }
.footer__col h4 {
  color: rgba(255,255,255,.8);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer__col ul a {
  color: rgba(255,255,255,.45);
  text-decoration: none;
  font-size: .85rem;
  transition: color .15s;
}
.footer__col ul a:hover { color: rgba(255,255,255,.85); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .8rem;
}

/* ── Auth pages ──────────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(22,163,74,.12), transparent),
    var(--bg);
  padding: 24px;
}
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: fadeUp .35s cubic-bezier(.34,1.56,.64,1);
}
.auth-card__logo {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -.04em;
  margin-bottom: 8px;
  text-decoration: none;
  display: block;
}
.auth-card__logo span { color: var(--primary); }
.auth-card__subtitle {
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
  margin-bottom: 32px;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { font-size: .82rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; display: block; }
.auth-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  outline: none;
  transition: all .2s ease;
  color: var(--ink);
  background: var(--surface-raised);
  font-family: var(--font);
}
.auth-form input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(22,163,74,.14);
}
.auth-form .btn { margin-top: 6px; width: 100%; justify-content: center; }
.auth-form__footer {
  text-align: center;
  font-size: .84rem;
  color: var(--muted);
  margin-top: 16px;
}
.auth-form__footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-form__footer a:hover { text-decoration: underline; }

.form-alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: .84rem;
  font-weight: 500;
  animation: fadeIn .2s ease;
}
.form-alert--error   { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.form-alert--success { background: var(--primary-dim); color: var(--primary-dark); border: 1px solid #bbf7d0; }
.hidden { display: none !important; }

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.mt-4  { margin-top: 1rem; }
.mt-8  { margin-top: 2rem; }
.mb-4  { margin-bottom: 1rem; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ai-first__grid    { grid-template-columns: 1fr; gap: 40px; }
  .footer__grid      { grid-template-columns: 1fr 1fr; gap: 32px; }
  .steps::before     { display: none; }
  .hero              { padding: 72px 0 60px; }
}

@media (max-width: 640px) {
  .container       { padding: 0 18px; }
  .hero__heading   { font-size: 2rem; }
  .nav__links      { display: none; }
  .footer__grid    { grid-template-columns: 1fr; gap: 24px; }
  .features__grid  { grid-template-columns: 1fr; }
  .auth-card       { padding: 28px 22px; }
}

/* ═══════════════════════════════════════════════════════════════
   Mobile bottom navigation bar
   Used on standalone pages (expenses, capture) that don't have
   the full sidebar. Hidden on desktop (≥ 860px) where the
   sidebar takes over. Safe-area aware for iOS home indicator.
═══════════════════════════════════════════════════════════════ */
.bottom-nav {
  display: none; /* hidden on desktop */
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid #e5e7eb;
  z-index: 500;
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
}
.bottom-nav__inner {
  display: flex;
  height: 56px;
  align-items: stretch;
}
.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: #888;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .2px;
  border: none;
  background: none;
  cursor: pointer;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
.bottom-nav__item svg { flex-shrink: 0; }
.bottom-nav__item--active { color: #1a6b3a; }
.bottom-nav__item--capture { color: #1a6b3a; }

/* Show on mobile only */
@media (max-width: 860px) {
  .bottom-nav { display: block; }
  /* Prevent content from hiding behind the bottom nav bar */
  .has-bottom-nav { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
}

/* ── Site footer (frontend/js/footer.js injects markup) ─────────────────── */
.site-footer {
  margin-top: auto;
  padding: 18px 24px 22px;
  background: #0a4f23;
  color: #d1fae5;
  font-size: .8rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.site-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.site-footer__brand,
.site-footer__legal {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.site-footer__product { font-weight: 800; color: #fff; letter-spacing: -.01em; }
.site-footer__attr   { color: #a7f3d0; }
.site-footer__attr strong { color: #fff; font-weight: 700; }
.site-footer__copy   { color: #a7f3d0; }
.site-footer__sep    { color: #4ade80; opacity: .7; }
.site-footer__link {
  color: #d1fae5;
  text-decoration: none;
  transition: color .15s ease;
}
.site-footer__link:hover { color: #fff; text-decoration: underline; }

/* Push the footer to the bottom of the viewport on short pages */
html, body { min-height: 100%; }
body { display: flex; flex-direction: column; }
body > .site-footer { flex-shrink: 0; }

@media (max-width: 640px) {
  .site-footer { padding: 14px 16px 18px; font-size: .75rem; text-align: center; }
  .site-footer__inner { flex-direction: column; align-items: center; gap: 8px; }
}

/* The dashboard, admin, and auth shells already have their own scrolling
   regions — nudge them so the footer reads as a bottom rail rather than
   floating between content blocks. */
.admin-shell, .auth-page, .dashboard-shell { flex: 1 0 auto; }

/* ── Landing page (index.html) — section aliases & polish ──────────────────── */

/* "How it works" — HTML uses .how / .step__number; CSS above defined .how-it-works / .step__num */
.how {
  padding: 100px 0;
  background: var(--surface);
}
.how .section-label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.how > .container > h2 {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -.03em;
  margin-bottom: 56px;
  line-height: 1.15;
}

/* Kill default <ol> markers — only custom 01/02/03 chips should show */
.how .steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  position: relative;
}
.how .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 32px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.how .step:hover {
  background: var(--surface-raised);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.06);
}
.step__number {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(22,163,74,.3);
  flex-shrink: 0;
}
.how .step h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}
.how .step p {
  font-size: .92rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

/* CTA — HTML uses .cta / .cta__inner; CSS above defined .cta-section */
.cta {
  padding: 100px 0;
  background: linear-gradient(135deg, #0c1f14, #0f2d1a);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22,163,74,.18), transparent 70%);
  pointer-events: none;
}
.cta__inner {
  text-align: center;
  position: relative;
  z-index: 1;
}
.cta__inner h2 {
  font-size: 2.4rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.04em;
  margin-bottom: 16px;
  line-height: 1.15;
}
.cta__inner > p {
  color: rgba(255,255,255,.7);
  font-size: 1.05rem;
  margin: 0 auto 32px;
  max-width: 560px;
}
.cta__form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.cta__form input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: .95rem;
  outline: none;
  transition: var(--transition);
}
.cta__form input[type="email"]::placeholder { color: rgba(255,255,255,.5); }
.cta__form input[type="email"]:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,.14);
}
.cta__form .btn--primary { padding: 14px 26px; }
.cta__note {
  color: rgba(255,255,255,.55);
  font-size: .82rem;
  margin: 0;
}

/* Footer — HTML uses .footer__inner; CSS above defined .footer__grid */
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer .nav__logo {
  color: #fff;
  font-size: 1.25rem;
}
.footer .nav__logo span { color: var(--primary); }
.footer p {
  margin: 0;
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
}
.footer p span { display: inline; }

@media (max-width: 640px) {
  .how { padding: 64px 0; }
  .how > .container > h2 { font-size: 1.6rem; margin-bottom: 36px; }
  .cta { padding: 64px 0; }
  .cta__inner h2 { font-size: 1.7rem; }
  .footer__inner { flex-direction: column; text-align: center; }
}
