/* ============================================================================
   BeProductive · Build Your New Reality — brand system
   "The Field Manual for Reinvention": warm paper + deep indigo + Plan·Work·Adjust
   Authentic tokens from beproductive-consumer/src/index.css. Self-contained.
   ========================================================================== */

/* ---- Tokens: light (primary) ---- */
:root {
  --paper:        43 27% 95%;
  --paper-2:      45 33% 98%;   /* cards */
  --paper-deep:   42 22% 91%;   /* bands */
  --ink:          40 8% 12%;
  --ink-soft:     40 5% 33%;
  --ink-faint:    40 4% 54%;
  --rule:         41 16% 84%;
  --rule-soft:    41 16% 89%;

  --indigo:       223 47% 40%;
  --indigo-deep:  223 52% 28%;
  --indigo-tint:  223 30% 92%;

  /* Plan · Work · Adjust triad */
  --plan:         38 92% 48%;   /* amber  */
  --work:         160 74% 33%;  /* green  */
  --adjust:       258 62% 58%;  /* purple */
  --plan-tint:    44 90% 90%;
  --work-tint:    152 60% 91%;
  --adjust-tint:  255 70% 94%;

  --shadow: 220 30% 15%;

  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 72px);
  --radius: 6px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Newsreader', Georgia, serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  color-scheme: light;
}

/* ---- Tokens: dark ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      47 19% 7%;
    --paper-2:    45 8% 11%;
    --paper-deep: 45 12% 9%;
    --ink:        45 20% 91%;
    --ink-soft:   45 12% 68%;
    --ink-faint:  45 8% 48%;
    --rule:       45 9% 20%;
    --rule-soft:  45 9% 15%;

    --indigo:      223 60% 70%;
    --indigo-deep: 223 55% 82%;
    --indigo-tint: 223 30% 20%;

    --plan:        38 88% 58%;
    --work:        160 62% 46%;
    --adjust:      258 72% 72%;
    --plan-tint:   40 40% 16%;
    --work-tint:   160 40% 13%;
    --adjust-tint: 255 40% 18%;

    --shadow: 0 0% 0%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper:      47 19% 7%;
  --paper-2:    45 8% 11%;
  --paper-deep: 45 12% 9%;
  --ink:        45 20% 91%;
  --ink-soft:   45 12% 68%;
  --ink-faint:  45 8% 48%;
  --rule:       45 9% 20%;
  --rule-soft:  45 9% 15%;
  --indigo:      223 60% 70%;
  --indigo-deep: 223 55% 82%;
  --indigo-tint: 223 30% 20%;
  --plan:        38 88% 58%;
  --work:        160 62% 46%;
  --adjust:      258 72% 72%;
  --plan-tint:   40 40% 16%;
  --work-tint:   160 40% 13%;
  --adjust-tint: 255 40% 18%;
  --shadow: 0 0% 0%;
  color-scheme: dark;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ── Accessibility: keyboard focus + skip link (WCAG 2.4.1 / 2.4.7) ── */
:focus-visible { outline: 3px solid hsl(var(--indigo)); outline-offset: 2px; border-radius: 3px; }
:root[data-theme="dark"] :focus-visible,
.hero :focus-visible { outline-color: hsl(223 70% 72%); }
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 1000;
  background: hsl(var(--indigo)); color: #fff;
  padding: 11px 20px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.05em;
  text-transform: uppercase; transition: top .16s ease;
}
.skip-link:focus { top: 8px; outline: 3px solid hsl(var(--paper)); outline-offset: 2px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ---- Base ---- */
body {
  font-family: var(--font-body);
  font-size: clamp(1.02rem, 0.55vw + 0.9rem, 1.18rem);
  line-height: 1.62;
  color: hsl(var(--ink));
  background-color: hsl(var(--paper));
  font-weight: 380;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.028'/%3E%3C/svg%3E");
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 460; line-height: 1.06; letter-spacing: -0.018em; font-optical-sizing: auto; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 460; color: hsl(var(--indigo)); }
p { max-width: 62ch; }
strong { font-weight: 620; color: hsl(var(--ink)); }
em { font-style: italic; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: hsl(var(--ink-faint));
}

/* ---- Phase thread (signature motif) ---- */
.thread { display: flex; height: 3px; width: 88px; border-radius: 3px; overflow: hidden; }
.thread i { flex: 1; }
.thread i:nth-child(1) { background: hsl(var(--plan)); }
.thread i:nth-child(2) { background: hsl(var(--work)); }
.thread i:nth-child(3) { background: hsl(var(--adjust)); }
.thread--wide { width: 100%; }

/* ---- Layout ---- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: clamp(64px, 9vw, 132px); position: relative; }
.band { background: hsl(var(--paper-deep)); border-block: 1px solid hsl(var(--rule)); }

.sec-head { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
@media (min-width: 860px) {
  .sec-head { grid-template-columns: 200px 1fr; gap: 40px; align-items: start; }
}
.sec-index { display: flex; flex-direction: column; gap: 14px; }
.sec-index .num { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; color: hsl(var(--indigo)); }
.sec-head h2 { font-size: clamp(1.85rem, 3.4vw, 3rem); max-width: 20ch; }
.sec-head .lede { margin-top: 18px; font-size: clamp(1.1rem, 1.4vw, 1.3rem); color: hsl(var(--ink-soft)); max-width: 54ch; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 15px var(--gutter);
  background: hsl(var(--paper) / 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid hsl(var(--rule) / 0.7);
}
.nav-logo { display: flex; flex-direction: column; gap: 5px; line-height: 1; }
.nav-logo b { font-family: var(--font-display); font-weight: 500; font-size: 1.28rem; letter-spacing: -0.02em; }
.nav-logo b em { font-style: italic; color: hsl(var(--indigo)); }
.nav-links { display: flex; align-items: center; gap: clamp(10px, 2vw, 26px); }
.nav-links a.link { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; color: hsl(var(--ink-soft)); transition: color .2s; }
.nav-links a.link:hover { color: hsl(var(--indigo)); }
.nav-hide { display: none; }
@media (min-width: 720px) { .nav-hide { display: inline; } }
.theme-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid hsl(var(--rule)); border-radius: 50%; color: hsl(var(--ink-soft)); transition: border-color .2s, color .2s; }
.theme-btn:hover { border-color: hsl(var(--indigo)); color: hsl(var(--indigo)); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
  padding: 13px 22px; border-radius: var(--radius); transition: transform .18s, background .2s, box-shadow .2s, color .2s, border-color .2s;
}
.btn .arw { transition: transform .2s; }
.btn:hover .arw { transform: translateX(4px); }
.btn--primary { background: hsl(var(--indigo)); color: hsl(var(--paper-2)); box-shadow: 0 1px 2px hsl(var(--shadow) / 0.25); }
.btn--primary:hover { background: hsl(var(--indigo-deep)); transform: translateY(-1px); box-shadow: 0 6px 20px hsl(var(--indigo) / 0.28); }
:root[data-theme="dark"] .btn--primary, .btn--primary { color: hsl(var(--paper)); }
:root[data-theme="dark"] .btn--primary { color: hsl(45 19% 8%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--primary { color: hsl(45 19% 8%); } }
.btn--ghost { border: 1px solid hsl(var(--rule)); color: hsl(var(--ink)); }
.btn--ghost:hover { border-color: hsl(var(--indigo)); color: hsl(var(--indigo)); }

/* degrade state (no live vendor url) */
.btn.is-soon, a.is-soon { opacity: 0.62; cursor: not-allowed; pointer-events: none; background: hsl(var(--rule-soft)); color: hsl(var(--ink-faint)); box-shadow: none; border: 1px solid hsl(var(--rule)); }
.btn.is-soon .arw { display: none; }

/* ---- HERO ---- */
.hero { padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 112px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 8%, hsl(var(--adjust) / 0.10), transparent 70%),
    radial-gradient(50% 50% at 8% 92%, hsl(var(--work) / 0.09), transparent 70%),
    radial-gradient(46% 40% at 40% 30%, hsl(var(--plan) / 0.07), transparent 70%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-eyebrow { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.hero-eyebrow .thread { flex: none; }
.hero-eyebrow span { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: hsl(var(--ink-soft)); }
.hero h1 { font-size: clamp(2.7rem, 7.4vw, 6.1rem); font-weight: 420; letter-spacing: -0.028em; line-height: 0.98; max-width: 15ch; }
.hero h1 .l2 { color: hsl(var(--indigo)); font-style: italic; }
.hero-thesis { margin-top: 30px; font-size: clamp(1.2rem, 1.9vw, 1.62rem); line-height: 1.5; color: hsl(var(--ink-soft)); max-width: 40ch; }
.hero-thesis strong { color: hsl(var(--ink)); font-weight: 560; }
.hero-cta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.hero-note { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; color: hsl(var(--ink-faint)); display: flex; align-items: center; gap: 9px; }
.hero-note .dot { width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--work)); box-shadow: 0 0 0 3px hsl(var(--work) / 0.2); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* hero promise strip */
.promise { margin-top: clamp(48px, 6vw, 76px); display: grid; gap: 1px; background: hsl(var(--rule)); border: 1px solid hsl(var(--rule)); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 760px) { .promise { grid-template-columns: repeat(3, 1fr); } }
.promise-cell { background: hsl(var(--paper-2)); padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; }
.promise-cell .k { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.promise-cell .k::before { content: ""; width: 8px; height: 8px; border-radius: 2px; }
.promise-cell:nth-child(1) .k::before { background: hsl(var(--plan)); }
.promise-cell:nth-child(2) .k::before { background: hsl(var(--work)); }
.promise-cell:nth-child(3) .k::before { background: hsl(var(--adjust)); }
.promise-cell .k { color: hsl(var(--ink-faint)); }
.promise-cell p { font-size: 1.02rem; color: hsl(var(--ink)); line-height: 1.45; }

/* ---- Pull quote / crossroads ---- */
.pull { font-family: var(--font-display); font-weight: 380; font-size: clamp(1.6rem, 3.6vw, 2.7rem); line-height: 1.24; letter-spacing: -0.015em; max-width: 22ch; }
.pull em { color: hsl(var(--indigo)); font-style: italic; }
.crossroad-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .crossroad-grid { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 64px; } }
.crossroad-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid hsl(var(--rule)); }
.crossroad-list li { list-style: none; padding: 17px 0; border-bottom: 1px solid hsl(var(--rule)); color: hsl(var(--ink-soft)); font-size: 1.05rem; display: flex; gap: 14px; }
.crossroad-list li::before { content: "—"; color: hsl(var(--indigo)); flex: none; }

/* ---- Thesis / phase map ---- */
.thesis-grid { display: grid; gap: 20px; }
@media (min-width: 800px) { .thesis-grid { grid-template-columns: repeat(2, 1fr); } }
.thesis-card { background: hsl(var(--paper-2)); border: 1px solid hsl(var(--rule)); border-radius: var(--radius); padding: 30px 28px; position: relative; overflow: hidden; }
.thesis-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.thesis-card[data-p="plan"]::before { background: hsl(var(--plan)); }
.thesis-card[data-p="work"]::before { background: hsl(var(--work)); }
.thesis-card[data-p="adjust"]::before { background: hsl(var(--adjust)); }
.thesis-card[data-p="score"]::before { background: hsl(var(--indigo)); }
.thesis-card .tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.13em; text-transform: uppercase; color: hsl(var(--ink-faint)); margin-bottom: 14px; }
.thesis-card h3 { font-size: 1.4rem; margin-bottom: 10px; }
.thesis-card p { font-size: 1rem; color: hsl(var(--ink-soft)); }

/* ---- The app ---- */
.app-close { display: grid; gap: 32px; margin-top: clamp(30px, 4vw, 50px); }
@media (min-width: 820px) { .app-close { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; } }
.app-facts { list-style: none; padding: 0; margin: 0; }
.app-facts li { font-size: 1.05rem; color: hsl(var(--ink-soft)); padding: 13px 0 13px 28px; border-bottom: 1px solid hsl(var(--rule)); position: relative; }
.app-facts li strong { color: hsl(var(--indigo)); font-weight: 620; }
.app-facts li::before { content: ""; position: absolute; left: 0; top: 20px; width: 10px; height: 10px; border-radius: 2px; background: hsl(var(--work)); }
.app-note { margin-top: 20px; font-size: 0.98rem; color: hsl(var(--ink-soft)); max-width: 42ch; }
.app-note em { color: hsl(var(--indigo)); font-style: italic; }
.app-cta .btn svg { margin-top: -1px; }
/* "Coming soon" placeholder for the App Store CTA — clearly visible in light AND
   dark (the generic faded .is-soon disappears on dark). Reads as a not-yet button. */
a[data-appstore].is-soon {
  opacity: 1;
  background: hsl(var(--paper-2));
  border: 1.5px dashed hsl(var(--indigo) / 0.55);
  color: hsl(var(--ink-soft));
  box-shadow: none;
}
a[data-appstore].is-soon::after {
  content: "soon";
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em;
  padding: 2px 7px; margin-left: 4px; border-radius: 20px;
  background: hsl(var(--indigo) / 0.14); color: hsl(var(--indigo));
}

/* ---- Difference / KESP ---- */
.kesp { display: grid; gap: 44px; }
@media (min-width: 900px) { .kesp { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; } }
.kesp-letters { display: flex; flex-direction: column; gap: 2px; }
.kesp-row { display: grid; grid-template-columns: 54px 1fr; align-items: baseline; gap: 18px; padding: 15px 0; border-bottom: 1px solid hsl(var(--rule)); }
.kesp-row .let { font-family: var(--font-display); font-size: 2.1rem; font-weight: 500; line-height: 1; color: hsl(var(--indigo)); }
.kesp-row.pains .let { color: hsl(var(--plan)); }
.kesp-row.victories .let { color: hsl(var(--work)); }
.kesp-row .let-body strong { display: block; font-family: var(--font-body); font-size: 1.02rem; }
.kesp-row .let-body span { font-size: 0.94rem; color: hsl(var(--ink-soft)); }
.claim { background: hsl(var(--indigo)); color: hsl(var(--paper-2)); border-radius: var(--radius); padding: 34px 32px; }
:root[data-theme="dark"] .claim { color: hsl(45 19% 8%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .claim { color: hsl(45 19% 8%); } }
.claim .mono { color: inherit; opacity: 0.72; margin-bottom: 14px; }
.claim q { font-family: var(--font-display); font-style: italic; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.24; quotes: none; }
.claim .first { margin-top: 22px; font-size: 0.98rem; opacity: 0.9; border-top: 1px solid hsl(var(--paper-2) / 0.25); padding-top: 18px; }

/* ---- Two doors ---- */
.doors { display: grid; gap: 22px; }
@media (min-width: 820px) { .doors { grid-template-columns: 1fr 1fr; } }
.door { border: 1px solid hsl(var(--rule)); border-radius: var(--radius); padding: 34px 30px; background: hsl(var(--paper-2)); display: flex; flex-direction: column; gap: 14px; transition: border-color .25s, transform .25s; }
.door:hover { border-color: hsl(var(--indigo)); transform: translateY(-3px); }
.door .door-k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: hsl(var(--indigo)); }
.door h3 { font-size: 1.7rem; }
.door p { font-size: 1.01rem; color: hsl(var(--ink-soft)); }
.door .egs { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.door .egs span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; padding: 4px 10px; border: 1px solid hsl(var(--rule)); border-radius: 20px; color: hsl(var(--ink-soft)); }
.doors-foot { margin-top: 26px; text-align: center; font-size: 1.05rem; color: hsl(var(--ink-soft)); }
.doors-foot em { color: hsl(var(--indigo)); font-style: italic; }

/* ---- Evidence Flight (sticky app screenshots) ---- */
.af-root { margin-bottom: 48px; }
.af-track {
  --af-beats: 5;
  height: calc(var(--af-beats) * 85vh);
  position: relative;
}
.af-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.af-grid {
  width: min(var(--maxw), 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  height: 100%;
}
@media (min-width: 900px) {
  .af-grid {
    grid-template-columns: minmax(260px, 0.95fr) minmax(320px, 1.15fr);
    gap: 40px;
  }
}
.af-copy { position: relative; z-index: 2; max-width: 34rem; }
.af-copy .sec-index { margin-bottom: 18px; }
.af-beat-stack { position: relative; min-height: 11.5rem; }
.af-beat-text {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}
.af-beat-text.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}
.af-beat-text .af-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--indigo));
  margin-bottom: 10px;
}
.af-beat-text h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.15;
  margin-bottom: 12px;
}
.af-beat-text h2 em { font-style: italic; color: hsl(var(--indigo)); }
.af-beat-text p {
  font-size: 1.05rem;
  color: hsl(var(--ink-soft));
  max-width: 32ch;
}
.af-progress {
  margin-top: 28px;
  max-width: 280px;
}
.af-progress-track {
  height: 4px;
  border-radius: 3px;
  background: hsl(var(--rule));
  overflow: hidden;
}
.af-progress-fill {
  height: 100%;
  width: 0%;
  background: hsl(var(--indigo));
  border-radius: 3px;
  transition: width 0.05s linear;
}
.af-dots {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}
.af-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: hsl(var(--rule));
  transition: background 0.3s, transform 0.3s;
}
.af-dot.is-on {
  background: hsl(var(--indigo));
  transform: scale(1.25);
}
.af-dot:nth-child(1).is-on { background: hsl(var(--plan)); }
.af-dot:nth-child(3).is-on { background: hsl(var(--work)); }
.af-dot:nth-child(5).is-on { background: hsl(var(--adjust)); }
.af-progress-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--ink-faint));
  margin-top: 8px;
}

.af-stage {
  position: relative;
  height: min(68vh, 560px);
  min-height: 340px;
  /* shared bounding box so phone/laptop don't pop size */
}
.af-device {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  will-change: transform, opacity, filter;
  transition: none; /* driven by rAF for scrub feel */
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(100%, 520px);
}
/* No-JS / first paint: active device visible before flight script runs */
.af-device.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
  z-index: 5;
}
.af-device figcaption {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: hsl(var(--indigo));
  text-align: center;
  line-height: 1.2;
}
.af-device figcaption small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--ink-faint));
  margin-top: 4px;
  font-weight: 400;
}

/* Phone chrome */
.af-phone {
  width: min(220px, 42vw);
  aspect-ratio: 9 / 19.2;
  background: #141416;
  border-radius: 28px;
  padding: 10px 8px 12px;
  box-shadow:
    0 24px 48px hsl(var(--shadow) / 0.22),
    0 0 0 1px hsl(0 0% 100% / 0.06) inset;
  position: relative;
}
.af-phone::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 12px;
  background: #0a0a0c;
  border-radius: 10px;
  z-index: 2;
}
.af-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 18px;
  display: block;
  background: hsl(var(--paper-2));
}

/* Laptop chrome */
.af-laptop {
  width: min(460px, 88%);
  filter: drop-shadow(0 22px 40px hsl(var(--shadow) / 0.2));
}
.af-laptop-screen {
  background: #2a2a2e;
  border-radius: 10px 10px 0 0;
  padding: 14px 8px 8px;
  position: relative;
}
.af-laptop-screen::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 10px;
  width: 6px; height: 6px; border-radius: 50%;
  background: #ff5f56;
  box-shadow: 11px 0 0 #ffbd2e, 22px 0 0 #27c93f;
}
.af-laptop-screen img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border-radius: 3px;
  display: block;
  background: hsl(var(--paper-2));
}
.af-laptop-base {
  height: 10px;
  background: linear-gradient(180deg, #3a3a40, #2c2c30);
  border-radius: 0 0 4px 4px;
  margin: 0 -4%;
  position: relative;
}
.af-laptop-base::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 16%;
  height: 4px;
  background: #222226;
  border-radius: 0 0 3px 3px;
}

.af-doors-lead {
  text-align: center;
  font-size: 1.08rem;
  color: hsl(var(--ink-soft));
  margin: 8px 0 22px;
  max-width: 40rem;
  margin-inline: auto;
}

/* Reduced motion / no-JS: collapse track, show first device + list stills */
@media (prefers-reduced-motion: reduce) {
  .af-track { height: auto; }
  .af-pin { position: relative; height: auto; padding: 12px 0 32px; }
  .af-beat-stack { min-height: 0; }
  .af-beat-text {
    position: relative;
    opacity: 1;
    transform: none;
    margin-bottom: 1.25rem;
    pointer-events: auto;
  }
  .af-beat-text + .af-beat-text { display: none; }
  .af-stage {
    height: auto;
    min-height: 0;
    display: grid;
    gap: 28px;
    justify-items: center;
    padding: 12px 0;
  }
  .af-device {
    position: relative;
    left: auto; top: auto;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    width: 100%;
  }
  .af-device:not(.is-active):not([data-static-show]) { display: none; }
  .af-device.is-active { display: flex; }
  .af-progress { display: none; }
}

@media (max-width: 899px) {
  .af-track { height: calc(var(--af-beats) * 95vh); }
  .af-stage { height: min(58vh, 480px); min-height: 300px; }
  .af-phone { width: min(200px, 48vw); }
  .af-laptop { width: min(100%, 360px); }
  .af-device figcaption { font-size: 1.15rem; }
}

/* ---- The arc (timeline) ---- */
.arc { display: grid; gap: 1px; background: hsl(var(--rule)); border: 1px solid hsl(var(--rule)); border-radius: var(--radius); overflow: hidden; }
.arc-row { background: hsl(var(--paper-2)); display: grid; grid-template-columns: 1fr; gap: 6px; padding: 24px 26px; position: relative; }
@media (min-width: 780px) { .arc-row { grid-template-columns: 150px 1fr 1.1fr; gap: 30px; align-items: baseline; } }
.arc-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.arc-row[data-p="plan"]::before { background: hsl(var(--plan)); }
.arc-row[data-p="work"]::before { background: hsl(var(--work)); }
.arc-row[data-p="adjust"]::before { background: hsl(var(--adjust)); }
.arc-phase { display: flex; flex-direction: column; gap: 4px; }
.arc-phase .pw { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }
.arc-row[data-p="plan"] .pw { color: hsl(var(--plan)); }
.arc-row[data-p="work"] .pw { color: hsl(var(--work)); }
.arc-row[data-p="adjust"] .pw { color: hsl(var(--adjust)); }
.arc-phase .wk { font-family: var(--font-mono); font-size: 0.72rem; color: hsl(var(--ink-faint)); }
.arc-row h3 { font-size: 1.28rem; }
.arc-row p { font-size: 0.98rem; color: hsl(var(--ink-soft)); }

/* ---- Proof ---- */
.proof-grid { display: grid; gap: 20px; }
@media (min-width: 820px) { .proof-grid { grid-template-columns: repeat(3, 1fr); } }
.proof-card { border: 1px solid hsl(var(--rule)); border-radius: var(--radius); padding: 28px 26px; background: hsl(var(--paper-2)); }
.proof-card .n { font-family: var(--font-display); font-size: 2.4rem; font-weight: 500; color: hsl(var(--indigo)); line-height: 1; margin-bottom: 12px; }
.proof-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.proof-card p { font-size: 0.97rem; color: hsl(var(--ink-soft)); }

/* ---- Guarantee ---- */
.guarantee { max-width: 820px; margin-inline: auto; text-align: center; }
.guarantee .seal { width: 74px; height: 74px; margin: 0 auto 26px; border: 1px solid hsl(var(--indigo)); border-radius: 50%; display: grid; place-items: center; color: hsl(var(--indigo)); position: relative; }
.guarantee .seal .thread { width: 40px; }
.guarantee blockquote { font-family: var(--font-display); font-size: clamp(1.4rem, 2.8vw, 2.1rem); line-height: 1.34; font-weight: 380; letter-spacing: -0.012em; }
.guarantee blockquote em { color: hsl(var(--indigo)); font-style: italic; }
.guarantee .did { margin-top: 30px; display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; max-width: 640px; }
.guarantee .did span { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; padding: 6px 12px; background: hsl(var(--paper-2)); border: 1px solid hsl(var(--rule)); border-radius: 20px; color: hsl(var(--ink-soft)); }

/* ---- Pricing / scarcity ---- */
.price-grid { display: grid; gap: 22px; }
@media (min-width: 860px) { .price-grid { grid-template-columns: 1.3fr 1fr; align-items: stretch; } }
.price-main { border: 1px solid hsl(var(--indigo)); box-shadow: 0 0 0 1px hsl(var(--indigo) / 0.5), 0 20px 50px hsl(var(--shadow) / 0.10); border-radius: var(--radius); padding: 38px 34px; background: hsl(var(--paper-2)); display: flex; flex-direction: column; }
.price-main .tier { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: hsl(var(--indigo)); display: flex; align-items: center; gap: 10px; }
.price-main .tier .badge { background: hsl(var(--indigo)); color: hsl(var(--paper-2)); padding: 3px 9px; border-radius: 3px; font-size: 0.62rem; letter-spacing: 0.08em; }
:root[data-theme="dark"] .price-main .tier .badge { color: hsl(45 19% 8%); }
.price-main .amt { font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 3.7rem); font-weight: 500; margin: 16px 0 2px; line-height: 1; }
.price-main .amt small { font-family: var(--font-mono); font-size: 0.8rem; color: hsl(var(--ink-faint)); letter-spacing: 0.04em; font-weight: 400; }
.price-main .sub { color: hsl(var(--ink-soft)); font-size: 1.02rem; margin-bottom: 22px; }
.price-feats { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
.price-feats li { font-size: 0.98rem; color: hsl(var(--ink-soft)); padding: 10px 0 10px 26px; border-bottom: 1px solid hsl(var(--rule)); position: relative; }
.price-feats li::before { content: ""; position: absolute; left: 0; top: 17px; width: 10px; height: 10px; border-radius: 2px; background: hsl(var(--work)); }
.price-side { display: flex; flex-direction: column; gap: 22px; }
.price-note { border: 1px solid hsl(var(--rule)); border-radius: var(--radius); padding: 26px 24px; background: hsl(var(--paper)); }
.price-note h4 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 10px; }
.price-note p { font-size: 0.96rem; color: hsl(var(--ink-soft)); }
.price-note .amt2 { font-family: var(--font-display); font-size: 1.5rem; color: hsl(var(--ink)); font-weight: 500; }
.scarcity { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.05em; color: hsl(var(--ink-soft)); text-transform: uppercase; margin-bottom: 4px; }
.scarcity .dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--plan)); box-shadow: 0 0 0 3px hsl(var(--plan) / 0.22); }

/* ---- Selection / filter ---- */
.filter-grid { display: grid; gap: 22px; }
@media (min-width: 780px) { .filter-grid { grid-template-columns: 1fr 1fr; } }
.filter-col { border: 1px solid hsl(var(--rule)); border-radius: var(--radius); padding: 30px 28px; background: hsl(var(--paper-2)); }
.filter-col h3 { font-size: 1.35rem; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.filter-col.yes h3 { color: hsl(var(--work)); }
.filter-col.no h3 { color: hsl(var(--ink-faint)); }
.filter-col ul { list-style: none; padding: 0; margin: 16px 0 0; }
.filter-col li { font-size: 0.98rem; color: hsl(var(--ink-soft)); padding: 11px 0 11px 26px; border-top: 1px solid hsl(var(--rule)); position: relative; }
.filter-col li::before { position: absolute; left: 0; top: 11px; font-family: var(--font-mono); font-size: 0.85rem; }
.filter-col.yes li::before { content: "+"; color: hsl(var(--work)); }
.filter-col.no li::before { content: "–"; color: hsl(var(--ink-faint)); }

/* ---- Faith ---- */
.faith { max-width: 720px; margin-inline: auto; text-align: center; }
.faith p { margin-inline: auto; font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.5; color: hsl(var(--ink-soft)); }
.faith em { color: hsl(var(--indigo)); font-style: italic; }

/* ---- Apply / CTA ---- */
.apply { text-align: center; }
.apply .steps { display: grid; gap: 16px; max-width: 760px; margin: 0 auto clamp(38px, 5vw, 54px); }
@media (min-width: 720px) { .apply .steps { grid-template-columns: repeat(3, 1fr); } }
.apply .step { padding: 22px; }
.apply .step .s-n { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; color: hsl(var(--indigo)); margin-bottom: 10px; }
.apply .step h3 { font-size: 1.24rem; margin-bottom: 6px; }
.apply .step p { font-size: 0.95rem; color: hsl(var(--ink-soft)); margin-inline: auto; }
.apply-cta { display: inline-flex; flex-direction: column; align-items: center; gap: 14px; }
.apply-soon-note { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em; color: hsl(var(--ink-faint)); }

/* ---- Footer ---- */
.foot { border-top: 1px solid hsl(var(--rule)); padding-block: 56px; }
.foot .wrap { display: grid; gap: 30px; }
@media (min-width: 760px) { .foot .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot-mark b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; }
.foot-mark b em { font-style: italic; color: hsl(var(--indigo)); }
.foot-mark p { margin-top: 12px; font-size: 0.92rem; color: hsl(var(--ink-soft)); max-width: 34ch; }
.foot-col h5 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: hsl(var(--ink-faint)); margin-bottom: 14px; }
.foot-col a { display: block; padding: 5px 0; font-size: 0.95rem; color: hsl(var(--ink-soft)); transition: color .2s; }
.foot-col a:hover { color: hsl(var(--indigo)); }
.foot-legal { margin-top: 40px; padding-top: 22px; border-top: 1px solid hsl(var(--rule)); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.03em; color: hsl(var(--ink-faint)); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }

/* ---- Landing film ---- */
.film-sec { padding-block: clamp(30px, 5vw, 56px); }
.film { position: relative; max-width: 1080px; margin-inline: auto; border-radius: calc(var(--radius) + 4px); overflow: hidden; border: 1px solid hsl(var(--rule)); background: hsl(var(--paper-deep)); box-shadow: 0 30px 70px hsl(var(--shadow) / 0.14); aspect-ratio: 16 / 9; }
.film video { width: 100%; height: 100%; display: block; object-fit: cover; background: hsl(var(--paper-deep)); }
.film-play { position: absolute; inset: 0; margin: auto; width: 92px; height: 92px; border-radius: 50%; background: hsl(var(--indigo)); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 40px hsl(var(--indigo) / 0.5); transition: transform .2s, background .2s; z-index: 2; }
:root[data-theme="dark"] .film-play { color: hsl(45 19% 8%); }
.film-play svg { margin-left: 5px; }
.film-play:hover { transform: scale(1.07); background: hsl(var(--indigo-deep)); }
.film.is-playing .film-play, .film.is-playing .film-cap { opacity: 0; pointer-events: none; }
.film-cap { position: absolute; left: 0; bottom: 0; right: 0; padding: 20px 24px; display: flex; align-items: center; gap: 12px; background: linear-gradient(0deg, hsl(220 30% 8% / 0.55), transparent); z-index: 2; transition: opacity .3s; }
.film-cap .mono { color: rgba(255,255,255,.92); }
.film-cap .thread { flex: none; }
.film-sec .film-note { text-align: center; margin-top: 18px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: hsl(var(--ink-faint)); text-transform: uppercase; }

/* ---- About Me ---- */
.about-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 300px 1fr; gap: 60px; align-items: start; } }
.about-card { background: hsl(var(--paper-2)); border: 1px solid hsl(var(--rule)); border-radius: var(--radius); padding: 30px 28px; position: sticky; top: 90px; }
@media (max-width: 899px) { .about-card { position: static; } }
.about-mono { width: 68px; height: 68px; border-radius: 14px; background: hsl(var(--indigo)); color: hsl(var(--paper-2)); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 20px; }
:root[data-theme="dark"] .about-mono { color: hsl(45 19% 8%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .about-mono { color: hsl(45 19% 8%); } }
.about-card h3 { font-size: 1.5rem; margin-bottom: 4px; }
.about-card .role { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: hsl(var(--ink-soft)); line-height: 1.5; }
.about-card .loc { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em; color: hsl(var(--ink-faint)); margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.about-creds { list-style: none; padding: 18px 0 0; margin: 18px 0 0; border-top: 1px solid hsl(var(--rule)); }
.about-creds li { font-size: 0.9rem; color: hsl(var(--ink-soft)); padding: 7px 0 7px 20px; position: relative; }
.about-creds li::before { content: ""; position: absolute; left: 0; top: 13px; width: 8px; height: 8px; border-radius: 2px; background: hsl(var(--work)); }
.about-body > p { font-size: clamp(1.05rem, 1.4vw, 1.22rem); color: hsl(var(--ink)); margin-bottom: 22px; max-width: 60ch; }
.about-body > p .lead-in { color: hsl(var(--indigo)); font-style: italic; }
.about-body .sig { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: hsl(var(--indigo)); margin-top: 6px; }
.about-career { margin-top: 30px; padding-top: 26px; border-top: 1px solid hsl(var(--rule)); }
.about-career .k { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: hsl(var(--ink-faint)); margin-bottom: 16px; }
.about-career .names { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.about-career .names span { font-family: var(--font-display); font-size: 1.15rem; color: hsl(var(--ink-soft)); font-weight: 460; }
.about-career .names span::after { content: "·"; margin-left: 20px; color: hsl(var(--ink-faint)); }
.about-career .names span:last-child::after { content: ""; }

/* ---- Free Resources (value ladder) ---- */
.res-tier { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; color: hsl(var(--ink-faint)); display: flex; align-items: center; gap: 12px; margin: 44px 0 20px; }
.res-tier::after { content: ""; flex: 1; height: 1px; background: hsl(var(--rule)); }
.res-tier .pip { width: 9px; height: 9px; border-radius: 50%; }
.res-tier.free .pip { background: hsl(var(--work)); }
.res-tier.paid .pip { background: hsl(var(--plan)); }
.res-grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .res-grid { grid-template-columns: repeat(3, 1fr); } }
.res-card { border: 1px solid hsl(var(--rule)); border-radius: var(--radius); padding: 28px 26px; background: hsl(var(--paper-2)); display: flex; flex-direction: column; gap: 12px; transition: border-color .25s, transform .25s, box-shadow .25s; position: relative; overflow: hidden; }
.res-card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: hsl(var(--rule)); }
.res-card.is-free::before { background: hsl(var(--work)); }
.res-card.is-paid::before { background: linear-gradient(90deg, hsl(var(--plan)), hsl(var(--adjust))); }
.res-card:hover { border-color: hsl(var(--indigo)); transform: translateY(-3px); box-shadow: 0 14px 34px hsl(var(--shadow) / 0.10); }
.res-kind { display: flex; align-items: center; justify-content: space-between; }
.res-kind .type { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: hsl(var(--ink-faint)); }
.res-kind .tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 20px; font-weight: 500; }
.res-card.is-free .tag { background: hsl(var(--work-tint)); color: hsl(var(--work)); }
.res-card.is-paid .tag { background: hsl(var(--paper)); border: 1px solid hsl(var(--rule)); color: hsl(var(--ink)); }
.res-card h3 { font-size: 1.32rem; line-height: 1.15; }
.res-card p { font-size: 0.96rem; color: hsl(var(--ink-soft)); flex: 1; }
.res-card .res-formats { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; color: hsl(var(--ink-faint)); text-transform: uppercase; }
.res-card .res-link { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; color: hsl(var(--indigo)); display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; transition: gap .2s; }
.res-card .res-link:hover { gap: 12px; }
.res-card .res-link.is-soon { color: hsl(var(--ink-faint)); pointer-events: none; }
.res-card .res-link.is-soon::after { content: " · soon"; }
.res-ladder-foot { margin-top: 34px; text-align: center; font-size: 1.05rem; color: hsl(var(--ink-soft)); }
.res-ladder-foot em { color: hsl(var(--indigo)); font-style: italic; }

/* ---- Reveal animation ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { transition-delay: calc(var(--i, 0) * 90ms); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---- Screenshot lightbox (click a shot to view full screen) ---- */
.shot-grid img { cursor: zoom-in; }
.shot-lightbox {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 4vmin; background: rgba(20, 18, 14, 0.88);
  opacity: 0; transition: opacity .18s ease; cursor: zoom-out;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.shot-lightbox.in { opacity: 1; }
.shot-lightbox img {
  max-width: 96vw; max-height: 92vh;
  border-radius: 12px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}
.shot-lightbox-close {
  position: fixed; top: 16px; right: 20px;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.shot-lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }
@media (prefers-reduced-motion: reduce) { .shot-lightbox { transition: none; } }

/* ---- Shot grid (app screenshot gallery) — shared default; app pages may override inline ---- */
.shot-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); margin-top: 8px; }
@media (min-width: 760px) { .shot-grid { grid-template-columns: repeat(3, 1fr); } }
.shot-grid img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid hsl(var(--rule)); border-radius: var(--radius); background: hsl(var(--paper-2)); }
