/*
  ══════════════════════════════════════════════════════════════════════════════
  hub.css — the static pages (every article, the archive, the kit) dressed as
  the hub at reelgorithm.net/. (2026-11-03)
  ══════════════════════════════════════════════════════════════════════════════
  Owner: "redesign every article for the newsletter page to be the same as
  this website". Loaded AFTER each page's own <style>, so it wins by order.
  Every page here was built on the same nine variables, so the palette swap is
  a variable swap; the rest restyles shared chrome (nav, masthead, footer) and
  the shared article roles. A page's own chart/figure CSS is untouched.

  DUSK, the hub's palette, sampled from the hero painting
  (platform/src/app/globals.css :root). Keep the two in step.
*/
:root {
  --bg: #0b1730; --bg-2: #102143; --paper: #0b1730; --paper-2: #102143;
  --ink: #f3efe3; --muted: #a3afcf; --faint: #8e9bbf;
  --line: #c8d4ff1c; --line-2: #c8d4ff2b;
  --pink: #ff8cc3; --pink-2: #ffb0d6;
  --hub-wrap: max(clamp(20px, 5vw, 56px), calc((100vw - 1200px) / 2 + clamp(20px, 5vw, 56px)));
}
body { background: var(--bg) !important; }
/* the old pages' pink radial glow + grid overlay: retired with the black page */
.bg, .grain { display: none !important; }

/* ── masthead: the hero painting, short, then the same cloud bank as the hub ── */
.hub-mast {
  position: relative;
  height: clamp(150px, 14vw, 210px); /* short: with the bank below it the title must still sit above the fold */
  background: #1f416c url(/_assets/sky/hero-painted-wide.webp) right bottom / cover no-repeat;
}
@media (max-width: 767px) {
  .hub-mast { height: 200px; background-image: url(/_assets/sky/hero-painted-phone.webp); background-position: center 62%; }
}
/* pull = 7.31vw: where the strip's body turns solid (scripts/hero-sky.md),
   so the painting's bottom edge hides inside the clouds */
.hub-bank { display: block; position: relative; z-index: 1; width: 100%; height: auto; margin-top: -7.31vw; pointer-events: none; }

/* ── the nav: no bar (owner: "the black bar at the top HAS to go") ── */
header.hub-nav {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 72px; padding: 0 var(--hub-wrap);
  border: 0 !important; background: none !important;
}
.hub-wm { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font: 600 18px/1 'Geist', system-ui, sans-serif; letter-spacing: -0.02em; }
.hub-wm svg { width: 20px; height: 20px; }
.hub-links { display: flex; align-items: center; gap: 2px; }
.hub-links a { padding: 8px 12px; border-radius: 999px; color: rgb(243 239 227 / 0.9); text-decoration: none;
  font: 500 14px/1 'Geist', system-ui, sans-serif; transition: background-color .2s, color .2s; }
@media (hover: hover) { .hub-links a:hover { background: rgb(255 255 255 / 0.1); color: var(--ink); } }
.hub-links a.x { display: none; }
/* the short masthead puts cloud under the nav at most widths: the words get
   their own soft floor (a shadow on the glyphs, not a bar) */
.hub-wm, .hub-links a { text-shadow: 0 1px 14px rgb(11 23 48 / 0.85), 0 0 2px rgb(11 23 48 / 0.6); }
@media (min-width: 480px) { .hub-links a.x { display: inline-block; } }
@media (min-width: 1024px) { .hub-links a { font-size: 15px; } }

/* horizontal overflow clipped at the root (a slide entering from the right
   edge must never widen a phone's layout viewport) + a visible focus ring */
html { overflow-x: clip; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ── article type, on the hub's roles ── */
main { padding-top: 8px !important; }
.kicker { font-family: 'Geist', system-ui, sans-serif !important; text-transform: none !important;
  letter-spacing: 0 !important; font-size: 14px !important; color: var(--pink) !important; }
.byline { font-family: 'Geist', system-ui, sans-serif !important; letter-spacing: 0 !important; font-size: 14px !important; color: var(--faint) !important; }
h1 { font-weight: 600 !important; letter-spacing: -0.04em !important; line-height: 1.0 !important; text-wrap: balance; }
/* no one-word accent — not by colour, not by weight ("Year one" 600 / "is a
   free pass" 400 was the same tell) */
h1 *, h2 *, h1 .serif, h2 .serif { color: inherit !important; font-weight: inherit !important; }
article h2 { font-weight: 600 !important; letter-spacing: -0.03em !important; }
article p, article li { color: #d3d9e8; }
.figure, .plate { border-radius: 20px; border-color: var(--line-2) !important; background: var(--bg-2) !important; }
/* the pages' own old footers: the hub footer replaces them */
body > footer:not(.hub-foot) { display: none !important; }
/* the kit's / archive's tracked mono caps labels → sentence-case Geist, as on the hub */
/* every label these pages set in tracked uppercase — measured off their own
   <style> blocks (2026-11-03): sentence case and Geist, as on the hub. Data
   and code that is genuinely monospaced (.mono, tables' numbers) stays mono. */
.kicker, .figure .cap, .num .k, table.d th, .caveat .cap, .dl, .cta, .eyebrow, .issue .date,
.slab .t, .guide .cover .k, .guide .tag, .btn, .proofrow span, .t, .k, .tag, .cf {
  font-family: 'Geist', system-ui, sans-serif !important; text-transform: none !important; letter-spacing: 0 !important;
}
.eyebrow span { display: none; }
.toplink { font-family: 'Geist', system-ui, sans-serif !important; letter-spacing: 0 !important; }

/* ── the night plate + footer, as on the hub ── */
.hub-night { display: block; width: 100%; height: auto; margin-top: 64px; margin-bottom: -9vw; pointer-events: none; }
.hub-foot { position: relative; z-index: 2; padding: 24px var(--hub-wrap) 56px; font-family: 'Geist', system-ui, sans-serif; }
.hub-foot .cols { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .hub-foot .cols { grid-template-columns: 1.2fr 2fr; } }
.hub-foot .links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
@media (min-width: 640px) { .hub-foot .links { grid-template-columns: repeat(4, 1fr); } }
.hub-foot h4 { font: 600 14px/1.4 'Geist', system-ui, sans-serif; color: var(--ink); margin-bottom: 14px; }
.hub-foot a { display: block; color: var(--muted); text-decoration: none; font-size: 14px; line-height: 1.55; margin-bottom: 10px; border: 0 !important; }
@media (hover: hover) { .hub-foot a:hover { color: var(--ink); } }
.hub-foot p { font-size: 14px; line-height: 1.55; color: var(--muted); max-width: 28ch; margin-top: 10px; }

/* ── motion: the reels' round-5 rules, as on the hub (_assets/hub-motion.js) ──
   Scoped to html.mo, which an inline head script sets ONLY when the motion can
   run — no JS or reduced motion: nothing is ever hidden. Body copy does not
   move (a reader is reading); the title rises, the deck slides in whole from
   the nearer edge, figures and the data band arrive as objects. */
:root { --mo-out: cubic-bezier(0.33, 1, 0.68, 1); }
.mo [data-mo]:not(.in) { opacity: 0; }
.mo [data-mo].in { animation: mo-slide .45s var(--mo-out) var(--mo-d, 0s) backwards; }
.mo [data-mo="rise"].in { animation: mo-rise .6s var(--mo-out) var(--mo-d, 0s) backwards, mo-fade .36s linear var(--mo-d, 0s) backwards; }
.mo [data-mo].in.mo-now { animation: none; }
@keyframes mo-slide { from { transform: translateX(var(--mo-x, 0px)) scale(var(--mo-sx, 1), var(--mo-sy, 1)); } to { transform: none; } }
@keyframes mo-rise { from { transform: translateY(28px); } to { transform: none; } }
@keyframes mo-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mo [data-mo] { animation: none !important; opacity: 1 !important; } }
