/* ============================================================
   Granary marketing site — mirrors the app's brand theme.
   Palette & type sampled from the app (src/theme.ts).
   ============================================================ */
:root {
  --forest: #0b3b28;
  --forest-deep: #062a1d;
  --amber: #e19a2e;
  --amber-deep: #b97a17;
  --amber-soft: #f7e7c3;
  --cream: #faf5e9;
  --cream-deep: #f1e9d3;
  --paper: #ffffff;
  --terracotta: #c4693b;
  --terracotta-soft: #f7decd;
  --ink: #1d2620;
  --muted: #68766c;
  --faint: #9aa5a0;
  --line: #e7dfc8;
  --success: #2e7d4f;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-card: 0 2px 10px rgba(11, 59, 40, 0.06);
  --shadow-lift: 0 6px 18px rgba(11, 59, 40, 0.12);
  --shadow-phone: 0 24px 60px rgba(11, 59, 40, 0.22);

  --font-display: "Baloo 2", "Quicksand", system-ui, sans-serif;
  --font-body: "Quicksand", system-ui, -apple-system, sans-serif;

  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(3rem, 9vw, 5.25rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0 0 1em; }

a { color: inherit; }

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

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin: 0 0 12px;
}

.section { padding: 88px 0; }
.section-tint { background: var(--cream-deep); }
.section-lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 620px;
  margin: 0 0 40px;
}

/* ---------- Buttons (chunky, rounded — like the app) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  padding: 14px 28px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.btn-sm { padding: 10px 20px; font-size: 0.9rem; }

.btn-primary {
  background: var(--amber);
  color: var(--forest-deep);
  box-shadow: var(--shadow-card);
}
.btn-primary:hover { background: var(--amber-deep); color: #fff; box-shadow: var(--shadow-lift); }

.btn-ghost {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}
.btn-ghost:hover { background: var(--forest); color: var(--cream); }

.btn-terracotta {
  background: var(--terracotta);
  color: #fff;
  box-shadow: var(--shadow-card);
}
.btn-terracotta:hover { filter: brightness(1.07); box-shadow: var(--shadow-lift); }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 12px 0;
  z-index: 200;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 245, 233, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 18px rgba(11, 59, 40, 0.07);
}
.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--forest);
  letter-spacing: -0.01em;
}
.nav-links { display: none; gap: 28px; }
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--forest); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-cta .btn { display: none; }
.nav-toggle {
  display: inline-flex;
  background: none;
  border: none;
  color: var(--forest);
  padding: 8px;
  cursor: pointer;
  border-radius: 10px;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 20px 20px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a:not(.btn) {
  text-decoration: none;
  font-weight: 600;
  padding: 10px 4px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.mobile-menu .btn { margin-top: 12px; }

@media (min-width: 820px) {
  .nav-links { display: flex; }
  .nav-cta .btn { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 120px;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}
.blob-1 {
  width: 420px; height: 420px;
  background: var(--amber-soft);
  top: -140px; right: -120px;
  opacity: 0.9;
}
.blob-2 {
  width: 300px; height: 300px;
  background: var(--terracotta-soft);
  bottom: 40px; left: -110px;
  opacity: 0.7;
}
.blob-3 {
  width: 180px; height: 180px;
  background: #dceef5;
  top: 42%; left: 44%;
  opacity: 0.5;
}
.hero-arch {
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 64px;
  background: var(--cream-deep);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  opacity: 0.55;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  gap: 56px;
  align-items: center;
}
@media (min-width: 920px) {
  .hero { padding: 88px 0 140px; }
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; gap: 40px; }
}
.hero-copy h1 { margin-bottom: 18px; }
.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.hero-note { font-size: 0.9rem; color: var(--faint); font-weight: 600; margin: 0; }

/* ---------- Phone mockup ---------- */
.hero-phone { display: flex; justify-content: center; }
.phone {
  width: 300px;
  background: #10231b;
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow-phone);
  animation: float 5.5s ease-in-out infinite;
  position: relative;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-14px) rotate(1deg); }
}
.phone-notch {
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 24px;
  background: #10231b;
  border-radius: var(--r-pill);
  z-index: 2;
}
.phone-screen {
  background: var(--cream);
  border-radius: 34px;
  overflow: hidden;
  padding: 14px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 560px;
}
.mini-topbar { display: flex; align-items: center; gap: 7px; padding: 26px 4px 0; }
.mini-mark { border-radius: 8px; }
.mini-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--forest);
}
.mini-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper);
  border-radius: var(--r-pill);
  padding: 9px 14px;
  font-size: 0.72rem;
  color: var(--faint);
  box-shadow: var(--shadow-card);
}
.mini-toggle {
  display: flex;
  background: var(--cream-deep);
  border-radius: var(--r-pill);
  padding: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}
.mini-toggle span { flex: 1; text-align: center; padding: 6px 0; border-radius: var(--r-pill); color: var(--muted); }
.mini-toggle .on { background: var(--paper); color: var(--forest); box-shadow: var(--shadow-card); }
.mini-cards { display: flex; flex-direction: column; gap: 10px; }
.mini-card {
  background: var(--paper);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.mini-card-top {
  background: var(--tint);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
}
.mini-ico {
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  display: flex; align-items: center; justify-content: center;
  color: var(--tintfg);
}
.mini-ico svg { width: 24px; height: 24px; }
.mini-card-meta p {
  margin: 4px 0 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--tintfg);
}
.mini-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  background: var(--paper);
  color: var(--forest);
  border-radius: var(--r-pill);
  padding: 2px 8px;
  margin-right: 4px;
}
.mini-card-body { padding: 10px 12px 12px; }
.mini-card-body h4 {
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.mini-person {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.66rem; color: var(--muted); font-weight: 600;
}
.mini-avatar {
  width: 20px; height: 20px; flex: none;
  border-radius: 50%;
  background: var(--forest);
  color: var(--amber-soft);
  font-size: 0.6rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.mini-dist { margin-left: auto; color: var(--faint); }
.mini-tabbar {
  margin-top: auto;
  display: flex; justify-content: space-around;
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 10px 0;
  box-shadow: var(--shadow-card);
}
.mini-tabbar span { width: 26px; height: 6px; border-radius: 3px; background: var(--line); }
.mini-tabbar .on { background: var(--amber); }

/* ---------- How it works cards ---------- */
.cards3 {
  display: grid;
  gap: 20px;
}
@media (min-width: 820px) { .cards3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative;
  background: var(--paper);
  border-radius: var(--r-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.step-num {
  position: absolute;
  top: 20px; right: 24px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--cream-deep);
  line-height: 1;
}
.card-ico {
  width: 60px; height: 60px;
  border-radius: 20px;
  background: var(--tint);
  color: var(--tintfg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.card-ico svg { width: 30px; height: 30px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* ---------- Shelf category chips ---------- */
.chip-grid {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 820px) { .chip-grid { grid-template-columns: repeat(3, 1fr); } }
.chip {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chip-ico {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--tintfg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.chip-ico svg { width: 26px; height: 26px; }
.chip-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.chip-sub { font-size: 0.88rem; color: var(--muted); }
.shelf-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--amber-soft);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  font-weight: 600;
  color: #6b4a10;
  margin: 0;
  font-size: 0.98rem;
}
.shelf-note svg { flex: none; }

/* ---------- Dignity strip ---------- */
.dignity {
  background: var(--forest);
  color: var(--cream);
  padding: 96px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dignity::before,
.dignity::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(225, 154, 46, 0.08);
  pointer-events: none;
}
.dignity::before { width: 380px; height: 380px; top: -190px; left: -120px; }
.dignity::after { width: 300px; height: 300px; bottom: -150px; right: -90px; }
.dignity-mark {
  border-radius: 18px;
  margin: 0 auto 28px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}
.dignity-line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 2.9rem);
  line-height: 1.2;
  max-width: 800px;
  margin: 0 auto 16px;
  color: var(--cream);
}
.dignity-sub {
  color: var(--amber-soft);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
  opacity: 0.85;
}

/* ---------- Rules ---------- */
.rules-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .rules-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .rules-grid { grid-template-columns: repeat(4, 1fr); } }
.rule {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow-card);
}
.rule-ico {
  width: 48px; height: 48px;
  border-radius: 16px;
  background: var(--forest);
  color: var(--amber);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.rule-ico svg { width: 24px; height: 24px; }
.rule h3 { font-size: 1.08rem; margin-bottom: 8px; }
.rule p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* ---------- Pilot ---------- */
.pilot { background: var(--cream-deep); }
.pilot-inner {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 920px) { .pilot-inner { grid-template-columns: 1.1fr 0.9fr; } }
.pilot-inner p { color: var(--muted); font-size: 1.05rem; max-width: 520px; }
.pilot-card {
  background: var(--forest);
  color: var(--cream);
  border-radius: var(--r-xl);
  padding: 44px 36px;
  text-align: center;
  box-shadow: var(--shadow-lift);
  position: relative;
  overflow: hidden;
}
.pilot-card::before {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(225, 154, 46, 0.12);
  top: -130px; right: -80px;
}
.pilot-pin {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--forest-deep);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.pilot-pin svg { width: 36px; height: 36px; }
.pilot-zip {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  margin: 0 0 8px;
  color: var(--cream);
}
.pilot-sub { color: var(--amber-soft); opacity: 0.85; margin: 0 0 24px; font-size: 0.98rem; }
.pilot-dots { display: flex; justify-content: center; gap: 8px; }
.pilot-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(225, 154, 46, 0.35); }
.pilot-dots span:first-child { background: var(--amber); }

/* ---------- Support ---------- */
.support { text-align: center; }
.support .section-lede { margin-left: auto; margin-right: auto; }
.support-note { margin-top: 18px; color: var(--faint); font-size: 0.9rem; font-weight: 600; }

/* ---------- Footer ---------- */
.footer {
  background: var(--forest-deep);
  color: var(--cream);
  padding: 56px 0 32px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.footer .brand-word { color: var(--cream); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; }
.footer-links a {
  text-decoration: none;
  color: var(--amber-soft);
  font-weight: 600;
  font-size: 0.92rem;
  opacity: 0.85;
}
.footer-links a:hover { opacity: 1; color: var(--amber); }
.footer-email {
  font-weight: 700;
  color: var(--amber);
  text-decoration: none;
  font-size: 1.02rem;
}
.footer-email:hover { text-decoration: underline; }
.footer-copy { color: rgba(250, 245, 233, 0.55); font-size: 0.85rem; margin: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }
.cards3 .reveal:nth-child(2), .chip-grid .reveal:nth-child(2), .chip-grid .reveal:nth-child(5) { transition-delay: 0.08s; }
.cards3 .reveal:nth-child(3), .chip-grid .reveal:nth-child(3), .chip-grid .reveal:nth-child(6) { transition-delay: 0.16s; }
.rules-grid .reveal:nth-child(2) { transition-delay: 0.07s; }
.rules-grid .reveal:nth-child(3) { transition-delay: 0.14s; }
.rules-grid .reveal:nth-child(4) { transition-delay: 0.21s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone { animation: none; }
}
