/* Shared stylesheet for StepZero article pages.
   One file for all long-form pages - edit here, not per page. */

:root {
  --bg:#0a101f; --bg2:#0e1428; --surface:#101731; --surface2:#131c38;
  --gold:#e8c264; --gold-l:#f8e3a3; --gold-d:#b88a30;
  --tx:#f6f1e4; --tx2:#c3bdab; --tx3:#8d876f;
  --bd:rgba(232,194,100,.16); --bd2:rgba(232,194,100,.26);
  --metal:linear-gradient(135deg,#fff2cc 0%,#f3d486 20%,#e8c264 42%,#b88a30 62%,#e3bd64 82%,#fbe6a8 100%);
  --expo:cubic-bezier(0.16,1,0.3,1);
}
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box }
html { scroll-behavior:smooth; font-size:16px; -webkit-text-size-adjust:100% }
body {
  font-family:'Barlow',system-ui,sans-serif; background:var(--bg); color:var(--tx);
  overflow-x:hidden; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
body::after {
  content:''; position:fixed; inset:0; z-index:9999; pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity:.035;
}
img { max-width:100%; display:block }
a { color:var(--gold-l) }

nav {
  position:sticky; top:0; z-index:100;
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  padding:12px clamp(18px,5vw,40px);
  background:rgba(10,16,31,.88); backdrop-filter:blur(14px); border-bottom:1px solid var(--bd);
}
.nav-logo { display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--tx) }
.nav-logo img { width:29px; height:29px }
.nav-logo-text { font-family:'Big Shoulders Display',sans-serif; font-weight:900; font-size:19px; letter-spacing:.06em }
.btn-gold {
  position:relative; display:inline-flex; align-items:center; padding:10px 22px; border:none;
  clip-path:polygon(0 0,100% 0,100% calc(100% - 9px),calc(100% - 9px) 100%,0 100%);
  background:var(--metal); color:#2a1c05;
  font-family:'Barlow',sans-serif; font-size:11px; font-weight:600;
  letter-spacing:.14em; text-transform:uppercase; text-decoration:none; cursor:pointer;
  box-shadow:0 4px 18px rgba(184,138,48,.3);
  transition:transform .35s var(--expo), box-shadow .35s var(--expo);
}
.btn-gold:hover { transform:translateY(-2px); box-shadow:0 10px 32px rgba(184,138,48,.46) }
.btn-gold.lg { padding:14px 32px; font-size:13px }

.shell { max-width:790px; margin:0 auto; padding:0 clamp(18px,5vw,32px) }
.crumbs { padding-top:clamp(26px,5vw,46px); font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:var(--tx3) }
.crumbs a { color:var(--tx3); text-decoration:none }
.crumbs a:hover { color:var(--gold-l) }

article { padding:clamp(16px,3vw,26px) 0 clamp(56px,8vw,90px) }
h1 {
  font-family:'Big Shoulders Display',sans-serif; font-weight:900;
  font-size:clamp(40px,6.6vw,74px); line-height:.96; letter-spacing:-.01em;
  margin:clamp(14px,2.5vw,22px) 0 clamp(16px,2.6vw,24px);
}
h1 .gold { color:var(--gold) }
.standfirst {
  font-size:clamp(17px,2.2vw,21px); line-height:1.62; color:var(--tx2);
  padding-bottom:clamp(22px,4vw,34px); border-bottom:1px solid var(--bd);
}
article h2 {
  font-family:'Big Shoulders Display',sans-serif; font-weight:900;
  font-size:clamp(28px,4vw,42px); line-height:1.02; letter-spacing:.005em;
  margin:clamp(38px,6vw,60px) 0 14px;
}
article h3 {
  font-family:'Big Shoulders Display',sans-serif; font-weight:800;
  font-size:clamp(20px,2.6vw,25px); line-height:1.15; color:var(--gold-l); margin:30px 0 8px;
}
article p { font-size:17px; line-height:1.76; color:var(--tx2); margin-bottom:17px }
article p strong, article li strong { color:var(--tx); font-weight:600 }
article ul { margin:0 0 18px; padding-left:0; list-style:none }
article ul li { position:relative; padding-left:22px; margin-bottom:11px; font-size:17px; line-height:1.7; color:var(--tx2) }
article ul li::before { content:''; position:absolute; left:0; top:11px; width:6px; height:6px; background:var(--gold); transform:rotate(45deg) }

.loop { margin:26px 0 30px; border:1px solid var(--bd); background:var(--surface) }
.loop-row {
  display:grid; grid-template-columns:clamp(74px,15vw,124px) 1fr;
  gap:clamp(12px,3vw,26px); padding:16px clamp(15px,3vw,24px); border-bottom:1px solid var(--bd);
}
.loop-row:last-child { border-bottom:none }
.loop-k { font-family:'Big Shoulders Display',sans-serif; font-weight:900; font-size:19px; letter-spacing:.04em; color:var(--gold); padding-top:3px }
.loop-v { font-size:15.5px; line-height:1.62; color:var(--tx2) }
@media (max-width:560px){ .loop-row { grid-template-columns:1fr; gap:4px } }

.keyline {
  margin:30px 0; padding:22px clamp(18px,3.4vw,28px);
  border-left:2px solid var(--gold); background:rgba(232,194,100,.045);
  font-family:'Big Shoulders Display',sans-serif; font-weight:800;
  font-size:clamp(22px,3.2vw,30px); line-height:1.16; color:var(--tx);
}

.today { margin:36px 0 8px; border:1px solid var(--bd2); background:var(--surface2); padding:clamp(22px,4vw,32px) }
.today .lbl { font-family:'Barlow',sans-serif; font-size:11px; font-weight:700; letter-spacing:.28em; text-transform:uppercase; color:var(--gold-l); margin-bottom:12px }
.today h2 { margin:0 0 12px; font-size:clamp(24px,3.4vw,32px) }
.today p:last-child { margin-bottom:0 }

.faq { margin-top:clamp(38px,6vw,58px); border-top:1px solid var(--bd) }
.faq h2 { margin-top:clamp(28px,4vw,40px) }
details { border-bottom:1px solid var(--bd); padding:16px 0 }
summary {
  cursor:pointer; list-style:none; display:flex; align-items:flex-start; gap:12px;
  font-family:'Big Shoulders Display',sans-serif; font-weight:800; font-size:21px; line-height:1.2; color:var(--tx);
}
summary::-webkit-details-marker { display:none }
summary::before { content:'+'; color:var(--gold); font-family:'Barlow',sans-serif; font-weight:600; font-size:19px; line-height:1.1; flex:none }
details[open] summary::before { content:'−' }
details p { margin:11px 0 2px 24px; font-size:16px }

.cta { margin:clamp(44px,7vw,70px) 0 0; padding:clamp(28px,5vw,44px); border:1px solid var(--bd2);
  background:linear-gradient(160deg,var(--surface2),var(--surface)); text-align:center }
.cta h2 { margin:0 0 12px }
.cta p { max-width:52ch; margin:0 auto 22px }

.readnext { margin-top:clamp(34px,5vw,50px); padding-top:22px; border-top:1px solid var(--bd) }
.readnext .lbl { font-size:11px; font-weight:700; letter-spacing:.28em; text-transform:uppercase; color:var(--tx3); margin-bottom:10px }
.readnext a { font-family:'Big Shoulders Display',sans-serif; font-weight:800; font-size:23px; line-height:1.15; text-decoration:none; color:var(--gold-l) }
.readnext a:hover { color:var(--gold-h,#fff6da) }

footer { border-top:1px solid var(--bd); padding:38px 0 54px; text-align:center }
.foot-links { display:flex; gap:24px; justify-content:center; flex-wrap:wrap; margin-bottom:14px }
.foot-links a { font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:var(--tx2); text-decoration:none }
.foot-links a:hover { color:var(--gold-l) }
.foot-note { font-family:'Cinzel',serif; font-weight:600; font-size:11px; letter-spacing:.26em; color:var(--tx3) }

@media (prefers-reduced-motion:reduce){ html { scroll-behavior:auto } }

/* ── Article meta line (date + reading time) ── */
.meta {
  display:flex; flex-wrap:wrap; align-items:center; gap:10px;
  margin:0 0 clamp(18px,3vw,26px);
  font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--tx3);
}
.meta .dot { flex:none; width:4px; height:4px; background:var(--gold-d); transform:rotate(45deg) }

/* ── Slim CTA directly under the intro ── */
.cta-inline {
  display:flex; flex-wrap:wrap; align-items:center; gap:14px;
  margin:26px 0 4px; padding:15px clamp(15px,3vw,22px);
  border:1px solid var(--bd); background:rgba(232,194,100,.04);
}
.cta-inline p { margin:0; font-size:15px; line-height:1.5; flex:1 1 240px; color:var(--tx2) }
.cta-inline strong { color:var(--tx); font-weight:600 }
.cta-inline .btn-gold { flex:none }

/* ── Table of contents ── */
.toc { margin:30px 0 8px; border:1px solid var(--bd); background:var(--surface); padding:20px clamp(16px,3vw,24px) }
.toc .lbl {
  font-size:11px; font-weight:700; letter-spacing:.28em; text-transform:uppercase;
  color:var(--gold-l); margin-bottom:12px;
}
.toc ol { list-style:none; counter-reset:toc; margin:0; padding:0 }
.toc li { counter-increment:toc; margin-bottom:8px; padding-left:30px; position:relative }
.toc li:last-child { margin-bottom:0 }
.toc li::before {
  content:counter(toc,decimal-leading-zero); position:absolute; left:0; top:1px;
  font-family:'Barlow',sans-serif; font-size:12px; font-weight:600;
  letter-spacing:.08em; color:var(--gold-d);
}
.toc a { color:var(--tx2); text-decoration:none; font-size:16px; line-height:1.45; transition:color .2s }
.toc a:hover { color:var(--gold-l) }

/* Offset anchor jumps so the sticky nav does not cover the heading */
article h2[id] { scroll-margin-top:76px }

/* ═══════════════════════════════════════════
   VISUAL PASS — brand furniture for article pages.
   Attached to html:: pseudo-elements so no page markup changes:
   html::before = terrain motif, html::after = reading progress,
   body::before = vignette, body::after = grain (both above).
═══════════════════════════════════════════ */

/* Ascent terrain — the stepped-mountain motif from the landing page */
html::before {
  content:''; position:fixed; inset:0; z-index:0; pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='480' viewBox='0 0 480 480'%3E%3Cg fill='none' stroke='%23e8c264' stroke-opacity='.045' stroke-width='1'%3E%3Cpath d='M0 440 h96 v-56 h96 v-56 h96 v-56 h96 v-56 h96'/%3E%3Cpath d='M0 480 h120 v-64 h120 v-64 h120 v-64 h120'/%3E%3C/g%3E%3C/svg%3E");
  background-size:480px 480px;
  mask-image:radial-gradient(ellipse 90% 70% at 50% 20%, transparent 25%, #000 72%);
  -webkit-mask-image:radial-gradient(ellipse 90% 70% at 50% 20%, transparent 25%, #000 72%);
}
/* lift content above the terrain; the sticky nav keeps its own z-index:100 */
.shell, footer { position:relative; z-index:2 }

/* Reading progress — CSS-only, no script. Silently absent where unsupported. */
@supports (animation-timeline: scroll()) {
  html::after {
    content:''; position:fixed; top:0; left:0; height:2px; width:100%;
    transform-origin:0 50%; transform:scaleX(0);
    background:var(--metal); box-shadow:0 0 12px rgba(232,194,100,.5);
    z-index:600; pointer-events:none;
    animation:readprogress linear both;
    animation-timeline:scroll(root block);
  }
  @keyframes readprogress { to { transform:scaleX(1) } }
}

/* Numbered sections with a hairline above — editorial rhythm, easier scanning */
article { counter-reset:sec }
article h2[id] {
  counter-increment:sec;
  padding-top:clamp(26px,4vw,38px);
  border-top:1px solid var(--bd);
}
/* inside a framed box the hairline is redundant; keep the number, drop the rule */
.today h2[id], .cta h2[id] { padding-top:0; border-top:none }
article h2[id]::before {
  content:counter(sec,decimal-leading-zero);
  display:block; margin-bottom:10px;
  font-family:'Barlow',sans-serif; font-size:11px; font-weight:700;
  letter-spacing:.34em; color:var(--gold-d);
}

/* HUD corner ticks on the framed blocks */
.loop, .today, .cta, .toc, .cta-inline { position:relative }
.loop::before, .loop::after,
.today::before, .today::after,
.cta::before, .cta::after {
  content:''; position:absolute; width:13px; height:13px; pointer-events:none;
  border:1px solid rgba(232,194,100,.45);
}
.loop::before, .today::before, .cta::before { top:-1px; left:-1px; border-right:none; border-bottom:none }
.loop::after,  .today::after,  .cta::after  { bottom:-1px; right:-1px; border-left:none; border-top:none }

/* Lead paragraph — the first line of body copy carries a little more weight */
.standfirst + p, .toc + p { font-size:18.5px; color:var(--tx) }

/* FAQ rows respond on hover, not just on open */
summary { transition:color .2s }
summary:hover { color:var(--gold-l) }
details[open] summary { color:var(--gold-l) }

/* Read-next reads as a card rather than a stray link */
.readnext {
  border:1px solid var(--bd); border-top:1px solid var(--bd);
  padding:22px clamp(16px,3vw,26px); background:var(--surface);
  transition:border-color .3s;
}
.readnext:hover { border-color:var(--bd2) }

/* Footer crest, for a proper ending instead of a bare line */
footer::before {
  content:''; display:block; width:30px; height:30px; margin:0 auto 18px;
  background:var(--gold); opacity:.5;
  -webkit-mask:url('/assets/logo-256.webp') center/contain no-repeat;
  mask:url('/assets/logo-256.webp') center/contain no-repeat;
}

@media (prefers-reduced-motion:reduce){
  @supports (animation-timeline: scroll()) { html::after { animation:none; transform:scaleX(0) } }
}

/* Skip link - hidden until focused by keyboard */
.skip {
  position:absolute; left:-9999px; top:0; z-index:9000;
  padding:12px 20px; background:var(--gold,#e8c264); color:#2a1c05;
  font-family:'Barlow',sans-serif; font-size:13px; font-weight:600;
  letter-spacing:.12em; text-transform:uppercase; text-decoration:none;
}
.skip:focus { left:8px; top:8px }

/* Visible keyboard focus everywhere - was missing entirely */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline:2px solid var(--gold,#e8c264); outline-offset:3px; border-radius:2px;
}
