/* ============================================================
   HYPEHAUS — MASTER TONE / DESIGN SYSTEM TOKENS
   Ink-black canvas · black film grain · white-alpha ladder
   Crimson permanent accent · lifecycle hues for cinema only
   ============================================================ */

:root {
  /* —— Ink ladder —— */
  --ink:        #020202;
  --ink-2:      #050208;
  --ink-3:      #07060a;

  /* —— White-alpha ladder (canonical 10-value) —— */
  --white:      #F4F4F4;
  --w85: rgba(255,255,255,0.85);
  --w70: rgba(255,255,255,0.70);
  --w55: rgba(255,255,255,0.55);
  --w40: rgba(255,255,255,0.40);
  --w32: rgba(255,255,255,0.32);
  --w25: rgba(255,255,255,0.25);
  --w18: rgba(255,255,255,0.18);
  --w12: rgba(255,255,255,0.12);
  --w08: rgba(255,255,255,0.08);
  --w06: rgba(255,255,255,0.06);
  --w03: rgba(255,255,255,0.03);

  /* —— Accent (permanent) —— */
  --crimson:      #E91E47;
  --crimson-deep: #8B0F2E;
  --crimson-dark: #3A0612;

  /* —— Lifecycle hues (cinema only) —— */
  --jade:   #2EA85C;
  --jade-deep: #0E3520;
  --plum:   #A855F7;
  --plum-deep: #2D0E47;
  --amber:  #E0A23B;
  --amber-deep: #3A2509;

  /* —— Type —— */
  --display: "Satoshi", "Arial Black", system-ui, sans-serif;
  --body:    "Inter", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  /* —— Motion —— */
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  /* —— Rhythm —— */
  --gutter: clamp(20px, 5vw, 90px);
  --section-pad: clamp(96px, 14vh, 220px);
}

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

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

body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--crimson); color: #fff; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
canvas { display: block; }

/* ============================================================
   VIBE GRADIENT — black-noise, slow rotation. Motion sells it.
   ============================================================ */
.vibe {
  position: fixed;
  inset: -40vmax;
  z-index: 0;
  pointer-events: none;
}
.vibe::before,
.vibe::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(38% 42% at 50% 46%, rgba(46,46,52,0.55), rgba(20,20,24,0.28) 55%, rgba(0,0,0,0) 78%);
  will-change: transform;
}
.vibe::before { animation: vibeSpin 96s linear infinite; }
.vibe::after  { animation: vibeSpinR 78s linear infinite; opacity: .8; }

@keyframes vibeSpin  { to { transform: rotate(360deg); } }
@keyframes vibeSpinR { to { transform: rotate(-360deg); } }

/* A pinned wash that lets cinematic sections tint the void */
.tint {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s var(--ease), background 1.4s var(--ease);
  mix-blend-mode: screen;
}

/* ============================================================
   FILM GRAIN — always last, always on top. Black-noise.
   ============================================================ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: var(--grain-uri);
  background-size: 220px 220px;
  animation: grainShift 4.7s steps(6) infinite, grainFlicker 5.5s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes grainShift {
  0%   { transform: translate(0,0); }
  20%  { transform: translate(-6%,4%); }
  40%  { transform: translate(4%,-8%); }
  60%  { transform: translate(-8%,6%); }
  80%  { transform: translate(6%,-4%); }
  100% { transform: translate(0,0); }
}
@keyframes grainFlicker {
  0%,100% { opacity: .50; }
  50%     { opacity: .42; }
}

/* ============================================================
   TYPE PRIMITIVES
   ============================================================ */
.mono {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.30em;
  font-weight: 500;
  font-size: clamp(10px, 0.78vw, 13px);
  color: var(--w40);
}
.mono--bright { color: var(--w70); }
.mono--crimson { color: var(--crimson); }

.display {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.86;
  color: var(--white);
}
.display em,
.italic {
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-transform: none;
}

.lede {
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(17px, 1.7vw, 23px);
  line-height: 1.5;
  color: var(--w70);
  text-wrap: pretty;
}

/* hairline */
.rule {
  height: 1px;
  width: 100%;
  background: var(--w12);
  border: 0;
}

/* reveal base — used by ScrollTrigger */
.r-up   { opacity: 0; transform: translateY(28px); }
.r-fade { opacity: 0; }
.r-blur { opacity: 0; filter: blur(14px); transform: translateY(18px); }
.is-in.r-up, .is-in.r-fade, .is-in.r-blur {
  opacity: 1; transform: none; filter: none;
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out), filter 1.1s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .vibe::before, .vibe::after, .grain { animation: none; }
  .r-up, .r-fade, .r-blur { opacity: 1; transform: none; filter: none; }
}
