/* ============================================
   NAPA STORY — Core Stylesheet
   ============================================ */

:root {
  --ink: #161512;
  --ink-soft: #211f1a;
  --ivory: #F2EDE3;
  --ivory-dim: #d8d2c4;
  --clay: #A8583C;
  --clay-bright: #c2694a;
  --gold: #C8A24B;
  --sage: #6E7257;
  --line: rgba(242, 237, 227, 0.14);
  --line-strong: rgba(242, 237, 227, 0.28);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--clay); color: var(--ivory); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4rem, 9vw, 8rem); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--gold);
  display: inline-block;
}

.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ivory-dim); font-weight: 300; max-width: 60ch; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter);
  transition: background .4s ease, padding .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(22, 21, 18, 0.85);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-block: 0.8rem;
}
.brand { display: flex; align-items: baseline; gap: 0.55rem; font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -0.01em; }
.brand .dot { color: var(--clay-bright); }
.brand small { font-family: var(--font-body); font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ivory-dim); align-self: center; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { font-size: 0.82rem; letter-spacing: 0.04em; color: var(--ivory-dim); transition: color .25s; }
.nav a:hover { color: var(--ivory); }
.nav .btn { color: var(--ink); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 30px; height: 22px; position: relative; }
.nav-toggle span { position: absolute; left: 0; width: 100%; height: 2px; background: var(--ivory); transition: .3s; }
.nav-toggle span:nth-child(1){ top: 0; } .nav-toggle span:nth-child(2){ top: 10px; } .nav-toggle span:nth-child(3){ top: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.8rem 1.5rem;
  border-radius: 2px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn-primary { background: var(--clay); color: var(--ivory); }
.btn-primary:hover { background: var(--clay-bright); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line-strong); color: var(--ivory); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.06); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding-bottom: clamp(3rem, 8vh, 7rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 80% 10%, rgba(168,88,60,0.22), transparent 55%),
    radial-gradient(90% 70% at 10% 90%, rgba(110,114,87,0.18), transparent 60%),
    linear-gradient(180deg, #1a1814 0%, #161512 60%, #12110e 100%);
  z-index: -2;
}
.hero-grain { position: absolute; inset: 0; z-index: -1; opacity: 0.5; pointer-events: none; mix-blend-mode: overlay; }

.hero-status {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ivory); margin-bottom: 2rem;
  border: 1px solid var(--line-strong); border-radius: 100px; padding: 0.5rem 1rem;
  background: rgba(22,21,18,0.4);
}
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--clay-bright); box-shadow: 0 0 0 0 rgba(194,105,74,0.6); animation: rec 2s infinite; }
@keyframes rec { 0%{box-shadow:0 0 0 0 rgba(194,105,74,.55);} 70%{box-shadow:0 0 0 12px rgba(194,105,74,0);} 100%{box-shadow:0 0 0 0 rgba(194,105,74,0);} }

.hero h1 { font-size: clamp(3rem, 9vw, 8rem); letter-spacing: -0.03em; max-width: 15ch; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero .lede { margin-top: 1.8rem; }
.hero-actions { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-meta { position: absolute; right: var(--gutter); bottom: clamp(3rem,8vh,7rem); text-align: right; display: none; }
.hero-meta .big { font-family: var(--font-display); font-size: clamp(2rem,4vw,3.4rem); color: var(--ivory); line-height: 1; }
.hero-meta .lbl { font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ivory-dim); margin-top: 0.4rem; }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding-block: 1.1rem; background: var(--ink-soft); }
.marquee-track { display: flex; gap: 3rem; white-space: nowrap; width: max-content; animation: scroll 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-family: var(--font-display); font-style: italic; font-size: clamp(1.3rem,2.4vw,2rem); color: var(--ivory-dim); display: inline-flex; align-items: center; gap: 3rem; }
.marquee span::after { content: "✦"; color: var(--clay); font-style: normal; font-size: 0.8em; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Section heading block ---------- */
.sec-head { display: grid; grid-template-columns: 1fr; gap: 1.4rem; max-width: 66ch; margin-bottom: clamp(2.5rem,5vw,4rem); }
.sec-head h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head.center .eyebrow { justify-content: center; }

/* ---------- Ethos / features ---------- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pillar { background: var(--ink); padding: clamp(1.8rem,3vw,2.6rem); position: relative; transition: background .4s; }
.pillar:hover { background: var(--ink-soft); }
.pillar .num { font-family: var(--font-display); font-size: 0.9rem; color: var(--clay-bright); letter-spacing: 0.1em; }
.pillar h3 { font-size: 1.5rem; margin: 1rem 0 0.7rem; }
.pillar p { color: var(--ivory-dim); font-size: 0.95rem; }

/* ---------- Process / how it works ---------- */
.steps { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.step { background: var(--ink); display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem,4vw,3.5rem); padding: clamp(1.8rem,3.5vw,3rem); align-items: start; }
.step .idx { font-family: var(--font-display); font-size: clamp(2.5rem,5vw,4rem); color: var(--clay); line-height: 0.8; opacity: 0.85; }
.step h3 { font-size: 1.55rem; margin-bottom: 0.6rem; }
.step p { color: var(--ivory-dim); max-width: 58ch; }

/* ---------- Model / two column revenue ---------- */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 1.5rem; }
.card {
  border: 1px solid var(--line); border-radius: 4px; padding: clamp(1.8rem,3vw,2.8rem);
  background: linear-gradient(160deg, var(--ink-soft), var(--ink));
  position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--clay); }
.card.gold::before { background: var(--gold); }
.card .tag { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.card.gold .tag { color: var(--clay-bright); }
.card h3 { font-size: 1.7rem; margin: 0.9rem 0 0.8rem; }
.card p { color: var(--ivory-dim); font-size: 0.96rem; }
.card ul { list-style: none; margin-top: 1.2rem; display: grid; gap: 0.7rem; }
.card li { display: flex; gap: 0.7rem; font-size: 0.92rem; color: var(--ivory-dim); }
.card li::before { content: "→"; color: var(--clay-bright); }

/* ---------- Slate / status board ---------- */
.slate { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 1.2rem; }
.slate-item { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--ink-soft); }
.slate-frame { aspect-ratio: 4/3; background: linear-gradient(135deg, #23211b, #191712); position: relative; display: flex; align-items: center; justify-content: center; }
.slate-frame::after { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line); }
.slate-frame .cat { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; color: var(--ivory-dim); }
.slate-corner { position: absolute; top: 12px; left: 12px; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); z-index: 2; }
.slate-body { padding: 1.2rem 1.3rem 1.5rem; }
.slate-body h4 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.slate-status { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ivory-dim); margin-top: 0.6rem; }
.slate-status .d { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
.slate-status.live .d { background: var(--clay-bright); animation: rec 2s infinite; }

/* ---------- CTA / signup ---------- */
.signup { background: linear-gradient(160deg, #1d1a15, #161512); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.signup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,5rem); align-items: center; }
.signup h2 { font-size: clamp(2rem,4.5vw,3.4rem); }
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ivory-dim); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 0.95rem; color: var(--ivory);
  background: rgba(242,237,227,0.04); border: 1px solid var(--line-strong); border-radius: 3px;
  padding: 0.85rem 1rem; transition: border-color .25s, background .25s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: rgba(242,237,227,0.07); }
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.78rem; color: var(--ivory-dim); }
.field select { appearance: none; cursor: pointer; }
.field select option { background: var(--ink); color: var(--ivory); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: #100f0c; border-top: 1px solid var(--line); padding-block: clamp(3rem,6vw,5rem) 2rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand .brand { font-size: 1.6rem; margin-bottom: 1rem; }
.footer-brand p { color: var(--ivory-dim); font-size: 0.9rem; max-width: 34ch; }
.footer-col h5 { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.1rem; font-family: var(--font-body); font-weight: 500; }
.footer-col a, .footer-col span { display: block; color: var(--ivory-dim); font-size: 0.9rem; margin-bottom: 0.6rem; transition: color .2s; }
.footer-col a:hover { color: var(--ivory); }
.socials { display: flex; gap: 1rem; margin-top: 1.4rem; }
.socials a { width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: .25s; }
.socials a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.footer-bottom { margin-top: clamp(2.5rem,5vw,4rem); padding-top: 1.6rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p, .footer-bottom a { font-size: 0.78rem; color: var(--ivory-dim); }
.footer-legal { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-legal a:hover { color: var(--ivory); }

/* ---------- Legal / content pages ---------- */
.page-hero { padding-top: clamp(8rem, 14vh, 11rem); padding-bottom: clamp(2rem,4vw,3rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.4rem,6vw,4.5rem); }
.page-hero p { color: var(--ivory-dim); margin-top: 1rem; }
.legal { max-width: 820px; }
.legal h2 { font-size: 1.6rem; margin: 2.6rem 0 0.9rem; color: var(--gold); }
.legal h3 { font-size: 1.2rem; margin: 1.8rem 0 0.6rem; font-family: var(--font-body); font-weight: 500; }
.legal p, .legal li { color: var(--ivory-dim); font-size: 0.96rem; margin-bottom: 0.9rem; }
.legal ul, .legal ol { margin: 0 0 1rem 1.3rem; }
.legal li { margin-bottom: 0.5rem; }
.legal a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.legal strong { color: var(--ivory); font-weight: 500; }
.legal .updated { display: inline-block; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ivory-dim); border: 1px solid var(--line); padding: 0.4rem 0.9rem; border-radius: 100px; margin-top: 1rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.9rem; }
.legal th, .legal td { border: 1px solid var(--line); padding: 0.7rem 0.9rem; text-align: left; color: var(--ivory-dim); }
.legal th { color: var(--ivory); font-weight: 500; background: var(--ink-soft); }
.toc { background: var(--ink-soft); border: 1px solid var(--line); border-radius: 4px; padding: 1.4rem 1.6rem; margin-bottom: 2.5rem; }
.toc h4 { font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.9rem; }
.toc ol { margin-left: 1.1rem; }
.toc a { color: var(--ivory-dim); font-size: 0.9rem; }
.toc a:hover { color: var(--gold); }

/* ---------- Sitemap page ---------- */
.map-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 2rem; }
.map-col h3 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--gold); }
.map-col a { display: block; color: var(--ivory-dim); padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; transition: color .2s, padding-left .2s; }
.map-col a:hover { color: var(--ivory); padding-left: 0.5rem; }

/* ---------- Cookie banner ---------- */
.cookie {
  position: fixed; bottom: 1.2rem; left: 1.2rem; right: 1.2rem; z-index: 200;
  max-width: 560px; margin-inline: auto;
  background: rgba(29,26,21,0.97); backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: translateY(150%); transition: transform .5s cubic-bezier(.16,1,.3,1);
}
.cookie.show { transform: translateY(0); }
.cookie p { font-size: 0.86rem; color: var(--ivory-dim); margin-bottom: 1rem; }
.cookie p a { color: var(--gold); text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.cookie .btn { padding: 0.6rem 1.2rem; font-size: 0.78rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 900px) { .hero-meta { display: block; } }

@media (max-width: 820px) {
  .nav { position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px); flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.8rem; background: var(--ink-soft); padding: 3rem; transform: translateX(100%); transition: transform .4s cubic-bezier(.16,1,.3,1); border-left: 1px solid var(--line); }
  .nav.open { transform: none; }
  .nav a { font-size: 1.1rem; }
  .nav-toggle { display: block; z-index: 101; }
  .nav-toggle.active span:nth-child(1){ top:10px; transform: rotate(45deg); }
  .nav-toggle.active span:nth-child(2){ opacity: 0; }
  .nav-toggle.active span:nth-child(3){ top:10px; transform: rotate(-45deg); }
  .signup-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .footer-top { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 0.8rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
