/* ==========================================================================
   MINIMALNATURE Pb — hoja de estilos
   Paleta: Salar (día) / Noche de Atacama (noche) · Laguna (acento) · Lumbre (brasa)
   Tipos: Archivo (eje de ancho 62–125: "zoom" tipográfico) + Martian Mono (datos)
   ========================================================================== */

/* ---------- Tokens: día (por defecto) ---------- */
:root {
  --bg: #eceee9;
  --bg-2: #e1e4de;
  --surface: #f6f7f4;
  --ink: #14161b;
  --ink-2: #3b4047;
  --muted: #5f6664;
  --line: rgba(20, 22, 27, 0.14);
  --line-strong: rgba(20, 22, 27, 0.3);
  --accent: #0a7672;
  --accent-ink: #f6f7f4;
  --ember: #e4521a;
  --glass: rgba(236, 238, 233, 0.74);
  --overlay: rgba(20, 22, 27, 0.55);
  --shadow: 0 30px 60px -32px rgba(20, 22, 27, 0.4);
  --bayer-r: #c8463d;
  --bayer-g: #3e9a55;
  --bayer-b: #3f63c8;
  --photo-scrim: linear-gradient(180deg, rgba(8, 10, 16, 0) 30%, rgba(8, 10, 16, 0.78) 100%);

  --font-sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-jp: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;

  --fs-xs: 0.72rem;
  --fs-sm: 0.875rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.3rem;
  --fs-xl: clamp(1.5rem, 1.1rem + 1.4vw, 2.3rem);
  --fs-h2: clamp(2.1rem, 1.1rem + 4vw, 4.6rem);
  --fs-display: clamp(3.6rem, 0.6rem + 13vw, 14rem);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --section: clamp(88px, 12vw, 190px);
  --radius: 3px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
  color-scheme: light;
}

/* ---------- Tokens: noche (sistema) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070a14;
    --bg-2: #0c1120;
    --surface: #111729;
    --ink: #e7eaf3;
    --ink-2: #bac1d3;
    --muted: #8b94a9;
    --line: rgba(231, 234, 243, 0.13);
    --line-strong: rgba(231, 234, 243, 0.3);
    --accent: #4fd3c9;
    --accent-ink: #04111a;
    --ember: #ff7a2e;
    --glass: rgba(7, 10, 20, 0.62);
    --overlay: rgba(2, 4, 10, 0.7);
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85);
    --bayer-r: #ff5c52;
    --bayer-g: #54d37b;
    --bayer-b: #5d88ff;
    color-scheme: dark;
  }
}

/* ---------- Tokens: noche (elegida con el botón) ---------- */
:root[data-theme="dark"] {
  --bg: #070a14;
  --bg-2: #0c1120;
  --surface: #111729;
  --ink: #e7eaf3;
  --ink-2: #bac1d3;
  --muted: #8b94a9;
  --line: rgba(231, 234, 243, 0.13);
  --line-strong: rgba(231, 234, 243, 0.3);
  --accent: #4fd3c9;
  --accent-ink: #04111a;
  --ember: #ff7a2e;
  --glass: rgba(7, 10, 20, 0.62);
  --overlay: rgba(2, 4, 10, 0.7);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85);
  --bayer-r: #ff5c52;
  --bayer-g: #54d37b;
  --bayer-b: #5d88ff;
  color-scheme: dark;
}

/* ---------- View Transitions (tema día/noche) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color 0.6s var(--ease), color 0.6s var(--ease);
}
img, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--font-mono); font-stretch: 87.5%; letter-spacing: 0.01em; }
.jp { font-family: var(--font-jp); letter-spacing: 0.08em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.7em;
}
.label::before { content: ""; width: 7px; height: 7px; background: var(--accent); flex: none; }
.eyebrow { font-size: var(--fs-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.h2 {
  font-size: var(--fs-h2);
  font-stretch: 112%;
  font-weight: 750;
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 16ch;
}

.skip-link {
  position: fixed; left: 12px; top: 12px; z-index: 1000;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius);
  transform: translateY(-160%); transition: transform 0.3s var(--ease);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { transform: none; }

/* ---------- Botones ---------- */
.btn {
  --b-bg: transparent; --b-fg: var(--ink); --b-bd: var(--line-strong);
  display: inline-flex; align-items: center; gap: 0.7em;
  min-height: 48px; padding: 0 1.35em;
  border: 1px solid var(--b-bd); border-radius: var(--radius);
  background: var(--b-bg); color: var(--b-fg);
  font-weight: 650; font-stretch: 112%; font-size: var(--fs-sm); letter-spacing: 0.02em;
  text-decoration: none; white-space: nowrap;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  will-change: transform;
}
.btn--solid { --b-bg: var(--ink); --b-fg: var(--bg); --b-bd: var(--ink); }
.btn--solid:hover { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-bd: var(--accent); }
.btn--line:hover { --b-bd: var(--ink); --b-bg: color-mix(in srgb, var(--ink) 6%, transparent); }
.round-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-strong);
  display: inline-grid; place-items: center; font-size: 1.1rem;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.round-btn:hover { background: var(--ink); color: var(--bg); }
.chip {
  min-height: 38px; padding: 0 0.95em; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 600; display: inline-flex; align-items: center; gap: 0.45em;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip__n { font-family: var(--font-mono); font-size: 0.72em; opacity: 0.7; }
.link-btn { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 900;
  display: grid; place-items: center;
  background: var(--bg); color: var(--ink);
  clip-path: inset(0 0 0 0);
}
.preloader__inner { display: grid; justify-items: center; gap: 18px; }
.preloader__mark { width: 116px; height: 116px; overflow: visible; }
.preloader__mark path, .preloader__mark .pl-ring { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.preloader__mark .pl-core { fill: var(--ember); }
.preloader__word { font-stretch: 125%; font-weight: 800; letter-spacing: 0.32em; font-size: var(--fs-lg); padding-left: 0.32em; }
.preloader__word .jp { font-size: 0.6em; letter-spacing: 0.3em; color: var(--muted); font-weight: 500; margin-left: 0.4em; }
.preloader__count { font-size: clamp(2.6rem, 8vw, 5rem); font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.preloader__count .unit { font-size: 0.4em; color: var(--muted); margin-left: 0.15em; }
.preloader__meta { font-size: var(--fs-xs); letter-spacing: 0.18em; color: var(--muted); }
html.is-loaded .preloader { pointer-events: none; }

/* ---------- Transición de página (diafragma) ---------- */
.iris-transition { position: fixed; inset: 0; z-index: 800; pointer-events: none; visibility: hidden; }
.iris-transition svg { width: 100%; height: 100%; }
.iris-transition path { fill: var(--ink); stroke: var(--bg); stroke-width: 0.35; }

/* ---------- Cursor ---------- */
/* "diferencia": el anillo se ve igual sobre fondos claros, oscuros y sobre las escenas 3D */
.cursor { position: fixed; left: 0; top: 0; z-index: 950; pointer-events: none; opacity: 0; transition: opacity 0.3s; mix-blend-mode: difference; }
.cursor__ring {
  position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid #fff; transition: transform 0.35s var(--ease), background-color 0.35s var(--ease), border-color 0.35s;
}
.cursor__label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(0.6); opacity: 0;
  font: 600 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink);
  transition: opacity 0.25s, transform 0.35s var(--ease); white-space: nowrap;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hover .cursor__ring { transform: scale(0.45); background: #fff; }
.cursor.has-label { mix-blend-mode: normal; }
.cursor.has-label .cursor__ring { transform: scale(2.3); background: var(--accent); border-color: var(--accent); }
.cursor.has-label .cursor__label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cursor.is-down .cursor__ring { transform: scale(1.8); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }

.scroll-progress { position: fixed; left: 0; top: 0; z-index: 720; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* ---------- Cabecera ---------- */
.site-header {
  position: fixed; left: 0; right: 0; top: 0; z-index: 700;
  display: flex; align-items: center; gap: clamp(12px, 2vw, 28px);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--gutter) 10px;
  min-height: var(--header-h);
  transition: transform 0.5s var(--ease), background-color 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-bottom-color: var(--line); }
.site-header.is-hidden { transform: translateY(-110%); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 26px; height: 26px; }
.brand__mark circle { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.brand__mark .brand__dot { fill: var(--ember); stroke: none; }
.brand__word { font-stretch: 125%; font-weight: 800; letter-spacing: 0.24em; font-size: 0.95rem; }
.greeting { font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0.06em; white-space: nowrap; }
.greeting time { font-variant-numeric: tabular-nums; }
.nav { display: flex; gap: clamp(12px, 2vw, 30px); margin-left: auto; }
.nav__link { position: relative; text-decoration: none; font-weight: 600; font-size: var(--fs-sm); font-stretch: 108%; padding-block: 6px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 0.45s var(--ease); }
.nav__link:hover, .nav__link[aria-current="page"] { background-size: 100% 1.5px; }
.toggles { display: flex; align-items: center; gap: 6px; }
.toggle { min-height: 40px; min-width: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; font-size: var(--fs-xs); transition: border-color 0.3s, background-color 0.3s; }
.toggle:hover { border-color: var(--ink); }
.toggle--lang span { opacity: 0.45; }
.toggle--lang [data-lang-active] { opacity: 1; font-weight: 700; }
.toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; overflow: visible; }
.toggle .t-sun, .toggle .t-rays { transition: opacity 0.4s, transform 0.5s var(--ease); transform-origin: 12px 12px; }
.toggle .t-moon { fill: currentColor; stroke: none; opacity: 0; transition: opacity 0.4s, transform 0.5s var(--ease); transform-origin: 12px 12px; transform: rotate(-40deg) scale(0.6); }
html.is-night .toggle .t-sun, html.is-night .toggle .t-rays { opacity: 0; transform: scale(0.5); }
html.is-night .toggle .t-moon { opacity: 1; transform: none; }
.toggle .s-bar { transition: transform 0.4s var(--ease); transform-origin: 50% 50%; transform-box: fill-box; transform: scaleY(0.25); }
.toggle[aria-pressed="true"] .s-bar { transform: scaleY(1); animation: bars 0.9s var(--ease) infinite alternate; }
.toggle[aria-pressed="true"] .s-bar:nth-child(2) { animation-delay: -0.3s; }
.toggle[aria-pressed="true"] .s-bar:nth-child(3) { animation-delay: -0.6s; }
.toggle[aria-pressed="true"] .s-bar:nth-child(4) { animation-delay: -0.15s; }
@keyframes bars { to { transform: scaleY(0.45); } }
.toggle--menu { display: none; padding: 0 14px; font-weight: 600; letter-spacing: 0.06em; }

@media (max-width: 900px) {
  .nav { display: none; }
  .toggle--menu { display: inline-flex; }
  .toggles { margin-left: auto; }
  .greeting { display: none; }
}

/* ---------- Menú ---------- */
.menu { position: fixed; inset: 0; z-index: 690; background: var(--bg-2); color: var(--ink); overflow-y: auto; }
.menu__panel { min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: calc(var(--header-h) + 28px) var(--gutter) 40px; max-width: var(--max); margin-inline: auto; }
.menu__list { display: grid; }
.menu__list a { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.menu__name { font-size: clamp(1.7rem, 1rem + 3.4vw, 3.4rem); font-stretch: 125%; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; transition: color 0.3s, transform 0.5s var(--ease); display: inline-block; }
.menu__list a:hover .menu__name { color: var(--accent); transform: translateX(10px); }
.menu__tech { font-size: var(--fs-xs); color: var(--muted); text-align: right; }
.menu__foot { font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Vistas ---------- */
.view { min-height: 100svh; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(94svh, 1000px); display: grid; align-content: end; padding-block: calc(var(--header-h) + 24px) 40px; overflow: clip; isolation: isolate; background: var(--bg); }
.hero__stage { position: absolute; inset: 0; z-index: -1; }
.hero__stage canvas { width: 100% !important; height: 100% !important; }
.hero__copy { display: grid; gap: 18px; position: relative; pointer-events: none; }
.hero__copy a, .hero__copy button { pointer-events: auto; }
.hero__title { font-size: var(--fs-display); line-height: 0.8; letter-spacing: -0.035em; font-weight: 850; font-stretch: 125%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.12em; margin-top: 0.2em; }
/* "diferencia": el titular se invierte donde pasa sobre la cámara y sigue legible en día y en noche */
.hero__word { color: #fff; mix-blend-mode: difference; }
/* en escritorio el título vive en la mitad izquierda: "MINIMAL" mide 4 em y "NATURE Pb" 5,2 em, así que
   la letra se limita para que nada llegue a la cámara (que ocupa la mitad derecha) */
.hero__title > .hero__word--l1 { flex-basis: 100%; } /* MINIMAL arriba, NATURE Pb abajo */
@media (min-width: 901px) { .hero__title { font-size: min(var(--fs-display), 8vw); } }
@media (min-width: 901px) and (max-width: 1199px) { .hero__title { font-size: 6.6vw; } } /* aquí la cámara ocupa más de la mitad */
.hero__model { font-stretch: 62%; padding-right: 0.08em; font-style: italic; font-weight: 300; color: var(--ember); letter-spacing: -0.02em; }
.hero__line { font-size: var(--fs-xl); font-stretch: 100%; font-weight: 400; display: flex; flex-wrap: wrap; gap: 0 0.3em; align-items: baseline; }
.rotator { display: inline-grid; overflow: hidden; vertical-align: bottom; font-style: italic; font-weight: 600; color: var(--accent); padding-right: 0.1em; }
.rotator > span { grid-area: 1 / 1; white-space: nowrap; }
.rotator > span:not(:first-child) { opacity: 0; }
.hero__lede { max-width: 44ch; color: var(--ink-2); font-size: var(--fs-md); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero__specs { display: flex; flex-wrap: wrap; gap: 8px 36px; margin-top: 36px; font-size: var(--fs-xs); color: var(--ink-2); }
.hero__specs div { display: grid; gap: 2px; border-top: 1px solid var(--line-strong); padding-top: 8px; min-width: 150px; }
.hero__specs dt { color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.hero__specs dd { margin: 0; }
.hero__scroll { position: absolute; right: var(--gutter); bottom: 40px; display: flex; align-items: center; gap: 12px; font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); writing-mode: vertical-rl; }
.hero__scroll i { width: 1px; height: 64px; background: linear-gradient(var(--ink), transparent); animation: drip 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 900px) {
  /* la cámara arriba y el texto debajo: sin superposición en teléfonos y tabletas */
  .hero { min-height: 0; padding-top: calc(var(--header-h) + min(60vw, 50svh)); }
  .hero__stage { inset: 0 0 auto 0; height: calc(var(--header-h) + min(66vw, 56svh)); }
}
@media (max-width: 700px) {
  .hero__scroll { display: none; }
  .hero__specs div { min-width: 120px; }
}

/* ---------- Marquesina ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 18px; user-select: none; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__track span { font-size: var(--fs-xl); font-stretch: 125%; font-weight: 750; letter-spacing: -0.01em; padding-inline: 0.9em; display: inline-flex; align-items: center; gap: 1.8em; white-space: nowrap; }
.marquee__track span::after { content: ""; width: 0.42em; height: 0.42em; border-radius: 50%; border: 2px solid var(--ember); flex: none; }

/* ---------- Manifiesto ---------- */
.manifesto { padding-block: var(--section); display: grid; gap: 28px; }
.manifesto__text { font-size: clamp(1.6rem, 1rem + 2.6vw, 3.3rem); font-weight: 400; line-height: 1.16; letter-spacing: -0.015em; max-width: 26ch; font-stretch: 96%; }
.manifesto__text .word { opacity: 0.16; transition: opacity 0.2s linear; }

/* ---------- Despiece ---------- */
.explode { position: relative; height: 760vh; }
.explode__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.explode__stage { position: absolute; inset: 0; }
.explode__stage canvas { width: 100% !important; height: 100% !important; }
.explode__labels { position: absolute; inset: 0; pointer-events: none; }
.xlabel { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; opacity: 0; will-change: transform, opacity; }
.xlabel__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); flex: none; }
.xlabel__line { width: 30px; height: 1px; background: var(--line-strong); }
.xlabel__text { display: grid; line-height: 1.25; background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius); }
.xlabel__name { font-weight: 700; font-size: 0.84rem; font-stretch: 108%; white-space: nowrap; }
.xlabel__spec { font-family: var(--font-mono); font-stretch: 87.5%; font-size: 0.68rem; color: var(--muted); white-space: nowrap; }
.xlabel.is-left { flex-direction: row-reverse; }
/* solo las piezas del paso actual muestran su ficha; las demás quedan como un punto */
.xlabel__text, .xlabel__line { transition: opacity 0.35s var(--ease); }
.xlabel:not(.is-active) .xlabel__text, .xlabel:not(.is-active) .xlabel__line { opacity: 0; }
.xlabel.is-active .xlabel__text { border-color: var(--accent); }
.explode__ui { position: relative; height: 100%; display: grid; grid-template-rows: auto 1fr auto; padding-block: calc(var(--header-h) + 20px) 28px; pointer-events: none; }
.explode__ui > * { pointer-events: auto; }
.explode__head { display: grid; gap: 14px; max-width: 30rem; }
.explode__head .h2 { font-size: clamp(1.9rem, 1rem + 2.8vw, 3.4rem); }
.explode__intro { color: var(--ink-2); max-width: 36ch; }
.explode__steps { align-self: center; display: grid; gap: 2px; max-width: 19rem; counter-reset: step; margin-top: 18px; }
.explode__steps li { display: grid; grid-template-columns: 2.4em 1fr; gap: 6px; font-size: 0.82rem; color: var(--muted); padding: 3px 0; transition: color 0.35s; }
.explode__steps li span:first-child { font-family: var(--font-mono); font-stretch: 87.5%; font-size: 0.7rem; padding-top: 0.2em; }
.explode__steps li.is-done { color: var(--ink-2); }
.explode__steps li.is-current { color: var(--ink); font-weight: 650; }
.explode__steps li.is-current span:first-child { color: var(--accent); }
.explode__meter { display: flex; align-items: baseline; gap: 0.35em; font-size: var(--fs-sm); color: var(--muted); }
.explode__count { font-size: clamp(2rem, 4vw, 3.2rem); color: var(--ink); font-variant-numeric: tabular-nums; }
.explode__reset { position: absolute; right: var(--gutter); bottom: 28px; opacity: 0; pointer-events: none; transition: opacity 0.4s; }
.explode__reset.is-visible { opacity: 1; pointer-events: auto; }
.explode__caption { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); font-size: var(--fs-xs); letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; display: none; text-align: center; }
@media (max-width: 900px) {
  .explode { height: 620vh; }
  .explode__steps { display: none; }
  .explode__caption { display: block; left: var(--gutter); right: var(--gutter); transform: none; bottom: 88px; background: var(--glass); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); text-transform: none; letter-spacing: 0; color: var(--ink); font-size: var(--fs-sm); }
  .explode__caption:empty { display: none; }
  .explode__head .h2 { font-size: 1.8rem; }
  .explode__intro { display: none; }
  .xlabel:not(.is-active) { display: none; }
}
@media (max-width: 600px) {
  /* en teléfonos, la leyenda de abajo nombra el paso: en la escena solo quedan los puntos */
  .xlabel__text, .xlabel__line { display: none; }
}

/* ---------- Cifras ---------- */
.stats { padding-block: var(--section); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px var(--gutter); }
.stat { border-top: 1px solid var(--line-strong); padding-top: 18px; display: grid; gap: 10px; align-content: start; }
.stat__num { font-size: clamp(3rem, 1.4rem + 5.6vw, 7rem); font-stretch: 62%; font-weight: 700; line-height: 0.9; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 0.12em; }
.stat__unit { font-size: 0.3em; font-stretch: 100%; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat__label { color: var(--ink-2); font-size: var(--fs-sm); max-width: 22ch; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Secuencia (La luz) ---------- */
.sequence { position: relative; height: 420vh; background: #07080c; color: #e7eaf3; }
.sequence__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; }
.sequence__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sequence__stage { position: absolute; inset: 0; }
.sequence__stage canvas { width: 100% !important; height: 100% !important; }
.sequence__sticky::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.45) 100%); }
.sequence__captions { position: relative; align-self: center; display: grid; }
.sequence__caption { grid-area: 1 / 1; font-size: clamp(1.8rem, 1rem + 3.4vw, 4rem); font-stretch: 112%; font-weight: 750; line-height: 1; letter-spacing: -0.02em; max-width: 13ch; opacity: 0; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5); }
.sequence__meta { position: absolute; bottom: 28px; left: 0; right: 0; display: flex; justify-content: space-between; gap: 16px; font-size: var(--fs-xs); color: rgba(231, 234, 243, 0.6); }

/* ---------- Plano técnico ---------- */
.blueprint { padding-block: var(--section); display: grid; gap: 40px; }
.blueprint__head { display: grid; gap: 16px; max-width: 42rem; }
.blueprint__head p:last-child { color: var(--ink-2); max-width: 44ch; }
.blueprint__figure { overflow-x: auto; }
.blueprint__svg { width: 100%; min-width: 640px; height: auto; }
.blueprint__svg .bp-draw * { fill: none; stroke: var(--ink); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.blueprint__svg .bp-axis { stroke: var(--muted) !important; stroke-dasharray: 10 4 2 4; stroke-width: 1 !important; }
.blueprint__svg .bp-dim { stroke: var(--accent); stroke-width: 1.3; }
.blueprint__svg .bp-ext { stroke: var(--accent); stroke-width: 0.8; opacity: 0.7; }
.blueprint__svg .bp-fill { fill: var(--accent); }
.blueprint__svg .bp-text { fill: var(--accent); font: 600 22px var(--font-mono); }
.blueprint__svg .bp-note { fill: var(--muted); font: 500 12px var(--font-mono); letter-spacing: 0.12em; }
.blueprint__svg .bp-grid line { stroke: var(--line); stroke-width: 1; }

/* ---------- Óptica ---------- */
.optics { padding-block: var(--section); display: grid; gap: 40px; }
.optics__head { display: grid; gap: 16px; max-width: 44rem; }
.optics__head p:last-child { color: var(--ink-2); max-width: 50ch; }
.optics__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.optics__diagram { width: 100%; height: auto; overflow: visible; }
.op-axis line { stroke: var(--line-strong); stroke-dasharray: 8 6; }
.op-lenses path { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: var(--ink); stroke-width: 1.4; }
.op-stop line { stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.op-sensor { fill: var(--ember); }
.op-rays path { fill: none; stroke: var(--ember); stroke-width: 1.6; opacity: 0.85; }
.op-photon { fill: var(--ember); filter: drop-shadow(0 0 6px var(--ember)); }
.op-note { fill: var(--muted); font: 500 13px var(--font-mono); letter-spacing: 0.06em; }
.aperture { display: grid; gap: 18px; justify-items: center; }
.aperture__iris { width: min(300px, 70vw); height: auto; }
.ap-housing { fill: var(--bg-2); stroke: var(--line-strong); }
.ap-edge { fill: none; stroke: var(--ink); stroke-width: 2; }
.aperture__iris [data-ap-blades] path { fill: var(--ink); stroke: var(--bg); stroke-width: 0.8; }
.aperture__stops { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.aperture__stops button { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); font: 500 0.78rem var(--font-mono); font-stretch: 87.5%; transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.aperture__stops button[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.aperture__readout { font-size: var(--fs-sm); color: var(--ink-2); text-align: center; min-height: 2.6em; }
@media (max-width: 860px) { .optics__grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .op-note { font-size: 26px; } }

/* ---------- Sensor ---------- */
.sensor { padding-block: var(--section); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.sensor__head { display: grid; gap: 16px; }
.sensor__head p { color: var(--ink-2); max-width: 44ch; }
.sensor__legend { display: flex; gap: 14px; font-size: var(--fs-xs); color: var(--muted); }
.sensor__legend li { display: flex; align-items: center; gap: 6px; }
.sensor__legend i { width: 10px; height: 10px; border-radius: 2px; }
.sensor__legend .r { background: var(--bayer-r); } .sensor__legend .g { background: var(--bayer-g); } .sensor__legend .b { background: var(--bayer-b); }
.sensor__grid { --cols: 24; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: clamp(3px, 0.6vw, 7px); aspect-ratio: 3 / 2; padding: clamp(10px, 2vw, 24px); background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; touch-action: manipulation; }
.sensor__cell { border-radius: 30%; background: var(--c); opacity: 0.55; will-change: transform; }
.sensor__cell.r { --c: var(--bayer-r); } .sensor__cell.g { --c: var(--bayer-g); } .sensor__cell.b { --c: var(--bayer-b); }
@media (max-width: 860px) { .sensor { grid-template-columns: 1fr; } .sensor__grid { --cols: 16; } }

/* ---------- Velocidad de obturación ---------- */
.shutter { padding-block: var(--section); display: grid; gap: 28px; }
.shutter__head { display: grid; gap: 16px; }
.shutter__readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; }
.shutter__value { font-size: clamp(3.4rem, 2rem + 6vw, 8rem); font-weight: 300; line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.shutter__unit { font-size: 0.32em; color: var(--muted); margin-left: 0.15em; }
.shutter__hint { font-size: var(--fs-lg); color: var(--ink-2); font-style: italic; }
.shutter__ruler { position: relative; height: 120px; overflow: hidden; border-block: 1px solid var(--line); touch-action: pan-y; user-select: none; -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.shutter__track { position: absolute; left: 50%; top: 0; bottom: 0; display: flex; align-items: stretch; will-change: transform; }
.tick { width: 96px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; padding-bottom: 16px; font: 500 0.8rem var(--font-mono); font-stretch: 87.5%; color: var(--muted); transform: translateX(-50%); }
.tick::before { content: ""; width: 1px; height: 38px; background: var(--line-strong); box-shadow: 24px 10px 0 -0px var(--line), -24px 10px 0 0 var(--line); }
.tick.is-current { color: var(--ink); font-weight: 700; }
.shutter__needle { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ember); }
.shutter__needle::after { content: ""; position: absolute; top: -1px; left: -6px; border: 7px solid transparent; border-top-color: var(--ember); }
.shutter__help { font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Fotos grandes con texto a favor de la foto (js/sections/photostory.js) ---------- */
.pstory { position: relative; height: 260svh; background: #07080c; color: #fff; }
.pstory__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.pstory__frame { position: absolute; transform-origin: 50% 50%; will-change: transform; }
.pstory__bg, .pstory__fg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pstory__fx { position: absolute; top: 0; height: 100%; pointer-events: none; }
.pstory__fx p { margin: 0; white-space: nowrap; font-stretch: 125%; font-weight: 900; line-height: 0.82; letter-spacing: -0.03em; }
.pstory__caption { position: absolute; left: 0; right: 0; bottom: 32px; z-index: 3; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 28px; font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.86); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.pstory__caption p:last-child { max-width: 46ch; }
.pstory__sticky::after { content: ''; position: absolute; inset: auto 0 0 0; height: 38%; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5)); z-index: 2; }

/* LOS MOLLES: la palabra vive en una ventana cuyo borde inferior es el horizonte */
.fx-rise__mask, .fx-rise__sea { position: absolute; left: 0; right: 0; overflow: hidden; display: flex; justify-content: center; }
.fx-rise__mask { bottom: calc(100% - var(--horizon)); height: 30%; align-items: flex-end; }
.fx-rise__sea { top: var(--horizon); height: 22%; align-items: flex-start;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.fx-rise__reflection { font-stretch: 125%; font-weight: 900; line-height: 0.82; letter-spacing: -0.03em; color: #ffd9ae; filter: blur(2px); transform-origin: 50% 50%; mix-blend-mode: screen; }
.fx-rise__word { mix-blend-mode: normal; color: rgba(255, 244, 228, 0.9); text-shadow: 0 0 30px rgba(255, 150, 60, 0.55), 0 0 90px rgba(255, 120, 40, 0.35); }

/* LARGA EXPOSICIÓN: se revela con una máscara que avanza como una estela */
.fx-light { position: absolute; inset: 0; --reveal: -15%; --head: 0; }
.fx-light__word { position: absolute; left: 50%; top: var(--y); transform: translate(-50%, -50%) rotate(var(--rot)) skewX(-10deg); font-style: italic; color: rgba(255, 255, 255, 0.6); mix-blend-mode: screen;
  text-shadow: -18px 0 10px rgba(255, 120, 60, 0.55), -60px 0 26px rgba(255, 60, 140, 0.35), -140px 0 50px rgba(70, 160, 255, 0.3);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--reveal) - 22%), rgba(0, 0, 0, 0.35) calc(var(--reveal) - 6%), transparent var(--reveal));
  mask-image: linear-gradient(90deg, #000 calc(var(--reveal) - 22%), rgba(0, 0, 0, 0.35) calc(var(--reveal) - 6%), transparent var(--reveal)); }
.fx-light__head { position: absolute; top: var(--y); left: var(--reveal); width: 22vw; height: 5vw; min-height: 36px; transform: translate(-80%, -50%) rotate(var(--rot)); opacity: var(--head); mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(255, 190, 120, 0.55) 35%, rgba(255, 90, 160, 0.2) 65%, transparent); filter: blur(4px); }

/* ARREBOL: degradado recortado por las letras; el color sube desde abajo */
.fx-ember__word { position: absolute; left: 50%; top: 64%; transform: translate(-50%, -50%); --glow: 0; color: transparent;
  background-image: linear-gradient(0deg, #ffc15a 0%, #ff6a2a 22%, #e8451c 36%, rgba(170, 170, 180, 0.55) 52%, rgba(170, 170, 180, 0.4) 100%);
  background-size: 100% 260%; background-position: 0 0; -webkit-background-clip: text; background-clip: text;
  mix-blend-mode: screen; opacity: 0.92; /* las nubes se ven a través de las letras: la palabra es luz, no pintura */
  filter: drop-shadow(0 0 calc(var(--glow) * 34px) rgba(255, 90, 30, calc(var(--glow) * 0.7))); }

/* PUNTO DE FUGA: la palabra está en un plano que se aleja hacia el punto de fuga */
.fx-vanish { position: absolute; inset: 0; transform-style: preserve-3d; }
.fx-vanish__word { position: absolute; left: 0; --tx: 0%; transform-origin: 0 50%; transform: translateY(-50%) rotateY(var(--ry, 62deg)) translateX(var(--tx));
  color: transparent; background-image: linear-gradient(90deg, #ff4fa8, #ff7ad0 40%, #7dff9a 75%, #3cff7a); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 16px rgba(255, 80, 170, 0.5)); opacity: 0; }

/* Tríptico de fotos verticales */
.triptych { position: relative; padding-block: clamp(48px, 8vw, 120px); overflow: hidden; background: #0a0c12; color: #fff; }
.triptych__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.4vw, 20px); width: min(1400px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.triptych__item { margin: 0; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 4px; will-change: transform; }
.triptych__item img { width: 100%; height: 100%; object-fit: cover; }
.triptych__item:nth-child(2) { margin-top: clamp(24px, 6vw, 90px); }
.triptych__word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* se lee con lector de pantalla; lo visible son las copias */
.triptych__item { position: relative; }
.triptych__slice { position: absolute; transform: translateY(-50%); text-align: center; white-space: nowrap; pointer-events: none; font-stretch: 125%; font-weight: 900; letter-spacing: -0.02em; line-height: 0.8; color: rgba(255, 250, 240, 0.9); text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35); }
.triptych__caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 28px; margin-top: 28px; font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.82); }
@media (max-width: 560px) { .triptych__grid { gap: 6px; } .triptych__item:nth-child(2) { margin-top: 28px; } }

/* ---------- Diario de ruta (horizontal) ---------- */
.journey { position: relative; }
.journey__pin { height: 100svh; min-height: 620px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; padding-block: calc(var(--header-h) + 20px) 28px; overflow: hidden; }
.journey__head { display: grid; gap: 14px; }
.journey__track { display: flex; gap: clamp(20px, 3vw, 44px); padding-inline: var(--gutter); align-items: center; width: max-content; will-change: transform; }
.stop { width: clamp(270px, 30vw, 460px); display: grid; gap: 10px; }
.stop__img { margin: 0; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); background: var(--bg-2); }
.stop__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.stop__meta { font-size: var(--fs-xs); color: var(--muted); }
.stop__title { font-size: var(--fs-xl); font-stretch: 112%; line-height: 1.05; letter-spacing: -0.015em; }
.stop__text { color: var(--ink-2); max-width: 36ch; font-size: var(--fs-sm); }
.journey__bar { margin-inline: var(--gutter); height: 2px; background: var(--line); }
.journey__bar span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
@media (max-width: 700px) { .journey__pin { min-height: 560px; } }

/* ---------- Historias ---------- */
.stories { padding-block: var(--section); display: grid; gap: 36px; }
.stories__head { display: grid; gap: 14px; }
.stories__list { border-top: 1px solid var(--line-strong); }
.story { border-bottom: 1px solid var(--line-strong); }
.story a { display: grid; grid-template-columns: 7rem minmax(0, 1fr) auto; align-items: baseline; gap: 16px; padding: clamp(16px, 2.4vw, 28px) 0; text-decoration: none; position: relative; }
.story__cat { font: 500 var(--fs-xs) var(--font-mono); font-stretch: 87.5%; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.story__title { font-size: clamp(1.5rem, 0.9rem + 2.6vw, 3.4rem); font-stretch: 112%; font-weight: 700; line-height: 1.02; letter-spacing: -0.02em; transition: transform 0.5s var(--ease), color 0.3s; }
.story__exif { font: 500 var(--fs-xs) var(--font-mono); font-stretch: 87.5%; color: var(--muted); text-align: right; }
.story__thumb { display: none; }
@media (hover: hover) { .story a:hover .story__title { transform: translateX(12px); } }
.stories-gl { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.stories.is-hovering .story__title { color: var(--ink); mix-blend-mode: normal; }
@media (hover: none), (max-width: 760px) {
  .story a { grid-template-columns: 1fr; gap: 6px; }
  .story__exif { text-align: left; }
  .story__thumb { display: block; aspect-ratio: 3 / 2; max-height: 70svh; border-radius: var(--radius); overflow: hidden; clip-path: inset(0 0 0 0); margin-top: 8px; }
  .story__thumb img { width: 100%; height: 100%; object-fit: cover; }
}

/* ---------- Objetivos (carrusel) ---------- */
.lenses { padding-block: var(--section); display: grid; gap: 36px; overflow: hidden; }
.lenses__head { display: grid; gap: 14px; }
.lenses__viewport { overflow: hidden; padding-inline: var(--gutter); cursor: grab; touch-action: pan-y; }
.lenses__viewport:active { cursor: grabbing; }
.lenses__track { display: flex; gap: 18px; width: max-content; user-select: none; }
.lens-card { width: clamp(250px, 26vw, 340px); border: 1px solid var(--line); border-radius: 6px; padding: 20px; display: grid; gap: 10px; background: var(--surface); }
.lens-card svg { width: 100%; height: auto; aspect-ratio: 16 / 10; }
.lens-card svg .lc-body { fill: var(--ink); }
.lens-card svg .lc-ring { fill: var(--ink-2); }
.lens-card svg .lc-glass { fill: color-mix(in srgb, var(--accent) 50%, var(--bg)); }
.lens-card svg .lc-line { stroke: var(--bg); stroke-width: 1.2; }
.lens-card svg .lc-mark { fill: var(--ember); }
.lens-card svg .lc-text { fill: var(--bg); font: 600 9px var(--font-mono); letter-spacing: 0.08em; }
.lens-card__name { font-size: var(--fs-lg); font-weight: 750; font-stretch: 108%; line-height: 1.1; }
.lens-card__type { font: 500 var(--fs-xs) var(--font-mono); font-stretch: 87.5%; color: var(--muted); }
.lens-card__note { color: var(--ink-2); font-size: var(--fs-sm); }
.lenses__foot { display: flex; align-items: center; gap: 24px; }
.lenses__bar { flex: 1; height: 2px; background: var(--line); }
.lenses__bar span { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0.2); }
.lenses__arrows { display: flex; gap: 8px; }

/* ---------- Hielo ---------- */
.ice { position: relative; height: 320vh; background: #0c1420; color: #eaf3ff; }
.ice__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; align-content: end; padding-bottom: 48px; }
.ice__stage { position: absolute; inset: 0; }
.ice__stage canvas { width: 100% !important; height: 100% !important; }
.ice__copy { position: relative; display: grid; gap: 14px; max-width: calc(var(--max)); }
.ice__copy .label { color: rgba(234, 243, 255, 0.7); }
.ice__copy p:not(.label) { max-width: 42ch; color: rgba(234, 243, 255, 0.85); }
.ice__meter { font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Planeta ---------- */
.planet { padding-block: var(--section); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.planet__head { display: grid; gap: 16px; }
.planet__head p:not(.label) { color: var(--ink-2); max-width: 42ch; }
.planet__engine { font-size: var(--fs-xs); color: var(--muted); }
.planet__stage { position: relative; aspect-ratio: 1; max-width: 640px; width: 100%; justify-self: center; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 42%, #16243f, #070a14 72%); box-shadow: inset 0 0 0 1px rgba(127, 217, 210, 0.18); touch-action: pan-y; }
.planet__stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.planet__load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; background: var(--bg); }
.planet__bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.bubble { position: absolute; left: var(--x, 50%); top: var(--y, 40%); transform: translate(-50%, -100%); }
.bubble__inner { display: block; font-size: 1.8rem; line-height: 1.2; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; box-shadow: var(--shadow); }
.planet__emoji { grid-column: 2; justify-self: center; display: flex; gap: 8px; }
.planet__emoji button { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 1.4rem; transition: transform 0.3s var(--ease), background-color 0.3s; }
.planet__emoji button:hover { transform: translateY(-3px); background: var(--bg-2); }
@media (max-width: 860px) { .planet { grid-template-columns: 1fr; } .planet__emoji { grid-column: 1; } }

/* ---------- Reel ---------- */

/* ---------- Contacto ---------- */
.contact { padding-block: var(--section); display: grid; gap: 26px; }
.contact__title { font-size: clamp(3rem, 1rem + 8.6vw, 10rem); font-stretch: 125%; font-weight: 850; line-height: 0.86; letter-spacing: -0.04em; max-width: 12ch; }
.contact__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.contact__email { font-size: var(--fs-lg); padding: 10px 0; margin-right: 12px; user-select: all; overflow-wrap: anywhere; }
.fineprint { color: var(--muted); font-size: var(--fs-sm); max-width: 60ch; }

/* ---------- Pie ---------- */
.site-footer { position: relative; border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 80px); overflow: hidden; }
.footer__particles { position: absolute; inset: 0 0 auto 0; width: 100%; height: clamp(220px, 32vw, 460px); pointer-events: none; }
.footer__word { position: relative; text-align: center; font-size: clamp(3.8rem, 18.5vw, 22rem); font-stretch: 125%; font-weight: 900; line-height: 0.82; letter-spacing: -0.045em; perspective: 1600px; padding-inline: 8px; user-select: none; white-space: nowrap; }
/* Cada letra es un cubo: cara frontal + cara inferior. Al girar 90° en X la cara inferior queda al frente */
.footer__word--long { font-size: clamp(2.2rem, 8.9vw, 11rem); letter-spacing: -0.03em; }
.footer__word .char3d { --d: 0.82em; display: inline-block; position: relative; transform-style: preserve-3d; transform-origin: 50% 50% calc(var(--d) / -2); }
.footer__word .char3d > span { display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.footer__word .char3d > span:last-child { position: absolute; inset: 0; transform-origin: 50% 100%; transform: translateZ(calc(var(--d) * -1)) rotateX(-90deg); color: var(--ember); }
.footer__cols { position: relative; display: grid; grid-template-columns: 1fr 1.4fr 1.2fr; gap: 32px var(--gutter); padding-block: clamp(40px, 6vw, 80px); }
.footer__cols ul { display: grid; gap: 6px; margin-top: 14px; }
.footer__cols a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.4s var(--ease); }
.footer__cols a:hover { background-size: 100% 1px; }
.footer__sources { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; font-size: var(--fs-sm); }
.footer__stack { font-size: var(--fs-xs); color: var(--ink-2); }
.marquee--footer .marquee__track span { font-size: var(--fs-lg); }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 22px calc(22px + env(safe-area-inset-bottom, 0px)); font-size: var(--fs-xs); color: var(--muted); }
@media (max-width: 860px) { .footer__cols { grid-template-columns: 1fr; } }

/* ---------- Páginas internas ---------- */
.page-hero { padding-block: calc(var(--header-h) + clamp(48px, 8vw, 120px)) clamp(32px, 5vw, 64px); display: grid; gap: 18px; }
.page-title { font-size: clamp(3rem, 1rem + 9vw, 10.5rem); font-stretch: 125%; font-weight: 850; line-height: 0.86; letter-spacing: -0.04em; }
.page-title--alt .is-alt { font-style: italic; font-weight: 300; font-stretch: 62%; color: var(--accent); }
/* Las letras de los títulos entran desde abajo dentro de una caja con overflow: clip (splitText).
   Las cursivas y las ascendentes se salían de esa caja y quedaban cortadas: se le da holgura con
   padding y se compensa con margen negativo (el espaciado no cambia). La entrada parte de 135 %. */
[data-hero-title] span[style*="overflow: clip"], [data-page-title] span[style*="overflow: clip"] { padding: 0.16em 0.14em 0.16em; margin: -0.16em -0.14em; }
.page-lede { color: var(--ink-2); font-size: var(--fs-lg); max-width: 48ch; }

/* Especificaciones */
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter); padding-bottom: var(--section); }
.spec-group { border-top: 1px solid var(--line-strong); padding: 20px 0 30px; display: grid; gap: 10px; align-content: start; }
.spec-group h2 { font-size: var(--fs-lg); font-stretch: 112%; }
.spec-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 16px; padding-block: 8px; border-bottom: 1px dashed var(--line); font-size: var(--fs-sm); }
.spec-row dt { color: var(--muted); }
.spec-row dd { margin: 0; font-family: var(--font-mono); font-stretch: 87.5%; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .specs { grid-template-columns: 1fr; } }

/* Galería */
.gallery-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding-bottom: 28px; }
.filters, .viewmode { display: flex; flex-wrap: wrap; gap: 6px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 4px; grid-auto-flow: row dense; gap: clamp(12px, 2vw, 26px); padding-bottom: 40px; align-items: start; }
.g-item { display: grid; gap: 10px; align-content: start; }
.g-item.is-out { display: none; }
.g-item button { display: grid; gap: 10px; align-content: start; text-align: left; width: 100%; }
.g-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); background-size: cover; background-position: center; }
.g-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s var(--ease), transform 1s var(--ease); }
.g-media img.is-loaded { opacity: 1; }
.g-item button:hover .g-media img { transform: scale(1.04); }
.g-cap { display: grid; gap: 2px; }
.g-title { font-weight: 700; font-stretch: 108%; }
.g-title .jp { display: block; font-size: 0.72em; color: var(--muted); font-weight: 500; }
.g-meta { font: 500 var(--fs-xs) var(--font-mono); font-stretch: 87.5%; color: var(--muted); }
.gallery.is-list { grid-template-columns: 1fr; grid-auto-rows: auto; grid-auto-flow: row; gap: 0; border-top: 1px solid var(--line-strong); }
.gallery.is-list .g-item button { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line-strong); position: relative; }
.gallery.is-list .g-media { position: absolute; right: 22%; top: 50%; width: min(300px, 30vw); max-height: 60vh; transform: translateY(-50%); z-index: 2; pointer-events: none; clip-path: inset(50% 0 50% 0); transition: clip-path 0.55s var(--ease); }
.gallery.is-list .g-item button:hover .g-media, .gallery.is-list .g-item button:focus-visible .g-media { clip-path: inset(0 0 0 0); }
.gallery.is-list .g-title { font-size: var(--fs-xl); }
.gallery.is-list .g-title .jp { display: inline; margin-left: 0.45em; font-size: 0.5em; vertical-align: 0.35em; }
.gallery-more { display: flex; justify-content: center; padding-bottom: var(--section); }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } .gallery.is-list .g-media { display: none; } }

/* 404 */
.lost { min-height: 100svh; display: grid; align-content: center; justify-items: start; gap: 22px; padding-block: calc(var(--header-h) + 40px) 60px; }
.lost__title { font-size: clamp(3.4rem, 1rem + 11vw, 13rem); font-stretch: 125%; font-weight: 900; line-height: 0.85; letter-spacing: -0.04em; filter: blur(var(--blur, 14px)); transition: filter 0.1s linear; }
.lost__text { color: var(--ink-2); max-width: 46ch; font-size: var(--fs-lg); }
.focus { width: min(640px, 100%); display: grid; gap: 10px; margin-block: 10px 14px; }
.focus__scale { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); }
.focus__track { position: relative; height: 56px; border-radius: 999px; border: 1px solid var(--line-strong); background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px); }
.focus__ring { position: absolute; left: 4px; top: 4px; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); box-shadow: inset 0 0 0 8px var(--ember); touch-action: none; }


/* ---------- Visor de fotos ---------- */
.lightbox { position: fixed; inset: 0; z-index: 850; background: var(--overlay); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); display: grid; place-items: center; padding: calc(var(--header-h) + 8px) var(--gutter) 40px; }
.lightbox__figure { margin: 0; display: grid; justify-items: center; gap: 12px; width: min(1200px, 100%); }
/* la caja tiene la proporción exacta de la foto (3:2) para que Flip.fit calce con la miniatura */
.lightbox__img { width: min(100%, calc(78svh * var(--r, 1.5))); aspect-ratio: var(--r, 1.5); height: auto; max-height: 78svh; object-fit: cover; border-radius: 4px; background: #0a0c12; touch-action: pan-y; user-select: none; -webkit-user-drag: none; }
.lightbox__cap { width: min(100%, calc(78svh * 1.5)); }
.lightbox__cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: #f2f4f8; }
.lightbox__title { font-weight: 700; font-size: var(--fs-lg); font-stretch: 108%; }
.lightbox__cap .mono { font-size: var(--fs-xs); opacity: 0.8; }
.lightbox .round-btn { position: absolute; background: var(--bg); }
.lightbox__close { top: calc(env(safe-area-inset-top, 0px) + 16px); right: var(--gutter); }
.lightbox__prev { left: var(--gutter); top: 50%; }
.lightbox__next { right: var(--gutter); top: 50%; }
@media (max-width: 700px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 960; transform: translate(-50%, calc(100% + 48px)); visibility: hidden; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--radius); font-weight: 600; font-size: var(--fs-sm); max-width: calc(100vw - 32px); box-shadow: var(--shadow); transition: transform 0.5s var(--ease), visibility 0s linear 0.5s; pointer-events: none; }
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; transition: transform 0.5s var(--ease), visibility 0s; }

/* ---------- Texto dividido ---------- */
.split-line { display: block; overflow: clip; padding-bottom: 0.06em; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .manifesto__text .word { opacity: 1; }
  .explode { height: auto; }
  .explode__sticky { position: relative; height: 100svh; }
  .sequence { height: auto; }
  .sequence__sticky { position: relative; height: 100svh; }
  .sequence__caption { position: relative; opacity: 1; grid-area: auto; }
  .ice { height: auto; }
  .ice__sticky { position: relative; }
}
html.reduced .explode, html.reduced .sequence, html.reduced .ice { height: auto; }
html.reduced .explode__sticky, html.reduced .sequence__sticky, html.reduced .ice__sticky { position: relative; height: 100svh; }
html.reduced .sequence__caption { position: relative; opacity: 1; grid-area: auto; }
