/* ═══════════════════════════════════════════════════════════════
   Emal Saifi — Portfolio
   Palette: near-black stage, off-white key light, ember accent.
   Motif:   camera slate — mono metadata, hairline rules, frame marks.
   ═══════════════════════════════════════════════════════════════ */

:root{
  --bg:        #0A0A0B;
  --bg-alt:    #0E0E10;
  --bg-elev:   #141417;
  --fg:        #F2F0EC;
  --muted:     #8C8880;
  --dim:       #5C5952;
  --line:      rgba(242,240,236,.11);
  --line-soft: rgba(242,240,236,.06);
  --accent:    #E2603C;
  --accent-dim:#8A3A24;
  --rec:       #FF4D3D;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --pad: clamp(1.25rem, 5vw, 5.5rem);
  --max: 1560px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:var(--sans);
  font-size:16px;
  line-height:1.6;
  font-weight:300;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}

img,video{ display:block; max-width:100%; height:auto; }
a{ color:inherit; text-decoration:none; }
ul,ol,dl,dd{ margin:0; padding:0; list-style:none; }
h1,h2,h3,p{ margin:0; }

::selection{ background:var(--accent); color:#0A0A0B; }

.skip{
  position:absolute; left:-9999px; top:0; z-index:200;
  background:var(--accent); color:#0A0A0B; padding:.75rem 1.25rem;
  font-family:var(--mono); font-size:.75rem;
}
.skip:focus{ left:0; }

:focus-visible{ outline:2px solid var(--accent); outline-offset:4px; }

/* ── Film grain ─────────────────────────────────────────────── */
.grain{
  position:fixed; inset:-50%;
  z-index:100; pointer-events:none;
  opacity:.035;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  animation:grain 6s steps(6) infinite;
  will-change:transform;
}
@keyframes grain{
  0%,100%{ transform:translate(0,0) }
  20%{ transform:translate(-4%,3%) }
  40%{ transform:translate(3%,-5%) }
  60%{ transform:translate(-2%,-3%) }
  80%{ transform:translate(4%,2%) }
}

/* ── Shared bits ────────────────────────────────────────────── */
.eyebrow{
  font-family:var(--mono);
  font-size:.6875rem;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--muted);
  display:flex; align-items:center; gap:.85rem;
}
.eyebrow .rule{
  display:block; width:clamp(24px,4vw,56px); height:1px;
  background:var(--accent); flex:none;
}

.idx{
  font-family:var(--mono);
  font-size:.625rem;
  color:var(--dim);
  margin-right:.4em;
  letter-spacing:.08em;
}

/* Reveal on scroll */
.reveal{
  opacity:0;
  transform:translateY(28px);
  transition:opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-in{ opacity:1; transform:none; }

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  .reveal{ opacity:1; transform:none; transition:none; }
  .grain{ animation:none; }
  .ticker__track{ animation:none !important; }
  .rec__dot{ animation:none; }
}

/* ═══════════════════════  NAV  ═══════════════════════════════ */
.nav{
  position:fixed; inset:0 0 auto 0; z-index:90;
  transition:background .5s var(--ease), border-color .5s var(--ease), backdrop-filter .5s;
  border-bottom:1px solid transparent;
}
.nav.is-stuck{
  background:rgba(10,10,11,.78);
  backdrop-filter:blur(18px) saturate(1.4);
  -webkit-backdrop-filter:blur(18px) saturate(1.4);
  border-bottom-color:var(--line-soft);
}

.nav__inner{
  max-width:var(--max); margin:0 auto;
  padding:1.15rem var(--pad);
  display:flex; align-items:center; gap:2rem;
}

.nav__brand{
  display:flex; align-items:baseline; gap:.7rem;
  white-space:nowrap; flex:none;
}
.nav__mark{
  width:9px; height:9px; flex:none;
  background:var(--accent);
  align-self:center;
  transition:transform .5s var(--ease);
}
.nav__brand:hover .nav__mark{ transform:rotate(45deg) scale(1.15); }

.nav__name{
  font-size:.9375rem; font-weight:500; letter-spacing:-.01em;
}
.nav__role{
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.14em; text-transform:uppercase; color:var(--dim);
}

/* Camera-style REC indicator + running 24fps timecode */
.rec{
  display:flex; align-items:center; gap:.55rem;
  margin-right:auto;
  padding:.35rem .7rem .35rem .6rem;
  border:1px solid var(--line-soft); border-radius:2px;
  background:rgba(255,255,255,.02);
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.16em; text-transform:uppercase;
  color:var(--dim);
  user-select:none;
}
.rec__dot{
  width:7px; height:7px; border-radius:50%;
  background:var(--rec, #FF4D3D); flex:none;
  box-shadow:0 0 8px rgba(255,77,61,.65);
  animation:blink 1.7s steps(1,end) infinite;
}
@keyframes blink{ 0%,55%{opacity:1} 56%,100%{opacity:.18} }
.rec__label{ color:#FF4D3D; }
.rec__tc{
  color:var(--muted);
  font-variant-numeric:tabular-nums;
  letter-spacing:.08em;
  min-width:9.2ch;
}

.nav__links{ display:flex; gap:1.35rem; flex:none; }
.nav__links a{
  font-size:.8125rem; letter-spacing:.01em; color:var(--muted);
  position:relative; padding-bottom:2px; white-space:nowrap;
  transition:color .35s var(--ease);
}
.nav__links a::after{
  content:""; position:absolute; left:0; bottom:-2px;
  width:100%; height:1px; background:var(--accent);
  transform:scaleX(0); transform-origin:right;
  transition:transform .45s var(--ease);
}
.nav__links a:hover,
.nav__links a.is-active{ color:var(--fg); }
.nav__links a:hover::after,
.nav__links a.is-active::after{ transform:scaleX(1); transform-origin:left; }

.nav__cta{
  display:flex; align-items:center; gap:.6rem;
  font-family:var(--mono); font-size:.6875rem;
  letter-spacing:.12em; text-transform:uppercase;
  border:1px solid var(--line); border-radius:100px;
  padding:.55rem 1rem;
  color:var(--muted);
  transition:border-color .4s var(--ease), color .4s var(--ease);
}
.nav__cta:hover{ border-color:var(--accent); color:var(--fg); }
.dot{
  width:6px; height:6px; border-radius:50%;
  background:var(--accent); flex:none;
  box-shadow:0 0 0 0 rgba(226,96,60,.6);
  animation:pulse 2.4s infinite;
}
@keyframes pulse{
  70%{ box-shadow:0 0 0 8px rgba(226,96,60,0) }
  100%{ box-shadow:0 0 0 0 rgba(226,96,60,0) }
}

.nav__burger{
  display:none;
  width:38px; height:38px; padding:0;
  background:none; border:1px solid var(--line);
  border-radius:2px; cursor:pointer;
  flex-direction:column; align-items:center; justify-content:center; gap:5px;
}
.nav__burger span{
  display:block; width:15px; height:1px; background:var(--fg);
  transition:transform .4s var(--ease), opacity .3s;
}
.nav__burger[aria-expanded="true"] span:first-child{ transform:translateY(3px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child{ transform:translateY(-3px) rotate(-45deg); }

/* Mobile menu */
.menu{
  position:fixed; inset:0; z-index:85;
  background:var(--bg);
  display:flex; flex-direction:column; justify-content:center;
  gap:.35rem; padding:0 var(--pad);
}
.menu[hidden]{ display:none; }
.menu a{
  font-size:clamp(2rem,9vw,3rem); font-weight:300; letter-spacing:-.035em;
  padding:.35rem 0;
  border-bottom:1px solid var(--line-soft);
}
.menu .idx{ font-size:.6875rem; vertical-align:super; }
.menu__where{
  margin-top:1.25rem;
  font-family:var(--mono); font-size:.6875rem;
  letter-spacing:.12em; text-transform:uppercase; color:var(--dim);
  line-height:1.7;
}
.menu__mail{
  font-size:1rem !important; font-family:var(--mono);
  color:var(--accent); margin-top:2rem; border:none !important;
  letter-spacing:0 !important;
}

/* ═══════════════════════  HERO  ══════════════════════════════ */
.hero{
  position:relative;
  min-height:100svh;
  display:flex; flex-direction:column; justify-content:flex-end;
  padding:8rem var(--pad) clamp(2rem,5vh,3.5rem);
  overflow:hidden;
}

.hero__bg{
  position:absolute; inset:0; z-index:-1;
  background:
    radial-gradient(120% 90% at 78% 8%,  rgba(226,96,60,.16) 0%, transparent 55%),
    radial-gradient(100% 80% at 10% 100%, rgba(70,92,120,.20) 0%, transparent 60%),
    linear-gradient(180deg, #0C0C0E 0%, #0A0A0B 65%);
}
.hero__bg::after{
  /* faint sensor grid — engineering under the image */
  content:""; position:absolute; inset:0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size:clamp(60px,8vw,120px) clamp(60px,8vw,120px);
  mask-image:radial-gradient(80% 70% at 50% 40%, #000 0%, transparent 78%);
  -webkit-mask-image:radial-gradient(80% 70% at 50% 40%, #000 0%, transparent 78%);
}

.hero__inner{
  max-width:var(--max); margin:0 auto; width:100%;
}

.hero__title{
  font-size:clamp(3.5rem, 13.5vw, 12.5rem);
  line-height:.85;
  font-weight:300;
  letter-spacing:-.055em;
  margin:1.75rem 0 0;
}
.hero__title .line{ display:block; overflow:hidden; }
.hero__title .line span{
  display:block;
  transform:translateY(105%);
  transition:transform 1.15s var(--ease);
}
.hero__title.is-in .line span{ transform:none; }
.hero__title .line:last-child span{ transition-delay:.1s; }
/* all-caps surname needs looser tracking than the lowercase line */
.hero__title .surname{ letter-spacing:-.025em; }

.hero__lede{
  max-width:46ch;
  text-wrap:pretty;   /* keeps the last line from ending on a single orphaned word */
  font-size:clamp(1rem,1.55vw,1.3125rem);
  line-height:1.55;
  color:#C9C5BE;
  margin-top:clamp(1.75rem,3.5vw,2.75rem);
  transition-delay:.2s;
}

.hero__slate{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(205px,1fr));
  gap:1px;
  margin-top:clamp(2.5rem,5vw,4rem);
  border-top:1px solid var(--line);
  transition-delay:.3s;
}
.hero__slate > div{
  padding:1.1rem 1.25rem 1.1rem 0;
  border-right:1px solid var(--line-soft);
}
.hero__slate > div:last-child{ border-right:none; }
/* Keep the slate clear of the scroll cue pinned bottom-right. The gutter is
   taken off the whole grid rather than the last cell: with five cells, padding
   one cell by itself left too little room for its value and wrapped it.
   Only from 1200px — below that the cue is hidden and the room is needed. */
@media (min-width:1320px){
  .hero__slate{ padding-right:7.5rem; }
}
.hero__slate dt{
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.16em; text-transform:uppercase; color:var(--dim);
  margin-bottom:.5rem;
}
.hero__slate dd{ font-size:.875rem; color:#D8D4CD; }
.hero__slate .live{ color:var(--accent); }

.hero__scroll{
  position:absolute; right:var(--pad); bottom:clamp(2rem,5vh,3.5rem);
  display:flex; align-items:center; gap:.75rem;
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.18em; text-transform:uppercase; color:var(--dim);
  transition:color .4s var(--ease);
}
.hero__scroll:hover{ color:var(--fg); }
.hero__scroll i{
  display:block; width:1px; height:46px;
  background:linear-gradient(to bottom, var(--accent), transparent);
}
/* Below 1320px the reserved gutter would squeeze a five-cell slate hard enough
   to wrap a value, and the cue is decoration — drop the cue, keep the slate. */
@media (max-width:1319px){ .hero__scroll{ display:none; } }

/* ═══════════════════════  TICKER  ════════════════════════════ */
.ticker{
  border-block:1px solid var(--line-soft);
  padding:1.1rem 0;
  overflow:hidden;
  background:var(--bg-alt);
}
.ticker__track{
  display:flex; width:max-content;
  animation:slide 46s linear infinite;
}
.ticker__group{
  display:flex; align-items:center; gap:1.5rem;
  padding-right:1.5rem;
  font-family:var(--mono); font-size:.75rem;
  letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted); white-space:nowrap;
}
.ticker__group b{ color:var(--accent-dim); font-weight:400; }
@keyframes slide{ to{ transform:translateX(-50%) } }

/* ═══════════════════════  SECTIONS  ══════════════════════════ */
.section{
  max-width:var(--max); margin:0 auto;
  padding:clamp(5rem,11vw,10rem) var(--pad);
}
.section--alt{
  max-width:none;
  background:var(--bg-alt);
  border-block:1px solid var(--line-soft);
}
.section--alt > *{ max-width:var(--max); margin-inline:auto; }

.section__head{ margin-bottom:clamp(3rem,7vw,6rem); }
.section__title{
  font-size:clamp(2rem,6vw,4.5rem);
  line-height:1.02;
  font-weight:300;
  letter-spacing:-.04em;
  margin-top:1.5rem;
}
.section__lede{
  max-width:44ch; margin-top:1.5rem; text-wrap:pretty;
  color:var(--muted); font-size:clamp(.9375rem,1.3vw,1.0625rem);
}
.section__lede strong{ color:var(--fg); font-weight:400; }

/* ═══════════════════════  CASES  ═════════════════════════════ */
.cases{ display:flex; flex-direction:column; gap:clamp(4.5rem,9vw,9rem); }

.case{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:clamp(2rem,4.5vw,4.5rem);
  align-items:center;
}
/* Flipping the order must also flip the track widths, or every second case
   would show its image in the narrow column. */
.case--flip{ grid-template-columns:.85fr 1.15fr; }
.case--flip .case__media{ order:2; }

.case__media{ position:relative; }

.case__media img,
.case__media video{
  width:100%; aspect-ratio:16/9; object-fit:cover;
  filter:saturate(.85) contrast(1.05);
  transition:filter .7s var(--ease), transform .9s var(--ease);
}
.case:hover .case__media img,
.case:hover .case__media video{ filter:none; transform:scale(1.012); }

/* Placeholder frame — reads as a slate until real media is dropped in */
.frame{
  position:relative;
  aspect-ratio:16/9;
  background:
    radial-gradient(90% 120% at 30% 0%, rgba(226,96,60,.13) 0%, transparent 58%),
    linear-gradient(145deg, #16161A 0%, #0C0C0E 55%, #121216 100%);
  border:1px solid var(--line-soft);
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.frame::before{
  content:attr(data-frame);
  position:absolute; top:.9rem; left:1rem;
  font-family:var(--mono); font-size:.5625rem;
  letter-spacing:.2em; text-transform:uppercase; color:var(--dim);
}
.frame::after{
  /* corner framing marks */
  content:""; position:absolute; inset:.9rem;
  background:
    linear-gradient(var(--line),var(--line)) left  top    /14px 1px no-repeat,
    linear-gradient(var(--line),var(--line)) left  top    /1px 14px no-repeat,
    linear-gradient(var(--line),var(--line)) right top    /14px 1px no-repeat,
    linear-gradient(var(--line),var(--line)) right top    /1px 14px no-repeat,
    linear-gradient(var(--line),var(--line)) left  bottom /14px 1px no-repeat,
    linear-gradient(var(--line),var(--line)) left  bottom /1px 14px no-repeat,
    linear-gradient(var(--line),var(--line)) right bottom /14px 1px no-repeat,
    linear-gradient(var(--line),var(--line)) right bottom /1px 14px no-repeat;
  pointer-events:none;
}
.frame__label{
  font-family:var(--mono); font-size:.6875rem;
  letter-spacing:.22em; text-transform:uppercase;
  color:var(--dim);
}
.frame--portrait{ aspect-ratio:4/5; }

/* ── Case study link: the camera-slate treatment on hover ───── */
.case__link{
  display:block; position:relative; overflow:hidden;
}
.case__link img{
  transition:transform .9s var(--ease), filter .7s var(--ease);
}
.case__link:hover img,
.case__link:focus-visible img{
  transform:scale(1.045);
  filter:none;
}

/* framing brackets draw in from just outside the frame */
.case__link::after{
  content:""; position:absolute; inset:1.1rem; z-index:1;
  pointer-events:none;
  background:
    linear-gradient(var(--fg),var(--fg)) left  top    /22px 1px no-repeat,
    linear-gradient(var(--fg),var(--fg)) left  top    /1px 22px no-repeat,
    linear-gradient(var(--fg),var(--fg)) right top    /22px 1px no-repeat,
    linear-gradient(var(--fg),var(--fg)) right top    /1px 22px no-repeat,
    linear-gradient(var(--fg),var(--fg)) left  bottom /22px 1px no-repeat,
    linear-gradient(var(--fg),var(--fg)) left  bottom /1px 22px no-repeat,
    linear-gradient(var(--fg),var(--fg)) right bottom /22px 1px no-repeat,
    linear-gradient(var(--fg),var(--fg)) right bottom /1px 22px no-repeat;
  opacity:0;
  transform:scale(1.06);
  transition:opacity .45s var(--ease), transform .6s var(--ease);
}
.case__link:hover::after,
.case__link:focus-visible::after{ opacity:.85; transform:none; }

/* the invitation, rising out of the bottom edge */
.case__cue{
  position:absolute; inset:auto 0 0 0; z-index:2;
  display:flex; align-items:center; gap:.6rem;
  padding:2.5rem 1.4rem 1.15rem;
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.18em; text-transform:uppercase;
  color:var(--fg);
  background:linear-gradient(0deg, rgba(10,10,11,.9) 0%, rgba(10,10,11,.45) 55%, transparent 100%);
  opacity:0; transform:translateY(10px);
  transition:opacity .45s var(--ease), transform .55s var(--ease);
  pointer-events:none;
}
.case__link:hover .case__cue,
.case__link:focus-visible .case__cue{ opacity:1; transform:none; }
.case__cue i{
  font-style:normal; color:var(--accent);
  transition:transform .45s var(--ease);
}
.case__link:hover .case__cue i{ transform:translate(3px,-3px); }

/* the title points at the same place */
.case__title a{
  transition:color .35s var(--ease);
  border-bottom:1px solid transparent;
}
.case__title a:hover{ border-bottom-color:var(--accent); }

@media (prefers-reduced-motion:reduce){
  .case__link img,
  .case__link::after,
  .case__cue{ transition:none; }
  .case__link:hover img{ transform:none; }
}

/* The written invitation. The hover treatment on the image is invisible on touch,
   so the only reliable signal that there is more to read is a link that is always there. */
.case__more{
  display:inline-flex; align-items:center; gap:.7rem;
  margin-top:1.5rem;
  font-family:var(--mono); font-size:.6875rem;
  letter-spacing:.16em; text-transform:uppercase;
  color:var(--fg);
  border-bottom:1px solid var(--accent);
  padding-bottom:.45rem;
  transition:gap .35s var(--ease), color .35s var(--ease);
}
.case__more i{
  font-style:normal; color:var(--accent);
  transition:transform .35s var(--ease);
}
.case__more:hover{ gap:1.05rem; }
.case__more:hover i{ transform:translateX(2px); }

.case__num{
  font-family:var(--mono); font-size:.6875rem;
  letter-spacing:.2em; color:var(--accent); margin-bottom:1.25rem;
}
.case__title{
  font-size:clamp(1.75rem,3.6vw,3rem);
  line-height:1.04; font-weight:300; letter-spacing:-.035em;
}
.case__sub{
  font-family:var(--mono); font-size:.75rem;
  letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted); margin-top:.85rem;
}
.case__text{
  color:#B8B4AD; margin-top:1.5rem; max-width:52ch;
  font-size:clamp(.9375rem,1.2vw,1.0625rem);
}

.slate{
  margin-top:2rem;
  border-top:1px solid var(--line-soft);
}
.slate > div{
  display:grid;
  grid-template-columns:minmax(110px,150px) 1fr;
  gap:1rem;
  padding:.7rem 0;
  border-bottom:1px solid var(--line-soft);
}
.slate dt{
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.15em; text-transform:uppercase; color:var(--dim);
  padding-top:.15em;
}
.slate dd{ font-size:.875rem; color:#D8D4CD; }
.slate__note{
  font-family:var(--mono); font-size:.5625rem;
  letter-spacing:.14em; text-transform:uppercase;
  color:var(--dim); margin-left:.6em;
}
/* Credited names link out to IMDb — underlined so they read as clickable in a metadata block. */
.slate dd a{
  border-bottom:1px solid var(--line);
  padding-bottom:1px;
  transition:color .3s var(--ease), border-color .3s var(--ease);
}
.slate dd a:hover{ color:var(--fg); border-bottom-color:var(--accent); }
.slate dd a::after{
  content:"↗";
  font-size:.6875em; margin-left:.35em;
  color:var(--dim);
  transition:color .3s var(--ease);
}
.slate dd a:hover::after{ color:var(--accent); }

.tags{
  display:flex; flex-wrap:wrap; gap:.5rem;
  margin-top:1.75rem;
}
.tags li{
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.1em; text-transform:uppercase;
  color:var(--muted);
  border:1px solid var(--line);
  padding:.35rem .7rem;
  border-radius:100px;
}

/* ═══════════════════════  REEL FEED  ═════════════════════════ */
/* Cinematography: fixed 16:9 grid. The source is Full HD, so never crop it. */
.reel--cine{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:clamp(.6rem, 1.2vw, 1.15rem);
}

/* Case study stills: a real grid, because these are ordered — they read left to
   right and tell the build in sequence. A column flow would scramble that. */
.reel--square{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:clamp(.6rem, 1.2vw, 1.15rem);
}
.reel--square .reel__item > img{
  aspect-ratio:1/1;
  object-fit:cover;
}
/* A 16:9 frame would be gutted by a square crop, so let it take two cells instead.
   The image is taken out of flow so it can't drive the row taller than its square
   neighbours — the row stays square-height and the frame fills it. */
.reel--square .reel__item--wide{ grid-column:span 2; }
.reel--square .reel__item--wide > img{
  position:absolute; inset:0;
  aspect-ratio:auto;
  width:100%; height:100%;
  object-fit:cover;
}
@media (max-width:1100px){ .reel--square{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:760px) { .reel--square{ grid-template-columns:repeat(2,1fr); } }
/* one column left — a two-cell span would spill off the side */
@media (max-width:460px) {
  .reel--square{ grid-template-columns:1fr; }
  .reel--square .reel__item--wide{ grid-column:span 1; }
}

/* The results, reading left to right: raw capture → raw capture → finished shot.
   This is the payoff of the page, so it gets more room than the stills below. */
.reel--results{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:clamp(.75rem, 1.5vw, 1.5rem);
  max-width:72rem;
}
.reel--results .reel__item > img{ aspect-ratio:1/1; object-fit:cover; }
@media (max-width:860px){ .reel--results{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .reel--results{ grid-template-columns:1fr; } }

/* Gen AI: a uniform 4:5 grid. A column flow balanced by content height, which is
   what this was, leaves one column hanging below the rest as soon as portrait and
   landscape stills are mixed. Tiles crop to a common ratio; the lightbox shows the
   full frame. 4:5 favours the portrait majority without gutting the landscapes. */
.reel--genai{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:clamp(.6rem, 1.2vw, 1.15rem);
}
.reel--genai .reel__item > img{
  aspect-ratio:4/5;
  object-fit:cover;
  height:auto;
}

.reel__item{
  margin:0;
  position:relative;
  cursor:pointer;
  overflow:hidden;
  background:var(--bg-elev);
}
.reel__item > img,
.reel__item > video{
  width:100%; aspect-ratio:16/9; object-fit:cover;
  transition:filter .6s var(--ease), opacity .5s var(--ease);
}

/* The render sits under the top-down techvis; hovering cross-fades to the setup. */
.reel__shot{ filter:saturate(.92); }
.reel__item:hover .reel__shot,
.reel__item:focus-visible .reel__shot{ filter:none; }

.reel__tech{
  position:absolute; inset:0;
  height:100%;
  object-fit:contain;        /* the top-down is wider than 16:9 — never crop the rig */
  background:#1E1E1E;
  opacity:0;
  pointer-events:none;
}
.reel__item:hover .reel__tech,
.reel__item:focus-visible .reel__tech{ opacity:1; }

/* Corner tag on the frames that carry a setup diagram */
.reel__item[data-tech]::before{
  content:"Setup";
  position:absolute; top:.6rem; left:.65rem; z-index:2;
  font-family:var(--mono); font-size:.5rem;
  letter-spacing:.2em; text-transform:uppercase;
  color:var(--muted);
  background:rgba(10,10,11,.6);
  padding:.2rem .45rem;
  transition:color .4s var(--ease);
}
.reel__item[data-tech]:hover::before{ color:var(--accent); }

.reel__item .frame{ aspect-ratio:16/9; }

/* Links out to the projects that aren't in the grid */
.reel__more{
  margin-top:clamp(1.75rem,3vw,2.5rem);
  display:flex; flex-wrap:wrap; align-items:baseline; gap:.5rem 1.25rem;
  font-family:var(--mono); font-size:.6875rem;
  letter-spacing:.14em; text-transform:uppercase; color:var(--dim);
}
.reel__more a{
  color:var(--muted);
  border-bottom:1px solid transparent; padding-bottom:2px;
  transition:color .3s var(--ease), border-color .3s var(--ease);
}
.reel__more a:hover{ color:var(--fg); border-bottom-color:var(--accent); }

/* The last link goes to the whole profile rather than one project, so it
   takes a row of its own — at every width, so it never reads as a chip that
   happened to wrap. */
.reel__more .brk{ flex:0 0 100%; height:0; }   /* forces the wrap */
.reel__more a.is-all{
  margin-top:.35rem;
  color:var(--fg); border-bottom-color:var(--line-soft);
}
.reel__more a.is-all:hover{ color:var(--accent); border-bottom-color:var(--accent); }

/* slate strip along the bottom of each tile */
.reel__item figcaption{
  position:absolute; inset:auto 0 0 0;
  display:flex; align-items:baseline; justify-content:space-between; gap:.5rem;
  padding:.75rem .7rem .6rem;
  font-family:var(--mono); font-size:.5625rem;
  letter-spacing:.14em; text-transform:uppercase;
  color:#CFCBC4;
  background:linear-gradient(0deg, rgba(10,10,11,.92) 0%, rgba(10,10,11,.55) 55%, transparent 100%);
  opacity:0; transform:translateY(6px);
  transition:opacity .4s var(--ease), transform .4s var(--ease);
}
.reel__item:hover figcaption,
.reel__item:focus-visible figcaption{ opacity:1; transform:none; }
.reel__item figcaption em{ font-style:normal; color:var(--accent); }

/* Play button on video tiles — always visible, so a video reads as a video
   before anyone hovers or clicks. ::after is the disc, ::before the triangle. */
.reel__item[data-kind="Video"]::after{
  content:"";
  position:absolute; left:50%; top:50%;
  transform:translate(-50%,-50%);
  width:clamp(44px, 18%, 62px); aspect-ratio:1;
  border-radius:50%;
  border:1px solid rgba(242,240,236,.75);
  background:rgba(10,10,11,.42);
  backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px);
  z-index:2;
  transition:background .35s var(--ease), border-color .35s var(--ease), transform .4s var(--ease);
}
.reel__item[data-kind="Video"]::before{
  content:"";
  position:absolute; left:50%; top:50%;
  transform:translate(-35%,-50%);
  width:0; height:0;
  border-left:13px solid var(--fg);
  border-top:8.5px solid transparent;
  border-bottom:8.5px solid transparent;
  z-index:3;
  transition:border-left-color .35s var(--ease);
}
.reel__item[data-kind="Video"]:hover::after,
.reel__item[data-kind="Video"]:focus-visible::after{
  background:var(--accent);
  border-color:var(--accent);
  transform:translate(-50%,-50%) scale(1.08);
}
.reel__item[data-kind="Video"]:hover::before,
.reel__item[data-kind="Video"]:focus-visible::before{ border-left-color:#0A0A0B; }

@media (max-width:1200px){ .reel--genai{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:900px){
  .reel--cine{ grid-template-columns:repeat(2,1fr); }
  .reel--genai{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:560px){
  /* full-width reads better than two cramped thumbnails on a phone */
  .reel--cine{ grid-template-columns:1fr; }
  .reel--genai{ grid-template-columns:1fr; }
  /* no hover on touch — always show the caption strip */
  .reel__item figcaption{ opacity:1; transform:none; }
}

/* ═══════════════════════  KIT  ═══════════════════════════════ */
.kit{
  margin-top:clamp(2.5rem,5vw,4rem);
  padding-top:clamp(1.75rem,3vw,2.25rem);
  border-top:1px solid var(--line-soft);
}
.kit__title{
  font-family:var(--mono); font-size:.6875rem; font-weight:500;
  letter-spacing:.2em; text-transform:uppercase;
  color:var(--muted);
  margin-bottom:1.5rem;
}
.kit__list{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 260px));
  gap:1.5rem 3rem;
}
.kit__list dt{
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.16em; text-transform:uppercase; color:var(--dim);
  padding-bottom:.7rem; margin-bottom:.7rem;
  border-bottom:1px solid var(--line-soft);
}
.kit__list dd{
  font-size:.875rem; color:#D8D4CD;
  padding-left:1rem; position:relative;
}
.kit__list dd + dd{ margin-top:.5rem; }
.kit__list dd::before{
  content:""; position:absolute; left:0; top:.62em;
  width:5px; height:1px; background:var(--accent-dim);
}

/* ═══════════════════════  LIGHTBOX  ══════════════════════════ */
.lightbox{
  position:fixed; inset:0; z-index:120;
  display:flex; flex-direction:column;
  gap:clamp(.75rem,2vw,1.25rem);
  /* tight side padding — the nav arrows float over it so the frame gets the full width */
  padding:clamp(3.25rem,6vw,4.25rem) clamp(.75rem,2vw,1.5rem) clamp(1.25rem,2.5vw,2rem);
  background:rgba(8,8,9,.94);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.lightbox[hidden]{ display:none; }

.lightbox__stage{
  flex:1 1 auto;
  display:flex; align-items:center; justify-content:center;
  min-height:0;
}
.lightbox__stage > *{
  max-width:100%; max-height:100%;
  width:auto; height:auto;
  object-fit:contain;
  border:1px solid var(--line-soft);
}
/* placeholder frames need an explicit size inside the stage */
.lightbox__stage > .frame{
  width:min(100%, calc((100dvh - 14rem) * 16 / 9));
  aspect-ratio:16/9;
  height:auto;
}

/* Top-right control cluster — the setup toggle sits where it will be found. */
.lightbox__controls{
  position:absolute; top:clamp(.85rem,2vw,1.4rem); right:clamp(.85rem,2vw,1.5rem);
  z-index:3;
  display:flex; align-items:center; gap:.6rem;
}

.lightbox__close{
  background:none; border:1px solid var(--line); border-radius:2px;
  color:var(--muted); cursor:pointer;
  padding:.5rem .8rem;
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.16em; text-transform:uppercase;
  transition:color .3s var(--ease), border-color .3s var(--ease);
}
.lightbox__close:hover{ color:var(--fg); border-color:var(--accent); }

.lightbox__nav{
  position:absolute; top:50%; transform:translateY(-50%);
  z-index:3;
  background:rgba(10,10,11,.55); border:1px solid var(--line); border-radius:50%;
  width:44px; height:44px;
  color:var(--muted); cursor:pointer; font-size:1rem;
  backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  transition:color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.lightbox__nav:hover{ color:var(--fg); border-color:var(--accent); background:rgba(10,10,11,.85); }
.lightbox__nav--prev{ left:clamp(.5rem,1.5vw,1.25rem); }
.lightbox__nav--next{ right:clamp(.5rem,1.5vw,1.25rem); }

.lightbox__cap{
  flex:none;
  display:flex; align-items:baseline; justify-content:center;
  flex-wrap:wrap; gap:.5rem 1rem;
  font-family:var(--mono); font-size:.6875rem;
  letter-spacing:.14em; text-transform:uppercase; color:var(--muted);
  text-align:center;
}
.lightbox__cap #lbCount{ color:var(--accent); flex:none; }
.lightbox__toggle{
  display:flex; align-items:center; gap:.5rem;
  background:none; border:1px solid var(--accent); border-radius:2px;
  color:var(--fg); cursor:pointer;
  padding:.5rem .7rem;
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.16em; text-transform:uppercase;
  transition:background .3s var(--ease), color .3s var(--ease);
}
.lightbox__toggle[hidden]{ display:none; }
.lightbox__toggle:hover{ background:var(--accent); color:#0A0A0B; }
.lightbox__toggle kbd{
  font-family:inherit; font-size:.5625rem;
  border:1px solid currentColor; border-radius:2px;
  padding:0 .3em; opacity:.7;
}
.lightbox__toggle.is-on{ background:var(--accent); color:#0A0A0B; }

/* YouTube player inside the lightbox — sized to the stage, 16:9 */
.lightbox__stage > .is-embed{
  width:min(100%, calc((100dvh - 14rem) * 16 / 9));
  aspect-ratio:16/9;
  height:auto;
  border:1px solid var(--line-soft);
  background:#000;
}

/* the top-down is wider than the frame — fit it whole, never crop */
.lightbox__stage > .is-tech{ object-fit:contain; background:#1E1E1E; }

.lightbox__out{
  flex:none;
  color:var(--fg);
  border-bottom:1px solid var(--line);
  padding-bottom:2px;
  transition:border-color .3s var(--ease), color .3s var(--ease);
}
.lightbox__out[hidden]{ display:none; }
.lightbox__out:hover{ color:var(--accent); border-bottom-color:var(--accent); }

@media (max-width:560px){
  .lightbox__cap{ flex-wrap:wrap; gap:.5rem .8rem; }
}

@media (max-width:560px){
  .lightbox__nav{ width:38px; height:38px; }
}

/* ═══════════════════════  CAPABILITIES  ══════════════════════ */
.caps{
  display:grid;
  grid-template-columns:repeat(3, 1fr); /* 6 cards → two clean rows, no orphan cells */
  gap:1px;
  background:var(--line-soft);
  border:1px solid var(--line-soft);
}
.cap{
  background:var(--bg-alt);
  padding:clamp(1.75rem,3vw,2.5rem);
  transition:background .5s var(--ease);
}
.cap:hover{ background:var(--bg-elev); }
.cap__num{
  font-family:var(--mono); font-size:.6875rem;
  letter-spacing:.2em; color:var(--accent); margin-bottom:1.25rem;
}
.cap h3{
  font-size:1.125rem; font-weight:400; letter-spacing:-.015em;
  margin-bottom:1.25rem;
}
.cap ul{ display:flex; flex-direction:column; gap:.6rem; }
.cap li{
  font-size:.875rem; color:#B8B4AD;
  padding-left:1rem; position:relative;
}
.cap li::before{
  content:""; position:absolute; left:0; top:.62em;
  width:5px; height:1px; background:var(--accent-dim);
}
/* A final card left alone on its row shows the grid's gap colour as two empty
   cells — let it take the full width instead, and run its list across. */
.caps > .cap:last-child:nth-child(3n + 1){ grid-column:1 / -1; }
.caps > .cap:last-child:nth-child(3n + 1) ul{
  flex-direction:row; flex-wrap:wrap;
  gap:.7rem 2.75rem;
}

.cap em{
  font-style:normal; font-family:var(--mono);
  font-size:.5625rem; letter-spacing:.14em; text-transform:uppercase;
  color:var(--dim); margin-left:.5em;
}

/* ═══════════════════════  ABOUT  ═════════════════════════════ */
/* The portrait takes the frame's shape and its hairline, so swapping the
   placeholder for the photograph changes nothing about the layout. */
.about__shot{
  display:block; width:100%; height:auto;
  aspect-ratio:4/5; object-fit:cover;
  border:1px solid var(--line-soft);
}

.about{
  display:grid;
  grid-template-columns:.72fr 1fr;
  gap:clamp(2.5rem,6vw,6rem);
  align-items:start;
}
.about__portrait{ margin-top:2.5rem; }
.about__portrait img{
  width:100%; aspect-ratio:4/5; object-fit:cover;
  filter:saturate(.8) contrast(1.05);
}
.about__body{ padding-top:clamp(0rem,3vw,3rem); }
.about__lead{
  font-size:clamp(1.375rem,2.9vw,2.125rem);
  line-height:1.25; font-weight:300; letter-spacing:-.03em;
  margin-bottom:2rem;
}
.about__body p + p{ margin-top:1.35rem; }
.about__body a{
  color:var(--fg);
  border-bottom:1px solid var(--line);
  padding-bottom:1px;
  transition:border-color .3s var(--ease);
}
.about__body a:hover{ border-bottom-color:var(--accent); }
.about__body p:not(.about__lead){
  color:#A8A49D; max-width:62ch;
  font-size:clamp(.9375rem,1.2vw,1.0625rem);
}

/* ═══════════════════════  CONTACT  ═══════════════════════════ */
.section--contact{
  border-top:1px solid var(--line-soft);
  position:relative;
}
.section--contact::before{
  content:""; position:absolute; inset:0; z-index:-1;
  background:radial-gradient(70% 100% at 50% 100%, rgba(226,96,60,.10) 0%, transparent 65%);
}
.contact__title{
  /* three lines now, so a touch smaller than a two-line headline would take */
  font-size:clamp(2.125rem,6.5vw,6rem);
  line-height:.95; font-weight:300; letter-spacing:-.05em;
  margin:1.75rem 0 clamp(2.5rem,5vw,4rem);
}
.contact__mail{
  display:inline-flex; align-items:center; gap:1rem;
  font-size:clamp(1.125rem,2.6vw,2rem);
  font-weight:300; letter-spacing:-.02em;
  border-bottom:1px solid var(--line);
  padding-bottom:.6rem;
  transition:border-color .45s var(--ease), color .45s var(--ease);
}
.contact__mail i{
  width:clamp(20px,2.5vw,32px); height:1px; background:var(--accent);
  transition:transform .45s var(--ease);
}
.contact__mail:hover{ border-color:var(--accent); }
.contact__mail:hover i{ transform:translateX(6px); }

.contact__where{
  max-width:52ch;
  margin:clamp(1.75rem,3.5vw,2.5rem) 0 clamp(2.25rem,4vw,3rem);
  font-size:clamp(.9375rem,1.4vw,1.0625rem);
  line-height:1.65; color:var(--muted); text-wrap:pretty;
}

.contact__links{
  display:flex; flex-wrap:wrap; gap:.5rem 2rem;
  margin-top:clamp(2.5rem,5vw,4rem);
}
.contact__links a{
  font-family:var(--mono); font-size:.75rem;
  letter-spacing:.14em; text-transform:uppercase; color:var(--muted);
  border-bottom:1px solid transparent; padding-bottom:3px;
  transition:color .35s var(--ease), border-color .35s var(--ease);
}
.contact__links a:hover{ color:var(--fg); border-bottom-color:var(--accent); }

/* ═══════════════════════  CASE STUDY PAGE  ═══════════════════ */
.study{
  max-width:var(--max); margin:0 auto;
  padding:clamp(6rem,10vw,9rem) var(--pad) 0;
}

.study__back{
  margin-left:auto;
  font-family:var(--mono); font-size:.6875rem;
  letter-spacing:.14em; text-transform:uppercase; color:var(--muted);
  border:1px solid var(--line); border-radius:100px;
  padding:.55rem 1rem;
  white-space:nowrap;
  transition:color .35s var(--ease), border-color .35s var(--ease);
}
.study__back:hover{ color:var(--fg); border-color:var(--accent); }

.study__head{ max-width:60rem; }
.study__title{
  font-size:clamp(2.5rem,7vw,5.5rem);
  line-height:1; font-weight:300; letter-spacing:-.045em;
  margin-top:1.5rem;
}
.study__sub{
  font-family:var(--mono); font-size:.8125rem;
  letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted); margin-top:1.1rem;
}
.study__slate{
  margin-top:clamp(2rem,4vw,3rem);
  max-width:46rem;
}

.study__lead{
  margin:clamp(3rem,6vw,5rem) 0 0;
}
.study__lead img{
  width:100%; aspect-ratio:16/9; object-fit:cover;
}
.study__lead figcaption{
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.16em; text-transform:uppercase; color:var(--dim);
  padding-top:.85rem;
}

.study__body{
  max-width:68ch;
  margin:clamp(3.5rem,7vw,6rem) 0 0;
}
.study__lead-para{
  font-size:clamp(1.25rem,2.4vw,1.75rem);
  line-height:1.35; font-weight:300; letter-spacing:-.025em;
  color:var(--fg);
  text-wrap:pretty;
}
.study__body section{ margin-top:clamp(2.5rem,5vw,3.5rem); }
.study__body h2{
  font-family:var(--mono); font-size:.6875rem;
  letter-spacing:.2em; text-transform:uppercase;
  color:var(--accent);
  padding-bottom:.9rem; margin-bottom:1.25rem;
  border-bottom:1px solid var(--line-soft);
  font-weight:500;
}
.study__body p{
  color:#A8A49D; font-size:clamp(.9375rem,1.2vw,1.0625rem);
  text-wrap:pretty;
}
.study__body p + p{ margin-top:1.2rem; }
.study__body em{ font-style:normal; color:var(--fg); }
.study__body strong{ color:var(--fg); font-weight:400; }

/* Numbered pipeline steps — the count sits in the margin, mono, like a slate row */
.study__steps{
  counter-reset:step;
  margin-top:1.5rem;
  display:flex; flex-direction:column; gap:1.1rem;
}
.study__steps li{
  counter-increment:step;
  position:relative;
  padding-left:2.6rem;
  color:#A8A49D;
  font-size:clamp(.9375rem,1.2vw,1.0625rem);
  text-wrap:pretty;
}
.study__steps li::before{
  content:counter(step,decimal-leading-zero);
  position:absolute; left:0; top:.15em;
  font-family:var(--mono); font-size:.6875rem;
  letter-spacing:.14em; color:var(--accent);
}

/* The NDA note — set apart from the body, since it is an aside about the page itself */
.study__note{
  max-width:60ch;
  margin-top:clamp(2.5rem,5vw,3.5rem);
  padding-left:1.1rem;
  border-left:1px solid var(--accent);
  font-family:var(--mono); font-size:.75rem; line-height:1.9;
  color:var(--muted);
  text-wrap:pretty;
}
.study__body a{
  color:var(--fg);
  border-bottom:1px solid var(--line);
  padding-bottom:1px;
  transition:border-color .3s var(--ease);
}
.study__body a:hover{ border-bottom-color:var(--accent); }
.study__body .tags{ margin-top:clamp(2.5rem,5vw,3.5rem); }

.study__gallery{ margin-top:clamp(4rem,8vw,7rem); }
.study__gallery-title{
  font-family:var(--mono); font-size:.6875rem;
  letter-spacing:.2em; text-transform:uppercase;
  color:var(--muted); font-weight:500;
  padding-bottom:1rem; margin-bottom:clamp(1.5rem,3vw,2.25rem);
  border-bottom:1px solid var(--line-soft);
}

.study__next{
  margin-top:clamp(4rem,8vw,7rem);
  border-top:1px solid var(--line-soft);
}
.study__next a{
  display:block; padding:clamp(2.5rem,5vw,4rem) 0;
}
.study__next-title{
  display:block; margin-top:1.25rem;
  font-size:clamp(1.75rem,4vw,3rem);
  font-weight:300; letter-spacing:-.035em;
  color:var(--muted);
  transition:color .4s var(--ease);
}
.study__next a:hover .study__next-title{ color:var(--fg); }

@media (max-width:640px){
  .study__back{ padding:.45rem .75rem; font-size:.625rem; }
}

/* ═══════════════════  DATA FLOW DIAGRAM  ═════════════════════
   Wireframe devices, mono chrome, particles running the wiring.
   --flow-cool is the second stream: warm accent for what the operator
   watches, cool for what the system does on its own.
   ═══════════════════════════════════════════════════════════ */
.flow{
  --flow-cool:#5FA8B8;
  margin:0;
  border:1px solid var(--line-soft);
  border-radius:3px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(226,96,60,.05) 0%, transparent 60%),
    var(--bg-alt);
  overflow:hidden;
}

.flow__chrome{
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:.85rem 1.1rem;
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.18em; text-transform:uppercase;
  color:var(--dim);
}
.flow__chrome--top{ border-bottom:1px solid var(--line-soft); }
.flow__chrome--bottom{ border-top:1px solid var(--line-soft); }
.flow__live{ display:flex; align-items:center; gap:.5rem; color:var(--rec); }
.flow__live i{
  width:6px; height:6px; border-radius:50%; background:var(--rec);
  animation:blink 1.7s steps(1,end) infinite;
}
.flow__count{ color:var(--flow-cool); }

/* Scaled to a phone the labels fall to about 4px, so below a usable width the
   diagram keeps its size and the panel scrolls instead. */
.flow__stage{ overflow-x:auto; overscroll-behavior-x:contain; }
.flow__svg{ display:block; width:100%; height:auto; min-width:900px; }

.flow__wire{
  fill:none;
  stroke:rgba(242,240,236,.16);
  stroke-width:1;
}
.flow__node{ fill:var(--accent); }

.flow__device{
  fill:none;
  stroke:rgba(242,240,236,.42);
  stroke-width:1.2;
  stroke-linejoin:round;
}
.flow__device-fill{
  fill:none;
  stroke:var(--flow-cool);
  stroke-width:1.2;
  stroke-linejoin:round;
}
.flow__screen{ fill:rgba(242,240,236,.10); stroke:none; }
.flow__rec circle{ fill:var(--rec); animation:blink 1.7s steps(1,end) infinite; }
.flow__rec circle:nth-child(2){ animation-delay:.25s; }
.flow__rec circle:nth-child(3){ animation-delay:.5s; }

.flow__label text{
  fill:var(--dim);
  font-family:var(--mono); font-size:13px;
  letter-spacing:.14em; text-transform:uppercase;
}
.flow__label--stream text{ font-size:11px; }
/* the stream names take their line's colour, which is what ties each to its route */
.flow__label--stream .is-warm{ fill:var(--accent); }
.flow__label--stream .is-cool{ fill:var(--flow-cool); }

/* ── the travelling data ───────────────────────────────────── */
.flow__dot{
  offset-rotate:0deg;
  animation:flow-run 3.4s linear infinite;
}
/* warm: the live preview the operator watches */
.flow__dot--m1,.flow__dot--m2,.flow__dot--m3{ fill:var(--accent); }
.flow__dot--m1{ offset-path:path("M126,114 C170,114 195,170 230,170 C290,170 330,110 382,92"); }
.flow__dot--m2{ offset-path:path("M126,170 L230,170 C290,170 330,110 382,92"); animation-delay:-1.1s; }
.flow__dot--m3{ offset-path:path("M126,226 C170,226 195,170 230,170 C290,170 330,110 382,92"); animation-delay:-2.2s; }

/* cool: the footage writing itself to iCloud, then on to the Mac */
.flow__dot--b1,.flow__dot--b2,.flow__dot--b3,
.flow__dot--c1,.flow__dot--c2{ fill:var(--flow-cool); }
.flow__dot--b1{ offset-path:path("M126,114 C170,114 195,170 230,170 L710,172"); animation-duration:4.2s; }
.flow__dot--b2{ offset-path:path("M126,170 L230,170 L710,172"); animation-duration:4.2s; animation-delay:-1.4s; }
.flow__dot--b3{ offset-path:path("M126,226 C170,226 195,170 230,170 L710,172"); animation-duration:4.2s; animation-delay:-2.8s; }
.flow__dot--c1{ offset-path:path("M810,172 L902,170"); animation-duration:1.5s; }
.flow__dot--c2{ offset-path:path("M810,172 L902,170"); animation-duration:1.5s; animation-delay:-.75s; }

/* ── House of the Dragon pipeline: one dot per hop ─────────── */
.flow__dot--p1,.flow__dot--p2,.flow__dot--p3,.flow__dot--p4{ fill:var(--flow-cool); }
.flow__dot--p5,.flow__dot--p6{ fill:var(--accent); }
.flow__dot--p1{ offset-path:path("M210,110 L340,110"); animation-duration:2.2s; }
.flow__dot--p2{ offset-path:path("M210,110 L340,110"); animation-duration:2.2s; animation-delay:-1.1s; }
.flow__dot--p3{ offset-path:path("M460,110 L590,110"); animation-duration:2.2s; animation-delay:-.6s; }
.flow__dot--p4{ offset-path:path("M460,110 L590,110"); animation-duration:2.2s; animation-delay:-1.7s; }
.flow__dot--p5{ offset-path:path("M710,110 L845,110"); animation-duration:2.2s; animation-delay:-.3s; }
.flow__dot--p6{ offset-path:path("M710,110 L845,110"); animation-duration:2.2s; animation-delay:-1.4s; }

@keyframes flow-run{
  0%   { offset-distance:0%;   opacity:0; }
  12%  { opacity:1; }
  88%  { opacity:1; }
  100% { offset-distance:100%; opacity:0; }
}

/* Motion is the whole point here, but the diagram has to survive without it:
   park each dot on its path so the routes still read. */
@media (prefers-reduced-motion:reduce){
  .flow__dot{ animation:none; offset-distance:62%; }
  .flow__rec circle,
  .flow__live i{ animation:none; }
}

@media (max-width:640px){
  .flow__chrome{ font-size:.5625rem; letter-spacing:.12em; padding:.7rem .8rem; }
}

/* ═══════════════════════  FOOTER  ════════════════════════════ */
.foot{ border-top:1px solid var(--line-soft); }
.foot__inner{
  max-width:var(--max); margin:0 auto;
  padding:1.75rem var(--pad);
  display:flex; align-items:center; justify-content:space-between; gap:1.5rem;
  font-family:var(--mono); font-size:.625rem;
  letter-spacing:.14em; text-transform:uppercase; color:var(--dim);
}
.foot a{ transition:color .35s var(--ease); }
.foot a:hover{ color:var(--fg); }

/* ═══════════════════════  RESPONSIVE  ════════════════════════ */
/* Six nav entries need the room — shed the decorative bits before the links. */
@media (max-width:1500px){ .nav__role{ display:none; } }
@media (max-width:1360px){ .nav__cta{ display:none; } }

@media (max-width:1240px){
  .nav__links{ display:none; }
  .nav__burger{ display:flex; }
}

/* Keep the REC/timecode on phones — just drop the word and tighten the row. */
@media (max-width:640px){
  .nav__inner{ gap:.9rem; }
  .rec{ padding:.3rem .5rem; gap:.4rem; }
  .rec__label{ display:none; }
  .rec__tc{ font-size:.5625rem; }
}

@media (max-width:980px){
  .caps{ grid-template-columns:repeat(2, 1fr); }
  .caps > .cap:last-child:nth-child(3n + 1){ grid-column:auto; }
  .caps > .cap:last-child:nth-child(2n + 1){ grid-column:1 / -1; }
}

@media (max-width:860px){
  .case,
  .case--flip{
    grid-template-columns:1fr;
    gap:2rem;
  }
  .case--flip .case__media{ order:0; }
  .about{ grid-template-columns:1fr; }
  .about__portrait{ max-width:340px; margin-top:2rem; }
  .foot__inner{ flex-direction:column; align-items:flex-start; gap:.75rem; }
  .foot__mid{ order:3; }
  .hero{ min-height:auto; padding-top:7.5rem; padding-bottom:4rem; }
  .hero__slate > div{ border-right:none; border-bottom:1px solid var(--line-soft); }
}

@media (max-width:520px){
  .caps{ grid-template-columns:1fr; }
  .slate > div{ grid-template-columns:1fr; gap:.3rem; }
  .contact__links{ flex-direction:column; gap:1rem; }
}
