/* Bowcast landing: the front door. "The interactive edition of a field
   almanac." Paper and ink, spectral with restraint, honest uncertainty, light
   and dark. Dark-mode token overrides live in theme.css. */

:root {
  --font: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --display: 'Instrument Serif', Georgia, serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;

  --paper: #f5f2ea; --paper-2: #ece7db; --plaque: #fbf9f4;
  --line: #d8d2c4; --line-soft: #e6e0d3; --ink: #232a35; --muted: #5d6675;

  --color-none: #a9a294; --color-low: #7a68d9; --color-moderate: #2f9e8f;
  --color-good: #dd9f2e; --color-high: #d95f52;
  --text-none: #6f6a5e; --text-low: #5b48c2; --text-moderate: #22766b;
  --text-good: #9c6d10; --text-high: #b0392e;

  --violet: #7a68d9; --teal: #2f9e8f; --amber: #e0922e; --red: #d1495b;
  --accent: #6f5bd6;

  --shadow-sm: 0 1px 3px rgba(35, 42, 53, .12), 0 1px 2px rgba(35, 42, 53, .06);
  --shadow-md: 0 6px 18px rgba(35, 42, 53, .16);
  --radius: 12px;

  /* Faux-basemap surfaces (the map illustration) */
  --map-land: #e9e4d7;
  --map-water: #dcdccb;
  --map-road: #f3efe6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--text-low); text-decoration: none; }
a:hover { color: var(--text-moderate); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; }
.wrap { max-width: 1180px; margin: 0 auto; }
.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 18px;
}
.eyebrow.rule { display: flex; align-items: center; gap: 10px; }
.eyebrow.rule::before { content: ""; width: 22px; height: 1px; background: var(--muted); }

/* ── Header ─────────────────────────────────────────────── */
.lp-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand:hover { color: inherit; }
.brand svg { width: 34px; height: 22px; }
.brand span { font-family: var(--display); font-size: 1.4rem; color: var(--ink); }
.head-right { display: flex; align-items: center; gap: 14px; }
.lp-nav { display: flex; gap: 18px; font-size: 0.9rem; }
.lp-nav a { color: var(--text-low); }
.lp-nav a:hover { color: var(--text-moderate); }

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 9px; min-height: 52px;
  padding: 0 24px; border-radius: 999px; font-size: 1rem; font-weight: 600;
  transition: transform .15s, border-color .15s, background .15s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { color: var(--paper); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--muted); }
.link-arrow { font-size: 0.9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.link-arrow span { transition: transform .15s; }
.link-arrow:hover span { transform: translateX(4px); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px;
  align-items: center; padding: 60px 32px 40px;
}
.hero h1 {
  font-size: clamp(46px, 6.4vw, 84px); line-height: .98;
  margin: 0 0 24px; letter-spacing: -.02em;
}
.hero .lede { font-size: 1.15rem; line-height: 1.6; color: var(--muted); max-width: 52ch; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-stats { display: flex; gap: 26px; margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.hero-stats .num { font-family: var(--display); font-size: 30px; line-height: 1; }
.hero-stats .cap { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

.reading-plaque {
  background: var(--plaque); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-md); padding: 26px;
}
.reading-plaque .rp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.rp-place { font-family: var(--mono); font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rp-gauge { display: flex; justify-content: center; padding: 10px 0 4px; }
.rp-foot {
  display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--muted);
  margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.rp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); flex-shrink: 0; }

/* Level chip (level word on a tinted pill) */
.chip {
  font-size: 0.75rem; font-weight: 600; border-radius: 20px; padding: 4px 11px;
  text-transform: capitalize;
}
.chip.good { color: var(--text-good); background: color-mix(in srgb, var(--color-good) 16%, transparent); }
.chip.strong { color: var(--text-high); background: color-mix(in srgb, var(--color-high) 15%, transparent); }
.chip.fair { color: var(--text-moderate); background: color-mix(in srgb, var(--color-moderate) 14%, transparent); }
.chip.slim { color: var(--text-low); background: color-mix(in srgb, var(--color-low) 14%, transparent); }
.chip.unlikely { color: var(--text-none); background: color-mix(in srgb, var(--color-none) 14%, transparent); }

/* ── Section scaffold ───────────────────────────────────── */
.section { padding: 56px 32px; border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 40px; letter-spacing: -.01em; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.section-head h2 { margin: 0; font-size: clamp(28px, 3.6vw, 40px); }

/* ── Ingredients ────────────────────────────────────────── */
.ingredients-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ingredient { background: var(--plaque); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.ingredient .art { height: 72px; margin-bottom: 18px; display: flex; align-items: flex-end; }
.ingredient .tag { font-family: var(--mono); font-size: 0.7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-moderate); margin-bottom: 8px; }
.ingredient h3 { font-size: 1.44rem; margin: 0 0 8px; }
.ingredient p { font-size: 0.875rem; line-height: 1.6; color: var(--muted); margin: 0; }

/* ── Instrument preview ─────────────────────────────────── */
.preview-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.preview-copy h2 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 18px; letter-spacing: -.01em; }
.preview-copy p { font-size: 1rem; line-height: 1.65; color: var(--muted); margin: 0 0 24px; max-width: 46ch; }
.preview-steps { display: flex; flex-direction: column; gap: 14px; }
.preview-step { display: flex; gap: 12px; align-items: flex-start; }
.preview-step .k { font-family: var(--mono); font-size: 0.7rem; border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; margin-top: 2px; }
.preview-step:nth-child(1) .k { color: var(--text-low); }
.preview-step:nth-child(2) .k { color: var(--text-moderate); }
.preview-step:nth-child(3) .k { color: var(--text-good); }
.preview-step .body { font-size: 0.875rem; color: var(--ink); line-height: 1.5; }
.preview-step .body strong { font-weight: 600; }

.map-mock {
  background: var(--map-water); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-md); overflow: hidden; aspect-ratio: 4 / 3; position: relative;
}
.map-mock .basemap { position: absolute; inset: 0; }
.map-mock .map-attr {
  position: absolute; right: 10px; bottom: 8px;
  font-family: var(--mono); font-size: 0.65rem; color: var(--muted);
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  border-radius: 5px; padding: 3px 7px;
}
.map-mock .youhere {
  position: absolute; left: 16px; top: 16px; display: flex; gap: 8px; align-items: center;
  background: var(--plaque); border: 1px solid var(--line); border-radius: 20px; padding: 7px 13px;
  font-size: 0.75rem; color: var(--muted); box-shadow: var(--shadow-sm);
}
.map-mock .youhere .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.map-mock .g { position: absolute; }

/* ── Worldwide-now teaser ───────────────────────────────── */
.city-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.city-card {
  background: var(--plaque); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.city-card .cc-top { display: flex; justify-content: space-between; align-items: center; }
.city-card .cc-rank { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.city-card .cc-level { font-size: 0.7rem; font-weight: 600; text-transform: capitalize; }
.city-card .cc-gauge { display: flex; justify-content: center; }
.city-card .cc-body { text-align: center; }
.city-card .cc-pct { font-family: var(--display); font-size: 26px; line-height: 1; }
.city-card .cc-name { font-size: 0.8rem; color: var(--ink); margin-top: 5px; }
.city-card .cc-country { font-size: 0.7rem; color: var(--muted); }

/* ── Citizen science ────────────────────────────────────── */
.calibrate-panel {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 18px; padding: 44px;
  display: grid; grid-template-columns: 1fr .8fr; gap: 40px; align-items: center;
}
.calibrate-panel .eyebrow { color: var(--text-moderate); }
.calibrate-panel h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 16px; letter-spacing: -.01em; }
.calibrate-panel p { font-size: 1rem; line-height: 1.65; color: var(--muted); margin: 0; max-width: 48ch; }
.calibrate-card { background: var(--plaque); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.calibrate-card .cc-lead { font-size: 0.8rem; color: var(--muted); margin-bottom: 14px; }
.calibrate-actions { display: flex; gap: 10px; }
.sight-btn {
  flex: 1; min-height: 48px; cursor: pointer; border-radius: 10px;
  font-family: var(--font); font-size: 0.875rem; font-weight: 600;
  border: 1px solid var(--line); background: var(--paper-2); color: var(--ink);
  transition: all .2s ease;
}
.sight-btn:hover { border-color: var(--muted); }
.sight-btn.on-saw { border-color: var(--color-high); background: color-mix(in srgb, var(--color-high) 18%, transparent); color: var(--text-high); }
.sight-btn.on-none { border-color: var(--text-none); background: color-mix(in srgb, var(--color-none) 20%, transparent); color: var(--text-none); }
.sight-demo {
  flex: 1; min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 0.875rem; font-weight: 600;
  border: 1px dashed var(--line); background: var(--paper-2); color: var(--muted);
}
.calibrate-status { margin-top: 14px; font-size: 0.8rem; color: var(--muted); min-height: 20px; line-height: 1.55; }
.calibrate-cta { margin-top: 16px; min-height: 46px; font-size: 0.9rem; }
.teaser-note { font-size: 0.8rem; color: var(--muted); margin: 14px 0 0; }

/* ── Footer ─────────────────────────────────────────────── */
.lp-foot { padding: 44px 32px 60px; border-top: 1px solid var(--line); }
.foot-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 28px; }
.foot-about { max-width: 34ch; }
.foot-about .brand { margin-bottom: 12px; }
.foot-about p { font-size: 0.8rem; color: var(--muted); line-height: 1.6; margin: 0; }
.foot-cols { display: flex; gap: 56px; }
.foot-col { display: flex; flex-direction: column; gap: 9px; }
.foot-col .h { font-family: var(--mono); font-size: 0.7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.foot-col a { font-size: 0.875rem; }
.foot-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.75rem; color: var(--muted);
}
.foot-bottom .app { font-family: var(--mono); letter-spacing: .08em; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 44px 24px 32px; }
  .reading-plaque { max-width: 420px; }
  .ingredients-grid { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: 1fr; gap: 32px; }
  .city-grid { grid-template-columns: repeat(2, 1fr); }
  .calibrate-panel { grid-template-columns: 1fr; gap: 28px; padding: 32px; }
  .section { padding: 44px 24px; }
  .lp-head { padding: 14px 20px; }
  .lp-foot { padding: 40px 24px 56px; }
}
@media (max-width: 560px) {
  .lp-nav { display: none; }
  .hero-stats { gap: 18px; }
  .city-grid { grid-template-columns: 1fr; }
  .foot-cols { gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-primary, .btn-ghost, .sight-btn, .link-arrow span { transition: none; }
}
