/* ==========================================================
   Tokens
   ========================================================== */
:root {
  --ink: #0d0c0b;
  --ink-2: #161412;
  --ink-3: #221f1c;
  --line: rgba(236, 230, 220, 0.12);
  --line-2: rgba(236, 230, 220, 0.22);
  --paper: #ece6dc;
  --paper-dim: rgba(236, 230, 220, 0.62);
  --paper-faint: rgba(236, 230, 220, 0.38);
  --tally: #ff3b1f;
  --amber: #f2a541;
  --clip: #3a5bd9;
  --clip-2: #7c4ddb;
  --audio: #2f9e6e;

  --f-display: "Archivo", system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --bar-h: 56px;
  --tl-h: 64px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-display);
  font-variation-settings: "wdth" 100;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: var(--tl-h);
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
::selection { background: var(--tally); color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

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

/* ==========================================================
   Top bar
   ========================================================== */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(13,12,11,.85), rgba(13,12,11,0));
}
.bar__id { display: flex; align-items: center; gap: 10px; font-weight: 600; font-variation-settings: "wdth" 112; letter-spacing: .02em; }
.bar__role { color: var(--paper-faint); font-weight: 400; }
.rec { width: 9px; height: 9px; border-radius: 50%; background: var(--tally); box-shadow: 0 0 12px var(--tally); animation: rec 1.6s steps(2) infinite; }
@keyframes rec { 50% { opacity: .25; } }
.bar__nav { display: flex; gap: 28px; font-size: 14px; color: var(--paper-dim); }
.bar__nav a:hover { color: var(--paper); }
.bar__cta {
  font-size: 14px; font-weight: 600; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px;
  transition: background .3s, color .3s, border-color .3s;
}
.bar__cta:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  position: relative;
  min-height: calc(100svh - var(--tl-h));
  display: grid; align-items: end;
  padding: calc(var(--bar-h) + 24px) var(--gutter) clamp(32px, 6vh, 72px);
  isolation: isolate;
}
.viewer { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.viewer__stack video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04);
}
.viewer__stack video.is-on { opacity: 1; animation: drift 3.2s linear forwards; }
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1.02); } }
.viewer__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--ink) 2%, rgba(13,12,11,.55) 40%, rgba(13,12,11,.15) 70%, rgba(13,12,11,.6)),
    radial-gradient(ellipse at 30% 80%, rgba(13,12,11,.6), transparent 60%);
}
.viewer__safe {
  position: absolute; inset: calc(var(--bar-h) + 12px) var(--gutter) 24px;
  border: 1px dashed rgba(236,230,220,.08);
}
.corner { position: absolute; width: 22px; height: 22px; border-color: rgba(236,230,220,.55); border-style: solid; border-width: 0; }
.corner--tl { top: calc(var(--bar-h) + 12px); left: var(--gutter); border-top-width: 1.5px; border-left-width: 1.5px; }
.corner--tr { top: calc(var(--bar-h) + 12px); right: var(--gutter); border-top-width: 1.5px; border-right-width: 1.5px; }
.corner--bl { bottom: 24px; left: var(--gutter); border-bottom-width: 1.5px; border-left-width: 1.5px; }
.corner--br { bottom: 24px; right: var(--gutter); border-bottom-width: 1.5px; border-right-width: 1.5px; }
.viewer__hud { position: absolute; top: calc(var(--bar-h) + 26px); color: var(--paper-dim); font-size: 11px; }
.viewer__hud--tl { left: calc(var(--gutter) + 18px); }
.viewer__hud--tr { right: calc(var(--gutter) + 18px); }
.viewer__flash { position: absolute; inset: 0; background: var(--paper); opacity: 0; pointer-events: none; }
.viewer__flash.is-on { animation: flash .18s ease-out; }
@keyframes flash { 0% { opacity: .18; } 100% { opacity: 0; } }

.hero__copy { max-width: 1400px; }
.eyebrow { color: var(--amber); margin: 0 0 18px; }
.hero__title {
  margin: 0;
  font-weight: 800;
  font-variation-settings: "wdth" 125;
  font-size: clamp(56px, 13.5vw, 230px);
  line-height: .86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.hero__title em {
  text-transform: none; color: var(--tally);
  font-size: 1.12em; letter-spacing: -0.03em; padding-right: .05em;
}
.line { display: block; overflow: hidden; padding-bottom: .04em; }
.line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
.line:nth-child(2) > span { animation-delay: .12s; }
@keyframes rise { to { transform: none; } }
.hero__lede {
  max-width: 520px; margin: 28px 0 0;
  font-size: clamp(17px, 1.5vw, 20px); color: var(--paper-dim);
  opacity: 0; animation: fade .9s .5s forwards;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; opacity: 0; animation: fade .9s .65s forwards; }
@keyframes fade { to { opacity: 1; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform .3s var(--ease), background .3s, color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--tally); color: var(--ink); }
.btn--solid:hover { background: var(--paper); }
.btn--ghost { border: 1px solid var(--line-2); backdrop-filter: blur(6px); background: rgba(13,12,11,.25); }
.btn--ghost:hover { border-color: var(--paper); }

/* ==========================================================
   Section heads
   ========================================================== */
section { position: relative; }
.section-head {
  display: grid; grid-template-columns: 1fr; gap: 14px;
  padding: 0 var(--gutter); margin-bottom: clamp(40px, 6vw, 80px);
}
.section-head h2 {
  margin: 0; font-weight: 700; font-variation-settings: "wdth" 118;
  font-size: clamp(40px, 7vw, 112px); line-height: .95; letter-spacing: -0.035em;
}
.section-head h2 em { color: var(--amber); }
.section-head__tc { color: var(--tally); }
.section-head__meta { color: var(--paper-faint); }
.section-head__lede { max-width: 620px; margin: 6px 0 0; color: var(--paper-dim); font-size: 18px; }

/* ==========================================================
   Work
   ========================================================== */
.work { padding: clamp(96px, 14vw, 180px) 0 clamp(60px, 8vw, 120px); }
.work__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }

.proj {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.55fr);
  gap: clamp(16px, 3vw, 48px);
  align-items: center;
  padding: clamp(28px, 4vw, 56px) var(--gutter);
  border-bottom: 1px solid var(--line);
  transition: background .5s;
}
.proj:hover { background: var(--ink-2); }
.proj__no { align-self: start; color: var(--paper-faint); padding-top: 8px; }
.proj__info { align-self: start; padding-top: 4px; }
.proj__kind { color: var(--amber); margin-bottom: 14px; display: block; }
.proj__title {
  margin: 0; font-weight: 700; font-variation-settings: "wdth" 110;
  font-size: clamp(30px, 4vw, 60px); line-height: 1; letter-spacing: -0.03em;
}
.proj__place { margin: 10px 0 0; font-family: var(--f-serif); font-style: italic; font-size: clamp(22px, 2.2vw, 30px); color: var(--paper-dim); }
.proj__specs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 26px; color: var(--paper-faint); }
.proj__specs b { color: var(--paper); font-weight: 500; }
.proj__play {
  margin-top: 28px; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 999px;
  transition: background .3s, color .3s;
}
.proj__play:hover { background: var(--paper); color: var(--ink); }

.media {
  position: relative; overflow: hidden; border-radius: 4px; background: var(--ink-3);
  cursor: none;
}
.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 9 / 16; width: min(100%, 340px); justify-self: start; border-radius: 22px; }
.media img, .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media video { opacity: 0; transition: opacity .35s; }
.media.is-playing video { opacity: 1; }
.media img { transition: transform 1.2s var(--ease), filter .6s; filter: saturate(.85) brightness(.9); }
.proj:hover .media img { transform: scale(1.04); filter: none; }
.media__dur {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  padding: 4px 8px; background: rgba(13,12,11,.75); border-radius: 3px; font-size: 11px;
}
/* scrub bar that runs while preview plays */
.media__scrub { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--tally); z-index: 2; }

/* alternate: every other row flips media to the left (desktop only) */
@media (min-width: 900px) {
  .proj:nth-child(even) { grid-template-columns: 72px minmax(0, 1.55fr) minmax(0, 1fr); }
  .proj:nth-child(even) .proj__info { order: 3; }
  .proj:nth-child(even) .media { order: 2; }
  .proj--tall { grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr) !important; }
  .proj--tall .media--tall { justify-self: center; }
}

/* ==========================================================
   Formats
   ========================================================== */
.formats { padding: clamp(80px, 10vw, 160px) 0; background: var(--ink-2); border-block: 1px solid var(--line); }
.formats__pair {
  display: grid; grid-template-columns: minmax(0, 3.1fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px); align-items: end;
  padding: 0 var(--gutter);
}
.fmt { margin: 0; cursor: pointer; }
.fmt__frame { position: relative; overflow: hidden; background: var(--ink-3); border: 1px solid var(--line-2); }
.fmt--wide .fmt__frame { aspect-ratio: 16 / 9; border-radius: 6px; }
.fmt--tall .fmt__frame { aspect-ratio: 9 / 16; border-radius: 26px; border-width: 6px; border-color: #2b2724; }
.fmt video { width: 100%; height: 100%; object-fit: cover; }
.fmt figcaption { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; color: var(--paper-dim); }
.fmt figcaption b { color: var(--tally); font-weight: 500; }
.fmt figcaption span { margin-left: auto; color: var(--paper-faint); }
.fmt:hover .fmt__frame { border-color: var(--paper-dim); }

/* ==========================================================
   Process
   ========================================================== */
.process { padding: clamp(96px, 12vw, 180px) 0; }
.steps {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
}
.step { position: relative; padding: 28px 28px 8px 0; border-top: 1px solid var(--line-2); }
.step::before {
  content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px;
  background: var(--paper); transform: rotate(45deg);
}
.step__tc { color: var(--tally); }
.step h3 { margin: 14px 0 10px; font-size: 26px; font-weight: 700; font-variation-settings: "wdth" 115; letter-spacing: -0.02em; }
.step p { margin: 0; color: var(--paper-dim); font-size: 16px; max-width: 300px; }

/* ==========================================================
   Contact
   ========================================================== */
.contact {
  padding: clamp(96px, 12vw, 180px) var(--gutter) clamp(60px, 8vw, 120px);
  background:
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(255,59,31,.16), transparent 70%),
    var(--ink);
  border-top: 1px solid var(--line);
}
.render { max-width: 520px; margin-bottom: clamp(40px, 6vw, 72px); }
.render__row { display: flex; justify-content: space-between; color: var(--paper-dim); margin-bottom: 10px; }
.render__track { height: 4px; background: var(--ink-3); border-radius: 2px; overflow: hidden; }
.render__fill { height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--amber), var(--tally)); transition: width .1s linear; }
.render.is-done [data-render-label] { color: var(--audio); }

.contact__title {
  margin: 0; font-weight: 800; font-variation-settings: "wdth" 125; text-transform: uppercase;
  font-size: clamp(52px, 11vw, 190px); line-height: .88; letter-spacing: -0.045em;
}
.contact__title em { text-transform: none; color: var(--tally); font-size: 1.1em; }
.contact__lede { margin: clamp(32px, 4vw, 56px) 0 48px; max-width: 520px; color: var(--paper-dim); font-size: 19px; }

.channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.channel {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto;
  column-gap: 16px; align-items: center;
  padding: 26px 24px; border: 1px solid var(--line-2); border-radius: 10px;
  background: rgba(22,20,18,.6);
  transition: transform .35s var(--ease), border-color .35s, background .35s;
  overflow: hidden;
}
.channel svg { grid-row: 1 / 3; width: 34px; height: 34px; fill: currentColor; }
.channel__name { font-size: 22px; font-weight: 700; font-variation-settings: "wdth" 112; }
.channel__val { grid-column: 2; color: var(--paper-faint); text-transform: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel__go { grid-column: 3; grid-row: 1 / 3; font-size: 22px; transition: transform .35s var(--ease); }
.channel:hover { transform: translateY(-3px); border-color: var(--paper); background: var(--paper); color: var(--ink); }
.channel:hover .channel__val { color: rgba(13,12,11,.6); }
.channel:hover .channel__go { transform: translate(3px, -3px); }
.channel[data-channel="telegram"]:hover { background: #2aabee; border-color: #2aabee; }
.channel[data-channel="whatsapp"]:hover { background: #25d366; border-color: #25d366; }
.channel[data-channel="email"]:hover { background: var(--amber); border-color: var(--amber); }
.copy { margin-top: 18px; color: var(--paper-faint); padding: 6px 0; border-bottom: 1px dashed var(--paper-faint); }
.copy:hover { color: var(--paper); }

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 28px var(--gutter); color: var(--paper-faint); border-top: 1px solid var(--line);
}

/* ==========================================================
   Page timeline (sticky bottom)
   ========================================================== */
.tl {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: var(--tl-h);
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: stretch;
  background: rgba(13,12,11,.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-2);
}
.tl__tc {
  display: flex; align-items: center; padding: 0 16px 0 var(--gutter);
  font-size: 15px; color: var(--tally); border-right: 1px solid var(--line);
  font-variant-numeric: tabular-nums; letter-spacing: .02em; min-width: 150px;
}
.tl__tracks { position: relative; min-height: 0; display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 6px 16px 6px 46px; cursor: pointer; }
.tl__track { position: relative; display: flex; gap: 2px; min-height: 0; }
.tl__label { position: absolute; left: -34px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--paper-faint); }
.tl__clip {
  position: relative; height: 100%; border-radius: 2px; overflow: hidden;
  background: color-mix(in srgb, var(--clip) 55%, var(--ink));
  border: 1px solid color-mix(in srgb, var(--clip) 80%, white 0%);
  font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em;
  display: flex; align-items: center; padding: 0 6px; white-space: nowrap; color: rgba(255,255,255,.85);
  transition: filter .2s;
}
.tl__clip:nth-child(odd) { background: color-mix(in srgb, var(--clip-2) 55%, var(--ink)); border-color: var(--clip-2); }
.tl__clip.is-active { filter: brightness(1.35); }
.tl__wave { height: 100%; border-radius: 2px; background: color-mix(in srgb, var(--audio) 30%, var(--ink)); border: 1px solid color-mix(in srgb, var(--audio) 70%, var(--ink)); overflow: hidden; }
.tl__wave { position: relative; }
.tl__wave svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tl__head {
  position: absolute; top: 0; bottom: 0; left: 46px; width: 2px; background: var(--tally);
  box-shadow: 0 0 10px var(--tally); pointer-events: none; will-change: transform;
}
.tl__head::before {
  content: ""; position: absolute; top: 0; left: -5px;
  border: 6px solid transparent; border-top: 8px solid var(--tally); border-bottom: 0;
}

/* ==========================================================
   Player
   ========================================================== */
.player {
  width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(8,7,6,.97); color: var(--paper);
}
.player::backdrop { background: rgba(0,0,0,.8); }
.player[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); animation: fade .25s forwards; }
.player__top { display: flex; justify-content: space-between; align-items: center; padding: 18px var(--gutter); color: var(--paper-dim); }
.player__close { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 999px; }
.player__close:hover { background: var(--paper); color: var(--ink); }
.player__stage { display: grid; place-items: center; padding: 0 var(--gutter) 28px; min-height: 0; }
.player__stage video { max-width: 100%; max-height: 100%; background: #000; border-radius: 4px; }

/* ==========================================================
   Cursor
   ========================================================== */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none;
  display: flex; gap: 10px; padding: 9px 14px; border-radius: 999px;
  background: var(--tally); color: var(--ink); font-weight: 500;
  transform: translate(-50%, -50%) scale(0); transition: transform .25s var(--ease);
}
.cursor.is-on { transform: translate(-50%, -50%) scale(1); }
@media (pointer: coarse) { .cursor { display: none; } .media { cursor: pointer; } }

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

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 899px) {
  :root { --tl-h: 48px; --bar-h: 52px; }
  .bar__nav, .bar__role { display: none; }
  .proj { grid-template-columns: 1fr; gap: 20px; }
  .proj__no { display: none; }
  .proj .media { order: -1; }
  .media--tall { width: min(72%, 320px); }
  .formats__pair { grid-template-columns: 1fr; }
  .fmt--tall { width: min(64%, 300px); }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .channels { grid-template-columns: 1fr; }
  .tl__tc { min-width: 0; font-size: 12px; padding-right: 10px; }
  .tl__tracks { grid-template-rows: minmax(0, 1fr); padding: 8px 12px; }
  .tl__track--a, .tl__label { display: none; }
  .tl__head { left: 12px; }
  .viewer__hud--tr { display: none; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .tl__clip { font-size: 0; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .line > span { transform: none; }
  .hero__lede, .hero__actions { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}
