/* skuquant.com: tokens, type and layout shared by every page (DESIGN_NOTES §12.4–12.5).
   VOICE   work: a research note from a quant desk; demure, investment bank rather than fintech
   IDEA    an engineering drawing of a buying decision: fine rules, mono call-outs, figures as plates
   PICTURE MC-C in the hero: one item's stock, simulated many times, running down to empty (illustrative)
   COLOUR  paper, navy ink, greys; pink means a stockout and nothing else (none on Home)
   TYPE    T3: Spectral for reading, Fragment Mono for labels and numbers
   LAYOUT  laptop: hero text 5/12 beside the figure 7/12, then side-headed sections; phone: one column */
:root {
  color-scheme: light;
  --paper: #f5f3ee; --paper2: #faf9f5; --ink: #1d2b4f; --ink2: #2b3d6b; --text: #23262d; --muted: #5d626d;
  --rule: #d6d2c7; --tint: #e3e6ee; --tint2: #c8cfdd; --trace: #bfc1c6; --pink: #c2335f;
  --serif: Spectral, Georgia, serif; --mono: "Fragment Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 17px/1.6 var(--serif); overflow-x: clip; -webkit-text-size-adjust: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(5vw, 16px, env(safe-area-inset-left, 0px)); padding-right: max(5vw, 16px, env(safe-area-inset-right, 0px)); }
.wrap > *, .wrap > * > * { min-width: 0; }

/* ---- type: four sizes, plus mono labels ---- */
.label { font: 400 13px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); margin: 0; }
h1 { font: 300 clamp(36px, 4vw, 54px)/1.08 var(--serif); letter-spacing: -0.015em; color: var(--ink); margin: 16px 0 22px; text-wrap: balance; }
h2 { font: 300 clamp(28px, 2.8vw, 38px)/1.15 var(--serif); letter-spacing: -0.01em; color: var(--ink); margin: 12px 0 0; text-wrap: balance; }
h3 { font: 500 20px/1.3 var(--serif); color: var(--ink); margin: 0 0 8px; }
p { margin: 0 0 1em; max-width: 64ch; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---- controls: 44px targets, fast small hovers, no overshoot ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--ink); border-radius: 2px; font: 400 13px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 150ms var(--ease), border-color 150ms var(--ease); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--ink2); border-color: var(--ink2); }
.btn.line { background: transparent; color: var(--ink); }
.btn.line:hover { background: var(--tint); }
.btn.small { min-height: 44px; padding: 0 16px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.more { display: inline-flex; align-items: center; min-height: 44px; }
/* play/pause on a looping drawing: a small circle top right; the button itself is the 44px target */
.pp { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.pp::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--rule); border-radius: 50%; background: var(--paper); transition: border-color 150ms var(--ease); }
.pp:hover::before { border-color: var(--ink); }
.pp:focus-visible { outline: none; }
.pp:focus-visible::before { outline: 2px solid var(--ink); outline-offset: 2px; }
.pp svg { position: relative; width: 12px; height: 12px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pp .i-play { fill: var(--ink); display: none; }
.pp[aria-pressed="true"] .i-play { display: inline; }
.pp[aria-pressed="true"] .i-pause { display: none; }

/* ---- draft band (mockup only), header, footer ---- */
.draft { background: var(--tint); color: var(--ink); }
.draft .wrap { padding-block: 8px; }
.draft p { max-width: none; }
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0 32px; min-height: 76px; padding-block: 12px; }
.mark { font: 400 15px/1 var(--mono); letter-spacing: 0.16em; color: var(--ink); text-decoration: none; margin-right: auto; padding-block: 15px; }
.nav { display: flex; flex-wrap: wrap; gap: 0 28px; }
.nav a { color: var(--text); text-decoration: none; font-size: 16px; padding-block: 10px; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.foot { border-top: 1px solid var(--ink); }
.foot .wrap { display: grid; gap: 12px; padding-block: 28px 44px; font-size: 15px; color: var(--muted); }
.foot p { margin: 0; max-width: none; }
.foot p a { white-space: nowrap; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot nav a { color: var(--text); padding-block: 10px; }

/* ---- figures: a canvas fills a sized box, so drawing never feeds back into layout ---- */
.fig { position: relative; border: 1px solid var(--rule); background: var(--paper); }
.fig > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plate { display: flex; flex-direction: column; margin: 0; }
.plate .fig { flex: 1; min-height: 360px; border: 0; }

/* ---- hero ---- */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px clamp(32px, 4vw, 64px); padding-block: clamp(36px, 5vw, 72px) clamp(48px, 6vw, 88px); }
.hero h1 { margin-top: 0; }
.lead { font-size: 19px; line-height: 1.55; max-width: 34em; margin-bottom: 32px; }

/* ---- sections: a side head (label + heading) beside the content ---- */
.sec { border-top: 1px solid var(--rule); }
.sec > .wrap { padding-block: clamp(48px, 6vw, 88px); }
.side { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 28px clamp(32px, 4vw, 64px); }
.points { list-style: none; margin: 0; padding: 0; }
.points li { padding-block: 16px 18px; border-top: 1px solid var(--rule); }
.points li:first-child { border-top-color: var(--ink); }
.points b { display: block; font-weight: 500; font-size: 20px; color: var(--ink); margin-bottom: 4px; }
.points p { margin: 0; }
.steps { list-style: none; margin: 40px 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px clamp(24px, 3vw, 40px); }
.step { border-top: 1px solid var(--ink); padding-top: 4px; display: grid; grid-template-rows: auto auto 1fr auto; grid-template-areas: "head" "title" "fig" "text"; }
.step .head { grid-area: head; display: flex; align-items: center; min-height: 40px; }
.step h3 { grid-area: title; margin-bottom: 14px; }
.step .fig { grid-area: fig; aspect-ratio: 4 / 3; margin-bottom: 14px; }
.step p { grid-area: text; margin: 0; }
.offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; margin-bottom: 32px; }
.offer { border-top: 1px solid var(--ink); padding-top: 16px; }
.offer p { margin: 0; }
.author { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 28px clamp(32px, 4vw, 64px); align-items: start; }
.portrait { aspect-ratio: 4 / 5; max-width: 280px; border: 1px solid var(--rule); background: repeating-linear-gradient(135deg, transparent 0 7px, var(--tint) 7px 8px); display: flex; align-items: flex-end; padding: 14px; }
.side h2 + p { margin-top: 18px; }
.bio { font-size: 19px; line-height: 1.55; max-width: 36em; margin: 18px 0 24px; }

/* ---- contact form (mocked until a backend is chosen) ---- */
.form { display: grid; gap: 16px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; }
.field span { font: 400 13px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
input, textarea { font: 400 16px/1.4 var(--serif); color: var(--text); background: var(--paper2); border: 1px solid var(--rule); border-radius: 2px; padding: 11px 12px; width: 100%; transition: border-color 150ms var(--ease); }
input:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
textarea { min-height: 132px; resize: vertical; }
.status { margin: 0; min-height: 1.6em; color: var(--ink); font-size: 15px; }
.note { font: 400 13px/1.5 var(--mono); color: var(--muted); margin: 14px 0 0; }

/* ---- the scrolling home (DESIGN_NOTES §12.7): the stock paths fill the screen, statements scroll over them ---- */
/* the drawing's plot frame: its top edge as a share of the height, its right edge as a share of the width.
   illustrations.js reads these, so the first statement and the axes share one corner */
:root { --plot-top: 0.12; --plot-right: 0.96; }
.scroller { --gut: max(5vw, 16px); }
.backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100lvh; z-index: 0; }
.backdrop canvas { display: block; width: 100%; height: 100%; }
.pp.dock { position: fixed; top: auto; right: max(10px, env(safe-area-inset-right, 0px)); bottom: max(10px, env(safe-area-inset-bottom, 0px)); z-index: 3; }
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: calc(6px + env(safe-area-inset-top, 0px)) max(var(--gut), env(safe-area-inset-right, 0px)) 18px max(var(--gut), env(safe-area-inset-left, 0px)); background: linear-gradient(var(--paper) 60%, rgba(245, 243, 238, 0)); pointer-events: none; }
.bar > * { pointer-events: auto; }
.bar a.label { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.bar a.label:hover { text-decoration: underline; }
.scroller main { position: relative; z-index: 1; }
.beat { min-height: 100svh; display: grid; align-items: center; padding: 96px max(var(--gut), env(safe-area-inset-right, 0px)) 96px max(var(--gut), env(safe-area-inset-left, 0px)); position: relative; overflow-x: clip; }
.say { justify-self: end; width: min(40rem, 50vw); position: relative; isolation: isolate; text-shadow: 0 0 6px var(--paper), 0 0 14px var(--paper); }
.say::before { content: ""; position: absolute; inset: -18% -14%; z-index: -1; background: radial-gradient(closest-side, rgba(245, 243, 238, 0.95) 55%, rgba(245, 243, 238, 0)); }
.say h1, .say h2 { font: 300 clamp(38px, 5.4vw, 76px)/1.04 var(--serif); letter-spacing: -0.02em; color: var(--ink); margin: 10px 0 18px; text-wrap: balance; }
.say p:not(.label) { font-size: 19px; line-height: 1.55; margin: 0; max-width: 30em; }
/* the first statement starts locked to the plot frame's top-right corner */
.beat.first { align-items: start; padding-top: calc(var(--plot-top) * 100lvh); padding-right: max(calc((1 - var(--plot-right)) * 100%), env(safe-area-inset-right, 0px)); }
.first .say { text-align: right; }
.first .say h1 { margin-top: 0; text-box: trim-start cap alphabetic; }   /* the cap tops sit on the plot's top edge */
.first .say p { margin-left: auto; text-wrap: balance; }
/* the static one-screen page (DESIGN_NOTES §12.8): the first statement alone, and the contact form in a dialog */
.still { --accent: #b14d1b; }                     /* burnt orange, 4.8:1 on the paper: the one call to action */
.still main, .still .beat.first { height: 100svh; min-height: 0; overflow: hidden; }
.bar a.cta { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
/* without script or <dialog> support, the link's target shows the box in place */
.contact-box:target { display: block; position: fixed; inset: 0; margin: auto; height: fit-content; z-index: 5; }
.contact-box:target:not([open]) { box-shadow: 0 0 0 100vmax rgba(245, 243, 238, 0.82); }   /* the backdrop a modal would have */
.contact-box:focus-visible { outline: none; }
.contact-box { width: min(34rem, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 32px clamp(20px, 4vw, 36px) 24px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); color: var(--text); }
.contact-box::backdrop { background: rgba(245, 243, 238, 0.82); }
.contact-box h2 { font: 300 clamp(30px, 3.6vw, 44px)/1.1 var(--serif); letter-spacing: -0.015em; margin: 8px 0 14px; }
.contact-box > p:not(.label) { margin-bottom: 22px; }
.close { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; display: grid; place-items: center; font: 300 28px/1 var(--serif); color: var(--ink); text-decoration: none; }
.close:hover { color: var(--accent); }
.contact { position: relative; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; background: rgba(245, 243, 238, 0.93); border-top: 1px solid var(--rule); }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px clamp(32px, 5vw, 80px); align-content: center; padding-block: 120px 48px; width: 100%; }
.contact h2 { font: 300 clamp(34px, 4vw, 56px)/1.08 var(--serif); letter-spacing: -0.015em; margin: 10px 0 18px; }
.contact p:not(.label) { font-size: 19px; line-height: 1.55; }
.small { font-size: 15px; color: var(--muted); padding-block: 0 28px; }
/* statements come in and leave as they cross the screen (browsers with scroll-driven animations; others scroll plainly) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .say { animation: beat linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    @keyframes beat { 0% { opacity: 0; transform: translateY(56px); } 28%, 72% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-56px); } }
    .first .say { animation-range: exit 0% exit 100%; animation-name: leave; }
    @keyframes leave { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-56px); } }
  }
}

/* ---- narrower: beside a chat (~720px), then a phone ---- */
@media (max-width: 900px) {
  .hero .wrap, .side, .author { grid-template-columns: minmax(0, 1fr); }
  .plate .fig { flex: none; min-height: 0; height: clamp(280px, 62vw, 460px); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .step { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "head fig" "title fig" "text fig"; column-gap: 24px; }
  .step .fig { margin-bottom: 0; align-self: start; }
  .portrait { max-width: 200px; }
}
@media (max-width: 720px) {
  .nav { order: 3; width: 100%; gap: 0 22px; }
}
@media (max-width: 900px) {
  .say { justify-self: stretch; width: auto; }
  .beat { padding-left: max(52px, env(safe-area-inset-left, 0px)); }   /* clear of the drawing's axis and its label */
  .contact .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 96px 40px; }
}
@media (max-width: 600px) {
  .step { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "title" "fig" "text"; }
  .step .fig { margin-bottom: 14px; }
  .offers, .pair { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 140px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
