/* LENRIQUE — landing inmersiva · Diseñado por Operaria
   HTML/CSS/JS plano. Mobile-first. Un tatuaje es un pasaje. */

/* ---------- Tokens ---------- */
:root {
  /* Paleta v2 (16 jul 2026) — SIN sepia. Negro tinta + azul noche + platas + papel frío.
     La tinta negra envejece a azul bajo la piel: el paso del tiempo ES el concepto. */
  /* Superficie: negro tinta committed/drenched, teñido a azul frío */
  --ink-950: oklch(0.10 0.010 255);
  --ink-900: oklch(0.14 0.012 255);
  --ink-850: oklch(0.18 0.014 253);
  --ink-800: oklch(0.23 0.016 250);
  /* Papel FRÍO como MATERIAL (blanco-gris con grano, jamás beige) */
  --paper:   oklch(0.90 0.006 250);
  --paper-2: oklch(0.84 0.008 250);
  /* Azul noche / tinta envejecida: único acento */
  --azul:   oklch(0.66 0.075 250);
  --azul-2: oklch(0.54 0.080 255);
  /* Plata: piel, luz, cicatriz, metal de la aguja */
  --plata:  oklch(0.80 0.010 250);
  /* Texto */
  --on-ink:      oklch(0.94 0.006 250);   /* blanco frío, contraste alto */
  --on-ink-mut:  oklch(0.74 0.010 250);   /* plata, no gris lavado */
  --on-paper:    oklch(0.22 0.014 255);
  --on-paper-mut: oklch(0.42 0.018 253);

  /* Una sola voz serif — la del logo (Didot alto contraste; en web Playfair Display) */
  --serif: "Playfair Display", "Didot", "Bodoni 72", "Bodoni MT", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;

  --measure: 34rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* z-index semántico */
  --z-inkline: 5;
  --z-content: 6;
  --z-nav: 40;
  --z-modal: 60;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--on-ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.3vw, 1.125rem);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { max-width: 100%; display: block; }

/* Textura de grano/papel reutilizable (SVG feTurbulence embebido) */
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05; mix-blend-mode: overlay;
}

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.02;
  letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
em, .em { font-family: var(--serif); font-style: italic; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }

/* ---------- Reveal (solo con JS; sin JS todo visible) ---------- */
.reveal { }
html.js .reveal { opacity: 0.001; transform: translateY(18px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
html.js .reveal.is-in { opacity: 1; transform: none; }
html.js .reveal.d1 { transition-delay: 0.08s; }
html.js .reveal.d2 { transition-delay: 0.16s; }
html.js .reveal.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 0.001; transform: none;
    transition: opacity 0.4s linear; }
  html.js .reveal.is-in { opacity: 1; }
}

/* ---------- Fondos de imagen (Iris) con tratamiento editorial ---------- */
.chapter__bg { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; }
/* Fondos: imágenes -frio NATIVAS de la paleta (negros, platas, azul noche).
   Solo ajuste de exposición para legibilidad; sin desaturar (ya son frías). */
.chapter__bg { filter: brightness(0.82) contrast(1.04); }
.chapter__bg--faint { opacity: 0.42; filter: brightness(0.66) contrast(1.02); }
/* Scrim de negro tinta para legibilidad (contraste >=4.5:1 sobre el texto).
   Doble capa: velo azul noche (enfría la imagen cálida) + degradado direccional. */
.chapter__scrim { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: color-mix(in oklab, var(--ink-950) 40%, transparent); }
.chapter__scrim--full { background:
  color-mix(in oklab, var(--ink-950) 66%, transparent); }
.chapter__scrim--left { background:
  linear-gradient(90deg, var(--ink-950) 4%,
  color-mix(in oklab, var(--ink-950) 55%, transparent) 55%,
  color-mix(in oklab, var(--ink-950) 22%, transparent) 100%); }
/* Sobre el HERO ya hay velo propio (.slot--video::after) */
.hero .slot--video::after { background:
  radial-gradient(120% 90% at 50% 42%, color-mix(in oklab, var(--ink-950) 25%, transparent),
  var(--ink-950) 92%); }

/* ---------- Línea de tinta (riel del viaje) — adaptada de tinta-viva ---------- */
.inkline { position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: var(--z-inkline); pointer-events: none; }
.inkline .ink-main { fill: none; stroke: var(--azul);
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.6;
  filter: drop-shadow(0 0 6px oklch(0.66 0.075 250 / 0.4)); }
.inkline .bleed { fill: var(--azul); opacity: 0; }
.inkline .nib { fill: var(--paper); opacity: 0;
  filter: drop-shadow(0 0 5px var(--azul)); }
@media (prefers-reduced-motion: reduce) {
  .inkline .nib { display: none; }
  .inkline .bleed { opacity: 0.16; }
}

/* ---------- Stack de capítulos (sticky-stack) ---------- */
.stack { position: relative; z-index: var(--z-content); }
.chapter { position: sticky; top: 0; min-height: 100dvh;
  display: grid; align-content: center; overflow: hidden;
  /* padding lateral mínimo 24px en móvil (el viewport es parte del diseño) */
  padding: clamp(2rem, 6vw, 6rem) max(24px, 6vw);
  isolation: isolate; }
.chapter > * { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: 68rem; margin-inline: auto; }
.col { max-width: var(--measure); }

/* Atenuación del capítulo saliente */
html.js .chapter { transition: filter 0.8s var(--ease), opacity 0.8s var(--ease); }
html.js .chapter.dimmed { filter: brightness(0.35) saturate(0.7); opacity: 0.55; }
@media (prefers-reduced-motion: reduce) {
  html.js .chapter.dimmed { filter: none; opacity: 1; }
}

/* ---------- HERO (frame-by-frame) ---------- */
/* La sección es alta (300vh) para dar recorrido al scrubbing; el contenido va sticky.
   Anula el sticky/min-height del .chapter genérico. */
.hero { position: relative; height: 300vh; min-height: 0; padding: 0;
  display: block; align-content: normal; overflow: visible; background: var(--ink-950); }
.hero__sticky { position: sticky; top: 0; height: 100dvh; overflow: hidden;
  display: grid; align-content: center; justify-items: center; isolation: isolate;
  padding: clamp(2rem, 6vw, 6rem) max(24px, 6vw); }
.hero__poster, .hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__poster { object-fit: cover; z-index: 0; }
.hero__canvas { z-index: 1; }
.hero__veil { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 44%,
    color-mix(in oklab, var(--ink-950) 28%, transparent), var(--ink-950) 94%); }
.hero__inner { position: relative; z-index: 3;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: clamp(1.5rem, 4vw, 2.5rem); }
.hero__inner > * { max-width: 100%; }
.hero__logo { width: min(46vw, 190px); filter: invert(1) drop-shadow(0 4px 30px rgba(0,0,0,0.6)); }
.hero__claim { max-width: 16ch; font-size: clamp(2.4rem, 8vw, 5.4rem); }
.hero__sub { color: var(--on-ink-mut); max-width: min(26rem, 100%); font-size: 1.05rem;
  text-wrap: pretty; overflow-wrap: break-word; }
/* Reduced-motion: sin recorrido de scrubbing, un solo frame fijo (poster = f-070 por JS) */
@media (prefers-reduced-motion: reduce) { .hero { height: 100dvh; } }

/* Boleto perforado (invitación a abordar) */
.ticket-cta { display: inline-flex; align-items: stretch; gap: 0;
  background: var(--paper); color: var(--on-paper); font-family: var(--mono);
  border: none; cursor: pointer; text-decoration: none;
  border-radius: 6px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transition: transform 0.5s var(--ease); }
.ticket-cta:hover { transform: translateY(-3px); }
.ticket-cta__stub { display: grid; place-items: center; padding: 0.85rem 0.8rem;
  border-right: 2px dashed var(--on-paper-mut); font-size: 0.68rem; letter-spacing: 0.12em; }
.ticket-cta__main { display: grid; text-align: left; padding: 0.7rem clamp(1rem, 3.5vw, 1.3rem); gap: 0.1rem; }
.ticket-cta__main b { font-family: var(--serif); font-style: italic;
  font-size: clamp(1rem, 3.6vw, 1.15rem); letter-spacing: 0; }
.ticket-cta__main span { font-size: 0.64rem; letter-spacing: 0.08em; color: var(--on-paper-mut);
  white-space: nowrap; }
.scrollhint { color: var(--on-ink-mut); font-size: 0.7rem; letter-spacing: 0.28em;
  text-transform: uppercase; }
.scrollhint span { display: block; width: 1px; height: 34px; margin: 0.7rem auto 0;
  background: linear-gradient(var(--azul), transparent); }

/* ---------- EL PASAJE (manifiesto) ---------- */
.pasaje { background: var(--ink-900); }
.manifiesto { display: grid; gap: clamp(0.6rem, 2vw, 1rem); }
.manifiesto p { font-family: var(--serif); font-size: clamp(1.35rem, 3.4vw, 2.4rem);
  line-height: 1.28; color: var(--on-ink); letter-spacing: -0.01em; max-width: 22ch; }
.manifiesto p.mut { color: var(--on-ink-mut); }
.manifiesto .cierre { color: var(--azul); }
.chapter__kicker { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--azul); margin-bottom: 1.5rem; display: inline-block; }

/* ---------- ARCHIVO DE PASAJES ---------- */
.archivo { background: var(--ink-950); align-content: center; }
.archivo__grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); margin-top: 2rem; }
.boleto { position: relative; background: var(--paper); color: var(--on-paper);
  border-radius: 8px; padding: 1.3rem 1.3rem 1.4rem; display: grid; gap: 0.6rem;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45); overflow: hidden; }
.boleto__perf { position: absolute; top: 0; bottom: 0; left: 2.6rem; width: 0;
  border-left: 2px dashed color-mix(in oklab, var(--on-paper) 35%, transparent); }
.boleto::before, .boleto::after { content: ""; position: absolute; left: 2.35rem;
  width: 0.55rem; height: 0.55rem; background: var(--ink-950); border-radius: 50%; }
.boleto::before { top: -0.27rem; }
.boleto::after { bottom: -0.27rem; }
.boleto__serie { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em;
  color: var(--on-paper-mut); padding-left: 2.1rem; }
.boleto__titulo { font-family: var(--serif); font-style: italic; font-size: 1.55rem;
  padding-left: 2.1rem; }
.boleto__foto { position: relative; aspect-ratio: 4 / 3; border-radius: 5px; overflow: hidden;
  background: var(--ink-850); display: grid; place-items: center; margin-left: 2.1rem; }
.boleto__foto img { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: brightness(0.9) contrast(1.03); }
/* Memoria = azul: leve velo de tinta envejecida sobre las obras del archivo (el pasado) */
.boleto__foto::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: color-mix(in oklab, var(--azul-2) 16%, transparent); mix-blend-mode: multiply; }
.boleto__foto-tag { position: relative; z-index: 1; align-self: end; justify-self: start;
  margin: 0.5rem; padding: 0.25rem 0.45rem; background: color-mix(in oklab, var(--ink-950) 72%, transparent);
  color: var(--plata); font-size: 0.54rem !important; letter-spacing: 0.12em; border-radius: 3px; }
.boleto__foto span { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  color: var(--on-paper-mut); text-align: center; padding: 0 1rem; line-height: 1.5; }
.boleto__foto--reservado { background: var(--paper-2);
  outline: 1px dashed color-mix(in oklab, var(--on-paper) 30%, transparent); outline-offset: -8px; }
.boleto__texto { padding-left: 2.1rem; font-size: 0.92rem; line-height: 1.55;
  color: color-mix(in oklab, var(--on-paper) 88%, transparent); }
.boleto__banda { margin-top: 0.3rem; padding: 0.4rem 0 0 2.1rem; border-top: 1px solid
  color-mix(in oklab, var(--on-paper) 18%, transparent); font-family: var(--mono);
  font-size: 0.62rem; letter-spacing: 0.1em; color: var(--on-paper-mut);
  display: flex; justify-content: space-between; gap: 0.5rem; }

/* ---------- LA AGUJA QUE ESCUCHA ---------- */
.aguja { background: linear-gradient(var(--ink-900), var(--ink-850)); }
.aguja h2 { font-size: clamp(2rem, 6vw, 3.6rem); margin-bottom: 1.2rem; }
.aguja p { max-width: 40ch; color: var(--on-ink-mut); font-size: 1.1rem; }
.aguja p strong { color: var(--on-ink); font-weight: 500; }
.aguja__igs { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; }
.igtag { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.05em;
  color: var(--azul); text-decoration: none; padding: 0.5rem 0.9rem;
  border: 1px solid color-mix(in oklab, var(--azul) 45%, transparent); border-radius: 999px; }
.igtag:hover { background: color-mix(in oklab, var(--azul) 14%, transparent); }

/* ---------- EL AGENTE (mockup) ---------- */
.agente { background: var(--ink-950); }
.agente__layout { display: grid; gap: clamp(1.5rem, 5vw, 3rem);
  grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .agente__layout { grid-template-columns: 1fr 1fr; } }
.agente h2 { font-size: clamp(2rem, 6vw, 3.4rem); margin-bottom: 1rem; }
.agente__intro { color: var(--on-ink-mut); max-width: 34ch; }
.agente__label { margin-top: 1.4rem; font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--azul); }

/* Marco de teléfono */
.phone { justify-self: center; width: min(340px, 88vw); background: #0c0c0d;
  border-radius: 34px; padding: 12px; box-shadow: 0 30px 70px rgba(0,0,0,0.6),
  inset 0 0 0 1px rgba(255,255,255,0.06); }
.phone__screen { background: var(--ink-900); border-radius: 24px; overflow: hidden;
  height: 560px; display: grid; grid-template-rows: auto 1fr auto; position: relative; }
.phone__bar { display: flex; align-items: center; gap: 0.6rem; padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06); }
.phone__dot { width: 30px; height: 30px; border-radius: 50%; background: var(--azul);
  display: grid; place-items: center; font-family: var(--serif); font-style: italic;
  color: var(--ink-950); font-size: 0.9rem; }
.phone__who { display: grid; line-height: 1.2; }
.phone__who b { font-size: 0.86rem; font-weight: 600; }
.phone__who span { font-size: 0.66rem; color: var(--on-ink-mut); }
.phone__body { overflow-y: auto; padding: 1rem 0.9rem; display: grid;
  gap: 0.6rem; align-content: start; scrollbar-width: thin; }
.msg { max-width: 82%; padding: 0.6rem 0.8rem; border-radius: 14px; font-size: 0.85rem;
  line-height: 1.45; }
.msg--bot { background: var(--ink-800); color: var(--on-ink); justify-self: start;
  border-bottom-left-radius: 4px; }
.msg--user { background: var(--azul); color: var(--ink-950); justify-self: end;
  border-bottom-right-radius: 4px; }
html.js .msg { animation: pop 0.5s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html.js .msg { animation: none; } }
.msg canvas { border-radius: 8px; margin-top: 0.4rem; width: 100%; height: auto; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }
.chip { font-family: var(--mono); font-size: 0.68rem; padding: 0.4rem 0.7rem;
  border-radius: 999px; border: 1px solid var(--azul); background: transparent;
  color: var(--azul); cursor: pointer; }
.chip:hover { background: color-mix(in oklab, var(--azul) 16%, transparent); }
.phone__foot { border-top: 1px solid rgba(255,255,255,0.06); padding: 0.6rem;
  display: flex; gap: 0.5rem; }
.phone__foot input[type="text"] { flex: 1; background: var(--ink-800); border: none;
  border-radius: 999px; padding: 0.6rem 0.9rem; color: var(--on-ink); font-size: 0.85rem;
  font-family: var(--sans); }
.phone__foot input::placeholder { color: var(--on-ink-mut); }
.phone__send { background: var(--azul); border: none; color: var(--ink-950);
  border-radius: 50%; width: 40px; height: 40px; cursor: pointer; font-size: 1.1rem;
  flex: 0 0 auto; display: grid; place-items: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }

/* Boleto generado dentro del chat — troquel adaptado de assets/anim/boleto-pasaje.html */
.miniboleto { position: relative; background: var(--paper); color: var(--on-paper);
  border-radius: 8px; padding: 0.8rem 0.9rem 0.8rem 1.7rem; font-family: var(--mono);
  display: grid; gap: 0.25rem; margin-top: 0.3rem; overflow: hidden; }
/* línea de perforación + muescas del troquel (aparecen al "picar") */
.miniboleto::before { content: ""; position: absolute; top: 0; bottom: 0; left: 1.2rem; width: 0;
  border-left: 2px dashed color-mix(in oklab, var(--on-paper) 35%, transparent); }
.miniboleto .notch { position: absolute; left: 1.2rem; width: 0.5rem; height: 0.5rem;
  background: var(--ink-900); border-radius: 50%; transform: translateX(-50%) scale(0);
  transition: transform 0.35s var(--ease); }
.miniboleto .notch--top { top: -0.25rem; }
.miniboleto .notch--bot { bottom: -0.25rem; }
.miniboleto.punched .notch { transform: translateX(-50%) scale(1); }
.miniboleto .b-serie { font-size: 0.6rem; letter-spacing: 0.12em; color: var(--on-paper-mut); }
.miniboleto .b-dest { font-family: var(--serif); font-style: italic; font-size: 1.05rem; }
.miniboleto .b-meta { font-size: 0.62rem; color: var(--on-paper-mut);
  display: flex; justify-content: space-between; gap: 0.5rem; }
/* troquel que baja y pica el boleto */
.punch-tool { position: absolute; left: 1.2rem; top: -2.4rem; width: 1.1rem; height: 1.1rem;
  border-radius: 50%; background: var(--azul); transform: translateX(-50%);
  box-shadow: 0 0 0 3px var(--ink-900); opacity: 0; z-index: 2; }
html.js .punch-tool.drop { animation: punchdrop 0.5s var(--ease) forwards; }
@keyframes punchdrop {
  0% { opacity: 1; top: -2.4rem; }
  55% { opacity: 1; top: 0.1rem; }
  70% { opacity: 1; top: -0.2rem; }
  100% { opacity: 0; top: -0.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .miniboleto .notch { transition: none; }
  .punch-tool { display: none; }
}

/* ---------- RESERVA ---------- */
.reserva { background: linear-gradient(var(--ink-850), var(--ink-950)); text-align: center;
  justify-items: center; }
.reserva h2 { font-size: clamp(2.2rem, 7vw, 4rem); }
.reserva p { color: var(--on-ink-mut); max-width: 34ch; margin: 1rem auto 2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.btn { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.06em;
  text-decoration: none; padding: 0.95rem 1.6rem; border-radius: 8px; cursor: pointer;
  transition: transform 0.5s var(--ease); border: 1px solid transparent; }
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--paper); color: var(--on-paper); }
.btn--ghost { background: transparent; color: var(--on-ink); border-color:
  color-mix(in oklab, var(--azul) 55%, transparent); }

/* ---------- FOOTER ---------- */
.footer { background: var(--ink-950); position: relative; z-index: var(--z-content);
  padding: clamp(3rem, 8vw, 5rem) 1.5rem; text-align: center; display: grid; gap: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.06); }
.footer__logo { width: 120px; margin: 0 auto; filter: invert(1); opacity: 0.9; }
.footer__igs { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }
.footer a { color: var(--azul); text-decoration: none; font-family: var(--mono);
  font-size: 0.78rem; }
.footer__cred { color: var(--on-ink-mut); font-size: 0.76rem; }
.footer__cred a { color: var(--on-ink); }

/* ---------- Reduced-motion: sin sticky-stack agresivo ---------- */
@media (prefers-reduced-motion: reduce) {
  .chapter { position: relative; }
}
