/* ============================================================
   as if : shared design system
   Aesthetic: warm editorial. Terracotta on paper. Fraunces + Hanken.
   Tokens borrowed from the product's DESIGN.md (OKLCH, terracotta).
   Used by both landing variations: /product and /skool.
   ============================================================ */
:root {
  --paper:        oklch(98.5% 0.006 70);
  --paper-2:      oklch(96.5% 0.008 70);
  --ink:          oklch(22% 0.015 50);
  --ink-soft:     oklch(42% 0.018 50);
  --ink-faint:    oklch(58% 0.016 60);
  --line:         oklch(89% 0.01 60);
  --accent:       oklch(56% 0.18 30);   /* deep terracotta */
  --accent-deep:  oklch(48% 0.17 30);
  --accent-wash:  oklch(94% 0.03 40);
  --emerald:      oklch(58% 0.12 160);

  /* persona accents (boardroom voices) */
  --p-violet:  oklch(60% 0.18 290);
  --p-amber:   oklch(72% 0.16 70);
  --p-emerald: oklch(62% 0.14 160);
  --p-rose:    oklch(64% 0.18 10);
  --p-sky:     oklch(66% 0.14 230);

  --radius: 14px;
  --maxw:   1140px;
  --ease:   cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Lenis smooth scroll (premium inertia) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }
body {
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
}

/* Grain overlay */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Atmospheric glows */
.glow { position: absolute; z-index: 0; pointer-events: none; filter: blur(70px); opacity: 0.5; border-radius: 50%; }
.glow--a { width: 520px; height: 520px; background: oklch(72% 0.16 45 / 0.55); top: -180px; right: -120px; }
.glow--b { width: 420px; height: 420px; background: oklch(80% 0.1 90 / 0.5); top: 120px; left: -160px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

h1, h2, h3, .serif { font-family: "Fraunces", Georgia, serif; font-optical-sizing: auto; }
.ital { font-style: italic; color: var(--accent); }
.eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-deep); }

/* ---------- Nav ---------- */
nav { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; position: relative; z-index: 5; }
.wordmark { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; gap: 2px; }
.wordmark em { font-style: italic; color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-link { font-size: 0.85rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; transition: color 160ms var(--ease); }
.nav-link:hover { color: var(--accent-deep); }
.nav-cta { font-size: 0.85rem; font-weight: 600; color: var(--ink); text-decoration: none; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; transition: all 160ms var(--ease); background: var(--paper); }
.nav-cta:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-1px); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: inherit; font-weight: 600; font-size: 1rem; cursor: pointer; border: none; border-radius: 999px; padding: 16px 30px; transition: transform 160ms var(--ease), box-shadow 200ms var(--ease), background 160ms var(--ease); text-decoration: none; }
.btn--primary { background: var(--accent); color: oklch(99% 0.01 70); box-shadow: 0 12px 30px -12px oklch(56% 0.18 30 / 0.7); }
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 18px 38px -12px oklch(56% 0.18 30 / 0.8); }
.btn--primary:active { transform: scale(0.975); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn .arrow { transition: transform 200ms var(--ease); }
.btn--primary:hover .arrow { transform: translateX(4px); }

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.band { padding: 86px 0; }
.band--tint { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 32ch; }
.sec-head--center { margin: 0 auto; text-align: center; }
.sec-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.08; font-weight: 600; letter-spacing: -0.02em; margin-top: 12px; }
.sec-lede { font-size: 1.08rem; color: var(--ink-soft); margin-top: 16px; max-width: 56ch; }
.sec-head--center .sec-lede { margin-left: auto; margin-right: auto; }

/* ---------- Ledger (stat cells) ---------- */
.ledger { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 46px; }
.ledger-cell { background: var(--paper); padding: 30px 26px; }
.ledger-cell .num { font-family: "Fraunces", serif; font-size: 2.4rem; font-weight: 600; color: var(--accent); line-height: 1; }
.ledger-cell h3 { font-family: "Hanken Grotesk", sans-serif; font-size: 1rem; font-weight: 700; margin: 14px 0 6px; }
.ledger-cell p { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; }
.step .idx { font-family: "Fraunces", serif; font-size: 0.85rem; font-weight: 600; color: var(--accent-deep); border: 1px solid var(--accent); border-radius: 999px; width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 18px; }
.step h3 { font-family: "Hanken Grotesk", sans-serif; font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Feature / wedge cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 50px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; transition: transform 240ms var(--ease), border-color 240ms var(--ease), box-shadow 240ms var(--ease); }
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 24px 44px -28px oklch(56% 0.18 30 / 0.5); }
.card .ico { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-wash); color: var(--accent-deep); display: grid; place-items: center; margin-bottom: 18px; }
.card h3 { font-family: "Hanken Grotesk", sans-serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 9px; }
.card p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- Chat demo (shared visual primitive) ---------- */
.demo { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 40px 80px -40px oklch(40% 0.05 50 / 0.45), 0 8px 24px -16px oklch(40% 0.05 50 / 0.3); overflow: hidden; transition: transform 400ms var(--ease); }
.demo-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.demo-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.demo-bar .label { margin-left: auto; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.demo-body { padding: 20px 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 11px; align-items: flex-start; }
.ava { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; color: white; }
.bubble { font-size: 0.92rem; line-height: 1.5; }
.bubble .who { font-weight: 700; font-size: 0.82rem; margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.bubble .badge { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-deep); background: var(--accent-wash); padding: 2px 6px; border-radius: 5px; }
.bubble p { color: var(--ink-soft); }
.cite { margin-top: 9px; display: inline-flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 600; color: var(--accent-deep); background: var(--accent-wash); border-radius: 7px; padding: 5px 9px; }
.cite svg { width: 13px; height: 13px; }

/* ---------- Form ---------- */
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 40px; max-width: 560px; margin: 44px auto 0; box-shadow: 0 30px 70px -44px oklch(40% 0.05 50 / 0.5); }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-deep); background: var(--accent-wash); padding: 7px 13px; border-radius: 999px; margin-bottom: 18px; }
.pill .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 7px; }
.field input { width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink); padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2); transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px oklch(56% 0.18 30 / 0.14); background: var(--paper); }
.field input::placeholder { color: var(--ink-faint); }
.form-card .btn--primary { width: 100%; margin-top: 6px; }
.form-fine { font-size: 0.8rem; color: var(--ink-faint); text-align: center; margin-top: 14px; }
.form-success { display: none; text-align: center; padding: 20px 0; }
.form-success.show { display: block; animation: fadeUp 400ms var(--ease); }
.form-success .check { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-deep); display: grid; place-items: center; margin: 0 auto 18px; }
.form-success h3 { font-family: "Fraunces", serif; font-size: 1.6rem; margin-bottom: 10px; }
.form-success p { color: var(--ink-soft); max-width: 38ch; margin: 0 auto; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 44px auto 0; }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; padding: 22px 0; font-family: "Fraunces", serif; font-size: 1.18rem; font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .plus { color: var(--accent); font-size: 1.4rem; transition: transform 240ms var(--ease); flex-shrink: 0; line-height: 1; }
.qa[open] summary .plus { transform: rotate(45deg); }
.qa .ans { padding: 0 0 22px; color: var(--ink-soft); font-size: 1rem; max-width: 64ch; }

/* ---------- Final CTA + footer ---------- */
.final { text-align: center; padding: 90px 0; }
.final h2 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); line-height: 1.06; font-weight: 600; letter-spacing: -0.02em; max-width: 18ch; margin: 14px auto 0; }
.final .btn { margin-top: 34px; }
footer { border-top: 1px solid var(--line); padding: 34px 0; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-row p { font-size: 0.85rem; color: var(--ink-faint); }
.foot-row a { color: var(--ink-soft); text-decoration: none; font-size: 0.85rem; }
.foot-row a:hover { color: var(--accent-deep); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.stagger { opacity: 0; animation: fadeUp 800ms var(--ease) forwards; }
.stagger:nth-child(1) { animation-delay: 0.05s; }
.stagger:nth-child(2) { animation-delay: 0.15s; }
.stagger:nth-child(3) { animation-delay: 0.25s; }
.stagger:nth-child(4) { animation-delay: 0.35s; }
.stagger:nth-child(5) { animation-delay: 0.45s; }
.hero-visual { opacity: 0; animation: fadeUp 900ms var(--ease) 0.3s forwards; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger, .hero-visual, .demo { transition: none !important; animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---------- Responsive base ---------- */
@media (max-width: 900px) {
  .ledger, .steps, .cards { grid-template-columns: 1fr; }
  .demo { transform: none !important; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .band { padding: 64px 0; }
  .form-card { padding: 28px 22px; }
  .nav-link { display: none; }
  .nav-cta { padding: 7px 13px; font-size: 0.8rem; }
}

/* ---------- Mobile + tablet only: clip decorative glow overflow (kills sideways scroll) ---------- */
@media (max-width: 1024px) {
  html, body { overflow-x: hidden; }
  .glow--a { width: 60vw; height: 60vw; right: -18vw; top: -120px; }
  .glow--b { width: 55vw; height: 55vw; left: -22vw; }
}
