/* ============================================================================
   Émile Vallée · film editor
   Theme + page markup. The engine (scrollcraft.css/js) is untouched.
   ========================================================================== */

:root {
  --sc-canvas:      #0a0a0b;
  --sc-surface:     #141416;
  --sc-ink:         #f1eee8;
  --sc-ink-soft:    #a29e96;
  --sc-accent:      #ff4630;
  --sc-accent-ink:  #0a0a0b;

  --sc-font-display: "Archivo", system-ui, sans-serif;
  --sc-font-text:    "Geist", system-ui, sans-serif;
  --sc-font-mono:    "Geist Mono", ui-monospace, "SF Mono", monospace;

  --sc-shadow-color: 230 8% 2%;
  --sc-r-sm: 3px; --sc-r-md: 4px; --sc-r-lg: 6px;

  --bar-h: 64px;
  --warm:  #130e0d;
  --black: #050506;
  --copy-lift: calc(var(--bar-h) + clamp(2rem, 7vh, 5rem));
}
@media (max-width: 860px) { :root { --bar-h: 56px; } }

body { padding-bottom: 0; }

/* ------------------------------------------------------------ the cuts -- */
.cut { position: relative; overflow: clip; background: var(--sc-canvas); }
.cut--frame { height: 100svh; min-height: 34rem; }
.cut--burst { height: 72svh; min-height: 26rem; }
.cut--close { height: 100svh; min-height: 38rem; }

.frame { position: absolute; inset: 0; margin: 0; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
#open .frame img { object-position: 60% 50%; }
#page .frame img { object-position: 40% 50%; }
#room .frame img { object-position: 60% 50%; }

/* Copy anchors. Vary them: lead, trail, top, centre. */
.copy { position: absolute; z-index: 2; max-width: min(44rem, 82vw); }
.copy--lead  { left: var(--sc-gutter); bottom: var(--copy-lift); }
.copy--trail { right: var(--sc-gutter); bottom: var(--copy-lift); text-align: right; }
.copy--top   { left: var(--sc-gutter); top: clamp(2rem, 9vh, 5.5rem); }
.copy--center {
  inset-inline: var(--sc-gutter); max-width: none;
  top: 44%; translate: 0 -50%; text-align: center;
}

/* Scrims are siblings of the copy, and they point at it. */
.scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.scrim--lead {
  background: linear-gradient(to top right,
    rgba(10,10,11,.94) 0%, rgba(10,10,11,.72) 24%, rgba(10,10,11,.28) 46%, transparent 64%);
}
.scrim--trail {
  background: linear-gradient(to top left,
    rgba(10,10,11,.94) 0%, rgba(10,10,11,.72) 24%, rgba(10,10,11,.28) 46%, transparent 64%);
}
.scrim--top {
  background: linear-gradient(to bottom right,
    rgba(10,10,11,.92) 0%, rgba(10,10,11,.66) 22%, rgba(10,10,11,.22) 42%, transparent 58%);
}
.scrim--band-strong {
  background:
    radial-gradient(70% 62% at 50% 44%, rgba(10,10,11,.88) 0%, rgba(10,10,11,.62) 55%, transparent 100%),
    linear-gradient(to top, rgba(10,10,11,.92) 0%, rgba(10,10,11,.5) 22%, transparent 40%);
}
@media (max-width: 860px) {
  .copy--lead, .copy--trail { inset-inline: var(--sc-gutter); max-width: none; text-align: left; }
  .scrim--lead, .scrim--trail {
    background: linear-gradient(to top,
      rgba(10,10,11,.95) 0%, rgba(10,10,11,.76) 26%, rgba(10,10,11,.32) 46%, transparent 62%);
  }
}

/* ----------------------------------------------------------------- hero -- */
/* The wordmark spans two thirds of the frame, so its scrim is a band across
   the bottom plus a column up the left, not a corner. */
#open .scrim--lead {
  background:
    linear-gradient(to top, rgba(10,10,11,.94) 0%, rgba(10,10,11,.78) 26%, rgba(10,10,11,.42) 48%, transparent 66%),
    linear-gradient(to right, rgba(10,10,11,.8) 0%, rgba(10,10,11,.42) 38%, transparent 68%);
}
.mark {
  margin: 0;
  display: flex; flex-direction: column;
  font-family: var(--sc-font-display);
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: .84;
  letter-spacing: -.025em;
  font-size: clamp(3.4rem, 12.5vw, 12.5rem);
  text-wrap: balance;
}
.hero-line {
  margin: 1.4rem 0 0;
  font-family: var(--sc-font-mono);
  font-size: var(--sc-t-sm);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sc-ink);
}
@media (max-width: 860px) { .mark { font-size: clamp(3.2rem, 17vw, 6rem); } }

/* ----------------------------------------------------------- type cuts -- */
.cut--type {
  min-height: 80svh;
  display: grid; align-items: center;
  padding-block: var(--sc-section);
}
.cut--type .sc-display--lg { font-weight: 600; letter-spacing: -.03em; }
.cut--type-center { text-align: center; }
.cut--type-center h2 { margin-inline: auto; max-width: 14ch; }
.cut--type-lead h2 { max-width: 15ch; }
.cut--type-lead .sc-lede { color: var(--sc-ink-soft); max-width: 38ch; }
.cut--warm { background: var(--warm); }

/* ---------------------------------------------------------------- slates -- */
.slate { margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.copy--trail .slate { align-items: flex-end; }
.slate__k {
  font-family: var(--sc-font-mono);
  font-size: var(--sc-t-xs);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sc-accent);
}
.slate__v {
  font-family: var(--sc-font-display);
  font-weight: 600;
  font-size: var(--sc-t-xl);
  line-height: 1.08;
  letter-spacing: -.02em;
  max-width: 18ch;
  text-wrap: balance;
}
.slate--wide .slate__v { max-width: 28ch; font-size: var(--sc-t-lg); }
@media (max-width: 860px) { .copy--trail .slate { align-items: flex-start; } }

/* --------------------------------------------------------------- silence -- */
.cut--black {
  height: 70svh; min-height: 22rem;
  background: var(--black);
  display: grid; align-items: center; justify-items: end;
  padding-inline: var(--sc-gutter);
}
.slug {
  margin: 0;
  font-family: var(--sc-font-mono);
  font-size: var(--sc-t-sm);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--sc-ink-soft);
}

/* ------------------------------------------------------------- the peak -- */
#motion { background: var(--black); }
#motion .sc-copy { bottom: var(--copy-lift); }
#motion .sc-display--lg { font-weight: 600; letter-spacing: -.03em; max-width: 14ch; }
@media (max-width: 860px) { #motion .sc-display--lg { font-size: var(--sc-t-2xl); } }

/* --------------------------------------------------------------- method -- */
.cut--method { padding-block: calc(var(--sc-section) * .9) var(--sc-section); }
.method__h { max-width: 15ch; font-weight: 600; letter-spacing: -.03em; }
.stages {
  list-style: none; margin: var(--sc-9) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sc-7) var(--sc-6);
  counter-reset: stage;
}
.stage { border-top: 1px solid var(--sc-hairline-strong); padding-top: var(--sc-4); }
.stage h3 {
  margin: 0 0 var(--sc-3);
  font-family: var(--sc-font-display);
  font-weight: 600; font-size: var(--sc-t-lg);
  letter-spacing: -.015em; line-height: 1.1;
}
.stage p {
  margin: 0; color: var(--sc-ink-soft);
  font-size: var(--sc-t-sm); line-height: 1.62; text-wrap: pretty;
}
.tools { margin: var(--sc-9) 0 0; }
@media (max-width: 860px) { .stages { grid-template-columns: 1fr 1fr; gap: var(--sc-6) var(--sc-5); margin-top: var(--sc-8); } }
@media (max-width: 520px) { .stages { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- close -- */
.close__h {
  margin: 0 0 var(--sc-6);
  font-weight: 700; font-stretch: 112%;
  letter-spacing: -.03em;
}
.cta {
  display: inline-block;
  background: var(--sc-accent); color: var(--sc-accent-ink);
  font-family: var(--sc-font-display);
  font-weight: 700; font-stretch: 112%;
  text-transform: uppercase; letter-spacing: .07em;
  font-size: var(--sc-t-base);
  padding: 1.1rem 1.9rem;
  border-radius: var(--sc-r-md);
  text-decoration: none;
  box-shadow: var(--sc-e2);
  transition: transform 140ms var(--sc-ease-out), background-color 140ms var(--sc-ease-out);
}
.cta:hover { background: #ff5b47; }
.cta:active { transform: scale(.97); }
.foot {
  position: absolute; z-index: 2;
  left: var(--sc-gutter); right: var(--sc-gutter);
  bottom: calc(var(--bar-h) + 1.1rem);
  display: flex; justify-content: space-between; gap: var(--sc-4) var(--sc-6); flex-wrap: wrap;
  font-family: var(--sc-font-mono);
  font-size: var(--sc-t-xs); letter-spacing: .1em; text-transform: uppercase;
  color: var(--sc-ink-soft);
}
.foot__mark { color: var(--sc-ink); font-family: var(--sc-font-display); font-stretch: 125%; font-weight: 700; }
.foot a { color: var(--sc-ink); text-transform: none; letter-spacing: .04em; }
@media (max-width: 520px) { .foot { justify-content: flex-start; } }

/* ============================================================ THE TIMELINE ==
   Fixed chrome. Every act is a clip; the playhead is the scroll; cuts you have
   passed stay marked; J / K / L shuttle the page.                          */
.tl {
  position: fixed; inset: auto 0 0 0;
  height: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: var(--sc-z-chrome);
  display: flex; align-items: stretch;
  background: #0d0d0f;
  border-top: 1px solid var(--sc-hairline-strong);
  box-shadow: 0 -10px 30px -10px rgba(0,0,0,.7);
  font-family: var(--sc-font-mono);
  color: var(--sc-ink-soft);
}
.tl__mark {
  display: flex; align-items: center;
  padding-inline: var(--sc-5);
  border-right: 1px solid var(--sc-hairline);
  font-family: var(--sc-font-display);
  font-stretch: 125%; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .72rem; color: var(--sc-ink);
  text-decoration: none; white-space: nowrap;
}
.tl__mark:hover { color: var(--sc-accent); }
.tl__track {
  position: relative; flex: 1; min-width: 0;
  padding: 9px 10px;
  cursor: ew-resize;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.tl__track.is-scrubbing { cursor: grabbing; }
.tl__clips { list-style: none; margin: 0; padding: 0; display: flex; height: 100%; gap: 2px; }
.tl__clips li { display: flex; min-width: 0; position: relative; flex: 1 1 0; }
.tl__clips button {
  flex: 1; min-width: 0;
  border: 0; padding: 0 0 0 6px;
  border-radius: 2px;
  background-color: #1e1e22;
  background-image: linear-gradient(rgba(13,13,15,.62), rgba(13,13,15,.62)), var(--thumb, none);
  background-size: cover; background-position: center;
  color: var(--sc-ink);
  font: 500 9px/1 var(--sc-font-mono);
  letter-spacing: .12em; text-transform: uppercase;
  text-align: left; white-space: nowrap; overflow: hidden;
  cursor: pointer;
  opacity: .66;
  transition: opacity 140ms var(--sc-ease-out);
}
.tl__clips button:hover, .tl__clips button:focus-visible { opacity: 1; }
.tl__clips li.is-current button { opacity: 1; box-shadow: inset 0 0 0 1px rgba(241,238,232,.55); }
.tl__clips li.is-cut::before {
  content: ""; position: absolute; z-index: 2;
  left: -2px; top: -7px;
  border: 4px solid transparent; border-top: 6px solid var(--sc-accent);
}
.tl__head {
  position: absolute; top: 0; bottom: 0; left: 10px; width: 2px;
  background: var(--sc-accent);
  pointer-events: none; will-change: transform;
  z-index: 3;
}
.tl__head::before {
  content: ""; position: absolute; top: 0; left: -5px;
  border: 6px solid transparent; border-top: 7px solid var(--sc-accent);
}
.tl__readout {
  display: flex; align-items: center; gap: var(--sc-4);
  padding-inline: var(--sc-5);
  border-left: 1px solid var(--sc-hairline);
  font-size: .78rem; letter-spacing: .06em;
}
.tl__tc { font-variant-numeric: tabular-nums; color: var(--sc-ink); min-width: 11ch; text-align: right; }
.tl__shuttle { display: inline-flex; align-items: center; gap: 3px; min-width: 3.4rem; color: var(--sc-ink); font-size: .7rem; }
.tl__shuttle svg { fill: currentColor; }
.tl__shuttle.is-live { color: var(--sc-accent); }
.tl__keys { display: none; gap: 3px; }
.tl__keys kbd {
  font: 500 .6rem/1 var(--sc-font-mono);
  padding: 4px 5px;
  border: 1px solid var(--sc-hairline-strong); border-bottom-width: 2px;
  border-radius: 3px; color: var(--sc-ink-soft);
}
@media (hover: hover) and (pointer: fine) { .tl__keys { display: inline-flex; } }
.tl__cta {
  display: flex; align-items: center;
  padding-inline: var(--sc-5);
  background: var(--sc-accent); color: var(--sc-accent-ink);
  font-family: var(--sc-font-display);
  font-stretch: 112%; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; font-size: .72rem;
  text-decoration: none; white-space: nowrap;
  transition: background-color 140ms var(--sc-ease-out);
}
.tl__cta:hover { background: #ff5b47; }
.tl__cta:active { background: #e83a25; }
@media (max-width: 860px) {
  .tl__cta, .tl__keys, .tl__shuttle { display: none; }
  .tl__mark { padding-inline: var(--sc-4); font-size: .62rem; }
  .tl__readout { padding-inline: var(--sc-4); font-size: .68rem; }
  .tl__tc { min-width: 10ch; }
  .tl__clips button { font-size: 8px; padding-left: 4px; }
}
@media (max-width: 520px) { .tl__mark { display: none; } }

/* Focus rings inside the bar sit on a dark ground; keep them visible. */
.tl :focus-visible { outline-offset: 2px; }

/* ---------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cta, .tl__clips button, .tl__cta { transition: none; }
}
