/* ============================================================
   The Brew Lab — Pitch (cinematic scrollytelling)
   Native vertical scroll. A sticky "stage" tracks your position
   while chapters animate in. No transforms/carousel — robust on
   mobile, and fully readable if JS/GSAP never load.
   ============================================================ */

/* scroll progress bar (under the sticky nav) */
.ps-progressbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.ps-progressbar .fill { height: 100%; width: 0; background: var(--grad); }

/* ---------- hero ---------- */
.ps-hero { padding: clamp(56px, 13vh, 140px) 0 clamp(28px, 6vh, 64px); }
.ps-hero .kicker { margin-bottom: 18px; }
.ps-hero h1 {
  font-size: clamp(40px, 11vw, 86px); font-weight: 800; letter-spacing: -0.04em;
  line-height: 0.98; margin-bottom: 18px; text-wrap: balance;
}
.ps-hero .lead { font-size: clamp(16px, 3.8vw, 20px); }
.ps-scrollcue { margin-top: 28px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.ps-scrollcue .arrow { display: inline-block; animation: ps-bob 1.6s ease-in-out infinite; }
@keyframes ps-bob { 50% { transform: translateY(4px); } }

/* ---------- layout ---------- */
.ps-layout { display: grid; grid-template-columns: 1fr; }
@media (min-width: 920px) {
  .ps-layout { grid-template-columns: 340px 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
}

/* ---------- sticky stage ----------
   Mobile-first: a slim sticky bar (number + keyword). Desktop overrides
   below turn it into a tall pinned side panel with the chapter list.
   Base rules MUST precede the media query so source order resolves right. */
.ps-stage {
  position: sticky; top: 59px; z-index: 5; font-family: var(--font-sans);
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line); background: var(--bg);
}
.ps-stage-label { font-family: var(--font-mono); font-size: 12.5px; color: var(--cyan); letter-spacing: 0.05em; display: none; }
.ps-stage-orb { display: none; }
.ps-stage-meta { display: flex; align-items: baseline; gap: 12px; }
.ps-stage-num { font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; font-size: 28px; }
.ps-stage-word { font-weight: 700; letter-spacing: -0.02em; font-size: 16px; color: var(--lavender); }

.ps-stage-nav { list-style: none; display: none; gap: 2px; margin: 0; }
.ps-dot {
  display: flex; gap: 11px; align-items: center; width: 100%;
  background: none; border: none; cursor: pointer; padding: 7px 0;
  color: var(--muted); font: inherit; text-align: left;
  transition: color var(--t-base) ease;
}
.ps-dot .n { font-family: var(--font-mono); font-size: 11px; opacity: 0.7; min-width: 18px; }
.ps-dot .w { font-size: 13.5px; position: relative; }
.ps-dot .w::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px;
  background: var(--lavender); transition: right var(--t-base) var(--ease);
}
.ps-dot:hover { color: var(--text); }
.ps-dot[aria-current="true"] { color: var(--text); }
.ps-dot[aria-current="true"] .w { color: var(--lavender); }
.ps-dot[aria-current="true"] .w::after { right: 0; }

/* desktop: tall pinned panel with big number + chapter list */
@media (min-width: 920px) {
  .ps-stage {
    top: 64px; height: calc(100vh - 64px);
    flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 6px; padding: 24px 0; border-bottom: none; background: transparent;
    overflow: hidden;
  }
  .ps-stage-label { display: block; margin-bottom: 18px; }
  .ps-stage-meta { flex-direction: column; gap: 6px; align-items: flex-start; }
  .ps-stage-num { font-size: clamp(72px, 9vw, 132px); }
  .ps-stage-word { font-size: clamp(20px, 2vw, 28px); }
  .ps-stage-nav { display: grid; margin-top: 30px; }
  .ps-stage-orb {
    display: block; position: absolute; width: 280px; height: 280px; border-radius: 50%;
    background: var(--grad); filter: blur(64px); opacity: 0.16;
    top: 18%; left: -60px; z-index: -1; pointer-events: none;
  }
}

/* ---------- chapters ---------- */
.ps-chapter {
  min-height: 78vh; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(40px, 8vh, 88px) 0; border-top: 1px solid var(--line);
}
.ps-chapter:first-child { border-top: none; }
@media (min-width: 920px) { .ps-chapter { min-height: 100vh; padding: clamp(56px, 10vh, 120px) 0; } }

.ps-chapter .kicker {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--cyan);
  letter-spacing: 0.05em; margin-bottom: 16px; display: inline-flex; gap: 8px; align-items: center;
}
.s-title {
  font-size: clamp(26px, 5.4vw, 46px); font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.06; margin-bottom: 16px; text-wrap: balance;
}
.s-body { font-size: clamp(15px, 3.6vw, 19px); color: var(--muted); max-width: 620px; line-height: 1.55; }
.s-mantra { font-size: clamp(16px, 4vw, 22px); font-weight: 600; color: var(--text); margin-top: 14px; }

/* metrics */
.metrics { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 30px; }
@media (min-width: 560px) { .metrics { grid-template-columns: repeat(3, 1fr); } }
.metric { background: var(--editor); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 20px; }
.metric .big { font-size: clamp(26px, 6vw, 40px); font-weight: 800; letter-spacing: -0.03em; }
.metric .lab { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 6px; }
.metric:nth-child(1) .big { color: var(--lavender); }
.metric:nth-child(2) .big { color: var(--cyan); }
.metric:nth-child(3) .big { color: var(--rose); }

/* bullet points */
.points { list-style: none; display: grid; gap: 14px; margin-top: 24px; max-width: 640px; }
.points li { display: flex; gap: 12px; align-items: flex-start; font-size: clamp(15px, 3.6vw, 18px); color: var(--text); }
.points li .mk { font-family: var(--font-mono); color: var(--lavender); flex: none; }
.points li span.dim { color: var(--muted); }

/* model cards */
.models { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 26px; }
@media (min-width: 680px) { .models { grid-template-columns: repeat(2, 1fr); } }
.model { background: var(--editor); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 20px; }
.model h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.model h3 .tag { font-family: var(--font-mono); font-size: 11px; color: var(--cyan); display: block; margin-bottom: 6px; letter-spacing: 0.04em; }
.model p { color: var(--muted); font-size: 14.5px; }

/* placeholder marker */
.ph {
  font-family: var(--font-mono); font-size: 0.85em; color: var(--champagne);
  background: color-mix(in srgb, var(--champagne) 14%, transparent);
  border: 1px dashed color-mix(in srgb, var(--champagne) 45%, transparent);
  border-radius: 6px; padding: 0 5px;
}

/* the ask */
.ps-chapter.ps-ask { text-align: left; }
.ps-ask .cta-row { margin-top: 26px; }

/* ---------- print ---------- */
@media print {
  .ps-progressbar, .ps-stage-nav, .ps-scrollcue, .ambient, nav, .cursor-dot, .cursor-ring { display: none !important; }
  .ps-layout { grid-template-columns: 1fr; }
  .ps-stage { position: static; height: auto; border: none; }
  .ps-chapter { min-height: 0; page-break-inside: avoid; border-top: 1px solid #ccc; }
}
