:root {
  --bg: #0a0a0b;
  --panel: #121214;
  --line: #26262a;
  --ink: #f1ede6;
  --mute: #8d8a85;
  --accent: #ff5b1f;
  --accent-ink: #0a0a0b;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --pad: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }
.label { color: var(--mute); text-transform: uppercase; margin: 0 0 12px; }
.small { color: var(--mute); }
::selection { background: var(--accent); color: var(--accent-ink); }

/* bar */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--pad);
  background: linear-gradient(var(--bg) 40%, transparent);
}
.mark { font-weight: 900; font-stretch: 125%; text-decoration: none; letter-spacing: -.02em; font-size: 20px; }
.mark .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 4px; }
.bar nav { display: flex; gap: clamp(10px, 2.4vw, 28px); align-items: center; }
.bar nav a { text-decoration: none; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); }
.bar nav a:hover { color: var(--ink); }
.bar nav a.cta { color: var(--accent-ink); background: var(--accent); padding: 8px 12px; border-radius: 999px; }
@media (max-width: 640px) { .bar nav a:not(.cta) { display: none; } }

/* sections */
section { padding: clamp(72px, 9vw, 128px) var(--pad) 0; }
.section-head { max-width: 1400px; margin: 0 auto 40px; }
h2 {
  font-size: clamp(32px, 4.6vw, 64px); line-height: .98; margin: 0;
  font-weight: 900; font-stretch: 112%; letter-spacing: -.035em;
}
.hint { color: var(--mute); margin: 16px 0 0; }

/* hero */
.hero { min-height: 84vh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 6vh; max-width: 1500px; margin: 0 auto; }
.kicker { color: var(--accent); text-transform: uppercase; margin: 0 0 18px; }
.title {
  margin: 0; font-weight: 900; font-stretch: 125%;
  font-size: clamp(52px, 9.5vw, 148px); line-height: .86; letter-spacing: -.045em;
  text-transform: uppercase;
}
.lede { max-width: 640px; font-size: clamp(18px, 2vw, 22px); color: var(--mute); margin: 32px 0 0; }
.lede em { color: var(--ink); font-style: normal; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-family: var(--mono); font-size: 13px; text-transform: uppercase;
  letter-spacing: .06em; padding: 14px 20px; border-radius: 999px; background: var(--ink); color: var(--bg);
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }

/* pipeline */
.canvas-wrap {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 20px;
}
.canvas {
  position: relative; min-height: 560px; border: 1px solid var(--line); border-radius: 20px;
  background:
    radial-gradient(circle at 1px 1px, #2a2a2e 1px, transparent 1.2px) 0 0 / 22px 22px,
    var(--panel);
  overflow: hidden; touch-action: none;
}
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wires path.wire { fill: none; stroke: #3a3a40; stroke-width: 2; transition: stroke .3s; }
.wires path.wire.hot { stroke: var(--accent); }
.wires circle.pulse { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }

.node {
  position: absolute; left: var(--x); top: var(--y);
  width: clamp(150px, 15vw, 190px); padding: 14px 16px 16px;
  background: #18181b; border: 1px solid var(--line); border-radius: 14px;
  text-align: left; cursor: grab; user-select: none;
  display: grid; gap: 2px;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.node:hover { border-color: #4a4a50; }
.node.dragging { cursor: grabbing; transform: scale(1.03); z-index: 5; }
.node.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 16px 50px -12px rgba(255, 91, 31, .45); }
.node.lit { border-color: var(--accent); }
.n-idx { color: var(--mute); }
.n-title { font-weight: 800; font-size: 22px; font-stretch: 112%; letter-spacing: -.02em; line-height: 1.05; }
.node.active .n-title { color: var(--accent); }
.n-sub { color: var(--mute); font-size: 11px; }
.port { position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--bg); border: 2px solid #4a4a50; }
.port.in { left: -6px; }
.port.out { right: -6px; }
.node.active .port, .node.lit .port { border-color: var(--accent); background: var(--accent); }

.viewer {
  border: 1px solid var(--line); border-radius: 20px; background: var(--panel);
  display: flex; flex-direction: column; overflow: hidden; min-height: 560px;
}
.viewer-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--mute); }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.sound { margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; color: var(--mute); }
.sound[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }

.screen { position: relative; flex: 1; min-height: 300px; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.screen video { height: 100%; max-height: 420px; width: auto; max-width: 100%; display: block; }
.screen .prompt {
  padding: 28px; font-family: var(--mono); font-size: 14px; line-height: 1.7; color: var(--ink); width: 100%;
}
.screen .prompt .k { color: var(--accent); }
.screen .prompt .caret { display: inline-block; width: 8px; height: 1.1em; background: var(--accent); vertical-align: text-bottom; animation: blink 1s infinite; }
.screen .ratios { display: flex; gap: 10px; align-items: flex-end; justify-content: center; padding: 20px; width: 100%; height: 100%; }
.screen .ratio { position: relative; overflow: hidden; border-radius: 6px; background: #111; outline: 1px solid #333; opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
.screen .ratio.in { opacity: 1; transform: none; }
.screen .ratio video { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover; }
.screen .ratio span { position: absolute; left: 6px; bottom: 6px; font-family: var(--mono); font-size: 10px; background: rgba(0,0,0,.7); padding: 2px 5px; border-radius: 4px; }

.viewer-text { padding: 18px 20px 6px; }
.viewer-text h3 { margin: 0 0 6px; font-size: 26px; font-weight: 800; font-stretch: 112%; letter-spacing: -.02em; }
.viewer-text p { margin: 0 0 12px; color: var(--mute); font-size: 15px; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; color: var(--ink); font-size: 11px; }
.viewer-ctrl { display: flex; gap: 8px; padding: 12px 20px 18px; }
.viewer-ctrl button { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.viewer-ctrl button:hover { border-color: var(--accent); color: var(--accent); }
#play { margin: 0 auto; min-width: 96px; }
#play.running { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

@media (max-width: 900px) {
  .canvas-wrap { grid-template-columns: 1fr; }
  .viewer { order: -1; min-height: 0; }
  .screen { min-height: 360px; }
  .canvas { min-height: 0; padding: 18px 18px 18px 34px; display: flex; flex-direction: column; gap: 22px; }
  .node { position: relative; left: auto !important; top: auto !important; width: 100%; cursor: pointer; }
  .port.in { left: 50%; top: -6px; margin: 0 0 0 -5px; }
  .port.out { left: 50%; top: auto; bottom: -6px; right: auto; margin: 0 0 0 -5px; }
}

/* numbers */
.numbers {
  max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; margin-top: clamp(80px, 10vw, 140px);
}
.num { padding: 32px 20px; border-right: 1px solid var(--line); }
.num:last-child { border-right: 0; }
.num b { display: block; font-size: clamp(40px, 4.6vw, 68px); font-weight: 900; font-stretch: 112%; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.num span { color: var(--mute); display: block; margin-top: 10px; }
@media (max-width: 760px) { .numbers { grid-template-columns: 1fr 1fr; } .num:nth-child(2) { border-right: 0; } .num:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* work */
.reel {
  max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
.clip { margin: 0; cursor: pointer; }
.clip .frame { position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #111; border: 1px solid var(--line); transition: border-color .25s, transform .35s; }
.clip:hover .frame { border-color: var(--accent); transform: translateY(-4px); }
.clip video { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip .frame::after {
  content: "▶ sound"; position: absolute; right: 10px; bottom: 10px; font-family: var(--mono); font-size: 11px;
  background: rgba(0,0,0,.65); padding: 4px 8px; border-radius: 999px; transition: opacity .2s;
}
.clip.playing .frame::after { content: "❚❚"; background: var(--accent); color: var(--accent-ink); }
.clip figcaption { padding: 12px 2px 0; display: grid; gap: 2px; }
.clip figcaption b { font-size: 18px; font-weight: 800; }
.clip figcaption span { color: var(--mute); }
@media (max-width: 900px) {
  .reel { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .clip { scroll-snap-align: start; }
}

.cases { max-width: 1400px; margin: clamp(60px, 8vw, 110px) auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
.case { padding: 32px 32px 36px 0; border-bottom: 1px solid var(--line); }
.case:nth-child(odd) { border-right: 1px solid var(--line); }
.case:nth-child(even) { padding-left: 32px; }
.case:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.case h3 { margin: 0 0 12px; font-size: clamp(21px, 2vw, 28px); line-height: 1.05; font-weight: 800; font-stretch: 108%; letter-spacing: -.02em; }
.case p { color: var(--mute); margin: 0 0 12px; max-width: 560px; }
.case b { color: var(--ink); font-weight: 700; }
@media (max-width: 760px) { .cases { grid-template-columns: 1fr; } .case, .case:nth-child(even) { padding: 28px 0; border-right: 0 !important; } }

/* toolkit */
.tool-groups { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px 32px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: 15px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: default;
  transition: border-color .2s, color .2s, background .2s;
}
.chips li:hover { border-color: var(--accent); color: var(--accent); }
.edu { max-width: 1400px; margin: 40px auto 0; color: var(--mute); line-height: 1.8; }
.edu + .edu { margin-top: 8px; }

/* hire */
.hire { padding-bottom: 60px; }
.offers { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.offer { border: 1px solid var(--line); border-radius: 18px; padding: 22px; background: var(--panel); transition: border-color .25s, transform .25s; }
.offer:hover { border-color: var(--accent); transform: translateY(-3px); }
.offer span { color: var(--accent); }
.offer h3 { margin: 10px 0 8px; font-size: 22px; font-weight: 800; font-stretch: 108%; letter-spacing: -.01em; }
.offer p { margin: 0; color: var(--mute); font-size: 15px; }
.offer.next { border-style: dashed; }
.contact { max-width: 1400px; margin: clamp(70px, 9vw, 120px) auto 0; }
.mail-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.mail { font-family: var(--mono); font-size: 14px; color: var(--mute); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.mail:hover { color: var(--accent); border-color: var(--accent); }
.contact-row { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 22px; color: var(--mute); }
.contact-row a { text-decoration: none; color: var(--ink); }
.contact-row a:hover { color: var(--accent); }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 28px var(--pad); color: var(--mute); border-top: 1px solid var(--line); margin-top: 60px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* at a glance: one readable screen for any reader */
.glance { max-width: 1400px; margin: 0 auto; padding: 0 var(--pad); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.glance > div { padding: 22px 20px 24px 0; }
.glance > div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.glance p { margin: 0; font-size: 16px; line-height: 1.45; }
@media (max-width: 760px) { .glance { grid-template-columns: 1fr; } .glance > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; } }

/* long-form & documentary: the editing pipeline */
.longform[hidden] { display: none; }
.edit-flow { max-width: 1400px; margin: 0 auto 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
.edit-flow .step { position: relative; border: 1px solid var(--line); background: #18181b; border-radius: 12px; padding: 10px 14px; font-family: var(--mono); font-size: 12px; color: var(--mute); }
.edit-flow .step b { display: block; color: var(--ink); font-family: var(--display); font-size: 16px; font-weight: 800; }
.edit-flow .wire { width: 28px; height: 2px; background: #3a3a40; }
.edit-flow .step.on { border-color: var(--accent); }
.edit-flow .step.on b { color: var(--accent); }
.doc-wrap { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 20px; }
.doc-player { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.doc-player video, .doc-player iframe { width: 100%; height: 100%; border: 0; display: block; }
.doc-list { display: grid; gap: 10px; align-content: start; }
.doc { text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 14px 16px; cursor: pointer; }
.doc:hover, .doc.active { border-color: var(--accent); }
.doc b { display: block; font-size: 18px; font-weight: 800; }
.doc span { color: var(--mute); }
.doc p { margin: 6px 0 0; color: var(--mute); font-size: 14px; }
@media (max-width: 900px) { .doc-wrap { grid-template-columns: 1fr; } .edit-flow .wire { width: 14px; } }

/* vfx */
.quote { font-size: clamp(18px, 1.8vw, 22px); color: var(--mute); max-width: 640px; margin: 18px 0 0; font-style: italic; }
.vfx-wrap { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(240px, 1fr); gap: 20px; align-items: start; }
.vfx-player { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.vfx-player video { width: 100%; height: 100%; display: block; }
.vfx-shots { display: grid; gap: 8px; }
.shot { display: flex; gap: 12px; align-items: baseline; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.shot span { color: var(--mute); }
.shot b { font-weight: 700; font-size: 16px; }
.shot:hover, .shot.active { border-color: var(--accent); }
.shot.active b { color: var(--accent); }
@media (max-width: 900px) { .vfx-wrap { grid-template-columns: 1fr; } }
