/* CHBS FILMS — site styles */

@font-face {
  font-family: "Departure Mono";
  src: url("fonts/DepartureMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --orange: #ff5b00;
  --red: #aa0000;
  --ice: #a6d6d4;
  --ink: #000;
  --paper: #e6e6e3;
  --muted: rgba(230, 230, 227, .62);
  --pixel: "Departure Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --gutter: clamp(18px, 3.2vw, 44px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --dim: brightness(.28) saturate(.35);
}

* { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--orange); color: #000; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 22px;
  font: 11px/1 var(--pixel); letter-spacing: .04em; text-transform: uppercase;
  color: var(--paper);
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,0));
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar__mark { display: flex; align-items: center; gap: 10px; text-decoration: none; opacity: 0; transform: translateY(-4px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.bar__mark svg { width: 13px; height: 16px; fill: none; stroke: currentColor; stroke-width: 6; }
body.is-scrolled .bar__mark { opacity: 1; transform: none; }
.bar__nav { display: flex; gap: 22px; }
.bar__nav a { text-decoration: none; }
.bar__nav a:hover, .bar__sound:hover { text-decoration: underline; text-underline-offset: 3px; }
.bar__sound b { font-weight: 400; }

/* language switch: a clear two-cell toggle, active cell filled with brand orange */
.lang {
  display: inline-flex; margin-right: 6px;
  border: 1px solid rgba(230,230,227,.7);
  background: rgba(0,0,0,.55);
  text-shadow: none;
}
.lang button {
  min-width: 46px; padding: 9px 12px;
  font: 13px/1 var(--pixel); letter-spacing: .08em;
  color: var(--paper);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.lang button + button { border-left: 1px solid rgba(230,230,227,.7); }
.lang button:hover { background: rgba(255,255,255,.12); }
.lang button[aria-pressed="true"] { background: var(--orange); color: #000; }
.lang button:focus-visible, .bar__nav a:focus-visible, .bar__sound:focus-visible { outline: 1px solid var(--orange); outline-offset: 3px; }
.bar__nav { align-items: center; }

/* text swap when the language changes */
.strip__text, .contact__tag, .hero__tag { transition: opacity .7s var(--ease); }
body.is-switching .strip__text, body.is-switching .contact__tag, body.is-switching .hero__tag { opacity: 0 !important; transition-duration: .18s; }
.bar__sound[aria-pressed="true"] b::before { content: "● "; }

/* ---------- hero ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 480px;
  display: grid; place-items: center; overflow: hidden; background: #000;
}
.hero__media { position: absolute; inset: 0; }
.hero__media video, .hero__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity 1.2s var(--ease);
}
.hero__media video { opacity: 0; }
.hero__media video.is-ready { opacity: 1; }
/* LED-screen look: the picture is seen through a grid of round "diodes", plus a vignette */
.hero__led {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,.72) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3CradialGradient id='g'%3E%3Cstop offset='.52' stop-opacity='0'/%3E%3Cstop offset='.875' stop-opacity='.92'/%3E%3C/radialGradient%3E%3Crect width='4' height='4' fill='url(%23g)'/%3E%3C/svg%3E") 0 0 / 4px 4px;
}
.hero__logo {
  --lw: min(150px, 40vw);
  position: relative; z-index: 1; color: var(--orange);
  display: flex; flex-direction: column; align-items: flex-start;
  width: var(--lw);
  animation: rise 1.4s var(--ease) both .15s;
}
/* soft shadow in the logo's own shape: a black, thick, blurred copy of the logo sits right under it */
.hero__shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  display: flex; flex-direction: column; align-items: flex-start;
  color: #000; opacity: .36; filter: blur(calc(var(--lw) * .12));
}
.hero__shade svg { width: 100%; height: auto; fill: none; stroke: #000; stroke-width: 64; stroke-linejoin: round; stroke-linecap: round; overflow: visible; }
.hero__shade .hero__word { -webkit-text-stroke: calc(var(--lw) * .17) #000; paint-order: stroke fill; }
.hero__shade .hero__tag { -webkit-text-stroke: calc(var(--lw) * .12) #000; paint-order: stroke fill; }
.hero__mark { width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 6.5; overflow: visible; }
.hero__mark path { stroke-dasharray: 1100; stroke-dashoffset: 1100; animation: draw 1.6s var(--ease) forwards .2s; }
.hero__word {
  margin: .5em 0 0; font: 400 calc(var(--lw) * .35)/.92 var(--pixel);
  letter-spacing: -.01em; text-transform: uppercase; white-space: nowrap;
}
.hero__tag { margin: 1.4em 0 0; font: 400 max(12px, calc(var(--lw) * .093))/1.25 var(--pixel); }
.hero__down {
  position: absolute; bottom: calc(22px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  font: 14px/1 var(--pixel); color: var(--paper); text-decoration: none; opacity: .7;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bob { 50% { transform: translate(-50%, 5px); } }

/* ---------- strips ---------- */
.reel { display: block; }
.strip {
  --h: 78vh;
  --focus: 50%;
  position: relative; overflow: hidden;
  height: var(--h); min-height: 340px;
  background: #050505;
  cursor: default;
  isolation: isolate;
  content-visibility: auto; contain-intrinsic-size: auto 78vh;
}
.strip[data-size="s"] { --h: 58vh; }
.strip[data-size="m"] { --h: 78vh; }
.strip[data-size="l"] { --h: 100vh; }


.strip__media { position: absolute; inset: 0; z-index: 0; }
.strip__media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: #000; opacity: 0; transition: opacity .7s var(--ease);
}
.strip__poster, .strip__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--focus) 50%;
  transition: opacity .6s var(--ease);
}
.strip__video { opacity: 0; }
.strip.is-playing .strip__video { opacity: 1; }

/* dim everything that is not the focused strip */
body.has-active .strip:not(.is-active) .strip__media::after { opacity: .72; }
body.has-active .strip:not(.is-active) .strip__text { opacity: .35; }

/* legibility scrim on the text side */
.strip::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: .9; transition: opacity .7s var(--ease);
}
.strip[data-side="left"]::after  { background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,0) 42%); }
.strip[data-side="right"]::after { background: linear-gradient(270deg, rgba(0,0,0,.55), rgba(0,0,0,0) 42%); }
.strip[data-side="center"]::after { background: radial-gradient(ellipse at center, rgba(0,0,0,.45), rgba(0,0,0,0) 60%); }

.strip__text {
  position: absolute; z-index: 2;
  top: 50%; transform: translateY(-50%);
  width: min(300px, 34vw);
  transition: opacity .7s var(--ease);
}
.strip[data-side="left"]  .strip__text { left: var(--gutter); }
.strip[data-side="right"] .strip__text { right: var(--gutter); }
.strip[data-side="center"] .strip__text { left: 50%; transform: translate(-50%, -50%); text-align: center; width: min(420px, 80vw); }
.strip[data-pos="top"]    .strip__text { top: calc(var(--gutter) + 44px); transform: none; }
.strip[data-pos="bottom"] .strip__text { top: auto; bottom: calc(var(--gutter) + 8px); transform: none; }
.strip[data-side="center"][data-pos="top"] .strip__text,
.strip[data-side="center"][data-pos="bottom"] .strip__text { transform: translateX(-50%); }

.strip__index, .strip__meta, .strip__tc {
  margin: 0; font: 11px/1.4 var(--pixel); letter-spacing: .04em; text-transform: uppercase;
}
.strip__index { color: var(--orange); margin-bottom: 10px; }
.strip__title {
  margin: 0 0 6px; font: 400 22px/1.1 var(--pixel); text-transform: uppercase; letter-spacing: -.005em;
}
.strip__meta { color: var(--muted); margin-bottom: 16px; }
.strip__body p { margin: 0 0 .8em; font-size: 15px; line-height: 1.5; color: var(--paper); }
.strip__body p:last-child { margin-bottom: 0; }
.strip__body:empty { display: none; }

/* soft dark shade that follows the letters (same idea as under the logo) */
.strip__text {
  text-shadow: 0 0 3px rgba(0,0,0,.5), 0 0 18px rgba(0,0,0,.75);
}

/* "soon" plate on cover-only strips */
.strip__soon {
  display: inline-block; margin: 0 0 12px; padding: 5px 9px 4px;
  font: 11px/1 var(--pixel); letter-spacing: .08em; text-transform: uppercase;
  color: #000; background: var(--orange); text-shadow: none;
}
.strip[data-side="center"] .strip__soon { margin-inline: auto; }

/* timecode + progress */
.strip__tc {
  position: absolute; z-index: 2; top: calc(var(--gutter) + 40px);
  display: flex; align-items: center; gap: 8px; color: var(--paper);
  opacity: 0; transition: opacity .4s var(--ease);
}
.strip[data-side="left"] .strip__tc, .strip[data-side="center"] .strip__tc { right: var(--gutter); }
.strip[data-side="right"] .strip__tc { left: var(--gutter); }
.strip__tc i { width: 7px; height: 7px; background: var(--orange); display: block; }
.strip.is-playing .strip__tc { opacity: .9; }
.strip.is-playing .strip__tc i { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.strip__progress { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 2px; opacity: 0; transition: opacity .4s; }
.strip__progress i { display: block; height: 100%; width: 100%; background: var(--orange); transform-origin: 0 50%; transform: scaleX(0); will-change: transform; }
.strip.is-playing .strip__progress { opacity: 1; }

/* ---------- strip: per-strip sound ---------- */
.strip:focus-visible { outline: 1px solid var(--orange); outline-offset: -6px; }
.strip__snd {
  position: absolute; z-index: 3; bottom: calc(var(--gutter) + 4px);
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid rgba(230,230,227,.65); background: rgba(0,0,0,.55);
  color: var(--paper); opacity: 0; transform: translateY(6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), background-color .25s, color .25s;
}
.strip[data-side="left"] .strip__snd, .strip[data-side="center"] .strip__snd { right: var(--gutter); }
.strip[data-side="right"] .strip__snd { left: var(--gutter); }
.strip.is-active .strip__snd { opacity: 1; transform: none; }
.strip__snd[hidden] { display: none; }
.strip__snd svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: square; }
.strip__snd .spk { fill: currentColor; stroke: none; }
.strip__snd .on { display: none; }
.strip__snd[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #000; }
.strip__snd[aria-pressed="true"] .on { display: block; }
.strip__snd[aria-pressed="true"] .off { display: none; }
.strip__snd:hover { background: rgba(255,255,255,.14); }
.strip__snd[aria-pressed="true"]:hover { background: var(--orange); }
.strip__snd:focus-visible { outline: 1px solid var(--orange); outline-offset: 3px; }

/* ---------- footer ---------- */
.contact {
  background: var(--red); color: var(--ice);
  min-height: 70vh; min-height: 70svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 34px; padding: 96px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  font-family: var(--pixel); text-align: center; position: relative;
}
.contact__tag { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.contact__title { margin: -14px 0 0; font: 400 clamp(34px, 6vw, 76px)/1 var(--pixel); text-transform: uppercase; letter-spacing: -.01em; }
.contact__lead { margin: -16px 0 0; font-size: clamp(14px, 1.3vw, 17px); opacity: .85; max-width: 44ch; }
.contact__cta[hidden] { display: none; }
.contact__cta {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 30px; background: var(--ice); color: var(--red);
  font: 400 clamp(15px, 1.4vw, 19px)/1 var(--pixel); text-transform: uppercase; letter-spacing: .04em; text-decoration: none;
  border: 1px solid var(--ice); transition: background .25s, color .25s, transform .25s var(--ease);
}
.contact__cta svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .25s var(--ease); }
.contact__cta:hover { background: transparent; color: var(--ice); }
.contact__cta:hover svg { transform: translateX(4px); }
.contact__cta:focus-visible { outline: 1px solid var(--ice); outline-offset: 4px; }
.contact__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.social {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px 11px 14px;
  color: var(--ice); text-decoration: none; border: 1px solid rgba(166,214,212,.55); transition: background .25s, color .25s, border-color .25s;
}
.social svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.social svg .dot { fill: currentColor; stroke: none; }
.social:hover { background: var(--ice); color: var(--red); border-color: var(--ice); }
.social:focus-visible { outline: 1px solid var(--ice); outline-offset: 3px; }
.contact__copy { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); margin: 0; font-size: 11px; opacity: .6; }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .bar__nav { gap: 14px; }
  .bar__sound { display: none; }          /* each strip has its own sound button on phones */
  .bar__mark span { display: none; }
  .lang button { min-width: 42px; padding: 10px 10px; font-size: 12px; }
  .strip__title { font-size: 22px; }
  .strip__body p { font-size: 14px; }
}

/* Vertical screens (phones, portrait tablets, narrow windows):
   the film is shown whole at its own aspect ratio — no crop — and the text sits ABOVE it,
   so it never covers the picture or burned-in subtitles. */
@media (max-width: 760px), (orientation: portrait) {
  .strip,
  .strip[data-size] {
    height: auto; min-height: 0;
    display: flex; flex-direction: column;
    padding-top: calc(var(--gutter) + 6px);
    border-top: 1px solid rgba(230,230,227,.08);
  }
  .strip::after { display: none; }
  .strip__text,
  .strip[data-pos] .strip__text,
  .strip[data-side] .strip__text {
    position: static; order: 0; transform: none;
    width: auto; max-width: 560px; margin: 0 var(--gutter) 16px; text-align: left;
  }
  .strip__index { margin-bottom: 6px; }
  .strip__meta { margin-bottom: 10px; }
  .strip__media {
    position: relative; order: 1; inset: auto;
    width: 100%; aspect-ratio: var(--ar, 16 / 9); max-height: 82svh;
  }
  .strip__poster, .strip__video { object-position: 50% 50%; }
  .strip__tc { display: none; }
  .strip[data-side] .strip__snd { top: auto; bottom: 14px; right: 14px; left: auto; }
  .strip__progress { bottom: 0; }
  body.has-active .strip:not(.is-active) .strip__text { opacity: .45; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__down { animation: none; }
  .hero__mark path { animation: none; stroke-dashoffset: 0; }
}

/* cover-only strip (no video yet) */
.strip.no-video .strip__tc, .strip.no-video .strip__progress { display: none; }
