/* Title pages (/broke): the page continues the clip. Night-feed black, the video is the light,
   bone for quiet structure, the site's cyan only for the one action. Loaded after site.css. */

.title-page {
  --t-night: var(--color-night);
  --t-night-2: var(--color-night-2);
  --t-line: var(--color-rule);
  --t-quiet: var(--color-bone-2);
  --t-text: var(--color-bone);
  --t-text-2: var(--color-bone-2);
  --t-frame-w: min(100vw, calc(100svh * 9 / 16));
  color-scheme: dark;
  background: var(--t-night);
  color: var(--t-text);
  caret-color: var(--color-accent);
  accent-color: var(--color-accent);
  scrollbar-color: var(--color-rule-2) var(--t-night);
}
.title-page ::selection { background: var(--t-text); color: var(--t-night); }
.title-page :focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.title-page a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

/* ---------- floating bar over the video ---------- */
.tp-bar {
  position: absolute; z-index: 30; inset: 0 0 auto 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + var(--space-3)) var(--space-4) var(--space-6);
  background: linear-gradient(180deg, oklch(8% 0.01 260 / 0.7), oklch(8% 0.01 260 / 0));
  color: var(--t-text);
  pointer-events: none;
}
.tp-bar > * { pointer-events: auto; }
.tp-bar .brand { gap: var(--space-2); }
.tp-bar .brand-name { font-size: 1rem; letter-spacing: 0.08em; }
.tp-social { display: flex; gap: var(--space-1); }
.tp-social .social { justify-content: center; width: 2.75rem; min-height: 2.75rem; padding: 0; border: 0; color: var(--t-text); }
.tp-social .social svg { width: 1.25rem; height: 1.25rem; }

/* ---------- the stage: one 9:16 frame, full height ---------- */
.tp-stage { position: relative; isolation: isolate; min-height: 100svh; display: grid; justify-items: center; background: var(--t-night); overflow: hidden; }
.tp-ambient { position: absolute; inset: 0; z-index: -1; }
.tp-ambient img { width: 100%; height: 100%; object-fit: cover; filter: blur(40px) saturate(1.15) brightness(0.42); transform: scale(1.2); }
.tp-frame { position: relative; width: var(--t-frame-w); height: 100svh; overflow: hidden; background: #000; }
.tp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }

/* scrim + dock: everything the visitor reads sits in the lower third, over a scrim, never over faces */
/* The episode's captions sit between 62% and 80% of the frame (the platforms' safe zone), so the page's own
   text keeps to the band the platforms reserve for their UI: the bottom ~19% and the top bar. */
.tp-frame::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 24%; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, oklch(7% 0.01 260 / 0.94) 0%, oklch(7% 0.01 260 / 0.8) 62%, oklch(7% 0.01 260 / 0) 100%);
}
.tp-dock {
  position: absolute; z-index: 2; inset: auto 0 0 0;
  display: grid; gap: var(--space-2);
  padding: 0 var(--space-4) calc(env(safe-area-inset-bottom) + var(--space-4));
}
.tp-title { font-size: clamp(1.75rem, 8.4vw, 2.3rem); font-weight: 900; line-height: 0.95; letter-spacing: 0.01em; white-space: nowrap; }
.tp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); }
.tp-head .tp-title { font-size: 1.35rem; line-height: 1; }
.tp-terms { font-size: 0.75rem; line-height: 1.3; color: var(--t-quiet); text-align: right; text-shadow: 0 1px 6px oklch(5% 0.01 260 / 0.9); }
.tp-hook { font-size: clamp(1.45rem, 6vw, 1.85rem); line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; color: var(--t-text); text-wrap: balance; }

/* the docked sign-up: one pill row, like the comment bar */
.tp-join { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); margin-top: var(--space-1); }
.tp-note:empty { display: none; }
.tp-join input[type="email"] {
  min-height: 3.25rem; padding: 0 var(--space-4); width: 100%;
  font: 500 1rem/1 var(--font-body); color: var(--t-text);
  background: oklch(22% 0.012 260 / 0.88); border: 1px solid var(--color-rule-2); border-radius: 999px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.tp-join input[type="email"]::placeholder { color: var(--color-bone-2); }
.tp-join input[type="email"]:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-color: transparent; }
.tp-join input[aria-invalid="true"] { border-color: var(--color-error); }
.tp-join .btn, .tp-step .btn { min-height: 3.25rem; border-radius: 999px; font-size: 1.15rem; width: 100%; }
.tp-play { min-height: 3rem; border-radius: 999px; font-size: 1.15rem; width: 100%; margin-top: var(--space-1); }
.tp-join .btn[disabled] { opacity: 0.7; cursor: progress; }
.tp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* One row at every phone width, so the dock never grows up into the captions. */
@media (min-width: 0) {
  .tp-join { grid-template-columns: minmax(0, 1fr) auto; background: oklch(22% 0.012 260 / 0.88); border: 1px solid var(--color-rule-2); border-radius: 999px; padding: 4px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .tp-join:focus-within { outline: 3px solid var(--color-focus); outline-offset: 2px; }
  .tp-join input[type="email"] { background: transparent; border: 0; min-height: 2.9rem; }
  .tp-join input[type="email"]:focus-visible { outline: 0; }
  .tp-join .btn { width: auto; min-height: 2.9rem; padding-inline: 1.2rem; font-size: 1.05rem; }
}
@media (max-width: 22.99rem) {
  .tp-head { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
  .tp-head .tp-terms { text-align: left; }
  .tp-terms { font-size: 0.7rem; }
  .tp-head .tp-title { font-size: 1.2rem; }
  .tp-join input[type="email"] { padding-inline: 0.85rem; }
  .tp-join .btn { padding-inline: 0.85rem; font-size: 0.95rem; letter-spacing: 0.06em; }
}
.tp-step { display: grid; gap: var(--space-3); }
.tp-step-text { font-size: 1.05rem; line-height: 1.45; }
.tp-step-text strong { color: var(--t-text); font-weight: 600; }
.tp-note { min-height: 1.4em; font-size: var(--text-sm); color: var(--t-text-2); }
.tp-note.is-error { color: var(--color-error); }

/* video controls: round icons on the right edge, above the dock */
/* Right edge, between the episode's top title (0–16%) and its captions (62–80%): where the feed apps put theirs. */
.tp-controls { position: absolute; z-index: 3; right: var(--space-3); top: 44%; display: grid; gap: var(--space-2); }
.tp-icon {
  position: relative; display: grid; place-items: center; width: 3rem; height: 3rem; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; color: var(--t-text);
  background: oklch(10% 0.01 260 / 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.tp-icon:hover { background: oklch(10% 0.01 260 / 0.75); }
.tp-icon:active { transform: scale(0.94); }
.tp-icon svg { width: 1.4rem; height: 1.4rem; }
.tp-icon[aria-pressed="true"] .i-muted, .tp-icon[aria-pressed="false"] .i-sound,
.tp-icon[data-act="pause"][aria-pressed="false"] .i-play, .tp-icon[data-act="pause"][aria-pressed="true"] .i-pause { display: none; }

.tp-video:fullscreen { object-fit: contain; background: #000; }
.tp-video:-webkit-full-screen { object-fit: contain; background: #000; }

/* reduced motion: no autoplay, a clear start button over the poster */
.tp-start {
  position: absolute; z-index: 3; left: 50%; top: 30%; translate: -50% -50%;
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 3.25rem; padding: 0 1.4rem 0 1.1rem; border: 0; border-radius: 999px; cursor: pointer;
  font: 800 1.1rem/1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--t-text); background: oklch(10% 0.01 260 / 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.tp-start svg { width: 1.5rem; height: 1.5rem; }

/* ---------- below the frame ---------- */
.tp-section { padding: var(--space-8) var(--space-4); border-top: 1px solid var(--t-line); }
.tp-section-first { padding-top: var(--space-7); border-top: 0; }
.tp-section-first .tp-col { gap: var(--space-6); }
.tp-section-quiet { background: var(--t-night-2); }
.tp-col { width: 100%; max-width: 34rem; margin-inline: auto; display: grid; gap: var(--space-5); }
.tp-section h2 { font-size: clamp(1.9rem, 7vw, 2.4rem); font-weight: 800; }
.tp-points { display: grid; gap: var(--space-5); counter-reset: none; }
.tp-points li { padding-left: var(--space-5); border-left: 1px solid var(--color-rule-2); font-size: 1.0625rem; line-height: 1.6; color: var(--t-text-2); }
.tp-points strong { display: block; color: var(--t-text); font-weight: 600; margin-bottom: var(--space-1); }
.tp-lede { font-size: 1.2rem; line-height: 1.55; color: var(--t-text); text-wrap: pretty; }
.tp-facts { display: grid; margin: 0; border-top: 1px solid var(--t-line); }
.tp-facts div { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-1); padding-block: var(--space-4); border-bottom: 1px solid var(--t-line); }
.tp-facts dt { font: 700 0.95rem/1.2 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--t-text); }
.tp-facts dd { margin: 0; line-height: 1.6; color: var(--t-text-2); }
@media (min-width: 36rem) { .tp-facts div { grid-template-columns: 9rem minmax(0, 1fr); gap: var(--space-4); } }
.tp-follow { color: var(--t-text-2); }
.tp-follow a { color: var(--t-text); }
.tp-again a {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font: 800 1.15rem/1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); text-decoration: none;
}
.tp-again a::after { content: ""; width: 1.4em; height: 2px; background: currentColor; transition: width var(--dur-med) var(--ease-out); }
.tp-again a:hover::after { width: 2.2em; }
.title-page .foot { border-top-color: var(--t-line); }

/* ---------- wider screens: the frame stays a phone-sized column in the middle of its own light ---------- */
@media (min-width: 40rem) {
  .tp-bar { padding-inline: var(--space-6); }
  .tp-bar .brand-name { font-size: 1.15rem; }
  .tp-frame { box-shadow: 0 0 0 1px var(--color-rule), 0 30px 80px oklch(0% 0 0 / 0.55); }
  .tp-title { font-size: clamp(2rem, 4.2vh, 2.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  .tp-icon, .tp-again a::after { transition: none; }
  .tp-step.is-new { animation: none; }
}

/* the feed's own progress line along the bottom edge of the frame */
.tp-progress { position: absolute; z-index: 2; inset: auto 0 0 0; height: 2px; background: oklch(100% 0 0 / 0.14); }
.tp-progress span { display: block; height: 100%; background: var(--t-text); transform: scaleX(0); transform-origin: left; }

/* the one authored moment: the pill hands over to the inbox line */
.tp-step.is-new { animation: tp-handover var(--dur-med) var(--ease-out) both; }
@keyframes tp-handover { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: none; } }

/* type: Big Shoulders is the title's alone; everything below it speaks in the body face */
.tp-section h2 { font-family: var(--font-body); font-weight: 600; text-transform: none; letter-spacing: -0.01em; line-height: 1.2; font-size: clamp(1.45rem, 5.4vw, 1.75rem); }
.tp-facts dt { font: 600 0.9375rem/1.3 var(--font-body); letter-spacing: 0; text-transform: none; }
.tp-start { font: 600 1.05rem/1 var(--font-body); letter-spacing: 0; text-transform: none; }
.tp-again a { font: 600 1.05rem/1 var(--font-body); letter-spacing: 0; text-transform: none; }

/* after submit: the step replaces the terms line and stays two to three short lines */
.tp-dock.is-step .tp-terms { display: none; }
.tp-step-text { font-size: 0.95rem; line-height: 1.45; }

/* short phones (iPhone SE and smaller): a slimmer dock so the page keeps out of the caption band */
@media (max-height: 40rem) {
  .tp-dock { gap: var(--space-1); padding-bottom: calc(env(safe-area-inset-bottom) + var(--space-3)); }
  .tp-play { min-height: 2.75rem; font-size: 1.05rem; }
  .tp-join input[type="email"], .tp-join .btn { min-height: 2.75rem; }
}

/* game art below the frame */
.tp-col-wide { max-width: 44rem; }
.tp-shot { margin: 0; background: var(--t-night-2); }
.tp-shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.tp-shots { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
@media (min-width: 36rem) { .tp-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
