/* ============================================================
   IDEM UNIVERSAL WORKS — "THE VIEWFINDER"
   ============================================================ */

:root {
  --ink: #0a0a0b;
  --ink-2: #121214;
  --ink-3: #1a1a1d;
  --paper: #f2efe8;
  --paper-dim: #b8b4aa;
  --rec: #ff3b30;
  --amber: #ffb547;
  --line: rgba(242, 239, 232, 0.14);
  --bar-h: 24px;
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; }

.accent { color: var(--amber); }

a { color: inherit; text-decoration: none; }

::selection { background: var(--amber); color: var(--ink); }

/* On devices with a fine pointer we hide the native cursor (custom one takes over) */
@media (pointer: fine) {
  body.cursor-on, body.cursor-on a, body.cursor-on button { cursor: none; }
}

/* ============ FILM LEADER INTRO ============ */
.leader {
  position: fixed; inset: 0; z-index: 100;
  background: #101012;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}
.leader.done { opacity: 0; visibility: hidden; pointer-events: none; }

.leader-cross { position: absolute; background: rgba(242,239,232,0.18); }
.leader-cross-v { width: 1px; height: 100%; left: 50%; }
.leader-cross-h { height: 1px; width: 100%; top: 50%; }

.leader-ring {
  position: absolute; width: min(52vmin, 420px); height: min(52vmin, 420px);
  border: 1px solid rgba(242,239,232,0.35); border-radius: 50%;
}
.leader-ring::after {
  content: ""; position: absolute; inset: 14%;
  border: 1px solid rgba(242,239,232,0.18); border-radius: 50%;
}

.leader-wipe {
  position: absolute; width: min(52vmin, 420px); height: min(52vmin, 420px);
  border-radius: 50%;
  background: conic-gradient(rgba(242,239,232,0.10) var(--sweep, 0deg), transparent 0deg);
}

.leader-num {
  font-family: var(--font-display);
  font-size: clamp(120px, 30vmin, 260px);
  color: var(--paper);
  position: relative; z-index: 2;
}

.leader-meta {
  position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%);
  color: var(--paper-dim); white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.leader-logo { height: 26px; width: auto; opacity: 0.9; }

.leader-skip {
  position: absolute; top: 32px; right: 32px;
  background: none; border: 1px solid var(--line); color: var(--paper-dim);
  padding: 8px 14px; cursor: pointer; letter-spacing: 0.12em;
}
.leader-skip:hover { color: var(--paper); border-color: var(--paper); }

/* ============ LETTERBOX BARS ============ */
.bar {
  position: fixed; left: 0; right: 0; height: 50vh;
  background: #000; z-index: 90; pointer-events: none;
  transition: height 1.1s cubic-bezier(0.77, 0, 0.18, 1);
}
.bar-top { top: 0; }
.bar-bottom { bottom: 0; }
body.rolling .bar { height: var(--bar-h); }

/* ============ FILM GRAIN ============ */
#grain {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 80; pointer-events: none; opacity: 0.07;
  mix-blend-mode: overlay;
}

/* ============ CUSTOM CURSOR ============ */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none;
  opacity: 0; transition: opacity 0.3s;
}
body.cursor-on .cursor { opacity: 1; }
.cursor-ring {
  position: absolute; width: 36px; height: 36px;
  border: 1px solid var(--paper); border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, border-color 0.25s;
}
.cursor-ring::before, .cursor-ring::after {
  content: ""; position: absolute; background: var(--paper);
  transition: inherit;
}
.cursor-ring::before { width: 7px; height: 1px; left: -11px; top: 50%; }
.cursor-ring::after { width: 7px; height: 1px; right: -11px; top: 50%; }
.cursor-dot {
  position: absolute; width: 3px; height: 3px; background: var(--rec);
  border-radius: 50%; transform: translate(-50%, -50%);
}
.cursor-label {
  position: absolute; top: 24px; left: 14px; color: var(--amber);
  white-space: nowrap;
}
.cursor.is-hover .cursor-ring {
  width: 56px; height: 56px; border-color: var(--amber);
}

/* ============ HUD ============ */
.hud {
  position: fixed; top: var(--bar-h); left: 0; right: 0; z-index: 85;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px;
  mix-blend-mode: difference;
}
.hud-tl { display: flex; align-items: center; gap: 10px; }
.rec-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--rec);
  animation: blink 1.4s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }
.tc { color: var(--paper-dim); }
.hud-tr { display: flex; align-items: center; gap: 18px; }
.hud-brand { display: flex; align-items: center; gap: 10px; letter-spacing: 0.22em; font-weight: 500; }
.hud-logo { height: 20px; width: auto; display: block; }
.hud-brand-txt { color: var(--paper); }
.hud-spec { color: var(--paper-dim); }

/* ============ SCENES ============ */
.scene {
  min-height: 100vh;
  padding: 140px clamp(24px, 7vw, 110px) 160px;
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
}
.scene + .scene { border-top: 1px solid var(--line); }

.slate {
  color: var(--amber);
  margin-bottom: 28px;
  padding-left: 16px;
  border-left: 2px solid var(--amber);
}

.scene-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 150px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  font-weight: 400;
  margin-bottom: 32px;
}

.scene-lede {
  max-width: 560px; color: var(--paper-dim); font-size: 17px;
  margin-bottom: 56px;
}
.scene-lede strong, .hero-sub strong { color: var(--paper); }

.scene-note { color: var(--paper-dim); margin-top: 48px; }

/* ============ HERO ============ */
.hero { justify-content: center; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(64px, 12.5vw, 210px);
  line-height: 0.9; font-weight: 400;
  margin-bottom: 40px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .word { display: inline-block; }
.hero-sub { max-width: 520px; color: var(--paper-dim); font-size: 17px; }
.hero-ctas { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 90px; right: clamp(24px, 7vw, 110px);
  color: var(--paper-dim); animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(6px); } }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block; padding: 15px 30px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em;
  border: 1px solid var(--paper); transition: all 0.25s;
}
.btn-solid { background: var(--paper); color: var(--ink); }
.btn-solid:hover { background: var(--amber); border-color: var(--amber); }
.btn-ghost { color: var(--paper); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn-big { padding: 20px 44px; font-size: 13px; }

/* ============ PILLARS ============ */
.pillars {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.pillar {
  background: var(--ink); padding: 34px 30px 30px;
  display: flex; flex-direction: column; gap: 10px;
  transition: background 0.3s;
  position: relative;
}
.pillar:hover { background: var(--ink-2); }
.pillar:hover h3 { color: var(--amber); }
.pillar-no { color: var(--paper-dim); }
.pillar h3 {
  font-family: var(--font-display); font-size: 30px; font-weight: 400;
  letter-spacing: 0.03em; transition: color 0.25s;
}
.pillar p { color: var(--paper-dim); font-size: 14px; flex-grow: 1; }
.tag { margin-top: 14px; }
.tag-live { color: #4ade80; }
.tag-soon { color: var(--paper-dim); }

/* ============ SERVICES ============ */
.services {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 32px; margin-bottom: 72px;
}
.service { border-top: 1px solid var(--line); padding-top: 20px; }
.service-no { color: var(--amber); }
.service h3 {
  font-family: var(--font-display); font-size: 28px; font-weight: 400;
  margin: 10px 0 8px;
}
.service p { color: var(--paper-dim); font-size: 14px; }

/* ============ PROCESS ============ */
.process {
  border: 1px solid var(--line); padding: 36px clamp(24px, 4vw, 48px);
  margin-bottom: 72px; background: var(--ink-2);
}
.process-title { color: var(--amber); margin-bottom: 22px; }
.process ol { list-style: none; display: grid; gap: 12px; }
.process li { color: var(--paper-dim); font-size: 12px; }
.process li b { color: var(--paper); margin-right: 8px; }

/* ============ CTA BAND ============ */
.cta-band {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  border: 1px solid var(--line); padding: 40px clamp(24px, 4vw, 48px);
}
.cta-line {
  font-family: var(--font-display); font-size: clamp(28px, 4vw, 52px);
  line-height: 1;
}

/* ============ REELS ============ */
.reels {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.reel-frame {
  aspect-ratio: 16 / 9; border: 1px solid var(--line);
  background:
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(242,239,232,0.03) 18px 36px),
    var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  transition: border-color 0.3s;
}
.reel:hover .reel-frame { border-color: var(--amber); }
.reel-frame::after {
  content: "▶"; position: absolute; font-size: 34px; color: var(--paper);
  opacity: 0; transition: opacity 0.3s, transform 0.3s; transform: scale(0.7);
}
.reel:hover .reel-frame::after { opacity: 0.9; transform: scale(1); }
.reel-slate { color: var(--paper-dim); }
.reel figcaption { margin-top: 12px; color: var(--paper-dim); }

/* ============ BOARDS (PRE-PRODUCTION) ============ */
.boards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.board {
  border: 1px solid var(--line); padding: 30px;
  background:
    linear-gradient(135deg, rgba(255,181,71,0.05), transparent 55%),
    var(--ink-2);
}
.board-top {
  display: flex; justify-content: space-between; color: var(--amber);
  border-bottom: 1px dashed var(--line); padding-bottom: 14px; margin-bottom: 20px;
}
.board h3 {
  font-family: var(--font-display); font-size: 34px; font-weight: 400;
  margin-bottom: 8px;
}
.board p { color: var(--paper-dim); font-size: 14px; }

/* ============ POWER PASS ============ */

/* --- Giant IDEM watermark in hero (focus-pull entrance + float) --- */
.hero-brand-mark {
  position: absolute; top: 50%; left: 50%;
  width: min(120vw, 1500px); height: auto;
  transform: translate(-50%, -46%) scale(1.04);
  opacity: 0; z-index: 0; pointer-events: none;
  filter: blur(22px);
  animation: focusPull 2.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}
@keyframes focusPull {
  0%   { opacity: 0;    filter: blur(22px); transform: translate(-50%, -46%) scale(1.12); }
  100% { opacity: 0.06; filter: blur(0px);  transform: translate(-50%, -46%) scale(1); }
}
.hero > *:not(.hero-brand-mark):not(.hero-video-wrap) { position: relative; z-index: 1; }

/* --- Cinematic hero video background (Higgsfield-generated) --- */
.hero-video-wrap { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-video.ready { opacity: 0.62; }
.hero-video-grade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10,10,11,0.92) 0%, rgba(10,10,11,0.55) 45%, rgba(10,10,11,0.30) 100%),
    linear-gradient(180deg, rgba(10,10,11,0.55) 0%, transparent 30%, rgba(10,10,11,0.85) 100%);
}

/* --- RGB-split chromatic glitch on accent words --- */
[data-glitch] { position: relative; }
[data-glitch]::before, [data-glitch]::after {
  content: attr(data-glitch);
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0; pointer-events: none;
}
[data-glitch]:hover::before {
  color: #00e0d0; opacity: 0.9; transform: translate(-3px, -1px);
  animation: glitchA 0.5s steps(2) infinite;
}
[data-glitch]:hover::after {
  color: var(--rec); opacity: 0.9; transform: translate(3px, 1px);
  animation: glitchB 0.5s steps(2) infinite;
}
@keyframes glitchA { 0%,100%{clip-path:inset(0 0 60% 0)} 50%{clip-path:inset(50% 0 0 0)} }
@keyframes glitchB { 0%,100%{clip-path:inset(60% 0 0 0)} 50%{clip-path:inset(0 0 50% 0)} }

/* --- Scan-line light sweep when a scene reveals --- */
.scene { overflow: hidden; }
.scene::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0; transform: translateY(0); pointer-events: none; z-index: 3;
}
.scene.in::after { animation: scanSweep 1.4s ease-out 0.1s; }
@keyframes scanSweep {
  0%   { opacity: 0; transform: translateY(0); }
  8%   { opacity: 0.85; }
  100% { opacity: 0; transform: translateY(88vh); }
}

/* --- Cinematic scroll depth: the centered scene is lit + full scale;
       scenes scrolled away recede into darkness like film frames in a projector. --- */
.scene {
  transform: scale(var(--scl, 1));
  transform-origin: 50% 50%;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.scene::before {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: var(--ink); opacity: var(--dim, 0);
  transition: opacity 0.3s linear; will-change: opacity;
}

/* Fixed cinematic vignette — always frames the picture */
.vignette {
  position: fixed; inset: 0; z-index: 82; pointer-events: none;
  background: radial-gradient(125% 105% at 50% 50%, transparent 52%, rgba(0,0,0,0.55) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .scene { transform: none; transition: none; }
  .scene::before { display: none; }
}

/* --- Video board (APPAREL) --- */
.board-video { position: relative; overflow: hidden; padding: 0; min-height: 300px; display: flex; }
.board-vid {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: grayscale(1) contrast(1.05); z-index: 0;
}
.board-vid-grade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10,10,11,0.35) 0%, rgba(10,10,11,0.88) 100%);
}
.board-video .board-body { position: relative; z-index: 2; padding: 30px; margin-top: auto; width: 100%; }
.board-video:hover .board-vid { filter: grayscale(0) contrast(1.08); }
.board-vid, .board-vid-grade { transition: filter 0.4s; }

/* --- Brand bumper (full-width IDEM moment) --- */
.bumper {
  position: relative; overflow: hidden;
  min-height: 46vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 50% 50%, rgba(255,181,71,0.05), transparent 60%),
    var(--ink-2);
}
.bumper-logo {
  width: min(78vw, 860px); height: auto; opacity: 0.92;
  filter: drop-shadow(0 0 40px rgba(255,181,71,0.10));
}
.bumper-tag { color: var(--paper-dim); letter-spacing: 0.3em; }
.bumper-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent);
  pointer-events: none;
  animation: bumperScan 5s linear infinite;
}
@keyframes bumperScan { 0%{transform:translateY(-100%)} 100%{transform:translateY(300%)} }

/* ============ CONTACT ============ */
.scene-contact { text-align: left; }
.mail-cta {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 96px);
  line-height: 1; color: var(--paper);
  border-bottom: 2px solid var(--amber);
  align-self: flex-start;
  transition: color 0.25s;
  word-break: break-all;
}
.mail-cta:hover { color: var(--amber); }

.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--paper-dim);
  margin-top: 110px; padding-top: 24px; border-top: 1px solid var(--line);
}

/* ============ TIMELINE NAV ============ */
.timeline {
  position: fixed; left: 0; right: 0; bottom: var(--bar-h); z-index: 86;
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 0 0 4px;
}
.playhead {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--rec); z-index: 2; left: 0; pointer-events: none;
}
.playhead-tc {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  color: var(--rec); background: var(--ink); padding: 1px 6px;
  border: 1px solid rgba(255,59,48,0.4);
}
.clips { display: flex; }
.clip {
  flex: 1; padding: 13px 4px 11px;
  background: none; border: none; border-right: 1px solid var(--line);
  color: var(--paper-dim); font-size: 10px; letter-spacing: 0.14em;
  cursor: pointer; transition: color 0.25s, background 0.25s;
}
.clip:last-child { border-right: none; }
.clip:hover { color: var(--paper); background: var(--ink-2); }
.clip.active { color: var(--amber); background: var(--ink-2); }
.scene-label {
  position: absolute; top: -34px; left: 28px;
  color: var(--amber); background: var(--ink);
  border: 1px solid var(--line); padding: 4px 10px;
}

/* ============ REVEALS ============ */
.reveal, .reveal-up {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-up { transform: translateY(105%); }
.in .reveal, .in .reveal-up, .reveal.in, .reveal-up.in {
  opacity: 1; transform: translateY(0);
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-up { opacity: 1; transform: none; transition: none; }
  .rec-dot, .hero-scroll { animation: none; }
  .bar { transition: none; }
  #grain { display: none; }
}

/* ============ MOBILE ============ */
@media (max-width: 720px) {
  :root { --bar-h: 14px; }
  .hud { padding: 12px 16px; }
  .hud-brand { display: none; }
  .scene { padding: 110px 20px 140px; }
  .scene-label { left: 16px; }
  .clip { font-size: 9px; letter-spacing: 0.06em; }
  .hero-scroll { display: none; }
  .cta-band { justify-content: flex-start; }
}
