/* ============================================================================
   T Platt Productions — cinematic dark portfolio
   Display: Big Shoulders Display (industrial condensed, signage/poster energy)
   Body:    Archivo (quiet grotesque)
   Utility: Martian Mono (timecode, labels, counts)
   ========================================================================== */

@font-face {
  font-family: 'Big Shoulders';
  src: url('../fonts/big-shoulders-var.woff2') format('woff2-variations');
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Martian Mono';
  src: url('../fonts/martian-mono-var.woff2') format('woff2-variations');
  font-weight: 400 600;
  font-display: swap;
}

:root {
  /* Film blacks are never neutral — these carry a warm bias. */
  --ground:      #0A0908;
  --ground-lift: #14110F;
  --ink:         #F5F1E9;
  --ink-dim:     #8B857A;
  --ember:       #FF4A1C;
  --line:        #241F1B;

  --display: 'Big Shoulders', 'Haettenschweiler', 'Arial Narrow', sans-serif;
  --body:    'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono:    'Martian Mono', ui-monospace, 'SF Mono', monospace;

  --step--1: clamp(0.75rem, 0.72rem + 0.12vw, 0.82rem);
  --step-0:  clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1:  clamp(1.35rem, 1.15rem + 0.9vw, 1.9rem);
  --step-2:  clamp(2.25rem, 1.4rem + 4vw, 4.5rem);
  --step-3:  clamp(3.25rem, 0.8rem + 11vw, 11rem);

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --max: 1600px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--ember) 60%, transparent); text-underline-offset: 0.2em; }
a:hover { color: var(--ember); }

:where(a, button, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 1px;
}

/* --- layout primitives ---------------------------------------------------- */

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4rem, 10vw, 9rem); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 5rem); }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* --- type ----------------------------------------------------------------- */

.display {
  font-family: var(--display);
  font-size: var(--step-3);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin: 0;
}

.h2 {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 700;
  line-height: 0.9;
  text-transform: uppercase;
  margin: 0;
}

.h3 {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  margin: 0;
}

.lede { font-size: var(--step-1); line-height: 1.35; max-width: 26ch; }
.prose { max-width: 62ch; }
.prose p { margin: 0 0 1.15em; }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: inline-block;
}

/* Timecode-style figures: tabular so columns of runtimes align. */
.tc {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block-end: clamp(1.5rem, 3vw, 2.5rem);
}

/* --- grain ---------------------------------------------------------------- */

/* inset:0 rather than a negative inset — a negative inset widens the document
   and produces a horizontal scrollbar. The shimmer comes from background-
   position instead of a transform for the same reason. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: no-preference) {
  .grain { animation: grain-shift 700ms steps(3, end) infinite; }
}
@keyframes grain-shift {
  0%   { background-position: 0 0; }
  33%  { background-position: -18px 9px; }
  66%  { background-position: 9px -18px; }
  100% { background-position: 0 0; }
}

/* --- reveals -------------------------------------------------------------- */

/* Content is visible by default. It is only hidden for animation once JS has
   confirmed it is running (html.js), so a script failure can never leave the
   page blank. main.js also force-reveals anything still hidden after 1.5s. */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(1.75rem);
    transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  }
  html.js .reveal.is-in { opacity: 1; transform: none; }
}

/* --- header --------------------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  background: var(--ember);
  color: var(--ground);
  padding: 0.75rem 1.25rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
}
.skip:focus { left: 0; color: var(--ground); }

.site-head {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-head__mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-head__logo { width: 38px; height: auto; flex: none; }
.site-head__name { display: block; }

.site-head__mark .site-head__name span {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
  color: var(--ink-dim);
}
.site-head__mark:hover { color: var(--ink); }
.site-head__mark:hover span { color: var(--ember); }

.site-head__nav { display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); }
.site-head__nav a {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-dim);
  position: relative;
  padding-block: 0.35rem;
  transition: color 0.25s var(--ease);
}
.site-head__nav a:hover { color: var(--ink); }
.site-head__nav a[aria-current='page'] { color: var(--ink); }
.site-head__nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--ember);
}

.site-head__toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

@media (max-width: 780px) {
  .site-head__toggle { display: block; }
  .site-head__nav {
    position: fixed;
    inset: 4.25rem 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--ground);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.5rem;
    display: none;
  }
  .site-head__nav.is-open { display: flex; }
  .site-head__nav a { padding-block: 0.85rem; font-size: 1rem; }
  .site-head__nav a[aria-current='page']::after { display: none; }
  .site-head__nav a[aria-current='page'] { color: var(--ember); }
}

/* --- footer --------------------------------------------------------------- */

.site-foot__brand { display: flex; align-items: center; gap: 1.25rem; }
.site-foot__logo { width: clamp(64px, 9vw, 104px); height: auto; flex: none; opacity: 0.92; }

/* The No Skip mark keeps its own brand lime rather than the site accent —
   it is a separate brand with its own style guide. */
.noskip-mark { width: clamp(88px, 13vw, 150px); height: auto; }
.noskip-head { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem); flex-wrap: wrap; }

.site-foot {
  border-top: 1px solid var(--line);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-foot__email {
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}
.site-foot__social { display: flex; gap: 1.25rem; }
.site-foot__social a {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-dim);
}
.site-foot__social a:hover { color: var(--ember); }

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ground);
  background: var(--ember);
  border: 1px solid var(--ember);
  padding: 0.9rem 1.5rem;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { background: transparent; color: var(--ember); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ember); color: var(--ember); }

/* --- work tiles ----------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}

.tile { margin: 0; }

.tile__hit {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
}

/* Spans, so the markup stays valid inside <button> — but they need to lay out
   as blocks for aspect-ratio and overflow to apply. */
.tile__frame {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--ground-lift);
  border: 1px solid var(--line);
}

/* Aspect ratio carries the format: cinemascope for films, broadcast for web,
   vertical for short-form. The grid's rhythm comes from the work itself. */
.tile[data-category='films']      .tile__frame { aspect-ratio: 2.39 / 1; }
.tile[data-category='youtube']    .tile__frame { aspect-ratio: 16 / 9; }
.tile[data-category='corporate']  .tile__frame { aspect-ratio: 16 / 9; }
.tile[data-category='short-form'] .tile__frame { aspect-ratio: 9 / 16; }
.tile[data-category='sports']     .tile__frame { aspect-ratio: 9 / 16; }

.tile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.25) contrast(1.05);
  transform: scale(1.01);
  transition: filter 0.55s var(--ease), transform 0.55s var(--ease);
}
.tile__hit:hover .tile__img,
.tile__hit:focus-visible .tile__img {
  filter: saturate(1) contrast(1);
  transform: scale(1.045);
}

/* Signature: the scrub line sweeps in proportion to the real runtime.
   --scrub is set per tile from the video's actual duration. */
.tile__scrub {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 0;
  background: var(--ember);
}
@media (prefers-reduced-motion: no-preference) {
  .tile__hit:hover .tile__scrub,
  .tile__hit:focus-visible .tile__scrub {
    width: 100%;
    transition: width var(--scrub, 2s) linear;
  }
}

.tile__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.tile__play span {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--ground);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border: 1px solid var(--ember);
}
.tile__hit:focus-visible .tile__play { opacity: 1; }
@media (hover: none) {
  .tile__play { opacity: 1; }
  .tile__img { filter: saturate(1); }
}

.tile__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem 0.15rem;
}

.tile__title {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.02;
  text-transform: uppercase;
  margin: 0;
  transition: color 0.25s var(--ease);
}
.tile__hit:hover .tile__title { color: var(--ember); }

.empty {
  font-family: var(--mono);
  color: var(--ink-dim);
  padding-block: 3rem;
}

/* --- filters -------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-block-end: clamp(1.5rem, 3vw, 2.5rem);
}

.filter {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.filter:hover { color: var(--ink); border-color: var(--ink-dim); }
.filter[aria-pressed='true'] { color: var(--ground); background: var(--ink); border-color: var(--ink); }
.filter__n { font-size: 0.65em; opacity: 0.65; }

/* --- gallery tiles -------------------------------------------------------- */

.masonry { columns: 1; column-gap: clamp(1rem, 2vw, 1.75rem); }
@media (min-width: 700px)  { .masonry { columns: 2; } }
@media (min-width: 1100px) { .masonry { columns: 3; } }

.gtile { break-inside: avoid; margin: 0 0 clamp(1rem, 2vw, 1.75rem); }

.gtile__hit {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.gtile__img {
  width: 100%;
  /* width/height attributes come from content.json, so the browser reserves
     the right box before the image loads and the masonry does not reflow. */
  height: auto;
  border: 1px solid var(--line);
  filter: saturate(0.3);
  transition: filter 0.55s var(--ease);
}
.gtile__hit:hover .gtile__img,
.gtile__hit:focus-visible .gtile__img { filter: saturate(1); }

.gtile__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.65rem 0;
}
.gtile__title {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.02;
  text-transform: uppercase;
  margin: 0;
}
.gtile__hit:hover .gtile__title { color: var(--ember); }

/* --- process -------------------------------------------------------------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line);
  align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__n { color: var(--ember); padding-top: 0.35rem; }
.step__title {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 700;
  line-height: 0.9;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.step__body { margin: 0; max-width: 58ch; color: var(--ink-dim); }

@media (min-width: 900px) {
  .step { grid-template-columns: 4.5rem minmax(0, 22rem) minmax(0, 1fr); align-items: baseline; }
  .step__title { margin-bottom: 0; }
}

/* --- stats ---------------------------------------------------------------- */

.stats { display: flex; flex-wrap: wrap; gap: clamp(2rem, 7vw, 6rem); }
.stat { display: flex; flex-direction: column; gap: 0.25rem; }
.stat__value {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 800;
  line-height: 0.85;
}

/* --- services ------------------------------------------------------------- */

.services { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 800px) { .services { grid-template-columns: 1fr 1fr; } }
.service { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.service__title {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.service__body { margin: 0; color: var(--ink-dim); }

/* --- departments ---------------------------------------------------------- */

.depts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.dept {
  display: grid;
  gap: 0.3rem 2rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
}
.dept:last-child { border-bottom: 1px solid var(--line); }
.dept__name {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}
.dept__body { margin: 0; color: var(--ink-dim); }
@media (min-width: 800px) { .dept { grid-template-columns: 20rem 1fr; align-items: baseline; } }

/* --- ventures ------------------------------------------------------------- */

.ventures { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 900px) { .ventures { grid-template-columns: 1fr 1fr; } }

.venture {
  display: grid;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--line);
}
.venture__mark { width: clamp(76px, 11vw, 104px); height: auto; }
.venture__name {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 800;
  line-height: 0.9;
  text-transform: uppercase;
  margin: 0.2rem 0 0.6rem;
}
.venture__blurb { margin: 0 0 1rem; color: var(--ink-dim); max-width: 46ch; }
.venture__link { text-decoration: none; color: var(--ember); }
.venture__link:hover { color: var(--ink); }

/* --- clients -------------------------------------------------------------- */

.clients__label {
  display: block;
  padding: 0 var(--gutter);
  margin: 0 0 0.6rem;
}

/* --- marquee -------------------------------------------------------------- */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: 1rem;
  white-space: nowrap;
}
.marquee__track { display: inline-flex; gap: 3rem; will-change: transform; }
.marquee__track > span {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.marquee__track > span::after { content: '—'; margin-left: 3rem; color: var(--ember); }
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: marquee 38s linear infinite; }
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(92svh, 60rem);
  display: flex;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img, .hero__bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.5) contrast(1.1) brightness(0.55);
}
.hero__bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--ground) 2%, transparent 55%),
              linear-gradient(to right, color-mix(in srgb, var(--ground) 70%, transparent), transparent 60%);
}
.hero__body { position: relative; z-index: 1; width: 100%; padding-block: clamp(3rem, 8vw, 6rem); }
.hero__title { margin-block: 0.35em 0.4em; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: baseline; }

/* Letterbox bars — the format the work is made in. */
.hero::before, .hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: clamp(1.25rem, 3.5vh, 2.75rem);
  background: var(--ground);
  z-index: 2;
  pointer-events: none;
}
.hero::before { top: 0; }
.hero::after { bottom: 0; }

/* --- custom cursor -------------------------------------------------------- */

.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 9997;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ground);
  background: var(--ember);
  padding: 0.5rem 0.7rem;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  transition: opacity 0.2s var(--ease);
  margin: -1.1rem 0 0 -1.6rem;
}
.cursor.is-on { opacity: 1; }

/* --- lightbox ------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--ground) 96%, transparent);
  backdrop-filter: blur(8px);
}
.lightbox[hidden] { display: none; }
.lightbox__close {
  justify-self: end;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  cursor: pointer;
}
.lightbox__close:hover { border-color: var(--ember); color: var(--ember); }
.lightbox__stage { display: grid; place-items: center; min-height: 0; }
.lightbox__frame {
  width: min(100%, 160vh);
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
}

/* Vertical clips: drive the box from height so the whole frame stays on
   screen. A percentage height does not resolve against the grid row here,
   so this is pinned to the viewport instead. */
.lightbox--portrait .lightbox__frame {
  width: auto;
  height: min(100%, calc(100svh - 10rem));
}
.lightbox__frame iframe, .lightbox__frame video { width: 100%; height: 100%; border: 0; display: block; }
.lightbox__caption { margin: 0; text-align: center; }

/* --- gallery viewer ------------------------------------------------------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--ground) 97%, transparent);
  backdrop-filter: blur(8px);
}
.viewer[hidden] { display: none; }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.viewer__stage { display: grid; place-items: center; min-height: 0; position: relative; }
.viewer__img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer__nav { display: flex; gap: 0.5rem; justify-content: center; }
.viewer__btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
}
.viewer__btn:hover { border-color: var(--ember); color: var(--ember); }

/* --- forms ---------------------------------------------------------------- */

.form { display: grid; gap: 1.25rem; max-width: 40rem; }
.field { display: grid; gap: 0.45rem; }
.field label {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.field input, .field textarea {
  font-family: var(--body);
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--ground-lift);
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
  width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--ember); }
.field textarea { resize: vertical; min-height: 9rem; }
.hidden { position: absolute; left: -9999px; }

/* --- utility -------------------------------------------------------------- */

/* Visible only to screen readers — used for headings that keep the document
   outline correct without adding visual clutter. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.stack > * + * { margin-top: var(--stack-gap, 1.5rem); }
.dim { color: var(--ink-dim); }
.ember { color: var(--ember); }
