/* ==========================================================================
   BANK 5.0 — styles.css
   Dark site built to feel like the jacket. Palette sampled from the cover.
   Re-skin by editing :root. Built by AMGomez Creative.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ground:   #05070F;   /* page background, the dominant 70% */
  --panel:    #0B1220;   /* cards, raised sections, form fields */
  --panel-2:  #101A2E;
  --core:     #0B4F9E;   /* section grounds, hover states */
  --cyan:     #4FC3F7;   /* primary CTA, links, active states — the one accent */
  --glow:     #A8E6FF;   /* headline accents, hairlines, focus rings */
  --text:     #FFFFFF;
  --text-2:   #9FB2CC;   /* secondary slate-blue — passes 4.5:1 on ground */
  --text-3:   #6F82A0;   /* labels only, never body copy */
  --line:     rgba(168,230,255,.14);
  --hair:     rgba(168,230,255,.35);

  --font-display: "Jost", "Poppins", "Helvetica Neue", Arial, sans-serif;     /* light, wide, open tracking */
  --font-cond:    "Barlow Condensed", "Arial Narrow", sans-serif;              /* heavy condensed — subtitle, labels */
  --font-body:    "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;

  --t-xs: .75rem;
  --t-sm: .875rem;
  --t-md: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  --t-2xl: clamp(2.2rem, 1.5rem + 3vw, 3.75rem);
  --t-hero: clamp(3.2rem, 1.8rem + 6.2vw, 6.4rem);

  --maxw: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(80px, 11vw, 150px);
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-cover: 0 60px 120px -40px rgba(0,0,0,.9), 0 30px 50px -30px rgba(79,195,247,.25);
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--ground); overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0; background: var(--ground); color: var(--text); overflow-x: hidden; overflow-x: clip; position: relative;
  font-family: var(--font-body); font-size: var(--t-md); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; }
h1, h2 { font-family: var(--font-display); font-weight: 300; letter-spacing: .06em; text-transform: uppercase; }
h3, h4 { font-family: var(--font-cond); font-weight: 700; letter-spacing: .02em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
::selection { background: var(--cyan); color: var(--ground); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--cyan); color: var(--ground); padding: 10px 14px; border-radius: var(--radius); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 840px; }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: calc(var(--section) * .55); }
.section--panel { background: var(--panel); }
.section--core { background: linear-gradient(160deg, #0A3F7F 0%, var(--core) 45%, #083A74 100%); }
/* The motif: a one-pixel cyan hairline between sections */
.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--hair) 20%, var(--hair) 80%, transparent); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-cond); font-weight: 600; font-size: var(--t-sm);
  letter-spacing: .24em; text-transform: uppercase; color: var(--cyan);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--glow); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }
.section-head h2 { font-size: var(--t-2xl); margin-top: 16px; }
.section-head p { margin-top: 18px; font-size: var(--t-lg); color: var(--text-2); }

.grid { display: grid; gap: clamp(20px, 3vw, 32px); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px;
  font-family: var(--font-cond); font-weight: 700; font-size: 1.15rem;
  letter-spacing: .1em; text-transform: uppercase; line-height: 1; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--cyan); color: var(--ground); box-shadow: 0 12px 30px -12px rgba(79,195,247,.7); }
.btn--primary:hover { background: var(--glow); box-shadow: 0 16px 36px -12px rgba(79,195,247,.9); }
.btn--ghost { border: 1px solid var(--hair); color: var(--text); }
.btn--ghost:hover { border-color: var(--glow); background: rgba(168,230,255,.06); }
.btn--sm { padding: 11px 20px; font-size: 1rem; }
.btn svg { width: 1em; height: 1em; }

/* ---------- Header ---------- */
.header { position: fixed; inset-inline: 0; top: 0; z-index: 100; color: var(--text); transition: background .3s, box-shadow .3s; }
.header.is-scrolled { background: color-mix(in oklab, var(--ground) 84%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 1px 0 var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.brand { font-family: var(--font-display); font-weight: 300; font-size: 1.45rem; letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 26px; height: 26px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { font-family: var(--font-cond); font-weight: 600; font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); transition: color .2s; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px; background: var(--glow); transition: right .3s var(--ease); }
.nav a:not(.btn):hover { color: var(--text); }
.nav a:not(.btn):hover::after { right: 0; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; place-items: center; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: #fff; position: relative; transition: background .2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 22px; height: 1.5px; background: #fff; transition: transform .3s var(--ease), top .3s; }
.nav-toggle span::before { top: -7px; } .nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
@media (max-width: 960px) {
  .nav-toggle { display: grid; }
  .header-inner { gap: 10px; }
  .header-inner .btn--header { margin-left: auto; margin-right: 2px; padding: 10px 16px; font-size: .95rem; }
  .nav { position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--panel); padding: 8px var(--gutter) 24px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s; border-bottom: 1px solid var(--line); }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
  .nav a:not(.btn) { padding: 14px 0; font-size: 1.2rem; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
}
@media (min-width: 961px) { .header-inner .btn--header { display: none; } }
@media (max-width: 480px) { .brand { font-size: 1.2rem; letter-spacing: .1em; } .brand-mark { width: 22px; height: 22px; } .nav-toggle { width: 40px; margin-right: -8px; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-top: calc(76px + clamp(40px, 7vw, 90px)); padding-bottom: clamp(80px, 10vw, 140px);
  background: radial-gradient(900px 700px at 78% 30%, rgba(11,79,158,.35) 0%, transparent 60%), var(--ground);
}
.hero-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero h1 { font-size: var(--t-hero); font-weight: 300; letter-spacing: .03em; line-height: .95; margin-top: 14px; color: var(--glow); white-space: nowrap; }
.hero h1 em { font-style: normal; }
.hero .subtitle { font-family: var(--font-cond); font-weight: 700; font-size: clamp(1.4rem, 1rem + 1.7vw, 2.1rem); letter-spacing: .02em; line-height: 1.1; color: var(--text); margin-top: 10px; }
.hero-tagline { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, .9rem + .7vw, 1.3rem); letter-spacing: .03em; line-height: 1.35; color: var(--cyan); margin-top: 22px; }
.hero-body { font-size: var(--t-md); line-height: 1.55; color: var(--text-2); max-width: 46ch; margin-top: 10px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-meta { margin-top: 26px; font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 8px 24px; }

.hero-art { position: relative; display: grid; place-items: center; perspective: 1400px; }
.hero-cover {
  width: min(100%, 520px);
  filter: drop-shadow(0 50px 60px rgba(0,0,0,.7)) drop-shadow(0 0 40px rgba(79,195,247,.12));
  transform: rotateY(var(--ry, 8deg)) rotateX(var(--rx, 2deg)) translateY(var(--ty, 0));
  transition: transform .6s var(--ease);
}
.hero-cover img { width: 100%; height: auto; }
.hero-art.is-tracking .hero-cover { transition-duration: .15s; }
.hero-art::before { /* glow behind the cover, sampled from the art */
  content: ""; position: absolute; z-index: -1; width: 80%; height: 80%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(79,195,247,.28), transparent 70%); filter: blur(30px);
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art { perspective: none; }
  .hero-cover { width: min(78%, 360px); --ry: 0deg; --rx: 0deg; transform: none; }
}

/* ---------- Marquee endorsements: one quote at a time ---------- */
.rotator { position: relative; display: grid; max-width: 980px; margin-inline: auto; text-align: center; }
.rotator blockquote { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .7s var(--ease), transform .7s var(--ease), visibility 0s .7s; }
.rotator blockquote.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.rotator blockquote p { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.25rem, 1rem + 1.4vw, 2.05rem); line-height: 1.35; letter-spacing: .01em; color: var(--text); }
.rotator blockquote p::before { content: "\201C"; color: var(--cyan); } .rotator blockquote p::after { content: "\201D"; color: var(--cyan); }
.rotator footer { margin-top: 22px; font-family: var(--font-cond); font-size: var(--t-md); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.rotator footer strong { color: var(--glow); font-weight: 600; margin-right: 10px; }
.rotator-nav { grid-area: 2 / 1; display: flex; justify-content: center; gap: 10px; margin-top: 32px; }
.rotator-nav button { width: 36px; height: 3px; border-radius: 2px; background: var(--line); padding: 0; transition: background .3s; }
.rotator-nav button[aria-selected="true"] { background: var(--cyan); }

/* ---------- The argument: cover detail + three movements ---------- */
.wrap.argument-grid { max-width: 1340px; }
.argument-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(48px, 9vw, 144px); align-items: start; }
.argument-copy { position: relative; z-index: 1; }
.argument-art { position: sticky; top: 100px; margin-top: 56px; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0,0,0,.9); }
.argument-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.argument { display: grid; gap: clamp(28px, 4vw, 44px); }
.movement { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; }
.movement .num { font-family: var(--font-display); font-weight: 300; font-size: 1.8rem; color: var(--cyan); letter-spacing: .04em; line-height: 1; padding-top: 4px; }
.movement h3 { font-size: 1.3rem; line-height: 1.25; color: var(--text); text-transform: none; letter-spacing: 0; }
.movement p { margin-top: 10px; font-size: var(--t-md); color: var(--text-2); max-width: 56ch; }
@media (max-width: 900px) {
  .argument-grid { grid-template-columns: 1fr; }
  .argument-art { position: relative; top: auto; margin-top: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 620px) { .movement { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Visual slot: reserved space for imagery that hasn't arrived ---------- */
.visual-slot { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); margin-bottom: 24px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.visual-slot img { width: 100%; height: 100%; object-fit: cover; }
.visual-slot-label { position: absolute; left: 14px; bottom: 12px; font-family: var(--font-cond); font-size: var(--t-xs); letter-spacing: .18em; text-transform: uppercase; color: var(--glow); background: rgba(5,7,15,.7); padding: 6px 10px; border-radius: 999px; }

/* ---------- Praise: side-scrolling cards ---------- */
.carousel-track.media-track > * { flex: 0 0 calc((100% - 2 * clamp(16px, 2.5vw, 28px)) / 3); }
@media (max-width: 900px) { .carousel-track.media-track > * { flex-basis: min(72%, 420px); } }
@media (max-width: 560px) { .carousel-track.media-track > * { flex-basis: 86%; } }
.carousel-track.praise-track > * { flex: 0 0 min(88%, calc((100% - clamp(16px, 2.5vw, 28px)) / 1.5)); }
@media (max-width: 760px) { .carousel-track.praise-track > * { flex-basis: 100%; } .praise-card figcaption span { font-size: var(--t-xs); } }
.praise-card { margin: 0; padding: clamp(22px, 3vw, 32px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; flex-direction: column; min-height: 100%; transition: border-color .3s; }
.praise-card:hover { border-color: var(--hair); }
/* The quote fills whatever space is left between the top of the card and the attribution,
   so cards of equal height never show a dead gap. Overflow is faded, not line-clamped. */
.praise-card blockquote { margin: 0; flex: 1 1 auto; min-height: 0; font-size: var(--t-lg); line-height: 1.55; color: var(--text); overflow: hidden; }
.praise-card.is-clamped blockquote { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 3em), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 3em), transparent); }
.praise-card.is-open blockquote { flex: 0 0 auto; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.praise-card blockquote::before { content: "\201C"; color: var(--cyan); }
.praise-card .more[hidden] { display: none; }
.praise-card .more { align-self: flex-start; margin-top: 8px; font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.praise-card figcaption { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.praise-card figcaption strong { display: block; font-family: var(--font-cond); font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; color: var(--glow); }
.praise-card figcaption span { font-size: var(--t-sm); color: var(--text-2); }

/* ---------- Contributors dial: hover / tap to expand ---------- */
.dial { display: flex; gap: 8px; align-items: stretch; max-width: 100%; overscroll-behavior-x: contain; }
.dial-item { position: relative; flex: 1 1 64px; min-width: 64px; display: flex; gap: 20px; align-items: center; text-align: left; padding: 18px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: flex-basis .55s var(--ease), border-color .3s, background .3s; }
.dial-item:hover, .dial-item:focus-visible { border-color: var(--hair); }
.dial-item.is-active { flex: 0 0 500px; padding: 18px; background: var(--panel-2); border-color: var(--hair); }
.dial-item .tile { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: linear-gradient(140deg, var(--core), #062B57); color: var(--glow); font-family: var(--font-display); font-size: 1rem; letter-spacing: .06em; overflow: hidden; transition: width .4s var(--ease), height .4s var(--ease), font-size .4s; }
.dial-item.is-active .tile { width: 96px; height: 96px; font-size: 1.8rem; }
.dial-item .tile img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.dial-body { display: grid; gap: 4px; flex: none; width: 340px; opacity: 0; transform: translateX(10px); transition: opacity .35s var(--ease) .1s, transform .35s var(--ease) .1s; white-space: normal; }
.dial-item.is-active .dial-body { opacity: 1; transform: none; }
.dial-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.dial-head strong { font-family: var(--font-cond); font-weight: 700; font-size: 1.5rem; letter-spacing: .03em; text-transform: uppercase; color: var(--text); }
.dial-head em { font-style: normal; font-family: var(--font-cond); font-size: var(--t-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.dial-body .role { font-size: var(--t-sm); color: var(--cyan); }
.dial-body .sum { font-size: var(--t-sm); color: var(--text-2); margin-top: 6px; max-width: 52ch; }
.dial-link { justify-self: start; margin-top: 8px; font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.dial-link:hover { color: var(--glow); }
/* Small screens: a scrollable row of tiles, and the bio in a fixed panel below. Nothing reflows on change. */
.dial-panel { display: none; }
@media (max-width: 1180px) {
  .dial { overflow-x: auto; scrollbar-width: none; padding: 4px 0 8px; scroll-snap-type: x proximity; }
  .dial::-webkit-scrollbar { display: none; }
  .dial-item, .dial-item.is-active { flex: 0 0 72px; width: 72px; padding: 12px; justify-content: center; background: var(--panel); scroll-snap-align: center; transition: border-color .3s, background .3s; }
  .dial-item.is-active { border-color: var(--cyan); background: var(--panel-2); }
  .dial-item .tile, .dial-item.is-active .tile { width: 48px; height: 48px; font-size: 1rem; }
  .dial-item .dial-body { display: none; }
  .dial-panel { display: grid; gap: 4px; margin-top: 16px; padding: 22px; background: var(--panel-2); border: 1px solid var(--hair); border-radius: var(--radius-lg); min-height: 250px; transition: opacity .25s var(--ease); }
  .dial-panel .sum { max-width: none; }
  .dial-panel.is-swapping { opacity: 0; }
  .dial-panel .dial-head strong { font-size: 1.4rem; }
}
@media (max-width: 560px) { .dial-panel { min-height: 350px; } }
@media (hover: none) { .dial-item:hover { border-color: var(--line); } .dial-item.is-active:hover { border-color: var(--cyan); } }

/* ---------- Repeated pre-order strip ---------- */
.cta-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-strip p { font-family: var(--font-display); font-weight: 300; font-size: var(--t-xl); letter-spacing: .04em; text-transform: uppercase; }
.cta-strip p span { color: var(--cyan); }

/* ---------- Launch event ---------- */
.event { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.event h2 { font-size: var(--t-2xl); margin-top: 16px; }
.event .desc { margin-top: 20px; font-size: var(--t-lg); color: rgba(255,255,255,.85); max-width: 56ch; }
.event-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid rgba(255,255,255,.18); }
.event-facts li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.event-facts dt, .event-facts .k { font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .18em; text-transform: uppercase; color: var(--glow); padding-top: 3px; }
.event-facts .v { color: #fff; }
.event-facts .v small { display: block; color: rgba(255,255,255,.65); font-size: var(--t-sm); margin-top: 2px; }
.event-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.event .btn--primary { background: #fff; color: var(--core); box-shadow: none; }
.event .btn--primary:hover { background: var(--glow); }
.event-note { margin-top: 22px; font-size: var(--t-sm); color: rgba(255,255,255,.7); max-width: 56ch; }
.event-note a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) { .event { grid-template-columns: 1fr; } }

/* ---------- Inside the book ---------- */
.toc { border-top: 1px solid var(--line); }
.toc details { border-bottom: 1px solid var(--line); }
.toc summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 90px 1fr auto; gap: 20px; align-items: center; padding: 26px 0; transition: color .2s; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary:hover { color: var(--glow); }
.toc .part { font-family: var(--font-display); font-weight: 300; font-size: 1rem; letter-spacing: .2em; color: var(--cyan); }
.toc summary h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); letter-spacing: .03em; text-transform: uppercase; }
.toc summary h3 small { display: block; font-family: var(--font-body); font-weight: 400; font-size: var(--t-sm); letter-spacing: 0; text-transform: none; color: var(--text-3); margin-top: 4px; }
.toc .chev { width: 22px; height: 22px; color: var(--text-3); transition: transform .3s var(--ease), color .2s; }
.toc details[open] .chev { transform: rotate(180deg); color: var(--cyan); }
.toc ol { margin: 0; padding: 0 0 26px 110px; list-style: none; display: grid; gap: 10px; }
.toc ol li { display: flex; gap: 16px; color: var(--text-2); }
.toc ol li span { font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .12em; color: var(--text-3); min-width: 32px; padding-top: 4px; }
.toc-foot { margin-top: 28px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 8px 32px; }
.toc-foot strong { color: var(--text); font-weight: 500; }
@media (max-width: 620px) { .toc summary { grid-template-columns: 1fr auto; } .toc .part { grid-column: 1 / -1; } .toc ol { padding-left: 0; } }

/* ---------- About Brett ---------- */
.about { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-photo { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1; background: var(--panel); position: sticky; top: 100px; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.02); }
.about h2 { font-size: var(--t-2xl); margin-top: 16px; }
.about h2 small { display: block; font-family: var(--font-cond); font-weight: 600; font-size: .38em; letter-spacing: .16em; color: var(--text-2); margin-bottom: 10px; }
.about-bio { margin-top: 24px; color: var(--text-2); font-size: var(--t-lg); max-width: 60ch; }
.about-bio p + p { margin-top: 1em; }
.about-bio[data-bio]:not(.is-open) p:not(:first-child) { display: none; }
.bio-more { margin-top: 18px; font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.bio-more:hover { color: var(--glow); }
.about-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 30px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--hair); display: grid; place-items: center; transition: background .2s, border-color .2s, color .2s; }
.socials a:hover { background: var(--cyan); color: var(--ground); border-color: var(--cyan); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.creds { margin-top: clamp(36px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.creds div { font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.creds strong { display: block; font-family: var(--font-display); font-weight: 300; font-size: 2rem; letter-spacing: .04em; color: var(--glow); margin-bottom: 4px; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about-photo { position: static; max-width: 380px; } .creds { grid-template-columns: 1fr 1fr; } }

/* ---------- Email capture ---------- */
.capture { text-align: center; }
.capture h2 { font-size: var(--t-2xl); margin-top: 16px; }
.capture p { color: var(--text-2); font-size: var(--t-lg); max-width: 52ch; margin: 18px auto 0; }
.capture form { max-width: 620px; margin: 32px auto 0; }
.capture-row { display: flex; gap: 10px; }
.capture input[type="text"], .capture input[type="email"] { flex: 1; min-width: 0; font: inherit; padding: 15px 18px; border-radius: 999px; border: 1px solid var(--hair); background: var(--panel); color: var(--text); }
.capture input::placeholder { color: var(--text-3); }
.capture input[type="text"]:focus, .capture input[type="email"]:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(79,195,247,.15); }
.capture input.is-invalid { border-color: #FF7A8A; }
.capture-consent { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; margin-top: 18px; text-align: left; font-size: var(--t-sm); line-height: 1.55; color: var(--text-2); cursor: pointer; }
.capture-consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cyan); cursor: pointer; }
.capture-consent.is-invalid span { color: #FFB3BC; }
.capture-consent a, .capture-privacy a { color: var(--glow); text-decoration: underline; text-underline-offset: 2px; }
.capture .form-status { max-width: 620px; margin: 16px auto 0; }
.capture-done { max-width: 520px; margin: 32px auto 0; padding: 28px; border: 1px solid var(--hair); border-radius: var(--radius-lg); background: var(--panel); }
.capture-done strong { display: block; font-family: var(--font-display); font-weight: 300; font-size: var(--t-xl); letter-spacing: .06em; text-transform: uppercase; color: var(--glow); }
.capture-done span { display: block; margin-top: 8px; color: var(--text-2); }
.capture-privacy { max-width: 620px; margin: 18px auto 0; text-align: left; font-size: var(--t-xs); color: var(--text-3); }
.capture-privacy summary { cursor: pointer; text-align: center; font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); list-style: none; }
.capture-privacy summary::-webkit-details-marker { display: none; }
.capture-privacy summary:hover { color: var(--text-2); }
.capture-privacy p { margin: 12px 0 0; font-size: var(--t-xs); line-height: 1.6; color: var(--text-3); max-width: none; }
@media (max-width: 560px) {
  .capture form { display: flex; flex-direction: column; gap: 10px; }
  .capture-row { display: contents; }
  .capture-consent { order: 3; margin: 6px 0 4px; }
  .capture form .btn { order: 4; }
}

/* ---------- Media cards ---------- */
.media-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); color: #fff; text-align: left; aspect-ratio: 16 / 10; display: block; width: 100%; border: 1px solid var(--line); transition: transform .35s var(--ease), border-color .3s; }
.media-card:hover { transform: translateY(-5px); border-color: var(--hair); }
.media-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: transform .8s var(--ease), opacity .3s; }
.media-card:hover img { transform: scale(1.04); opacity: 1; }
.media-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,7,15,.97) 0%, rgba(5,7,15,.85) 32%, rgba(5,7,15,.25) 62%, transparent 80%); }
.media-card .play { position: absolute; z-index: 2; left: 50%; top: 42%; translate: -50% -50%; width: 60px; height: 60px; border-radius: 50%; background: rgba(5,7,15,.5); backdrop-filter: blur(8px); display: grid; place-items: center; border: 1px solid var(--hair); transition: background .3s, transform .3s var(--ease); }
.media-card:hover .play { background: var(--cyan); transform: scale(1.08); }
.media-card .play svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }
.media-card:hover .play svg { fill: var(--ground); }
.media-meta { position: absolute; z-index: 2; left: 22px; right: 22px; bottom: 20px; }
.media-meta .kicker { font-family: var(--font-cond); font-size: var(--t-xs); letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); }
.media-meta h3 { font-size: 1.35rem; margin-top: 4px; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.video-dialog { border: 0; padding: 0; background: transparent; max-width: min(1000px, 92vw); width: 100%; }
.video-dialog::backdrop { background: rgba(5,7,15,.9); backdrop-filter: blur(6px); }
.video-frame { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--radius-lg); overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-fallback { display: inline-block; margin-top: 14px; font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.video-fallback:hover { color: var(--glow); }
.video-fallback[hidden] { display: none; }
.video-close { position: absolute; right: -8px; top: -52px; color: #fff; font-size: 2rem; line-height: 1; width: 44px; height: 44px; display: grid; place-items: center; }

/* ---------- Carousels / books ---------- */
.carousel { position: relative; }
.carousel-track { display: flex; gap: clamp(16px, 2.5vw, 28px); overflow-x: auto; max-width: 100%; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 8px 0 24px; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; flex: 0 0 min(76%, 240px); }
.carousel-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; }
.carousel-dots { display: flex; gap: 8px; }
.carousel-dots button { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .2s, transform .2s; padding: 0; }
.carousel-dots button[aria-current="true"] { background: var(--cyan); transform: scale(1.3); }
.carousel-btns { display: flex; gap: 8px; }
.carousel-btns button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hair); display: grid; place-items: center; transition: background .2s, border-color .2s, color .2s; }
.carousel-btns button:hover { background: var(--cyan); color: var(--ground); border-color: var(--cyan); }
.carousel-btns svg { width: 18px; height: 18px; }
.book-card { display: flex; flex-direction: column; gap: 14px; }
.book-card .sub { flex: 1; }
.book-cover { aspect-ratio: 2/3; border-radius: 3px; overflow: hidden; background: var(--panel); box-shadow: 0 30px 50px -30px rgba(0,0,0,.9); transition: transform .35s var(--ease), box-shadow .35s; }
.book-card:hover .book-cover { transform: translateY(-6px); box-shadow: 0 40px 60px -30px rgba(0,0,0,1), 0 0 0 1px var(--hair); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card h3 { font-size: 1.25rem; text-transform: uppercase; letter-spacing: .04em; }
.book-card .sub { font-size: var(--t-sm); color: var(--text-2); margin-top: 4px; }
.book-card a.buy { align-self: flex-start; margin-top: 0; font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.book-card a.buy:hover { color: var(--glow); }

/* ---------- Speaking ---------- */
.speaking { display: grid; grid-template-columns: 1fr auto; gap: 32px 64px; align-items: center; }
.speaking h2 { font-size: var(--t-2xl); margin-top: 16px; }
.speaking p { margin-top: 18px; color: var(--text-2); font-size: var(--t-lg); max-width: 60ch; }
@media (max-width: 760px) { .speaking { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-side h2 { font-size: var(--t-2xl); margin-top: 16px; }
.contact-side > p { margin-top: 16px; color: var(--text-2); font-size: var(--t-lg); }
.contact-types { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.contact-types li { display: flex; gap: 14px; align-items: flex-start; }
.contact-types svg { width: 24px; height: 24px; flex: none; color: var(--cyan); }
.contact-types strong { display: block; font-family: var(--font-cond); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; }
.contact-types span { font-size: var(--t-sm); color: var(--text-2); }
.form-consent { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; font-size: var(--t-sm); line-height: 1.55; color: var(--text-2); cursor: pointer; }
.form-consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cyan); cursor: pointer; }
.form-consent.is-invalid span { color: #FFB3BC; }
.form-consent a, .form-privacy a { color: var(--glow); text-decoration: underline; text-underline-offset: 2px; }
.form-privacy { font-size: var(--t-xs); color: var(--text-3); }
.form-privacy summary { cursor: pointer; font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); list-style: none; }
.form-privacy summary::-webkit-details-marker { display: none; }
.form-privacy summary:hover { color: var(--text-2); }
.form-privacy p { margin: 10px 0 0; line-height: 1.6; }
.form-done { padding: clamp(24px, 3vw, 40px); border: 1px solid var(--hair); border-radius: var(--radius-lg); background: var(--panel); }
.form-done strong { display: block; font-family: var(--font-display); font-weight: 300; font-size: var(--t-xl); letter-spacing: .06em; text-transform: uppercase; color: var(--glow); }
.form-done span { display: block; margin-top: 10px; color: var(--text-2); }
.contact-direct { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.contact-direct-label { font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); }
.contact-direct a { font-size: var(--t-lg); color: var(--glow); text-decoration: none; transition: color .2s; word-break: break-word; }
.contact-direct a:hover { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.form-status a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.form { display: grid; gap: 18px; background: var(--panel); padding: clamp(24px, 3vw, 40px); border-radius: var(--radius-lg); border: 1px solid var(--line); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.field label small { font-family: var(--font-body); letter-spacing: 0; text-transform: none; color: var(--text-3); }
.field input, .field select, .field textarea { color-scheme: dark; font: inherit; width: 100%; padding: 13px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ground); color: var(--text); transition: border-color .2s, box-shadow .2s; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239FB2CC' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(79,195,247,.15); }
.field textarea { min-height: 150px; resize: vertical; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #FF7A8A; }
.field .error { font-size: var(--t-xs); color: #FF9AA6; display: none; }
.field.is-invalid .error { display: block; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.form-foot small { color: var(--text-3); }
.form-status { display: none; padding: 16px 18px; border-radius: var(--radius); font-weight: 500; }
.form-status.is-success { display: block; background: rgba(79,195,247,.12); color: var(--glow); border: 1px solid var(--hair); }
.form-status.is-error { display: block; background: rgba(255,122,138,.1); color: #FFB3BC; border: 1px solid rgba(255,122,138,.3); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { background: #030509; color: var(--text-2); padding-block: clamp(56px, 8vw, 96px) 32px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(32px, 5vw, 64px); }
.footer h3 { font-family: var(--font-display); font-weight: 300; font-size: 1.8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--glow); }
.footer h3 span { display: block; font-family: var(--font-cond); font-weight: 600; font-size: .5em; letter-spacing: .14em; color: var(--text-2); margin-top: 8px; }
.footer h4 { font-family: var(--font-cond); font-size: var(--t-sm); letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a:hover { color: #fff; }
.footer dl { margin: 0; display: grid; gap: 8px; font-size: var(--t-sm); }
.footer dt { color: var(--text-3); }
.footer dd { margin: 0 0 6px; color: var(--text-2); }
.footer .socials { margin-top: 20px; }
.footer-bottom { margin-top: clamp(40px, 6vw, 64px); padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: var(--t-sm); color: var(--text-3); }
.footer-bottom a { color: var(--text-2); }
.footer-bottom a:hover { color: #fff; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Motion. Restrained: fade-and-rise on scroll, nothing over ~600ms.
   JS tags elements with [data-reveal] and flips .is-in in the viewport.
   Without JS (html.no-js) everything is simply visible.
   ========================================================================== */
html.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: var(--d, 0s); }
html.js [data-reveal="left"]  { transform: translateX(-32px); }
html.js [data-reveal="right"] { transform: translateX(32px); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }
html.js [data-reveal] .eyebrow::before { transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease) .2s; }
html.js [data-reveal].is-in .eyebrow::before { transform: scaleX(1); }

/* Ticker: logos and cards slide in from the right in sequence */
html.js .ticker > [data-reveal] { transform: translateX(56px); transition-delay: calc(var(--d, 0s) * .8); }
html.js .ticker > [data-reveal].is-in { transform: none; }

/* Ledger: a hairline draws across, then items append from the baseline */
.ledger { position: relative; padding-top: 28px; }
.ledger::before { content: ""; position: absolute; left: 0; top: 0; height: 1px; width: 100%; background: var(--glow); opacity: .5; transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease); }
.ledger.is-in::before { transform: scaleX(1); }
html.js .ledger [data-reveal] { transform: translateY(36px); transition-delay: calc(.3s + var(--d, 0s)); }
html.js .ledger [data-reveal].is-in { transform: none; }

/* Shelf: book covers stand up from lying flat, oldest to newest */
.shelf .book-card { perspective: 900px; }
html.js .shelf [data-reveal] { transform: none; transition: opacity .4s var(--ease); }
html.js .shelf [data-reveal] .book-cover { transform: rotateX(-80deg); transform-origin: 50% 100%; transition: transform .7s cubic-bezier(.2,.8,.2,1.04); transition-delay: var(--d, 0s); }
html.js .shelf [data-reveal].is-in .book-cover { transform: none; }
html.js .shelf [data-reveal].is-in:hover .book-cover { transform: translateY(-6px); transition-duration: .35s; transition-delay: 0s; }

/* Assembly: form fields draw on top to bottom, submit row last */
html.js .form [data-reveal] { transform: translateY(12px); transition-duration: .4s; }
html.js .form [data-reveal].is-in { transform: none; }

/* Hero entrance (on load, not scroll) */
@keyframes hero-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes hero-cover { from { opacity: 0; transform: rotateY(22deg) rotateX(4deg) translateY(30px); } to { opacity: 1; transform: rotateY(8deg) rotateX(2deg); } }
html.js .hero-copy > * { animation: hero-up .8s var(--ease) both; }
html.js .hero-copy > :nth-child(1) { animation-delay: .1s } html.js .hero-copy > :nth-child(2) { animation-delay: .18s }
html.js .hero-copy > :nth-child(3) { animation-delay: .26s } html.js .hero-copy > :nth-child(4) { animation-delay: .34s }
html.js .hero-copy > :nth-child(5) { animation-delay: .42s } html.js .hero-copy > :nth-child(6) { animation-delay: .5s }
html.js .hero-copy > :nth-child(7) { animation-delay: .6s }
html.js .hero-cover { animation: hero-cover 1.1s var(--ease) .15s both; }
html.js .hero-cover.is-settled { animation: none; }
@media (max-width: 900px) { html.js .hero-cover { animation-name: hero-up; } }

/* Version odometer: 2.0 → 3.0 → 4.0 → 5.0 */
.odo { display: inline-block; vertical-align: top; height: 1em; overflow: hidden; }
.odo-track { display: flex; flex-direction: column; }
.odo-track span { display: block; height: 1em; line-height: 1; }
@keyframes odo { 0%, 12% { transform: translateY(0); } 30%, 42% { transform: translateY(-1em); } 60%, 72% { transform: translateY(-2em); } 90%, 100% { transform: translateY(-3em); } }
html.js .odo-track { animation: odo 2.2s cubic-bezier(.7,0,.2,1) .4s both; }
html.no-js .odo-track { transform: translateY(-3em); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.js [data-reveal] { opacity: 1; transform: none; }
  html.js .odo-track { transform: translateY(-3em); }
  html.js .shelf [data-reveal] .book-cover { transform: none; }
  .hero-cover { transform: none !important; }
}
