/* ─────────────────────────────────────────────────────────────
   KUTRAL — dirección de arte
   Cine, no plantilla: negros cálidos, hueso, una sola brasa de
   acento. Marca en Archivo extra-ancho (peso 900, ancho 125);
   todo el resto del texto en Montserrat. Los destacados van en
   peso grueso + naranjo brasa.
   ───────────────────────────────────────────────────────────── */

:root {
  --black: #0b0907;      /* negro carbón, nunca #000 */
  --char: #16120e;
  --ash: #5d554c;        /* ceniza: texto apagado */
  --smoke: #9a9086;
  --bone: #ede6da;       /* texto principal */
  --ember: #ff5a1f;      /* único acento */
  --ember-deep: #b8321a;
  --gold: #ffb25e;

  --f-brand: "Archivo", "Helvetica Neue", Arial, sans-serif;   /* solo KUTRAL */
  --f-sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;

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

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

html { background: var(--black); color-scheme: dark; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--black);
  color: var(--bone);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

::selection { background: var(--ember); color: var(--black); }

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; border-radius: 2px; }

/* etiquetas pequeñas en mayúsculas (antes mono) */
.mono {
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
/* destacado: más peso + naranjo brasa */
em { font-style: normal; font-weight: 800; color: var(--ember); }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--bone); color: var(--black); padding: 10px 14px;
}
.skip:focus { top: 16px; }

/* ── Loader ─────────────────────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; align-content: center; gap: 28px;
  background: var(--black);
  transition: opacity 1.2s var(--ease), visibility 1.2s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__ember {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 12px 3px rgba(255, 90, 31, .7), 0 0 60px 12px rgba(255, 90, 31, .25);
  animation: breathe 1.8s ease-in-out infinite;
}
.loader__label { color: var(--smoke); }
@keyframes breathe { 50% { transform: scale(1.6); opacity: .65; } }

/* ── HUD ────────────────────────────────────────────────── */
.hud {
  position: fixed; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  padding: 20px var(--gutter);
  pointer-events: none;
  mix-blend-mode: difference;
  color: var(--bone);
}
.hud a { pointer-events: auto; }
.hud--top { top: 0; }

.wordmark {
  font-family: var(--f-brand);
  font-weight: 900;
  font-variation-settings: "wdth" 125;
  font-size: 15px;
  letter-spacing: .32em;
}
.hud__tag { color: var(--bone); }
.hud__cta {
  margin-left: auto;
  font-size: 14px; font-weight: 500;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}

.rail {
  position: fixed; right: 0; top: 0; bottom: 0; width: 2px; z-index: 41;
  background: rgba(237, 230, 218, .06);
}
.rail i {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  background: linear-gradient(var(--ember-deep), var(--ember), var(--gold));
  transform-origin: top; transform: scaleY(0);
}

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

/* ── Escenas (scroll-scrub) ─────────────────────────────── */
.scene { position: relative; height: var(--len, 400vh); }
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.frames { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(11, 9, 7, .75) 100%),
    linear-gradient(to bottom, rgba(11, 9, 7, .55), transparent 22%, transparent 70%, rgba(11, 9, 7, .8));
}
.veil--soft { background: radial-gradient(130% 100% at 50% 50%, transparent 60%, rgba(11, 9, 7, .55) 100%); }
.veil--case {
  background:
    linear-gradient(to right, rgba(11, 9, 7, .82) 0%, rgba(11, 9, 7, .35) 38%, transparent 60%),
    linear-gradient(to bottom, rgba(11, 9, 7, .5), transparent 25%, transparent 75%, rgba(11, 9, 7, .7));
}

.beat {
  position: absolute; z-index: 2;
  opacity: 0;
  will-change: opacity, transform, filter;
}
.pos-center { inset: 0; display: grid; place-content: center; text-align: center; padding: 0 var(--gutter); }
.pos-foot { left: 0; right: 0; bottom: clamp(24px, 5vh, 56px); display: grid; justify-items: center; text-align: center; padding: 0 var(--gutter); }
.pos-top { left: 0; right: 0; top: clamp(96px, 19vh, 200px); text-align: center; padding: 0 var(--gutter); }
.pos-hero { left: 0; right: 0; bottom: clamp(56px, 10vh, 120px); padding: 0 var(--gutter); }
.pos-bl { left: var(--gutter); bottom: clamp(72px, 14vh, 160px); max-width: min(760px, 88vw); }
.pos-br { right: var(--gutter); bottom: clamp(72px, 14vh, 160px); max-width: min(560px, 88vw); text-align: right; }
.pos-case { left: var(--gutter); top: 50%; translate: 0 -50%; max-width: min(460px, 86vw); }

/* ── Tipografía ─────────────────────────────────────────── */
.kicker { color: var(--bone); display: grid; gap: 18px; justify-items: center; font-size: 12px; text-shadow: 0 1px 14px rgba(11, 9, 7, .95); }
.scroll-hint { display: grid; justify-items: center; gap: 10px; color: var(--smoke); font-size: 10px; }
.scroll-hint i {
  width: 1px; height: 40px;
  background: linear-gradient(transparent, var(--bone));
  animation: drip 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.voice {
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 68px);
  line-height: 1.12;
  letter-spacing: -.02em;
  text-shadow: 0 2px 24px rgba(11, 9, 7, .85);
}
.voice--side { font-size: clamp(26px, 3vw, 46px); }

.mega {
  display: flex; justify-content: space-between;
  font-family: var(--f-brand);
  font-weight: 900;
  font-variation-settings: "wdth" 125;
  font-size: clamp(64px, 17.5vw, 300px);
  line-height: .8;
  letter-spacing: -.02em;
  color: var(--bone);
  mix-blend-mode: screen;
}
.mega span {
  display: inline-block;
  transform: translateY(calc((1 - var(--p, 0)) * 40% * var(--d, 1)));
  opacity: clamp(0, calc(var(--p, 0) * 2.2 - var(--d, 1) * .35 + .35), 1);
  text-shadow: 0 0 calc(var(--p, 0) * 60px) rgba(255, 120, 40, .35);
}
.mega span:nth-child(1) { --d: 1.0; } .mega span:nth-child(2) { --d: 1.25; }
.mega span:nth-child(3) { --d: 1.5; } .mega span:nth-child(4) { --d: 1.75; }
.mega span:nth-child(5) { --d: 2.0; } .mega span:nth-child(6) { --d: 2.25; }

.hero-sub {
  max-width: 34em; margin: clamp(20px, 3vh, 36px) auto 0;
  text-align: center;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.5;
  color: rgba(237, 230, 218, .9);
}

.fig { color: var(--smoke); margin-bottom: 18px; }
.stage .fig { color: rgba(237, 230, 218, .94); font-size: 12px; font-weight: 500; text-shadow: 0 1px 3px rgba(11, 9, 7, .9), 0 1px 18px rgba(11, 9, 7, .95); }
.display-l {
  font-weight: 800;
  font-size: clamp(32px, 4.6vw, 70px);
  line-height: 1;
  letter-spacing: -.03em;
}
.display-l.ink { color: #1f1b17; }            /* tinta sobre papel */
.display-l.ink .strike { position: relative; display: inline-block; color: #4a433c; }

/* Texto sobre el papel gris: tinta oscura + halo de papel, para que se lea
   también cuando el borde quemado pasa por detrás. */
.on-paper .fig {
  color: #1f1b17; font-weight: 500;
  display: inline-block; padding: 6px 10px; margin-left: -10px;
  background: rgba(226, 223, 216, .82);
}
.on-paper .display-l.ink {
  text-shadow: 0 0 24px rgba(214, 211, 204, .95), 0 0 6px rgba(214, 211, 204, .9);
}
.display-l.ink .strike::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: .09em;
  background: var(--ember); transform-origin: left;
  transform: scaleX(var(--strike, 0));
}
.display-xl {
  font-weight: 800;
  font-size: clamp(48px, 8vw, 132px);
  line-height: .92;
  letter-spacing: -.04em;
}
.display-xl em, .display-xxl em { font-weight: 900; }
.display-xxl {
  font-weight: 800;
  font-size: clamp(50px, 10vw, 180px);
  line-height: .9;
  letter-spacing: -.045em;
}
.burn {
  color: var(--bone);
  text-shadow: 0 0 40px rgba(255, 90, 31, .55), 0 0 120px rgba(255, 90, 31, .35);
}
.lede { max-width: 46ch; font-size: clamp(16px, 1.3vw, 19px); color: var(--smoke); }
.lede--center { margin: 28px auto 0; text-align: center; max-width: 52ch; }

/* ── Manifiesto ─────────────────────────────────────────── */
.manifesto { position: relative; height: var(--len); }
.manifesto__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; align-content: center;
  padding: 0 var(--gutter);
  max-width: 1400px; margin: 0 auto;
}
.manifesto .fig { font-size: 14px; margin-bottom: 24px; }
.heat {
  font-weight: 500;
  font-size: clamp(28px, 4.2vw, 66px);
  line-height: 1.14;
  letter-spacing: -.025em;
}
.heat .w {
  --h: 0;
  color: color-mix(in oklab, var(--ember) calc(var(--g, 0) * 100%), color-mix(in oklab, var(--bone) calc(var(--h) * 100%), #2b2520));
  text-shadow: 0 0 calc(var(--g, 0) * 28px) rgba(255, 90, 31, calc(var(--g, 0) * .6));
}

/* ── Intro de casos ─────────────────────────────────────── */
.intro-block {
  padding: 28vh var(--gutter) 22vh;
  display: grid; gap: 28px 64px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  max-width: 1400px; margin: 0 auto;
}
.intro-block > .fig, .intro-block > h2 { grid-column: 1; }
.intro-block > .lede { grid-column: 1; }
.index-list {
  grid-column: 2; grid-row: 2 / span 2; align-self: end;
  list-style: none; min-width: 260px;
  border-top: 1px solid rgba(237, 230, 218, .16);
}
.index-list li {
  display: flex; justify-content: space-between; gap: 32px;
  padding: 14px 0; border-bottom: 1px solid rgba(237, 230, 218, .16);
  color: var(--smoke);
}
.index-list li span:first-child { color: var(--ember); }

/* ── Casos ──────────────────────────────────────────────── */
.case__title {
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 88px);
  line-height: .95;
  letter-spacing: -.04em;
}
.case__line {
  font-size: clamp(19px, 1.7vw, 26px);
  line-height: 1.3;
  margin: 18px 0 32px;
  color: var(--bone);
}
.spec { display: grid; gap: 0; border-top: 1px solid rgba(237, 230, 218, .16); }
.spec div {
  display: grid; grid-template-columns: 112px 1fr; gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(237, 230, 218, .16);
}
.spec dt { color: rgba(237, 230, 218, .62); }
.spec dd { color: var(--bone); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }

/* ── Proceso horizontal ─────────────────────────────────── */
.process { position: relative; height: var(--len); }
.process__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
  display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr);
  padding-top: clamp(84px, 14vh, 140px);
}
.process__head { padding: 0 var(--gutter); }
.process__track {
  list-style: none;
  display: flex; align-items: stretch;
  gap: 0;
  padding: clamp(32px, 6vh, 64px) var(--gutter) clamp(72px, 12vh, 120px);
  will-change: transform;
  width: max-content;
}
.step {
  position: relative;
  width: clamp(300px, 34vw, 520px);
  padding: 28px 40px 0 0;
  margin-right: 40px;
  border-top: 1px solid rgba(237, 230, 218, .18);
  display: grid; align-content: start; gap: 14px;
}
.step::before {   /* la barra de temperatura */
  content: ""; position: absolute; left: 0; top: -1px; height: 2px;
  width: calc(var(--lit, 0) * 100%);
  background: var(--t);
  box-shadow: 0 0 18px var(--t);
}
.step__temp { color: var(--t); }
.step__num {
  font-weight: 900;
  font-size: clamp(90px, 13vw, 220px);
  line-height: .8; letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(237, 230, 218, .28);
  background: linear-gradient(to top, var(--t) calc(var(--lit, 0) * 100%), transparent calc(var(--lit, 0) * 100%));
  -webkit-background-clip: text; background-clip: text;
}
.step__name { font-weight: 700; font-size: clamp(28px, 2.8vw, 44px); line-height: 1.05; letter-spacing: -.03em; }
.step p { color: var(--smoke); max-width: 38ch; }

/* ── Cierre ─────────────────────────────────────────────── */
.close .display-xxl {
  font-size: clamp(44px, 8.6vw, 156px);
  text-shadow: 0 0 80px rgba(255, 90, 31, .35);
}
.close .lede, .pos-br .fig, .hero-sub { text-shadow: 0 1px 18px rgba(11, 9, 7, .9); }
.close .lede { color: var(--bone); }
.close__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px;
  background: var(--ember); color: var(--black);
  font-weight: 700; font-size: 15px; letter-spacing: .01em;
  border-radius: 999px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
  box-shadow: 0 0 0 0 rgba(255, 90, 31, .5);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 50px -6px rgba(255, 90, 31, .7); background: #ff6d36; }
.btn--ghost { background: transparent; color: var(--bone); border: 1px solid rgba(237, 230, 218, .35); box-shadow: none; }
.btn--ghost:hover { background: rgba(237, 230, 218, .08); box-shadow: none; }

.footer {
  display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between;
  padding: 28px var(--gutter) 72px;
  color: var(--ash);
  border-top: 1px solid rgba(237, 230, 218, .08);
}

/* ── Móvil ──────────────────────────────────────────────── */
@media (max-width: 760px) {
  .hud__tag { display: none; }
  .hud { gap: 14px; padding: 16px; }
  .pos-hero { bottom: 88px; }
  .pos-top { top: 96px; }
  .voice br { display: none; }
  .pos-bl, .pos-br { left: 16px; right: 16px; bottom: 96px; max-width: none; text-align: left; }
  .pos-case { top: auto; bottom: 84px; translate: none; left: 16px; right: 16px; max-width: none; }
  .veil--case { background: linear-gradient(to top, rgba(11, 9, 7, .92) 0%, rgba(11, 9, 7, .6) 45%, transparent 70%); }
  .spec div { grid-template-columns: 96px 1fr; padding: 8px 0; }
  .case__line { margin: 12px 0 20px; }
  .step { width: 80vw; padding-right: 20px; margin-right: 20px; }
  .display-l, .display-l.ink { font-size: clamp(30px, 9vw, 44px); }
  .close .display-xxl { font-size: clamp(38px, 11.5vw, 60px); }
  .intro-block { grid-template-columns: 1fr; padding: 20vh 16px 16vh; }
  .index-list { grid-column: 1; grid-row: auto; }
}

/* ── Movimiento reducido: todo visible, sin scrub ───────── */
@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-hint i, .loader__ember { animation: none; }
  .scene, .manifesto, .process { height: auto; }
  .stage, .manifesto__stage, .process__stage { position: relative; height: auto; min-height: 100vh; }
  .beat { position: relative; opacity: 1 !important; inset: auto; translate: none; padding: 16px var(--gutter); }
  .stage .beat:first-of-type { margin-top: 40vh; }
  .frames { position: absolute; }
  .mega span { transform: none; opacity: 1; }
  .process__track { width: auto; flex-direction: column; gap: 48px; }
  .step { width: auto; --lit: 1; }
  .heat .w { --h: 1; }
}
