/* blakecody.com design system (home + videos). Palette, type and components. */
:root {
  --light: #F5F6F8;
  --dark: #111318;
  --accent: #4D6BFF;
  --on-accent: #FFFFFF;
  --muted: #3F4450;
  --line: #D9DCE2;
  --soft: #C4C8D2;
  --footer: #9AA0AD;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Motion tokens: every transition and animation on Home and Videos uses these. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;  /* hovers, button presses */
  --dur-base: 320ms;  /* small reveals, underlines */
  --dur-slow: 700ms;  /* section and hero entrances */
  --rise: 16px;       /* how far things move up when they appear */
  --stagger: 70ms;    /* delay between items in a group */
}
/* Phones: same motion, shorter and quicker. */
@media (max-width: 760px) {
  :root { --dur-fast: 130ms; --dur-base: 260ms; --dur-slow: 560ms; --rise: 10px; }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--light); color: var(--dark); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-text { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; border: 2px solid var(--accent); border-radius: 6px; background: var(--accent); color: var(--on-accent); font: 800 14px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.btn:hover { background: #3a57ec; border-color: #3a57ec; transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn-light { background: var(--light); border-color: var(--light); color: var(--dark); }
.btn-light:hover { background: #fff; border-color: #fff; }
.btn-outline { background: transparent; border-color: var(--dark); color: var(--dark); }
.btn-outline:hover { background: var(--dark); border-color: var(--dark); color: var(--light); }
.on-dark .btn-outline { border-color: var(--light); color: var(--light); }
.on-dark .btn-outline:hover { background: var(--light); color: var(--dark); }
.more { align-self: center; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 12px 4px; border-bottom: 2px solid transparent; transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.more:hover { border-color: var(--accent); color: var(--accent); }
.more .arr { display: inline-block; transition: transform var(--dur-base) var(--ease-out); }
.more:hover .arr { transform: translateX(3px); }

/* Nav: transparent over the hero, then a solid bar with a soft shadow after 40px.
   The solid layer is a pseudo-element so only its opacity animates. Without the
   script the nav simply stays where it was (not fixed), so it can never cover text. */
.top { position: absolute; left: 0; right: 0; top: 0; z-index: 5; color: var(--light); }
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--dark); box-shadow: 0 8px 28px rgba(0, 0, 0, .28); opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out); }
.top.stuck::before { opacity: 1; }
html.js-motion .top { position: fixed; transition: transform var(--dur-base) var(--ease-out); }
.top.away { transform: translateY(-115%); } /* tucked away while scrolling down, back on scroll up */
.top.solid, html.js-motion .top.solid { position: sticky; background: var(--dark); border-bottom: 1px solid #262a33; }
.top nav { max-width: 1200px; margin: 0 auto; padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 32px; }
.wordmark { font-weight: 900; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 10px 0; }
.wordmark span { color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.links a { position: relative; text-decoration: none; padding: 14px 0 12px; }
.links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 7px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform var(--dur-base) var(--ease-out); }
.links a:hover::after, .links a:focus-visible::after, .links a[aria-current="page"]::after { transform: scaleX(1); }
.links { align-items: center; }
.links a.nav-sub { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; margin-left: 4px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.links a.nav-sub::after { display: none; }
.links a.nav-sub:hover { background: #3a57ec; transform: translateY(-1px); }

/* Hero */
.hero { position: relative; height: 780px; max-height: 100svh; min-height: 560px; overflow: hidden; color: var(--light); background: radial-gradient(ellipse at 66% 34%, #5d6068 0%, #2b2e35 40%, var(--dark) 80%); }
.hero-media { position: absolute; inset: 0; display: flex; justify-content: flex-end; align-items: flex-end; padding-right: max(4%, calc(50% - 560px)); }
.hero-photo { flex: none; height: 90%; width: auto; max-width: none; filter: grayscale(1) contrast(1.06); transform-origin: 50% 100%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(17,19,24,.94) 0%, rgba(17,19,24,.5) 26%, rgba(17,19,24,0) 55%), linear-gradient(to bottom, rgba(17,19,24,.55) 0%, rgba(17,19,24,0) 22%), linear-gradient(to right, rgba(17,19,24,.55) 0%, rgba(17,19,24,0) 55%); pointer-events: none; }
.hero-text { position: absolute; left: 0; right: 0; bottom: 64px; z-index: 2; }
.hero-text .wrap { display: flex; flex-direction: column; gap: 12px; }
.hero h1 .ln { display: block; }
.hero h1 { margin: 0; font-size: clamp(56px, 9vw, 128px); line-height: .88; letter-spacing: -.03em; font-weight: 900; text-transform: uppercase; }
.hero p { margin: 0; font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; }
/* Hero entrance: plays once on load, in CSS only, so it never depends on the script.
   Photo settles in, then BLAKE, CODY and the tagline rise one after another. */
@media (prefers-reduced-motion: no-preference) {
  .hero-photo { animation: heroPhoto 1200ms var(--ease-out) both; }
  .hero h1 .ln, .hero p { animation: riseIn var(--dur-slow) var(--ease-out) both; }
  .hero h1 .ln:nth-child(1) { animation-delay: 250ms; }
  .hero h1 .ln:nth-child(2) { animation-delay: 340ms; }
  .hero p { animation-delay: 490ms; }
  .wordmark span { animation: dotPulse 2400ms var(--ease-in-out) 1600ms 1; } /* one slow pulse, then still */
  @keyframes heroPhoto { from { opacity: 0; transform: scale(1.04); } }
  @keyframes riseIn { from { opacity: 0; transform: translateY(var(--rise)); } }
  @keyframes dotPulse { 50% { opacity: .55; } }
}

/* Bands and sections */
.band { background: var(--dark); color: var(--light); }
.news { max-width: 820px; margin: 0 auto; padding: 56px 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.news h2 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -.02em; font-weight: 800; text-wrap: balance; }
.news h2 span { display: block; color: var(--soft); font-weight: 600; text-wrap: balance; }
.signup { width: 100%; max-width: 560px; display: flex; flex-wrap: wrap; gap: 10px; }
.signup input[type="email"] { flex: 1 1 240px; min-width: 0; min-height: 52px; padding: 0 16px; border-radius: 6px; border: 2px solid transparent; background: var(--light); color: var(--dark); font: 500 16px var(--font); transition: border-color var(--dur-base) var(--ease-out); }
.signup input[type="email"]:focus { border-color: var(--accent); }
.signup input[type="email"]:focus-visible { outline-offset: 2px; }
.signup .btn { flex: 0 0 auto; min-height: 52px; }
.fine { margin: 0; font-size: 14px; color: var(--footer); }
.sec { padding: 96px 24px 56px; display: flex; flex-direction: column; gap: 26px; margin: 0 auto; }
.sec.w1200 { max-width: 1200px; }
.sec.w900 { max-width: 900px; }
.sec h2, .h-sec { margin: 0; text-align: center; font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -.02em; font-weight: 900; text-transform: uppercase; }
.lede { margin: 0 auto; max-width: 36em; text-align: center; color: var(--muted); text-wrap: pretty; }
.sec > .btn { align-self: center; }

/* Divider lists */
.rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin: 0; padding: 0; list-style: none; }
.rows > * { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.rows > * { transition: border-color var(--dur-base) var(--ease-out); }
.rows b { font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; transition: transform var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.rows .go { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); transition: transform var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
@media (hover: hover) {
  .rows > *:hover { border-bottom-color: var(--accent); }
  .rows > *:hover b { transform: translateX(4px); }
  .rows a:hover b, .rows a:hover .go { color: var(--accent); }
  .rows a:hover .go { transform: translateX(4px); }
}
.rows.talks > * { justify-content: flex-start; }
.rows.talks span { color: var(--muted); }

/* Book band */
.book { max-width: 900px; margin: 0 auto; padding: 96px 24px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.label { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.band .label { color: #8196ff; }
.book h2 { margin: 0; font-size: clamp(56px, 8vw, 104px); line-height: .92; letter-spacing: -.02em; font-weight: 900; text-transform: uppercase; }
.book p.sub { margin: 0 0 8px; font-size: 20px; color: var(--soft); max-width: 30em; text-wrap: balance; }

/* Contact */
.contact { align-items: center; text-align: center; padding-bottom: 104px; }
.contact h2 { font-size: clamp(32px, 3.6vw, 44px); text-transform: none; line-height: 1.05; }
.contact p { margin: 0; color: var(--muted); }
.social { display: flex; gap: 10px; margin-top: 12px; }
.social a { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--dark); color: var(--light); transition: background-color var(--dur-base) var(--ease-out); }
.social a:hover { background: var(--accent); }

/* Footer */
.foot { background: var(--dark); color: var(--footer); font-size: 14px; }
.foot .wrap { padding-top: 22px; padding-bottom: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.foot a { text-decoration: none; padding: 10px 0; transition: color var(--dur-fast) var(--ease-out); }
.foot a:hover { color: var(--light); }
.foot.lined { border-top: 1px solid #262a33; }

/* Video cards */
.vgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 270px)); justify-content: center; gap: 18px; }
.vcard { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vthumb { position: relative; width: 100%; aspect-ratio: 9 / 16; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: radial-gradient(circle at 60% 12%, #5a6170 0%, #2a2e37 48%, #14161b 90%); color: var(--light); font-family: var(--font); }
.vcard:nth-child(3n+2) .vthumb { background: radial-gradient(circle at 30% 18%, #46507a 0%, #252a44 48%, #121420 90%); }
.vcard:nth-child(3n) .vthumb { background: radial-gradient(circle at 50% 10%, #6b6f78 0%, #33363d 50%, #15171b 90%); }
.vthumb { container-type: inline-size; }
.vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(1.08); transition: transform var(--dur-base) var(--ease-out); }
.vthumb .cap { position: absolute; left: 14px; right: 14px; top: 14%; text-align: center; font-weight: 800; font-size: clamp(18px, 2vw, 24px); line-height: 1.06; letter-spacing: -.03em; text-shadow: 0 2px 12px rgba(0,0,0,.55); text-wrap: balance; }
.vthumb .cap em { font-style: normal; color: #8196ff; }
/* Branded cover: black and white, a dark fade over the lower half (it also hides
   the captions burned into the video), the topic and title set in the site type. */
.vthumb::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, #111318 0%, rgba(17,19,24,.96) 36%, rgba(17,19,24,0) 62%), linear-gradient(to bottom, rgba(17,19,24,.4) 0%, rgba(17,19,24,0) 18%); }
.vthumb .vcap { position: absolute; left: 7.5cqi; right: 7.5cqi; bottom: 8cqi; z-index: 1; text-align: left; }
.vthumb .vcap small { display: block; margin-bottom: 3.5cqi; font-size: max(10px, 4.6cqi); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.vthumb .vcap b { display: block; font-size: 11.6cqi; font-weight: 900; line-height: 1.02; letter-spacing: -.02em; text-transform: uppercase; text-wrap: balance; }
.vthumb .vcap.long b { font-size: 9.6cqi; }
.vthumb .vcap em { font-style: normal; color: #6f88ff; }
.vthumb .play { position: absolute; right: 5.5cqi; top: 5.5cqi; z-index: 1; width: max(34px, 15cqi); height: max(34px, 15cqi); border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; opacity: .9; transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.vthumb .dur { position: absolute; left: 5.5cqi; top: 5.5cqi; z-index: 1; padding: 3px 7px; border-radius: 4px; background: rgba(17, 19, 24, .72); color: var(--light); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
@media (hover: hover) {
  .vthumb:hover img { transform: scale(1.03); }
  .vthumb:hover .play { opacity: 1; transform: scale(1.06); }
}
.vthumb:focus-visible img { transform: scale(1.03); }
.vthumb:focus-visible .play { opacity: 1; }
.vmeta { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.vmeta b { font-weight: 700; font-size: 16px; line-height: 1.25; }
.vmeta span { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.page-dark .vmeta span { color: var(--soft); }
.empty { text-align: center; color: var(--soft); margin: 24px 0; }

/* Videos page */
.page-dark { background: var(--dark); color: var(--light); }
.feature { max-width: 1200px; margin: 0 auto; padding: 64px 24px 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 56px; }
/* Holds the featured video's space until site.js draws it, so nothing below jumps. */
html.js-motion #featured { flex: 0 1 320px; aspect-ratio: 9 / 16; }
.feature .vthumb { flex: 0 1 320px; border-radius: 14px; box-shadow: 0 0 0 4px var(--accent), 0 30px 80px rgba(0,0,0,.55); }
.feature .vthumb .cap { font-size: 32px; }
.feature-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.feature-text h1 { margin: 0; font-size: clamp(44px, 6.4vw, 84px); line-height: .98; letter-spacing: -.04em; font-weight: 900; }
.feature-text h1 span { color: #6f88ff; }
.feature-text p { margin: 0; max-width: 32em; font-size: 19px; color: var(--soft); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lib { max-width: 1200px; margin: 0 auto; padding: 24px 24px 96px; display: flex; flex-direction: column; gap: 24px; }
.lib-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.lib-head h2 { margin: 0; font-size: clamp(32px, 4.4vw, 56px); line-height: 1; letter-spacing: -.02em; font-weight: 900; text-transform: uppercase; }
.lib-head p { margin: 0; color: var(--footer); font-weight: 600; font-variant-numeric: tabular-nums; }
.chips { position: relative; isolation: isolate; display: flex; flex-wrap: wrap; gap: 10px; }
/* Sliding highlight behind the active chip (see moveIndicator in site.js). */
.chip-ind { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: -1; pointer-events: none; }
.chip-ind i { position: absolute; left: 0; top: 0; width: 100px; height: 44px; background: var(--accent); transform-origin: 0 50%; transition: transform var(--dur-base) var(--ease-out); }
.chip-ind i:first-child, .chip-ind i:last-child { border-radius: 50%; }
.chip-ind.snap i { transition: none; }
.chips.has-ind .chip[aria-pressed="true"] { background: transparent; border-color: transparent; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid #343945; background: transparent; color: var(--light); font: 700 13px var(--font); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
.chip:hover { border-color: var(--light); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
/* Filter change: the grid eases out, swaps, and the matches ease back in. */
.vgrid.leaving > * { opacity: 0; transform: scale(.98); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
@media (prefers-reduced-motion: no-preference) {
  .vgrid.entering > * { animation: cardIn var(--dur-base) var(--ease-out) calc(var(--i, 0) * 40ms) both; }
  @keyframes cardIn { from { opacity: 0; transform: scale(.98); } }
  /* Featured video: the same gentle rise as the hero text, once on load. */
  .feature .vthumb { animation: riseIn var(--dur-slow) var(--ease-out) 120ms both; }
  .feature-text { animation: riseIn var(--dur-slow) var(--ease-out) 210ms both; }
}
.lib .vgrid { justify-content: start; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.blue { background: var(--accent); color: var(--on-accent); }
.blue .wrap { padding-top: 64px; padding-bottom: 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.blue h2 { margin: 0 0 8px; font-size: clamp(32px, 4vw, 50px); line-height: 1; letter-spacing: -.02em; font-weight: 900; text-transform: uppercase; }
.blue p { margin: 0; font-size: 18px; font-weight: 500; }
.blue .col { flex: 1 1 400px; min-width: 0; }
.blue .signup { flex: 1 1 380px; max-width: none; }
.blue .signup input[type="email"] { background: #fff; }
.blue .signup input[type="email"]:focus { border-color: var(--dark); }
.blue .signup input[type="email"]:focus-visible, .blue .btn:focus-visible { outline-color: var(--dark); }
.blue .btn { background: var(--dark); border-color: var(--dark); color: var(--light); }
.blue .btn:hover { background: #000; border-color: #000; }

/* Lightbox */
dialog.lb { border: 0; padding: 24px; margin: auto; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; background: rgba(17,19,24,.92); color: var(--light); font-family: var(--font); overscroll-behavior: contain; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
dialog.lb::backdrop { background: transparent; }
dialog.lb[open] { display: flex; align-items: center; justify-content: center; }
.lb-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px; max-width: 780px; max-height: 100%; overflow: auto; }
.lb-stage { position: relative; width: min(320px, 78vw); max-height: 78dvh; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; text-align: center; }
.lb-stage video, .lb-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.lb-stage .soon { padding: 24px; color: var(--soft); font-weight: 600; }
.lb-side { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.lb-side .label { color: #8196ff; }
.lb-title { margin: 0; font-size: 30px; line-height: 1.08; letter-spacing: -.02em; font-weight: 900; }
.lb-side .btn { min-height: 46px; padding: 0 20px; font-size: 13px; }
/* Page scroll is locked while the player is open; the gutter keeps the layout from shifting. */
html { scrollbar-gutter: stable; }
html.lb-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  dialog.lb[open] { animation: lbFade var(--dur-base) var(--ease-out) both; }
  dialog.lb[open] .lb-in { animation: lbIn var(--dur-base) var(--ease-out) both; }
  dialog.lb.closing { animation: lbFadeOut 220ms var(--ease-out) both; }
  dialog.lb.closing .lb-in { animation: lbOut 220ms var(--ease-out) both; }
  @keyframes lbFade { from { opacity: 0; } }
  @keyframes lbIn { from { opacity: 0; transform: scale(.96); } }
  @keyframes lbFadeOut { to { opacity: 0; } }
  @keyframes lbOut { to { opacity: 0; transform: scale(.96); } }
  /* Next video: the current one slips 12px left as the next arrives from 12px right. */
  .lb-in.swap-out .lb-stage, .lb-in.swap-out .lb-title, .lb-in.swap-out .lb-side .label { opacity: 0; transform: translateX(-12px); transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); }
  .lb-in.swap-pre .lb-stage, .lb-in.swap-pre .lb-title, .lb-in.swap-pre .lb-side .label { opacity: 0; transform: translateX(12px); }
  .lb-in.swap-in .lb-stage, .lb-in.swap-in .lb-title, .lb-in.swap-in .lb-side .label { transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
}

/* Scroll reveal. Elements are only hidden once the page is script-enabled (.js-motion)
   and motion is allowed. site.js adds .in when about 15% is on screen, once, then
   strips the classes so hovers and focus styles are untouched afterwards. */
@media (prefers-reduced-motion: no-preference) {
  html.js-motion .rv,
  html.js-motion [data-rv-group]:not(.rv-done) > * { opacity: 0; transform: translateY(var(--rise)); }
  html.js-motion .rv.in,
  html.js-motion [data-rv-group]:not(.rv-done) > .in { opacity: 1; transform: none; transition: opacity var(--dur-slow) var(--ease-out) var(--d, 0ms), transform var(--dur-slow) var(--ease-out) var(--d, 0ms); }
}
/* The one "moment" on the page: ALIGNED arrives letter by letter (30ms apart, 8px rise).
   site.js splits the heading into letters only when motion is allowed. */
.book h2 .ch { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  html.js-motion .book h2.letters .ch { opacity: 0; transform: translateY(8px); }
  html.js-motion .book h2.letters.in .ch { opacity: 1; transform: none; transition: opacity 520ms var(--ease-out) calc(var(--i) * 30ms + 200ms), transform 520ms var(--ease-out) calc(var(--i) * 30ms + 200ms); }
}
/* Page to page: a plain 250ms cross-fade between Home and Videos, using the browser's
   own View Transitions. Browsers without it just load the page as usual. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 250ms; animation-timing-function: ease; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* Phones */
@media (max-width: 760px) {
  .top nav { padding: 12px 16px 8px; justify-content: center; gap: 0; }
  .wordmark { width: 100%; text-align: center; padding: 8px 0 2px; }
  .links { width: 100%; justify-content: space-between; gap: 0 10px; font-size: 11.5px; letter-spacing: .1em; }
  .links a.nav-sub { display: none; }
  .hero { height: 86svh; min-height: 540px; max-height: 720px; background: radial-gradient(ellipse at 50% 38%, #5d6068 0%, #2b2e35 42%, var(--dark) 82%); }
  .hero-media { justify-content: center; padding-right: 0; }
  .hero-photo { height: 78%; }
  .hero::after { background: linear-gradient(to top, rgba(17,19,24,.96) 0%, rgba(17,19,24,.6) 30%, rgba(17,19,24,0) 60%), linear-gradient(to bottom, rgba(17,19,24,.6) 0%, rgba(17,19,24,0) 24%); }
  .hero-text { bottom: 36px; }
  .wrap, .wrap-text { padding-left: 20px; padding-right: 20px; }
  .sec { padding: 72px 20px 40px; }
  .contact { padding-bottom: 80px; }
  .vgrid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .lib .vgrid { grid-template-columns: repeat(2, 1fr); }
  .rows b { font-size: 20px; }
  .signup .btn { flex: 1 1 100%; }
  .feature { padding: 40px 20px 56px; gap: 32px; }
  .feature .vthumb, html.js-motion #featured { flex-basis: 250px; }
  .foot .wrap { justify-content: center; text-align: center; }
}
@media (max-width: 760px) {
  dialog.lb { padding: 16px; }
  .lb-in { gap: 16px; }
  .lb-stage { width: auto; height: 54dvh; max-height: 54dvh; }
  .lb-side { flex: 1 1 100%; gap: 10px; flex-direction: row; flex-wrap: wrap; }
  .lb-side .label, .lb-title { flex: 1 1 100%; }
  .lb-title { font-size: 22px; }
  .lb-side .btn { flex: 1 1 auto; min-height: 44px; padding: 0 14px; font-size: 12px; }
}
