/* Homepage: one worldflight, then the split-flap arrivals board (code, not film). */
.lf-home { --sc-canvas: #0b1424; background: #0b1424; color: var(--lf-cream); }

/* ------------------------------------------------------------ copy over film */
.fl-scrim { background:
  linear-gradient(to top right, rgb(8 14 26 / 0.86) 0%, rgb(8 14 26 / 0.68) 30%, rgb(8 14 26 / 0.3) 52%, transparent 72%); }
/* Midday and white-lab legs are very bright: the kicker gets its own dark backing so gold never sits on haze. */
.fl-copy { color: var(--lf-cream); max-width: min(44rem, calc(100vw - 2 * var(--sc-gutter))); }
.fl-copy h1, .fl-copy h2 {
  font: 600 clamp(2.1rem, 1.3rem + 3.4vw, 4.4rem)/1.04 var(--sc-font-display); letter-spacing: -0.03em;
  margin: 0; text-wrap: balance; max-width: 16ch; text-shadow: 0 2px 22px rgb(4 8 16 / 0.55), 0 1px 3px rgb(4 8 16 / 0.6);
}
.fl-copy h1 { font-size: clamp(2.5rem, 1.4rem + 4.6vw, 5.4rem); }
.fl-copy p { margin: 18px 0 0; font: 400 clamp(1.05rem, 0.95rem + 0.45vw, 1.3rem)/1.45 var(--sc-font-text); max-width: 40ch;
  text-shadow: 0 1px 12px rgb(4 8 16 / 0.7), 0 1px 2px rgb(4 8 16 / 0.6); }
.fl-copy .lf-btn { margin-top: 28px; }
.fl-kicker { display: table; margin-bottom: 16px; padding: 5px 8px; margin-left: -8px; border-radius: 3px; background: rgb(6 10 18 / 0.55); font: 500 0.8rem/1.2 var(--sc-font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: #f1c650;
  text-shadow: 0 1px 8px rgb(4 8 16 / 0.8); }
.fl-copy .fl-note { max-width: none; margin-top: 14px; font: 400 0.78rem/1.3 var(--sc-font-mono); letter-spacing: 0.04em; color: color-mix(in oklab, var(--lf-cream) 85%, transparent); }
.fl-quote[hidden] { display: none; }

/* one flipping row of the record, at orbit */
.fl-onerow { margin-top: 26px; display: inline-flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 12px; border-radius: 6px;
  background: rgb(6 10 18 / 0.82); box-shadow: 0 10px 30px rgb(0 0 0 / 0.35); --t: clamp(13px, 1.25vw, 20px); }

/* ----------------------------------------------------------- split-flap tile */
/* One character per tile: charcoal, two-tone halves, a hairline split drawn over the glyph. */
.flap { display: inline-flex; gap: calc(var(--t) * 0.12); }
.flap__c {
  --tt: #2a2d34; --tb: #202228;
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--t); height: calc(var(--t) * 1.42); border-radius: 2px;
  font: 500 calc(var(--t) * 0.98)/1 var(--sc-font-mono); text-transform: uppercase; color: #f3e9d4;
  background: linear-gradient(var(--tt) 0 50%, var(--tb) 50% 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.07), 0 1px 0 rgb(0 0 0 / 0.7), 0 2px 4px rgb(0 0 0 / 0.35);
  perspective: calc(var(--t) * 6);
}
.flap__c::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 0.5px); height: 1px; background: rgb(0 0 0 / 0.8); z-index: 3; }
.flap__c i { font-style: normal; }
.flap__c > b { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; visibility: hidden; z-index: 2; backface-visibility: hidden; }
.flap__c > b > i { position: absolute; left: 0; right: 0; height: 200%; display: grid; place-items: center; }
.flap__c > .ft { top: 0; transform-origin: 50% 100%; background: var(--tt); border-radius: 2px 2px 0 0; }
.flap__c > .ft > i { top: 0; }
.flap__c > .fb { bottom: 0; transform-origin: 50% 0; background: var(--tb); border-radius: 0 0 2px 2px; }
.flap__c > .fb > i { bottom: 0; }
.flap__c.is-flip > b, .flap__c.is-flop > b { visibility: visible; }
.flap__c.is-flip > .ft { animation: flap-top 40ms ease-in both; }
.flap__c.is-flip > .fb { animation: flap-bot 40ms 40ms ease-out both; }
.flap__c.is-flop > .ft { animation: flap-top2 40ms ease-in both; }
.flap__c.is-flop > .fb { animation: flap-bot2 40ms 40ms ease-out both; }
@keyframes flap-top { from { transform: rotateX(0); filter: brightness(1); } to { transform: rotateX(-90deg); filter: brightness(0.55); } }
@keyframes flap-bot { from { transform: rotateX(90deg); filter: brightness(1.4); } to { transform: rotateX(0); filter: brightness(1); } }
@keyframes flap-top2 { from { transform: rotateX(0); filter: brightness(1); } to { transform: rotateX(-90deg); filter: brightness(0.55); } }
@keyframes flap-bot2 { from { transform: rotateX(90deg); filter: brightness(1.4); } to { transform: rotateX(0); filter: brightness(1); } }
.flap--gold .flap__c { color: #f1c650; }
.flap__c.is-sp { color: transparent; }

/* ------------------------------------------------------------------- finale */
/* Founder's layout (2026-11-19), top to bottom over a dark scrim of the last frame: headline, arrivals board,
   wordmark, button, tagline, footer. The engine drifts copy from +2vh to -2vh across its window; translate
   (separate from the engine's transform) cancels the -2vh where the reader comes to rest. */
.fl-finale { position: absolute; inset: 0; color: #efe8da; translate: 0 2vh; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--lf-bar-h, 72px) + 2vh) var(--sc-gutter) calc(1.5vh + env(safe-area-inset-bottom));
  /* One centred column (founder 2026-11-19): headline, board and logo row share both edges at every width. */
  --col: min(100vw - 2 * var(--sc-gutter), clamp(1280px, 66vw, 1480px));
  --sp: clamp(16px, 4vh, 48px);             /* headline -> board -> logo row: one gap */
  --hfs: clamp(2.1rem, 1.3rem + 3.4vw, 4.4rem);
  /* Board tile: 70 tiles + 4 column gaps span the column, capped by the height left after the other blocks. */
  --pad: clamp(16px, 1.6vw, 26px);
  --t: clamp(8px, min((var(--col) - 2 * var(--pad) - 104px) / 74,
                      (100vh - var(--lf-bar-h, 72px) - 2.2 * var(--hfs) - 3 * var(--sp) - 270px) / 13.4), 24px);
  --cg: calc(var(--t) * 0.9);               /* between columns */
  --gold-hi: #f2c54b; --dust: #8a7f6c;
}
.fl-finale::before { content: ""; position: absolute; inset: -3vh 0; z-index: -1; pointer-events: none;
  background: rgb(5 6 8 / 0.62); }

/* 1. Headline: the same white headline as every other scene, on the column's left edge. The auto margins
   above the headline and above the footer split the free height, so the group sits centred between them. */
.fl-fin-head { position: static; width: var(--col); max-width: none; margin: auto 0 var(--sp); }

/* 2. The arrivals board: one solid panel. */
.fl-panel { max-width: 100%; box-sizing: border-box;
  display: grid; gap: clamp(10px, 1.4vh, 16px); padding: var(--pad);
  background: #070706; border: 1px solid rgb(239 232 218 / 0.13); border-radius: 2px; box-shadow: 0 24px 70px rgb(0 0 0 / 0.55); }
.fl-panel__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fl-title { margin: 0; font: 600 clamp(1.15rem, 0.5rem + 1.25vw, 2rem)/1 var(--sc-font-display); letter-spacing: 0.02em; text-transform: uppercase; color: #efe8da; }
.fl-clock { flex: none; font: 600 clamp(11px, 0.9vw, 14px)/1 var(--sc-font-mono); letter-spacing: 0.14em; color: var(--gold-hi); }

.fl-rows { margin: 0; padding: 0; list-style: none; display: grid; gap: calc(var(--t) * 0.3); }
.fl-rows > li { display: flex; gap: var(--cg); align-items: center; justify-content: space-between; }
.fb-labels > span { flex: none; width: calc(var(--n) * (var(--t) + 1.5px) - 1.5px); font: 500 clamp(10px, calc(var(--t) * 0.68), 13px)/1 var(--sc-font-mono); letter-spacing: 0.14em; color: var(--dust); }
.fb-col { flex: none; display: flex; gap: 1.5px; }
/* One character per tile: dark split halves, a dark hairline at 50%, a bright gold glyph that fills the tile. */
.fb-c { display: grid; place-items: center; width: var(--t); height: calc(var(--t) * 1.62); border-radius: 1.5px; overflow: hidden;
  background: linear-gradient(180deg, #1c1a16 0 49%, #050504 49% 51%, #15130f 51%);
  font: 700 calc(var(--t) * 1.2)/1 var(--sc-font-mono); color: var(--gold-hi); }
.fb-c.is-flip { animation: fb-flip 50ms linear; }
@keyframes fb-flip { 50% { transform: scaleY(0.15); } }

/* 3-6. Under the board, one row exactly the board's width: wordmark with the tagline right under it, left on
   the board's left edge; the button on the board's right edge, centred on the group. Then the footer. */
.fl-stack { width: var(--col); max-width: 100%; display: grid; }
.fl-sig { margin: var(--sp) 0 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.fl-sig__brand { display: flex; flex-direction: column; align-items: center; }
.fl-logo { margin: 0; color: #f3e9d4; }
.fl-logo .lf-word { height: clamp(22px, 2.6vw, 34px); }
.fl-tagline { margin: 10px 0 0; color: #C9A227; font: 600 clamp(0.9rem, 0.8rem + 0.3vw, 1.05rem)/1.2 var(--sc-font-display); letter-spacing: 0.01em; }
.fl-cta-wrap { margin: 0; }
.fl-foot { margin: auto 0 0; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 0 18px; justify-content: center;
  font: 400 0.8rem/1.4 var(--sc-font-text); color: color-mix(in oklab, #f3e9d4 82%, transparent); }
.fl-foot :is(a, span) { color: inherit; display: inline-flex; align-items: center; min-height: 32px; }

/* Everything fades in as the board starts flipping. */
.fl-finale > *, .fl-finale::before { opacity: 0; transition: opacity 260ms; }
.fl-finale.is-on > *, .fl-finale.is-on::before, .fl-finale.is-still > *, .fl-finale.is-still::before { opacity: 1; }
.fl-finale.is-on :is(.fl-sig, .fl-foot) { opacity: 1; transition-delay: 900ms; }
.fl-sig { opacity: 0; transition: opacity 260ms; }
.fl-finale.is-still .fl-sig { opacity: 1; }
.fl-finale.is-still * { transition: none !important; animation: none !important; }

/* ----------------------------------------------------------------- phone */
/* Phone: ROLE and STATUS only (16 + 7 tiles). */
@media (max-width: 760px) {
  .fl-finale { --pad: 18px; --sp: clamp(18px, 3.6vh, 32px);
    --t: min((var(--col) - 2 * var(--pad) - 2px - 40px) / 24, 15px); }
  .fl-panel { gap: 14px; }
  .fl-panel__top { flex-wrap: wrap; }
  .fl-title { font-size: 1.15rem; }
  .fl-rows :is(.k-from, .k-to, .k-rem) { display: none; }
  .fl-stack { width: 100%; }
  .fl-sig { flex-direction: column; align-items: stretch; gap: var(--sp); }
  .fl-sig__brand { align-items: flex-start; }
  .fl-cta-wrap .lf-btn { width: 100%; justify-content: center; box-sizing: border-box; }
  .fl-foot { gap: 0 12px; font-size: 0.75rem; }
  .fl-foot :is(a, span) { min-height: 28px; }
  .fl-onerow { --t: 12px; }
}
@media (min-width: 761px) and (max-height: 700px) { .fl-foot { display: none; } }

/* Reduce-motion opt-in (2026-11-19). Shown only to people whose device asks for reduced motion. */
.lf-film-toggle { position: fixed; z-index: 60; left: 50%; bottom: 20px; transform: translateX(-50%);
  font: 600 14px/1 inherit; font-family: inherit; padding: 12px 18px; border-radius: 999px; border: 0;
  background: #C9A227; color: #0E1A2B; box-shadow: 0 6px 20px rgba(0,0,0,.35); cursor: pointer; }
.lf-film-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* The engine's own reduce-motion stylesheet still applies when the film is chosen; it only removes the still's zoom and the copy drift. */

/* Founder 2026-11-19: on desktop each small line sits on one line. */
@media (min-width: 1024px) { .fl-copy p { max-width: none; white-space: nowrap; } }

/* Founder 2026-11-19: finale headline on two lines, one sentence each. */
.fl-fin-head h2 { max-width: none; }
.fl-fin-head .fl-nb { display: block; }
@media (min-width: 761px) { .fl-fin-head .fl-nb { white-space: nowrap; } }

/* Founder 2026-11-19: the three practices, one per line. */
.fl-stack { max-width: none; }
.fl-stack .fl-nb { display: block; white-space: nowrap; }

/* Founder 2026-11-19: taller tiles, same letter size, more air between rows and tiles (approved from preview). */
@media (min-width: 761px) {
.fl-finale { --t: clamp(8px, min((var(--col) - 2 * var(--pad) - 104px - 105px) / 74,
                      (100vh - var(--lf-bar-h, 72px) - 2.2 * var(--hfs) - 3 * var(--sp) - 270px) / 16.5), 24px); }
.fb-col { gap: 3px; }
.fl-rows { gap: calc(var(--t) * 0.5); }
.fb-labels > span { width: calc(var(--n) * (var(--t) + 3px) - 3px); }
}
.fb-c { height: calc(var(--t) * 1.95); border-radius: 2px; }
