/* forage.life/websites — the postcard's journey. Same design system as the valley:
   dark glass, Bricolage display, ember accent. House rules: no cream page backgrounds,
   no italic accent words, no numbered section labels, no monospace, no pill buttons. */

:root {
  --text: #f6f3ee;
  --muted: rgba(246, 243, 238, 0.76);
  --faint: rgba(246, 243, 238, 0.52);
  --ember: #ff7a21;
  --ember-hot: #ff9a4d;
  --ember-ink: #1c0f05;
  --glass: rgba(13, 17, 32, 0.58);
  --glass-strong: rgba(10, 13, 25, 0.82);
  --line: rgba(255, 255, 255, 0.14);
  --gold: #ffd16e;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Instrument Sans", "Avenir Next", system-ui, sans-serif;
  --gutter: 16px;
  --p: 0;
}

* { box-sizing: border-box; }
html { background: #0e1530; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; }
::selection { background: var(--ember); color: var(--ember-ink); }
:focus-visible { outline: 2px solid var(--ember-hot); outline-offset: 3px; }

/* ---------- the stage: dusk gradient + transparent WebGL canvas ---------- */
.stage-wrap {
  position: fixed; inset: 0; z-index: 0;
  background-color: #0e1530;
  background-image:
    radial-gradient(70% 55% at 50% 30%, hsla(calc(22 + var(--p) * 2.5), 88%, 58%, calc(0.26 - var(--p) * 0.012)), transparent 62%),
    radial-gradient(120% 70% at 0% 0%, rgba(38, 57, 106, 0.9), transparent 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(92, 44, 78, 0.55), transparent 60%),
    linear-gradient(180deg, #111a3a 0%, #151a3a 48%, #1b1631 100%);
}
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Labels pinned to 3D props (positioned by scene.js). */
.labels { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.plabel {
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(10, 13, 23, 0.78);
  border: 1px solid var(--line);
  font: 600 12.5px/1.2 var(--body);
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: transform;
}
.plabel::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); }
.plabel.is-on { opacity: 1; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: linear-gradient(180deg, rgba(10, 14, 30, 0.7), rgba(10, 14, 30, 0));
}
.wordmark { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.wordmark span { color: var(--ember); }
.topnav { display: flex; align-items: center; gap: 2px; }
.navlink, .navbtn { font-size: 14px; font-weight: 600; text-decoration: none; padding: 10px 11px; border-radius: 8px; }
.navlink:hover { background: rgba(255, 255, 255, 0.08); }
.navlink--wide { display: none; }
.navbtn { background: rgba(255, 255, 255, 0.92); color: #111623; padding: 10px 14px; margin-left: 4px; }
.navbtn:hover { background: #fff; }

/* ---------- buttons (rectangles, never pills) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border-radius: 8px;
  font-weight: 650; font-size: 15px;
  text-decoration: none; text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary { background: var(--ember); color: var(--ember-ink); }
.btn--primary:hover { background: var(--ember-hot); }
.btn--ghost { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.3); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.52); }
.btn--block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.actions--center { justify-content: center; }

/* ---------- beats (phones first: the 3D subject lives in the top of the screen) ---------- */
main { position: relative; z-index: 3; pointer-events: none; }
main a, main button, main details, main summary, .panel, .pricing, .faq, .final, .footer { pointer-events: auto; }
.beat { position: relative; padding: 0 var(--gutter); }
.beat--story { min-height: 170vh; padding-top: 54vh; }
.beat[data-beat="usual"] { min-height: 130vh; padding-top: 50vh; }
.beat[data-beat="trust"] { min-height: 110vh; padding-top: 40vh; }

.panel {
  width: 100%;
  max-width: 480px;
  padding: 22px 20px 20px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}
.beat--story .panel, .beat[data-beat="usual"] .panel { position: sticky; top: 52vh; }
.kicker { margin: 0 0 8px; font-size: 13px; font-weight: 650; letter-spacing: 0.01em; color: var(--ember-hot); }
.panel-title, .section-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 720;
  font-size: clamp(28px, 7.4vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.panel-lede, .section-lede { margin: 12px 0 0; color: var(--muted); font-size: 16.5px; }
.panel-more { margin: 16px 0 0; font-size: 14px; color: var(--faint); }
.panel-more a, .pricing-foot a, .faq a { color: var(--text); text-underline-offset: 3px; }
.sample-disclosure {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40;
  width: fit-content; max-width: calc(100% - 2 * var(--gutter));
  margin: 0; padding: 8px 12px; border-radius: 8px;
  background: #0b0f1a; color: var(--muted); pointer-events: none;
}
.sample-disclosure[hidden], .after-story .sample-disclosure { display: none; }

/* ---------- hero ---------- */
.beat--hero { min-height: 118vh; }
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 48svh 0 6svh;
  max-width: 700px;
}
.eyebrow { margin: 0 0 12px; font-weight: 600; font-size: 14px; color: var(--muted); }
.hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 760;
  font-size: clamp(42px, 12vw, 108px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(10, 14, 32, 0.35);
}
.hero-lede { margin: 18px 0 0; max-width: 540px; font-size: clamp(16.5px, 4.3vw, 20px); }
.hero-note { margin: 18px 0 0; font-size: 14px; color: var(--faint); max-width: 460px; }
.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 600; color: var(--muted); }
.ticks li, .offer-list li, .compare li { position: relative; padding-left: 20px; }
.ticks li::before, .offer-list li::before, .compare-col--this li::before {
  content: ""; position: absolute; left: 2px; top: 0.42em;
  width: 9px; height: 5px;
  border-left: 2px solid var(--ember-hot); border-bottom: 2px solid var(--ember-hot);
  transform: rotate(-45deg);
}

/* ---------- the usual way vs this way ---------- */
.compare { display: grid; gap: 14px; margin-top: 18px; }
.compare-col { padding: 14px 16px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.compare-col h3 { margin: 0 0 8px; font-size: 14px; font-weight: 650; color: var(--faint); }
.compare-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; color: var(--faint); }
.compare-col:not(.compare-col--this) li::before {
  content: ""; position: absolute; left: 3px; top: 0.72em; width: 9px; height: 2px; background: rgba(255, 255, 255, 0.35);
}
.compare-col--this { background: rgba(255, 122, 33, 0.08); border-color: rgba(255, 154, 77, 0.45); }
.compare-col--this h3 { color: var(--ember-hot); }
.compare-col--this ul { color: var(--text); }

/* ---------- pricing ---------- */
.beat--pricing { padding-top: 16vh; padding-bottom: 10vh; }
.pricing { max-width: 1060px; margin: 0 auto; }
.pricing-head { max-width: 640px; margin-bottom: 26px; }
.offers, .plans { display: grid; gap: 14px; }
.offer, .plan {
  display: flex; flex-direction: column;
  padding: 24px 20px 20px;
  border-radius: 14px;
  background: var(--glass-strong);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.offer { border-top: 2px solid var(--ember); }
.offer-name, .plan-name { margin: 0; font-size: 15px; font-weight: 650; color: var(--muted); }
.offer-price, .plan-price { margin: 6px 0 0; display: flex; align-items: baseline; gap: 8px; }
.offer-price b { font-family: var(--display); font-weight: 760; font-size: 56px; line-height: 1; letter-spacing: -0.035em; }
.plan-price b { font-family: var(--display); font-weight: 720; font-size: 34px; line-height: 1; letter-spacing: -0.03em; }
.offer-price span, .plan-price span { font-size: 14px; color: var(--faint); font-weight: 600; }
.offer-list { list-style: none; margin: 18px 0 22px; padding: 16px 0 0; display: grid; gap: 8px; border-top: 1px solid var(--line); font-size: 15px; flex: 1; }
.plans-title { margin: 34px 0 12px; font-size: 15px; font-weight: 650; color: var(--muted); }
.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plan-head .plan-price { margin: 0; }
.pricing-foot { margin: 22px 0 0; font-size: 14.5px; color: var(--faint); }

/* ---------- trust facts ---------- */
.facts { list-style: none; margin: 20px 0 0; padding: 16px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; border-top: 1px solid var(--line); }
.facts li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts b { font-family: var(--display); font-weight: 720; font-size: 24px; letter-spacing: -0.02em; line-height: 1.1; }
.facts span { font-size: 13px; line-height: 1.35; color: var(--faint); }

/* ---------- questions ---------- */
.beat--faq { padding-top: 12vh; padding-bottom: 8vh; }
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq .section-title { margin-bottom: 12px; }
.faq details { border-radius: 10px; background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px;
  font-weight: 650; font-size: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px;
  border-right: 2px solid var(--ember-hot); border-bottom: 2px solid var(--ember-hot);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq details p { margin: 0; padding: 0 18px 18px; color: var(--muted); }

/* ---------- final ---------- */
.beat--final { padding-top: 18vh; }
.final { text-align: center; max-width: 820px; margin: 0 auto; }
.final-title { margin: 0; font-family: var(--display); font-weight: 760; font-size: clamp(40px, 10vw, 96px); line-height: 0.95; letter-spacing: -0.035em; }
.final .actions .btn { flex: 1 1 100%; }
.footer { max-width: 1060px; margin: 16vh auto 0; padding: 22px 0 max(26px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 13.5px; color: var(--faint); }
.footer p { margin: 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ---------- panels rise in as they enter (no JS; progressive) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .panel, .offer, .plan, .faq details {
      animation: ws-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}
@keyframes ws-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---------- tablets and up ---------- */
@media (min-width: 760px) {
  :root { --gutter: clamp(22px, 4vw, 56px); }
  .navlink--wide { display: inline-block; }
  .compare { grid-template-columns: 1fr 1fr; }
  .offers, .plans { grid-template-columns: 1fr 1fr; }
  .offer { padding: 28px 26px 24px; }
  .plan { padding: 22px 24px 20px; }
  .final .actions .btn { flex: 0 1 auto; }
}

/* ---------- desktop: copy on the left, the subject on the right ---------- */
@media (min-width: 900px) {
  .beat--hero { min-height: 128vh; }
  .hero { justify-content: center; padding: 90px 0 10vh; max-width: min(640px, 50vw); }
  .hero-title { font-size: clamp(56px, 6.4vw, 108px); }
  .beat--story { min-height: 190vh; padding-top: 30vh; }
  .beat[data-beat="usual"] { min-height: 150vh; padding-top: 30vh; }
  .beat[data-beat="trust"] { padding-top: 26vh; }
  .beat--story .panel, .beat[data-beat="usual"] .panel { top: 26vh; }
  .panel { padding: 30px 30px 26px; max-width: min(500px, 42vw); }
  .beat[data-beat="usual"] .panel { max-width: min(600px, 46vw); }
  .panel-title { font-size: clamp(34px, 3.2vw, 46px); }
}

/* ---------- no WebGL / reduced motion: a calm, readable page ---------- */
body.flat #stage, body.flat .labels { display: none; }
body.flat .beat--story, body.flat .beat[data-beat="usual"], body.flat .beat[data-beat="trust"] { min-height: 0; padding-top: 10vh; padding-bottom: 4vh; }
body.flat .beat--story .panel, body.flat .beat[data-beat="usual"] .panel { position: relative; top: auto; }
body.flat .hero { padding-top: 22vh; }
body.flat .panel, body.flat .offer, body.flat .plan, body.flat .faq details { animation: none; }

/* ---------- phones: keep scrolling copy below the controls and sample caption ---------- */
@media not all and (min-width: 760px) {
  body {
    --ws-bar-height: calc(70px + env(safe-area-inset-top, 0px));
    --ws-note-height: 46px;
    --ws-copy-top: calc(var(--ws-bar-height) + var(--ws-note-height) + 12px);
  }
  .topbar {
    background: none;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  }
  .topbar::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; z-index: -1;
    height: calc(var(--ws-copy-top) + 12px);
    background: linear-gradient(180deg, #0b0f1a 0, #0b0f1a calc(100% - 12px), rgba(11, 15, 26, 0) 100%);
    opacity: 0; pointer-events: none;
  }
  .phone-scrolled .topbar::before { opacity: 1; }
  .sample-disclosure {
    top: calc(var(--ws-bar-height) + 4px); bottom: auto;
    left: max(var(--gutter), env(safe-area-inset-left, 0px));
    right: max(var(--gutter), env(safe-area-inset-right, 0px));
    width: auto; max-width: none;
    padding: 6px 10px; font-size: 12px; line-height: 1.4;
  }
  .panel { background: #101526; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .beat[id], main a, main summary { scroll-margin-top: calc(var(--ws-copy-top) + 12px); }
  .after-story { --ws-copy-top: var(--ws-bar-height); }
  .after-story #stage, .after-story .labels { visibility: hidden; }
  .hero { min-height: 100vh; min-height: 100svh; padding: 48vh 0 6vh; padding: 48svh 0 6svh; }
  body.flat .hero { padding-top: max(22vh, calc(var(--ws-copy-top) + 24px)); }
  @media (prefers-reduced-motion: no-preference) {
    .topbar::before { transition: opacity 0.25s ease; }
  }
}
