/* Hallmark · shape: Conversational FAQ, cut to a player and an index · genre: atmospheric · theme: Midnight (deal 2/3, seed single-demo-film-web-be4b·c7892e97·2026-11-15·r0) · job: listen · draw: 7d3354
 * hero: Banner · nav: a wordmark and one link (search-led refused, nothing to search) · footer: mast · imagery: the user's film, in its own colours · signature: the film's seven on-screen lines as chapters that seek the player
 * axes: dark/grotesk-sans/cool · posture: committed · contrast: pass · fold: pass · finish-review: subagent · 8 findings · 8 resolved · gap: no hero review · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: S, three sections where the genre expects six, kept because the brief is a player only */
/* Hallmark · waive 39b · the 89px buttons are the seven index rows at section size, the player controls stand 44 to 48px · the rows are the film's lines, set large to be read as the film's index */
/* Hallmark · waive 77 · three sections, the hero with the player, the index of seven lines, the footer · the brief asks for a film player only, so the page carries the player and the film's own index */
@import url("./tokens.css");
@import url("./base.css");

@font-face {
  font-family: "Mona Sans";
  src: url("fonts/mona-sans-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  --nav-h: 64px;
  --head-h: 168px;
  --bar-h: 48px;
  /* one column for the whole page, as wide as the film can be with its bar on screen */
  --stage: min(100%, calc((100dvh - var(--nav-h) - var(--head-h) - var(--bar-h) - var(--space-lg)) * 16 / 9));
}

h1, h2 { font-stretch: var(--display-stretch); line-height: 1.04; }

.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-md); }

* { -webkit-tap-highlight-color: transparent; }
.col { width: var(--stage); min-width: min(100%, 20rem); margin-inline: auto; }
.keep { white-space: nowrap; }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.nav__mark { font-weight: 500; }
.nav__link { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); text-decoration-color: transparent; transition: color var(--dur-short) var(--ease-out), text-decoration-color var(--dur-short) var(--ease-out); }
.nav__link:hover { color: var(--color-ink); text-decoration-color: var(--color-accent); }

/* hero */
.hero { padding-bottom: var(--space-xl); }
.hero__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 17rem); gap: var(--gap-columns); align-items: end; min-height: var(--head-h); padding-block: var(--space-md) var(--space-lg); }
.hero__head h1 { max-width: none; font-size: clamp(2.25rem, 3.4vw + 0.25rem, 3.75rem); }
.hero__head .lead { justify-self: end; max-width: 34ch; color: var(--color-ink-2); }
.settle { animation: settle var(--dur-long) var(--ease-out) both; }
@keyframes settle { from { opacity: 0.6; } }

/* player: the frame never outgrows the viewport, so the bar stays on screen */
.player { margin: 0; background: var(--color-paper-2); box-shadow: var(--shadow-card); }
.player__frame { position: relative; aspect-ratio: 16 / 9; background: var(--color-paper-3); }
.player__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.player__start { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.player[data-started] .player__start { display: none; }
.player__error { position: absolute; inset: auto 0 0 0; padding: var(--space-sm) var(--space-md); background: var(--color-paper-3); color: var(--color-ink); font-size: var(--text-sm); }

.btn { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg); border: var(--rule-hair) solid transparent; border-radius: var(--radius-pill); font: 500 var(--text-md)/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.btn--primary { background: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-ink); }
.btn--primary:active { background: var(--color-ink-2); }
.btn--primary:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 3px; }

.player__bar { display: flex; align-items: center; gap: var(--space-xs); height: var(--bar-h); padding-inline: var(--space-2xs) var(--space-2xs); }
.ctl { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.ctl:hover { background: var(--color-paper-3); }
.ctl:active { background: var(--color-rule); }
.ctl:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.ctl:disabled { opacity: 0.55; cursor: not-allowed; }
.ctl__pause, .ctl__muted { display: none; }
.player[data-playing] .ctl__play, .player[data-muted] .ctl__sound { display: none; }
.player[data-playing] .ctl__pause, .player[data-muted] .ctl__muted { display: block; }
.player__time { flex: none; min-width: 4ch; font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); text-align: center; }

.scrub { position: relative; flex: 1; min-width: 0; height: 44px; }
.scrub__track { position: absolute; inset: 21px 0 auto 0; height: 2px; background: var(--color-rule-2); overflow: hidden; }
.scrub__fill { display: block; height: 100%; background: var(--color-accent); transform: scaleX(var(--progress, 0)); transform-origin: 0 50%; }
.scrub__marks span { position: absolute; top: 17px; left: calc(var(--at) * 100%); width: 1px; height: 10px; background: var(--color-muted); }
.scrub__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.scrub__input::-webkit-slider-runnable-track { height: 44px; background: transparent; }
.scrub__input::-moz-range-track { height: 44px; background: transparent; }
.scrub__input::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 20px; margin-top: var(--space-sm); border: 0; border-radius: 0; background: var(--color-ink); }
.scrub__input::-moz-range-thumb { width: 4px; height: 20px; border: 0; border-radius: 0; background: var(--color-ink); }
.scrub__input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -4px; }

.player:fullscreen { display: grid; grid-template-rows: minmax(0, 1fr) auto; width: 100%; background: var(--color-paper); box-shadow: none; }
.player:fullscreen .player__frame { aspect-ratio: auto; background: var(--color-paper); }
.player:fullscreen .player__bar { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--bar-h) + env(safe-area-inset-bottom)); padding-inline: max(var(--space-2xs), env(safe-area-inset-left)) max(var(--space-2xs), env(safe-area-inset-right)); }

/* the seven lines */
.lines { padding-block: var(--section-gap-s); }
.lines__note { margin-top: var(--space-md); color: var(--color-muted); }
.lines__list { list-style: none; margin: var(--space-xl) 0 0; padding: 0; }
.lines__list li { border-top: var(--rule-hair) solid var(--color-rule); }
.lines__list li:last-child { border-bottom: var(--rule-hair) solid var(--color-rule); }
.lines__list button { display: grid; grid-template-columns: 6rem minmax(0, 1fr) 10rem; align-items: center; gap: var(--gap-columns); width: 100%; padding: var(--space-md) 0; border: 0; background: transparent; color: var(--color-muted); text-align: left; cursor: pointer; transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.lines__list button:hover { color: var(--color-ink); background: var(--color-paper-2); }
.lines__list button:active { background: var(--color-paper-3); }
.lines__list button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.lines__list button[aria-current="true"] { color: var(--color-ink); }
.lines__list button[aria-current="true"] .num { color: var(--color-accent); }
.lines__list .num { font-size: var(--text-sm); font-weight: 500; }
.lines__list img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: 0.55; transition: opacity var(--dur-short) var(--ease-out); }
.lines__list button:hover img, .lines__list button[aria-current="true"] img { opacity: 1; }
.lines__text { font-size: var(--text-2xl); font-weight: var(--display-weight); font-stretch: var(--display-stretch); letter-spacing: var(--tracking-display); line-height: 1.1; overflow-wrap: break-word; min-width: 0; }

/* footer */
.foot { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-md) var(--gap-columns); align-items: end; padding-block: var(--space-2xl) var(--space-xl); border-top: var(--rule-hair) solid var(--color-rule); }
.foot__mark { grid-row: span 2; font-size: var(--text-section); font-weight: var(--display-weight); font-stretch: var(--display-stretch); letter-spacing: var(--tracking-display); line-height: 1; }
.foot__meta { color: var(--color-muted); font-size: var(--text-sm); }
.foot__link { justify-self: start; font-size: var(--text-sm); font-weight: 500; text-decoration-color: var(--color-rule-2); transition: text-decoration-color var(--dur-short) var(--ease-out); }
.foot__link:hover { text-decoration-color: var(--color-accent); }

@media (max-width: 60rem) {
  :root { --stage: 100%; }
  .keep { white-space: normal; }
  .hero__head, .foot { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .hero__head { min-height: 0; }
  .hero__head .lead { justify-self: start; }
  .lines__list button { grid-template-columns: 3.5rem minmax(0, 1fr) 6rem; gap: var(--space-md); }
  .lines__text { font-size: var(--text-xl); }
}

@media (max-width: 40rem) {
  .scrub__marks { display: none; }
  .player__start { min-height: 44px; padding: 0 var(--space-md); font-size: var(--text-sm); }
}

/* a phone on its side: the film is the first screen, edge to edge in height */
@media (orientation: landscape) and (max-height: 32rem) {
  :root { --stage: min(100%, calc((100dvh - var(--bar-h)) * 16 / 9)); }
  .nav { display: none; }
  .hero { padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
  .hero__col { display: flex; flex-direction: column; }
  .hero__head { order: 2; padding-block: var(--space-xl) 0; }
  .player { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .settle { animation: none; }
}
