/*
 * The Story page, approved on 2026-10-17 (mockup: Hi Website/Story mockup).
 * Loaded on template-story.php only, after hi.css, and scoped to main.hstory.
 *
 * Type: Anton for the big words, Geist for everything else. Yellow is the brush
 * and words on black; hovers are blue.
 */

main.hstory { --body:"Geist", Arial, sans-serif; --blue-ink:#0C5DE8; --ink-text:#2E3A4A; padding-bottom:0; color:var(--ink); font-family:var(--body); }
.hstory .st-wrap { max-width:1240px; margin:0 auto; padding-left:24px; padding-right:24px; }
.hstory h1, .hstory h2, .hstory h3 { font-weight:400; }

/* ---------- the question: lead-in light, the setting faded, the ask in ink, the answer on a hanging tag ---------- */
.st-ask { overflow-x:clip; display:grid; grid-template-columns:1.15fr 1fr; gap:6vw; padding-top:110px; padding-bottom:110px; border-top:1px solid var(--rule); }
.st-q { color:var(--ink); padding-bottom:200px; }
.st-q > span { display:block; }
.st-lead { font:300 clamp(24px, 1.9vw, 30px)/1.3 var(--body); opacity:.7; margin-bottom:14px; }
.st-set { font:400 clamp(30px, 3vw, 48px)/1 var(--shout); text-transform:uppercase; opacity:.35; }
.st-line { font:400 clamp(40px, 4.4vw, 70px)/1 var(--shout); text-transform:uppercase; margin-top:4px; }
.st-hook { position:relative; display:inline-block; }
/* the string: fixed at the letter and at the eyelet, slack between; it bends as the tag swings (story.js) */
.st-string { position:absolute; top:90%; right:calc(50% - 20px); width:40px; height:60px; overflow:visible; pointer-events:none; }
.st-string path { fill:none; stroke:#3b4252; stroke-width:2; stroke-linecap:round; }
/* the tag: our blue, drawn by story.js as an SVG behind the words; it hangs from the eyelet and moves by a pendulum */
.st-tag { position:absolute; top:calc(90% + 60px - 38px); right:calc(50% - 44px); display:block; transform-origin:calc(100% - 44px) 38px;
  filter:drop-shadow(0 16px 18px rgba(20,40,80,.22)); cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; }
.st-tag.held { cursor:grabbing; }
.st-tag--still { position:relative; top:auto; right:auto; display:inline-block; cursor:default; }
.st-card { position:relative; display:block; padding:44px 104px 28px 34px; font:400 clamp(44px, 4.4vw, 72px)/.95 var(--shout); text-transform:uppercase; white-space:nowrap; color:#13213d; border-radius:16px; background:var(--blue); }
.st-card.drawn { background:none; }   /* once story.js has drawn the shape, the plain fallback goes */
.st-card .st-shape { position:absolute; inset:0; width:100%; height:100%; overflow:visible; z-index:0; }
.st-card .st-shape .edge { fill:#a9c6fb; } .st-card .st-shape .face { fill:var(--blue); }
.st-card .st-shape .stitch { fill:none; stroke:rgba(255,255,255,.45); stroke-width:1.5; stroke-dasharray:6 5; }
.st-tl { display:block; position:relative; z-index:1; }
.st-tl + .st-tl { margin-top:.4em; }
.st-hole { position:absolute; right:30px; top:24px; width:28px; height:28px; border-radius:50%; z-index:2;
  background:radial-gradient(circle, #fafafa 0 7px, #2c5fc4 7.5px 8.5px, #d6e4ff 9px 12px, #8fb3f7 12.5px 14px); }
/* the halo over the O of SOUL */
.st-card .o { position:relative; display:inline-block; }
.st-card .o::before { content:""; position:absolute; left:50%; top:-.3em; width:.78em; height:.2em; translate:-50% 0; border:.055em solid var(--yellow); border-radius:50%;
  box-shadow:0 0 .14em rgba(255,196,0,.9), inset 0 0 .08em rgba(255,196,0,.7); animation:st-halo 3.2s ease-in-out infinite; }
@keyframes st-halo { 0%, 100% { translate:-50% 0; } 50% { translate:-50% -.05em; } }
.st-body p { font:400 clamp(19px, 1.6vw, 23px)/1.55 var(--body); color:var(--ink-text); margin-bottom:1.2em; max-width:30em; }
@media (max-width:520px) { .st-card { font-size:28px; padding:26px 70px 14px 16px; } }
@media (max-width:400px) { .st-line { font-size:35px; } }

/* ---------- how it started ---------- */
.st-bio { display:grid; grid-template-columns:1fr 1.6fr; gap:6vw; padding-top:100px; padding-bottom:100px; border-top:1px solid var(--rule); }
.st-bio h2, .st-loves h2, .st-how h2 { font:400 clamp(44px, 5vw, 80px)/.95 var(--shout); text-transform:uppercase; color:var(--ink); }
.st-bio p { font:400 clamp(19px, 1.6vw, 23px)/1.6 var(--body); color:var(--ink-text); max-width:34em; }

/* ---------- the chapters: full-screen cards in a horizontal track; scrolling down slides them across ---------- */
/* each chapter holds for a stretch of scrolling (its object plays), then slides on: 2n-1 steps of 55svh */
.st-chapters { position:relative; height:calc((2 * var(--n, 1) - 1) * 55svh + 100svh); }
.st-stage { position:sticky; top:0; height:100svh; overflow:hidden; }
.st-track { display:flex; height:100%; will-change:transform; }
.st-ch { flex:0 0 100vw; height:100%; position:relative; overflow:hidden; display:grid; align-items:center; padding:90px 6vw 110px; scroll-margin-top:0; }
.st-big { position:absolute; right:-2vw; bottom:-6vh; font:400 46vh/.8 var(--shout); letter-spacing:-.01em; pointer-events:none; opacity:.12; transform:translateX(calc(var(--p, 0) * 18vw)); }
.st-in { position:relative; display:grid; grid-template-columns:1.05fr 1fr; gap:5vw; align-items:center; max-width:1300px; margin:0 auto; width:100%; }
/* a chapter's type: the dates light Geist, the title Anton, the place small and firm, the text muted */
.st-yr { font:200 clamp(30px, 3vw, 44px)/1 var(--body); letter-spacing:-.01em; margin-bottom:12px; opacity:.6; }
.st-ch h3 { font:400 clamp(52px, 7vw, 118px)/.9 var(--shout); text-transform:uppercase; text-wrap:balance; }
.st-pin { display:flex; align-items:center; gap:6px; margin:20px 0 14px; font:600 15px/1.2 var(--body); letter-spacing:.01em; opacity:.85; }
.st-pin svg { width:17px; height:17px; fill:currentColor; flex:none; }
.st-tx { font:400 clamp(18px, 1.5vw, 22px)/1.55 var(--body); max-width:30em; opacity:.52; }
.st-say { transform:translateY(calc(var(--p, 0) * 40px)); opacity:calc(1 - var(--a, 0)); }
.st-obj { aspect-ratio:4 / 3; max-width:100%; border-radius:22px; display:grid; place-items:center; overflow:hidden;
  transform:translateX(calc(var(--p, 0) * -60px)) rotate(calc(var(--p, 0) * -3deg)); transition:scale .9s cubic-bezier(.2,.7,.2,1);
  box-shadow:0 1px 2px rgba(0,0,0,.08), 0 20px 40px -18px rgba(0,0,0,.35); }
.st-obj:hover { scale:1.03; }
/* the 3D object: a see-through canvas with a soft shadow under it and a flare for the camera.
   Until story-3d.js has a WebGL renderer (class is-3d), the card inside shows instead. */
.st-obj3d { position:relative; aspect-ratio:4 / 3; max-width:100%; }
.st-obj3d canvas, .st-shd, .st-flr { display:none; }
.st-obj3d.is-3d > .st-obj { display:none; }
.st-obj3d.is-3d { cursor:grab; touch-action:pan-y; }
.st-obj3d.is-3d canvas { display:block; position:absolute; inset:-8%; width:116%; height:116%; }
.st-obj3d.is-3d .st-shd { display:block; position:absolute; left:18%; right:18%; bottom:2%; height:12%; border-radius:50%; background:radial-gradient(closest-side, rgba(0,0,0,.28), rgba(0,0,0,0)); filter:blur(2px); pointer-events:none; }
.st-obj3d.is-3d .st-flr { display:block; position:absolute; inset:-30%; background:radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,0) 60%); opacity:0; pointer-events:none; }
.st-logo { background:#fff; } .st-logo img { width:62%; max-height:34%; object-fit:contain; }
.st-word span { font:400 clamp(40px, 4.6vw, 76px)/.92 var(--shout); text-transform:uppercase; text-align:center; padding:0 8%; }
/* the grounds; yellow words only ever on black */
.st-ch.yel { background:var(--yellow); color:#111; } .st-ch.yel .st-word { background:#111; } .st-ch.yel .st-word span { color:var(--yellow); }
.st-ch.blk { background:#111; color:#fff; } .st-ch.blk h3 { color:var(--yellow); } .st-ch.blk .st-pin { color:#9cc0ff; } .st-ch.blk .st-big { color:var(--yellow); }
.st-ch.blk .st-word { background:var(--blue); } .st-ch.blk .st-word span { color:#fff; } .st-ch.blk .st-tx { opacity:.45; }
.st-ch.blu { background:var(--blue); color:#fff; } .st-ch.blu .st-word { background:#fff; } .st-ch.blu .st-word span { color:var(--blue-ink); }
.st-ch.wht { background:#fff; color:var(--ink); } .st-ch.wht .st-pin { color:var(--blue-ink); } .st-ch.wht .st-tx { color:var(--ink-text); }
.st-ch.mst { background:var(--mist); color:var(--ink); } .st-ch.mst .st-pin { color:var(--blue-ink); } .st-ch.mst .st-word { background:var(--ink); } .st-ch.mst .st-word span { color:#fff; }
/* the dates: white on yellow, black and blue; ink on white and mist. On blue the title is black. */
.st-ch.yel .st-yr, .st-ch.blk .st-yr { color:#fff; opacity:.85; }
.st-ch.blu .st-yr { color:#fff; opacity:.85; } .st-ch.blu h3 { color:#111; }
/* the chapter buttons: where you are, and a way to jump */
.st-rail { position:absolute; left:50%; bottom:22px; transform:translateX(-50%); display:flex; gap:4px; z-index:5; padding:5px; border-radius:999px; background:rgba(255,255,255,.94);
  box-shadow:0 6px 24px -10px rgba(0,0,0,.35); max-width:calc(100vw - 32px); overflow-x:auto; scrollbar-width:none; }
.st-rail::-webkit-scrollbar { display:none; }
.st-rail a { font:500 15px/1 var(--body); padding:10px 14px; border-radius:999px; white-space:nowrap; color:#111; text-decoration:none; transition:background-color .3s, color .3s; }
.st-rail a:hover { background:var(--blue); color:#fff; }
.st-rail a.on { background:#111; color:var(--yellow); }
.st-rail a:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }

/* ---------- things I love, how I work ---------- */
.st-loves, .st-how { padding-top:110px; padding-bottom:110px; border-top:1px solid var(--rule); }
.st-loves h2, .st-how h2 { margin-bottom:28px; }
.st-loves ul { list-style:none; display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:0 48px; }
.st-loves li { padding:16px 0; border-bottom:1px solid var(--rule); font:400 19px/1.5 var(--body); }
.st-w { font-weight:700; color:var(--ink); }
.st-w::after { content:"."; }
.st-d { color:var(--ink-text); opacity:.55; }
.st-rules { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:16px; }
.st-rule { background:#fff; border:1px solid #e2e2e2; border-radius:18px; padding:26px 22px; min-height:240px; transition:transform .5s cubic-bezier(.2,.8,.2,1), background-color .3s; }
.st-rule h3 { font:700 22px/1.15 var(--body); color:var(--ink); margin-bottom:12px; transition:color .3s; }
.st-rule p { font:400 17px/1.5 var(--body); color:var(--ink-text); opacity:.55; transition:opacity .3s, color .3s; }
.st-rule:hover { transform:translateY(-4px); background:var(--blue); }
.st-rule:hover h3, .st-rule:hover p { color:#fff; } .st-rule:hover p { opacity:.85; }

/* ---------- the closing band ---------- */
.st-end { background:#111; color:#fff; padding:120px 0; }
.st-end h2 { font:400 clamp(52px, 8vw, 128px)/.92 var(--shout); text-transform:uppercase; color:#fff; }
/* on black the dry brush is laid three times, a little offset, so its streaks fill in and the black words stay whole */
.st-end em { font-style:normal; color:#111; line-height:1; padding:.2em .28em .26em; margin:.1em -.06em 0; display:inline-block; white-space:nowrap;
  background:url(media/brush.svg) 50% 50% / 100% 100% no-repeat, url(media/brush.svg) 48% 30% / 101% 92% no-repeat, url(media/brush.svg) 52% 72% / 99% 94% no-repeat; }
.st-btn { display:inline-block; margin-top:36px; font:600 20px/1 var(--body); color:#fff; background:var(--blue); padding:18px 26px; border-radius:12px; text-decoration:none; transition:background-color .3s; }
.st-btn:hover, .st-btn:focus-visible { background:var(--blue-ink); }

/* ---------- phone: no pinning; the chapters are a row you swipe ---------- */
@media (max-width:860px) {
  .st-ask, .st-bio { grid-template-columns:1fr; gap:26px; }
  .st-rules { grid-template-columns:1fr 1fr; }
  .st-chapters { height:auto; }
  .st-stage { position:relative; height:auto; overflow:visible; }
  .st-track { overflow-x:auto; scroll-snap-type:x mandatory; gap:12px; padding:0 16px 70px; transform:none !important; scrollbar-width:none; height:auto; }
  .st-track::-webkit-scrollbar { display:none; }
  .st-ch { flex:0 0 88vw; height:auto; min-height:78svh; border-radius:22px; scroll-snap-align:center; padding:64px 22px 30px; }
  .st-in { grid-template-columns:1fr; gap:26px; }
  .st-big { font-size:30vh; }
  .st-rail { bottom:16px; left:16px; right:16px; transform:none; }
  .st-loves ul { grid-template-columns:1fr; }
}
@media (max-width:520px) { .st-rules { grid-template-columns:1fr; } }
@media (prefers-reduced-motion:reduce) {
  .st-big, .st-say, .st-obj { transform:none !important; opacity:1 !important; }
  .st-card .o::before { animation:none; }
}
