/* Copied verbatim from realised-ads out/site-mock/film-block/film.css (the trailer session's player); keep the two in step. */
/* Film block for the site mock. Site tokens are read from the host page when present
   (--sage-bright, --font-mono, --bg-abyss ...) with the design-language values as fallbacks.
   Two shapes share this file:
   - the full player (.rf-film without .rf-bar): the gallery page, where watching is the point;
   - the film bar (.rf-film.rf-bar): a slim bar under a section's opening paragraph that opens
     in place into the player on a click. Script pages open it with film.js (the thumbnail
     flies into the player); the baseline page runs no script and uses <details> with a
     CSS-only open. */
.rf-film {
  --rf-hair: rgba(255,255,255,0.10);
  --rf-tick: var(--sage-bright, #7FA89E);
  --rf-cap: var(--muted, #9E9E9E);
  --rf-cap-strong: var(--offwhite, #E0E0E0);
  --rf-accent: var(--sage-bright, #7FA89E);
  --rf-mono: var(--font-mono, 'Space Mono', monospace);
  --rf-head: var(--font-heading, 'Space Grotesk', sans-serif);
  --rf-ease: cubic-bezier(0.22,1,0.36,1);
  --rf-ease-io: cubic-bezier(0.65,0,0.35,1);
  /* the open/close motion: one cubic ease-out to open, a faster ease-in-out to close
     (film.js reads the same values) */
  --rf-out: cubic-bezier(0.33,1,0.68,1);
  --rf-in: cubic-bezier(0.65,0,0.35,1);
  --rf-open-ms: 560ms;
  --rf-close-ms: 300ms;
  margin: 44px 0 0;
  width: 100%;
  max-width: 1080px;
  scroll-margin-top: 150px;
}
.rf-mark { display: flex; margin-bottom: 10px; }
.rf-film.rf-on-light {
  --rf-hair: rgba(26,26,26,0.16);
  --rf-tick: var(--cream-accent, #4A6B63);
  --rf-cap: var(--cream-ink-muted, #6B6B66);
  --rf-cap-strong: var(--cream-ink, #1A1A1A);
  --rf-accent: var(--cream-accent, #4A6B63);
}
.rf-frame {
  position: relative;
  border: 1px solid var(--rf-hair);
  padding: 10px;
}
/* corner ticks: four L-shaped hairlines sitting on the frame's corners */
.rf-tick { position: absolute; width: 14px; height: 14px; pointer-events: none; border: 0 solid var(--rf-tick); }
.rf-tick.tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.rf-tick.tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.rf-tick.bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.rf-tick.br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

.rf-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-abyss, #111111);
  overflow: hidden;
  isolation: isolate;
}
.rf-stage video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; background: transparent; z-index: 1;
}

/* the placeholder: shown under the video until a poster or a frame covers it */
.rf-ph {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; padding: 24px;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 48px 100%,
    radial-gradient(ellipse at 50% 46%, rgba(103,139,131,0.12), transparent 62%),
    #111111;
  font-family: var(--rf-mono);
}
.rf-ph svg { width: clamp(64px, 9vw, 112px); height: auto; fill: none; stroke: rgba(127,168,158,0.42); stroke-width: 1.2; }
.rf-ph-k { font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #7FA89E; display: inline-flex; align-items: center; gap: 10px; }
.rf-ph-k::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #7FA89E; animation: rf-pulse 1.8s var(--rf-ease-io) infinite; }
.rf-ph-n { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #868686; }
.rf-ph-s { font-size: 10px; letter-spacing: 0.06em; color: #5f5f5f; max-width: 34ch; line-height: 1.6; }
@keyframes rf-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

/* once a poster or a frame is up, the placeholder steps away */
.rf-film.rf-has-poster .rf-ph,
.rf-film.rf-has-frame .rf-ph { visibility: hidden; }

/* the play button: before the first play (gallery), when paused, and after the film ends */
.rf-play {
  position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 24px; border: 1px solid rgba(255,255,255,0.22);
  background: rgba(17,17,17,0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF; font-family: var(--rf-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  cursor: pointer; transition: background .25s var(--rf-ease-io), border-color .25s var(--rf-ease-io);
}
.rf-play svg { width: 12px; height: 12px; fill: currentColor; }
.rf-play:hover { background: rgba(17,17,17,0.9); border-color: #7FA89E; }
.rf-play:focus-visible { outline: 2px solid #7FA89E; outline-offset: 3px; }
.rf-play[hidden] { display: none; }

/* caption row */
.rf-cap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin-top: 12px; font-family: var(--rf-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rf-cap);
}
.rf-label { color: var(--rf-cap-strong); }
.rf-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.rf-ctl { display: inline-flex; gap: 8px; margin-left: auto; }
.rf-ctl button {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--rf-cap-strong);
  background: transparent; border: 1px solid var(--rf-hair); padding: 7px 11px; cursor: pointer;
  transition: border-color .25s var(--rf-ease-io), color .25s var(--rf-ease-io);
}
.rf-ctl button:hover { border-color: var(--rf-accent); color: var(--rf-accent); }
.rf-ctl button:focus-visible { outline: 2px solid var(--rf-accent); outline-offset: 2px; }
.rf-ctl button[aria-pressed="true"] { border-color: var(--rf-accent); color: var(--rf-accent); }
.rf-film:not(.rf-ready) .rf-ctl button { opacity: 0.35; pointer-events: none; }
.rf-draft {
  font-family: var(--rf-mono); text-transform: uppercase;
  font-size: 9px; letter-spacing: 0.16em; color: var(--rf-accent);
  border: 1px dashed var(--rf-accent); padding: 4px 8px; white-space: nowrap;
}

/* the plain link under a film block: "Watch all the films in order", "Next film: The order" */
.rf-onward { margin-top: 14px; font-family: var(--rf-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }
.rf-onward a { color: var(--rf-accent); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: color .25s var(--rf-ease-io); }
.rf-onward a:hover { color: var(--rf-cap-strong); }
.rf-onward a:focus-visible { outline: 2px solid var(--rf-accent); outline-offset: 3px; }

/* ── the film bar ─────────────────────────────────────────────────────────────
   Closed: a slim bar (thumbnail, round play, title, running time, "Watch").
   Open: the bar stays on top as the film's title row ("Close"), its thumbnail has grown
   into the player below, and a sage construction line has drawn along the frame's top. */
.rf-bar { position: relative; margin: 30px 0 0; }

.rf-open {
  position: relative;
  display: flex; align-items: center; width: 100%; min-height: 72px;
  padding: 9px 18px 9px 9px; margin: 0;
  background: var(--bg-abyss, #111111); color: #FFFFFF;
  border: 1px solid rgba(255,255,255,0.10); border-radius: 0;
  font: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .3s var(--rf-ease-io);
}
.rf-open:hover { border-color: rgba(255,255,255,0.22); }
.rf-open:focus-visible { outline: 2px solid var(--sage-bright, #7FA89E); outline-offset: 3px; }
.rf-bar.rf-on-light .rf-open { border-color: #111111; }
.rf-bar.rf-on-light .rf-open:focus-visible { outline-color: var(--cream-accent, #4A6B63); }

/* thumbnail: frame 0 at bar height, in a hairline frame. A quatrefoil sits under the
   picture and shows when the still has not been made yet. */
.rf-thumb {
  position: relative; flex: none; overflow: hidden;
  width: 94px; height: 53px; margin-right: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%237FA89E' stroke-opacity='.5' stroke-width='5'%3E%3Ccircle cx='100' cy='58' r='42'/%3E%3Ccircle cx='142' cy='100' r='42'/%3E%3Ccircle cx='100' cy='142' r='42'/%3E%3Ccircle cx='58' cy='100' r='42'/%3E%3C/svg%3E") center / 26px no-repeat,
    #161616;
  transition: width var(--rf-close-ms) var(--rf-in), margin-right var(--rf-close-ms) var(--rf-in), opacity var(--rf-close-ms) var(--rf-in);
}
.rf-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rf-thumb.rf-nothumb img { visibility: hidden; }

/* round play; becomes a close mark when open */
.rf-pb {
  position: relative; flex: none; width: 38px; height: 38px; margin-right: 16px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28); color: #FFFFFF;
  display: grid; place-items: center;
  transition: border-color .3s var(--rf-ease-io), color .3s var(--rf-ease-io), background-color .3s var(--rf-ease-io);
}
.rf-pb svg { grid-area: 1 / 1; width: 12px; height: 12px; transition: opacity .22s var(--rf-ease-io); }
.rf-pb .rf-i-play { fill: currentColor; margin-left: 2px; }
.rf-pb .rf-i-x { fill: none; stroke: currentColor; stroke-width: 1.4; opacity: 0; }
.rf-open:hover .rf-pb, .rf-open:focus-visible .rf-pb { border-color: var(--sage-bright, #7FA89E); color: var(--sage-bright, #7FA89E); background: rgba(127,168,158,0.08); }

.rf-btxt { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.rf-btitle {
  font-family: var(--rf-head); font-weight: 600; font-size: 17px; line-height: 1.2; letter-spacing: -0.01em;
  color: #FFFFFF; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rf-bmeta { font-family: var(--rf-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: #9E9E9E; font-variant-numeric: tabular-nums; }
/* the mock marker stays grey on the bar: sage there belongs to the play affordance alone */
.rf-bar .rf-draft { margin: 0 16px; font-size: 8.5px; padding: 3px 7px; color: #9E9E9E; border: 1px solid rgba(255,255,255,0.14); }
.rf-cue {
  display: grid; flex: none; font-family: var(--rf-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: #E0E0E0;
}
.rf-cue > span { grid-area: 1 / 1; text-align: right; transition: opacity .22s var(--rf-ease-io); }
.rf-cue-c { opacity: 0; }

/* the panel: grid rows 0fr -> 1fr, so the page below moves down with the height */
.rf-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows var(--rf-close-ms) var(--rf-in);
}
.rf-panel-in { min-height: 0; overflow: hidden; }
.rf-panel-body { padding-top: 12px; }
.rf-bar .rf-cap { margin-top: 10px; }
.rf-bar .rf-onward { margin-top: 12px; padding-bottom: 3px; }

/* the construction line: a sage hairline drawn left to right along the frame's top edge */
.rf-draw {
  position: absolute; z-index: 2; left: -1px; right: -1px; top: -1px; height: 1px;
  background: var(--rf-tick); transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none; transition: transform 160ms var(--rf-in);
}

/* the picture in flight (film.js): over everything in the figure while it moves. It holds one
   or two stacked pictures (on a phone the wide still, shown whole, hands over to the tall one) */
.rf-ghost {
  position: absolute; z-index: 5; margin: 0; pointer-events: none; overflow: hidden;
  background: #111111; will-change: left, top, width, height, opacity;
}
.rf-ghost > i { position: absolute; inset: 0; background-position: center; background-repeat: no-repeat; }

/* open */
.rf-bar.rf-is-open .rf-panel { grid-template-rows: 1fr; transition: grid-template-rows var(--rf-open-ms) var(--rf-out); }
.rf-bar.rf-is-open .rf-thumb { width: 0; margin-right: 0; opacity: 0; transition: width var(--rf-open-ms) var(--rf-out), margin-right var(--rf-open-ms) var(--rf-out), opacity calc(var(--rf-open-ms) * 0.6) var(--rf-out); }
.rf-bar.rf-flying .rf-thumb img { visibility: hidden; }
.rf-bar.rf-is-open .rf-i-play { opacity: 0; }
.rf-bar.rf-is-open .rf-i-x { opacity: 1; }
.rf-bar.rf-is-open .rf-cue-w { opacity: 0; }
.rf-bar.rf-is-open .rf-cue-c { opacity: 1; }
.rf-bar.rf-is-open .rf-draw { transform: scaleX(1); transition: transform 520ms var(--rf-out) 140ms; }
.rf-bar.rf-is-open .rf-btxt { animation: rf-settle var(--rf-open-ms) var(--rf-out); }
@keyframes rf-settle { from { transform: translateY(6px); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* ── the no-script bar (baseline): <details>, CSS only ─────────────────────── */
.rf-details > summary { list-style: none; }
.rf-details > summary::-webkit-details-marker { display: none; }
.rf-details[open] .rf-thumb { width: 0; margin-right: 0; opacity: 0; transition: width var(--rf-open-ms) var(--rf-out), margin-right var(--rf-open-ms) var(--rf-out), opacity calc(var(--rf-open-ms) * 0.6) var(--rf-out); }
.rf-details[open] .rf-btxt { animation: rf-settle var(--rf-open-ms) var(--rf-out); }
.rf-details[open] .rf-draw { transform: scaleX(1); transition: transform 520ms var(--rf-out) 140ms; }
@starting-style { .rf-details[open] .rf-draw { transform: scaleX(0); } }
.rf-poster { position: absolute; inset: 0; z-index: 0; background: center / cover no-repeat; }
.rf-poster-t { display: none; }
@media (max-width: 720px) { .rf-poster-w { display: none; } .rf-poster-t { display: block; } }
/* Once open, the bar stays open: no script can pause a film inside a closed <details>, so the
   player's own controls are how it stops. The summary turns into a plain title row (not
   clickable, out of the tab order: visibility hidden on the summary, visible on its parts,
   its ground redrawn by ::before); the round button and the cue fold away with the still. */
.rf-details > summary { isolation: isolate; }
.rf-details[open] > summary { visibility: hidden; pointer-events: none; cursor: default; }
.rf-details[open] > summary > * { visibility: visible; }
.rf-details[open] > summary::before {
  content: ''; position: absolute; inset: -1px; z-index: -1; visibility: visible;
  background: var(--bg-abyss, #111111); border: 1px solid rgba(255,255,255,0.10);
}
.rf-details > summary .rf-pb, .rf-details > summary .rf-cue {
  transition: width var(--rf-close-ms) var(--rf-in), margin-right var(--rf-close-ms) var(--rf-in), opacity var(--rf-close-ms) var(--rf-in);
}
.rf-details[open] > summary .rf-pb { width: 0; margin-right: 0; border-width: 0; opacity: 0; transition: width var(--rf-open-ms) var(--rf-out), margin-right var(--rf-open-ms) var(--rf-out), opacity 200ms var(--rf-out); }
.rf-details[open] > summary .rf-cue { opacity: 0; }
/* where the browser can animate to height:auto, the opened content grows and fades in;
   elsewhere it simply opens */
@supports selector(::details-content) {
  .rf-details { interpolate-size: allow-keywords; }
  .rf-details::details-content {
    block-size: 0; opacity: 0; overflow: hidden;
    transition: block-size var(--rf-close-ms) var(--rf-in), opacity var(--rf-close-ms) var(--rf-in), content-visibility var(--rf-close-ms) allow-discrete;
  }
  .rf-details[open]::details-content {
    block-size: auto; opacity: 1;
    transition: block-size var(--rf-open-ms) var(--rf-out), opacity 360ms var(--rf-out), content-visibility var(--rf-open-ms) allow-discrete;
  }
}

/* folded text: "Read it in words" */
.rf-words { margin-top: 30px; border-top: 1px solid var(--rf-hair, rgba(255,255,255,0.10)); }
.rf-words > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 0 4px; font-family: var(--font-mono, 'Space Mono', monospace); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--sage-bright, #7FA89E);
}
.rf-words > summary::-webkit-details-marker { display: none; }
.rf-words > summary::before {
  content: '+'; display: inline-grid; place-items: center; width: 22px; height: 22px;
  border: 1px solid currentColor; font-size: 13px; line-height: 1; letter-spacing: 0;
}
.rf-words[open] > summary::before { content: '\2212'; }
.rf-words > summary:hover { color: var(--text, #FFFFFF); }
.rf-words > summary:focus-visible { outline: 2px solid var(--sage-bright, #7FA89E); outline-offset: 3px; }
.rf-words-body { padding-top: 26px; }
.reg-cream .rf-words { border-top-color: rgba(26,26,26,0.14); }
.reg-cream .rf-words > summary { color: var(--cream-accent, #4A6B63); }
.reg-cream .rf-words > summary:hover { color: var(--cream-ink, #1A1A1A); }

/* phones: the tall cut, capped so the frame and its caption fit one screen */
@media (max-width: 720px) {
  .rf-film { margin-top: 32px; scroll-margin-top: 84px; }
  .rf-bar { margin-top: 24px; }
  .rf-mark { width: min(100%, calc(74svh * 9 / 16 + 14px)); margin-left: auto; margin-right: auto; }
  .rf-frame { padding: 6px; margin: 0 auto; width: min(100%, calc(74svh * 9 / 16 + 14px)); }
  .rf-stage { aspect-ratio: 9 / 16; }
  .rf-cap { width: min(100%, calc(74svh * 9 / 16 + 14px)); margin-left: auto; margin-right: auto; gap: 10px 12px; }
  .rf-ctl { margin-left: 0; width: 100%; }
  .rf-onward { width: min(100%, calc(74svh * 9 / 16 + 14px)); margin-left: auto; margin-right: auto; }
  .rf-open { min-height: 64px; padding: 6px 14px 6px 7px; }
  .rf-thumb { width: 84px; height: 48px; margin-right: 12px; }
  .rf-pb { width: 34px; height: 34px; margin-right: 12px; }
  .rf-btxt { gap: 4px; }
  .rf-btitle {
    font-size: 15px; line-height: 1.15; white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  .rf-bmeta { font-size: 9px; letter-spacing: 0.14em; }
  .rf-bar .rf-draft { display: none; }
  .rf-cue { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rf-ph-k::before { animation: none; opacity: 0.8; }
  .rf-play, .rf-ctl button { transition: none; }
  .rf-panel, .rf-bar.rf-is-open .rf-panel, .rf-thumb, .rf-bar.rf-is-open .rf-thumb, .rf-details[open] .rf-thumb,
  .rf-pb svg, .rf-cue > span, .rf-details > summary .rf-pb, .rf-details[open] > summary .rf-pb, .rf-details > summary .rf-cue { transition: none; }
  .rf-draw, .rf-bar.rf-is-open .rf-draw, .rf-details[open] .rf-draw { transition: none; transform: scaleX(1); }
  .rf-bar.rf-is-open .rf-btxt, .rf-details[open] .rf-btxt { animation: none; }
  .rf-details::details-content, .rf-details[open]::details-content { transition: none; }
}
