/* ── fonts.css ── */
/* Fuentes autoalojadas (OFL, licencias en /assets/fonts/licenses/). Subconjunto latino: incluye á é í ó ú ü ñ ¿ ¡.
   Las cuatro familias se declaran, pero el navegador solo descarga las que una página usa. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin.v1.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-italic.v1.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin.v1.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-italic.v1.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-400.v1.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-500.v1.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin.v1.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Respaldo con las métricas de IBM Plex Mono (avance 0.6 em, ascent 1025, descent 275):
   mientras carga la fuente, el texto mono ocupa el mismo espacio y no empuja la página. */
@font-face {
  font-family: "Plex Mono Fallback";
  src: local("Courier New"), local("CourierNewPSMT"), local("Roboto Mono"), local("Menlo");
  size-adjust: 100%;
  ascent-override: 102.5%;
  descent-override: 27.5%;
  line-gap-override: 0%;
}

/* ── tokens.css ── */
/* ─────────────────────────────────────────────────────────────
   Variables de diseño de wowperrodev.com.
   La identidad se cambia editando SOLO este archivo.

   Concepto: "la mano y la máquina". La serif y la firma son la mano;
   la mono, la retícula, los puntos y las cajas de detección son la máquina.

   Contraste WCAG medido con los valores actuales:
   - ink sobre paper       15.4:1  pasa
   - ink-soft sobre paper   6.9:1  pasa AA
   - accent sobre paper     5.4:1  pasa AA (texto normal). Las 6 skins pasan (ver abajo).
   - paper sobre accent     5.4:1  pasa (etiquetas de detección, botón principal)
   - paper sobre ink       15.4:1  pasa
   - ink sobre accent       2.8:1  FALLA: nunca texto ink sobre fondo accent
   Si cambias un color, vuelve a medir todas las combinaciones.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Color */
  --paper: #EAE9E4;
  --ink: #121212;
  --accent: var(--skin-blue);

  /* Skins: el visitante puede cambiar el color de acento (selector en el header).
     Cada una pasa AA contra paper en ambas direcciones (accent sobre paper y paper sobre accent). */
  --skin-blue: #3446E8;    /* 5.42:1, el original */
  --skin-red: #C2182B;     /* 4.99:1 */
  --skin-orange: #A84600;  /* 4.88:1 */
  --skin-green: #1B7340;   /* 4.83:1 */
  --skin-violet: #7A2FD0;  /* 5.49:1 */
  --skin-magenta: #B0186E; /* 5.40:1 */
  --ink-soft: color-mix(in srgb, var(--ink) 72%, var(--paper));   /* texto secundario, 7.6:1 */
  --rule: color-mix(in srgb, var(--ink) 16%, var(--paper));       /* líneas de sección */
  --grid: color-mix(in srgb, var(--ink) 9%, var(--paper));        /* retícula fina */
  --glow: drop-shadow(0 0 3px color-mix(in srgb, var(--accent) 55%, transparent)) drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 30%, transparent));
  --glow-text: 0 0 6px color-mix(in srgb, var(--accent) 40%, transparent);
  --pending: #8A3B00;                                             /* solo para marcas [[PENDIENTE]] */

  /* Tipografía: combinación A, elegida por Carlo el 2026-10-01. */
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "Plex Mono Fallback", ui-monospace, Consolas, monospace;
  --font-glyph: none; /* reservada para el alfabeto inventado; sin uso en esta versión */

  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-base: clamp(1.125rem, 1.08rem + 0.2vw, 1.25rem);
  --text-lg: clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --text-xl: clamp(2rem, 1.6rem + 2vw, 3.25rem);
  --text-2xl: clamp(2.5rem, 1.8rem + 3.5vw, 4.75rem);
  --leading: 1.55;
  --leading-tight: 1.08;
  --tracking-mono: 0.02em;
  --tracking-display: -0.015em;

  /* Espacio y medida */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: clamp(5rem, 3rem + 8vw, 9rem);
  --space-section: clamp(3.5rem, 2.25rem + 4.5vw, 6rem); /* aire arriba y abajo de cada sección */
  --measure: 36rem;     /* columna de lectura */
  --wide: 72rem;        /* ancho máximo de la página */
  --gutter: 1rem;       /* margen lateral en móvil */
  --cell: 4rem;         /* lado de la retícula del hero */

  /* Detalles */
  --radius: 0;
  --line: 1px;
  --focus: 2px solid var(--accent);
  --duration: 180ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (min-width: 48rem) {
  :root { --gutter: 2rem; --cell: 6rem; }
}

/* Combinaciones tipográficas para /_specimen. */
.combo-a { --font-serif: "Newsreader", Georgia, serif; --font-mono: "IBM Plex Mono", ui-monospace, monospace; }
.combo-b { --font-serif: "Source Serif 4", Georgia, serif; --font-mono: "JetBrains Mono", ui-monospace, monospace; }

/* Skin elegida por el visitante (assets/js/skin.js pone data-skin en <html>). */
[data-skin="red"]     { --accent: var(--skin-red); }
[data-skin="orange"]  { --accent: var(--skin-orange); }
[data-skin="green"]   { --accent: var(--skin-green); }
[data-skin="violet"]  { --accent: var(--skin-violet); }
[data-skin="magenta"] { --accent: var(--skin-magenta); }

/* ── firma.css ── */
/* Generado por scripts/brand.mjs. Posición del punto final de la firma. */
.firma, .hero-signature { --dot-x: 96.685%; --dot-y: 78.134%; }

/* ── base.css ── */
/* Estilos de wowperrodev.com. Todo valor de identidad sale de tokens.css. */

/* ── Reset mínimo ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; /* alto del header fijo */ }
img, svg, picture { display: block; max-width: 100%; height: auto; }
input, button { font: inherit; color: inherit; }
ul[class], ol[class], nav ul { list-style: none; padding: 0; }
figure { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ── Base ─────────────────────────────────────────────────── */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: var(--leading);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: var(--leading-tight); font-weight: 400; letter-spacing: var(--tracking-display); text-wrap: balance; }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-base); }
p, li, dd, blockquote { text-wrap: pretty; }

a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: var(--line); }
a, button, input { touch-action: manipulation; -webkit-tap-highlight-color: color-mix(in srgb, var(--accent) 20%, transparent); }
time, .event-when, .contact-list dd { font-variant-numeric: tabular-nums; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: var(--focus); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--paper); }
html { caret-color: var(--accent); scrollbar-color: var(--ink-soft) var(--paper); accent-color: var(--accent); }
main:focus { outline: none; }

.mono, code, .tag { font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: var(--tracking-mono); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100%; z-index: 10;
  background: var(--ink); color: var(--paper); padding: var(--space-2) var(--space-3);
  font-family: var(--font-mono); font-size: var(--text-sm);
}
.skip-link:focus { top: var(--space-2); }

/* ── Placeholders visibles (desaparecen solos al reemplazar el texto) ── */
mark.ph {
  background: none; color: inherit;
  font-family: var(--font-mono); font-size: max(0.8em, 0.75rem); letter-spacing: 0; font-style: normal; font-weight: 400;
  outline: 1px dashed currentColor; outline-offset: 1px;
}
mark.ph-copy { color: var(--accent); }
mark.ph-pendiente, mark.ph-todo { color: var(--pending); }
mark.ph-borrador { outline-style: dotted; }
.button mark.ph, .link-item mark.ph, .newsletter button mark.ph, .detect-label mark.ph { color: inherit; white-space: normal; }

/* ── Recursos de "la máquina" ─────────────────────────────── */

/* Caja de detección: anotación de la máquina sobre un objeto. Nunca encima de un título de sección. */
.detect { position: relative; }
.detect::after { content: ""; position: absolute; inset: calc(-1 * var(--space-2)); border: var(--line) solid var(--accent); pointer-events: none; }
.detect-label {
  position: absolute; left: calc(-1 * var(--space-2) - var(--line)); bottom: calc(100% + var(--space-2));
  display: inline-flex; gap: 0.6em; padding: 0.15em 0.5em;
  background: var(--accent); color: var(--paper);
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 400; line-height: 1.4;
  letter-spacing: var(--tracking-mono); white-space: nowrap;
}

/* Formas en matriz de puntos y en píxel. */
.shape { color: var(--accent); flex: none; }

/* ── Layout ───────────────────────────────────────────────── */
.site-header, main > *, .site-footer {
  width: min(100% - 2 * var(--gutter), var(--wide));
  margin-inline: auto;
}

/* Header fijo: siempre a la mano mientras bajas. El fondo de papel llega de orilla a orilla
   (sombra + clip-path) aunque el contenido mida lo mismo que la página. */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  padding-block: var(--space-2);
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  box-shadow: 0 0 0 100vmax var(--paper), 0 calc(100vmax + var(--line)) 0 100vmax var(--rule);
  clip-path: inset(0 -100vmax calc(-1 * var(--line)));
  transition: translate 250ms var(--ease);
}
.site-header.is-hidden { translate: 0 calc(-100% - var(--line)); }
.site-nav a[aria-current] { color: var(--accent); text-decoration: underline; text-decoration-thickness: var(--line); text-underline-offset: 0.35em; }
.brand { display: block; padding: var(--space-1); margin-left: calc(-1 * var(--space-1)); }
.brand img { width: 3.25rem; }
.site-nav { flex: 1 1 auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); }
.site-nav a {
  display: inline-block; padding-block: var(--space-2);
  color: var(--ink); text-decoration: none;
  font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: var(--tracking-mono);
}
.site-nav a:hover { color: var(--accent); }
.lang-switch ul { display: flex; gap: var(--space-1); }
.lang-switch a {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px;
  font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-soft); text-decoration: none;
}
.lang-switch a:hover { color: var(--accent); }
.lang-switch a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: var(--line); text-underline-offset: 0.35em; }

@media (max-width: 47.99rem) {
  .site-nav { order: 3; flex: 0 0 calc(100% + 2 * var(--gutter)); min-width: 0; margin-inline: calc(-1 * var(--gutter)); }
  /* En móvil, el menú es una sola fila que se desliza de lado. */
  .site-nav ul {
    flex-wrap: nowrap; gap: 0 var(--space-4); overflow-x: auto; scrollbar-width: none;
    padding-inline: var(--gutter); white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - 2.5rem), transparent);
  }
  .site-nav ul::-webkit-scrollbar { display: none; }
  .lang-switch { margin-left: auto; }
}

.section { padding-block: var(--space-section); border-top: var(--line) solid var(--rule); }
.section > h2, .section-head { margin-bottom: var(--space-5); }
.section > p, .section > ul, .section > ol { max-width: var(--measure); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.section-shape { width: clamp(4rem, 3rem + 4vw, 7rem); height: auto; }

/* ── Botones ──────────────────────────────────────────────── */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: var(--space-2) var(--space-4);
  border: var(--line) solid var(--ink); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; white-space: nowrap;
  font-family: var(--font-serif); font-size: var(--text-base);
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.button:hover { background: var(--ink); color: var(--paper); }
.button:active, .link-item:active, .newsletter button:active:not(:disabled) { transform: translateY(1px); }
/* paper sobre accent = 5.4:1. Nunca ink sobre accent. */
.button-primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.button-primary:hover { background: var(--ink); border-color: var(--ink); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero { padding-block: 0 var(--space-7); }
.hero-field {
  position: relative;
  margin-inline: calc(-1 * var(--gutter));
  padding: calc(var(--space-6) + var(--space-4)) var(--gutter) var(--space-6);
  background-image:
    linear-gradient(to right, var(--grid) var(--line), transparent var(--line)),
    linear-gradient(to bottom, var(--grid) var(--line), transparent var(--line));
  background-size: var(--cell) var(--cell);
  background-position: calc(var(--gutter) - var(--line)) 0;
}
.hero-signature { width: min(100% - 2 * var(--space-2) - 2px, 44rem); margin-left: calc(var(--space-2) + 1px); }
.hero-signature h1 { font-size: inherit; line-height: 0; }
.firma { display: block; position: relative; color: var(--ink); }
.firma-svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero-bird { position: absolute; top: var(--space-4); right: var(--gutter); width: clamp(4.5rem, 3rem + 6vw, 9rem); }
.hero-sparkle { position: absolute; right: calc(var(--gutter) + clamp(5rem, 4rem + 8vw, 13rem)); top: clamp(3.5rem, 2rem + 4vw, 6rem); width: clamp(1.25rem, 1rem + 1vw, 2rem); }
.hero-sparkle-small { position: absolute; left: calc(var(--gutter) + 46%); top: var(--space-5); width: clamp(0.75rem, 0.6rem + 0.6vw, 1.15rem); }
.section-shape.shape-wing { width: clamp(5.5rem, 4rem + 5vw, 9rem); }

/* El secreto: botón de 44×44 sobre el punto final y el mensaje trazado a mano. */
.secret-trigger {
  position: absolute; left: var(--dot-x); top: var(--dot-y); translate: -50% -50%;
  width: 44px; height: 44px; padding: 0; border: 0; background: transparent;
  cursor: crosshair; /* la única pista */
}
.secret-trigger:focus-visible { outline-offset: -8px; }
.secret {
  position: absolute; right: calc(100% - var(--dot-x) - 0.75rem); top: calc(100% + var(--space-3));
  pointer-events: none; color: var(--accent);
}
.secret-svg { width: clamp(7rem, 5rem + 8vw, 11rem); height: auto; overflow: visible; opacity: 0; }
.secret-svg path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.secret.is-open .secret-svg { opacity: 1; }
.secret.is-open .secret-svg path { stroke-dashoffset: 0; transition: stroke-dashoffset 1100ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .secret.is-open .secret-svg path { transition: none; }
}
.hero-copy { margin-top: var(--space-5); }
.hero-tagline { font-size: var(--text-lg); line-height: 1.35; max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin-top: var(--space-5); }
.hero-secondary { display: inline-block; padding-block: var(--space-2); }

@media (min-width: 60rem) {
  .hero-field { padding-block: 6rem var(--space-6); }
  .hero-copy { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; gap: var(--space-5); }
  .hero-actions { margin-top: 0; justify-content: flex-end; }
}

/* ── Games ────────────────────────────────────────────────── */
.game-feature { display: grid; gap: var(--space-6); align-items: center; }
.game-art { margin-top: var(--space-4); margin-inline: var(--space-2); max-width: 36rem; }
.game-art img { width: 100%; }
.game-body h3 { font-size: var(--text-xl); }
.game-hook { font-size: var(--text-lg); font-style: italic; margin-block: var(--space-2) var(--space-4); }
.game-links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: var(--tracking-mono); }
.game-links a, .game-links span { display: inline-block; padding-block: var(--space-2); }
.link-pending { color: var(--ink-soft); }
.game-list { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
@media (min-width: 60rem) {
  .game-feature { grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); gap: var(--space-6); }
}

/* ── Manifiesto corto ─────────────────────────────────────── */
.epigraph { max-width: 40rem; margin-bottom: var(--space-6); }
.epigraph blockquote { font-size: var(--text-xl); font-style: italic; line-height: 1.15; letter-spacing: var(--tracking-display); }
.epigraph figcaption { margin-top: var(--space-3); color: var(--ink-soft); font-size: var(--text-sm); font-family: var(--font-mono); letter-spacing: var(--tracking-mono); }
.manifesto-main { max-width: 40rem; font-size: var(--text-lg); line-height: 1.5; margin-bottom: var(--space-5); }
ul.statements { display: grid; gap: var(--space-3); max-width: 40rem; padding-left: var(--space-4); border-left: var(--line) solid var(--accent); }
.statements li { font-style: italic; color: var(--ink-soft); }
.more { display: inline-block; margin-top: var(--space-5); padding-block: var(--space-2); }

/* ── About ────────────────────────────────────────────────── */
.about-grid { display: grid; gap: var(--space-6); margin-bottom: var(--space-7); align-items: start; }
.about-photo {
  max-width: 22rem; margin: var(--space-4) var(--space-2) 0;
  background-image:
    linear-gradient(to right, var(--grid) var(--line), transparent var(--line)),
    linear-gradient(to bottom, var(--grid) var(--line), transparent var(--line));
  background-size: 2rem 2rem;
}
.about-bio { max-width: var(--measure); display: grid; gap: var(--space-3); }
.bio-intro { font-size: var(--text-lg); line-height: 1.4; margin-bottom: var(--space-2); }
.about-bio strong { font-weight: 600; }
@media (min-width: 60rem) {
  .about-grid { grid-template-columns: 22rem 1fr; gap: var(--space-6) var(--space-7); }
  .about-bio { padding-top: var(--space-4); }
}
#collaborators { margin-bottom: var(--space-2); }
.about > p { color: var(--ink-soft); }
.collab-group { margin-top: var(--space-5); max-width: 44rem; }
.collab-group h4 { font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: var(--tracking-mono); color: var(--ink-soft); margin-bottom: var(--space-2); }
.collab-list { display: grid; gap: var(--space-1) var(--space-5); }
.collab-list li { display: grid; grid-template-columns: minmax(9rem, auto) 1fr; align-items: center; gap: 0 var(--space-4); }
@media (min-width: 60rem) { .collab-list { grid-template-columns: 1fr 1fr; } .collab-group { max-width: none; } }
.collab-list li > .link-pending { grid-column: 2; }
.collab { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; }
.collab-role { color: var(--ink-soft); font-size: var(--text-sm); font-family: var(--font-mono); letter-spacing: var(--tracking-mono); }
.icon { width: 1.25rem; height: 1.25rem; flex: none; color: var(--accent); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
@media (max-width: 30rem) {
  .collab-list li { grid-template-columns: 1fr; }
  .collab-list li > .link-pending { grid-column: 1; }
  .collab-role { padding-bottom: var(--space-2); }
}

/* ── Work ─────────────────────────────────────────────────── */
.services { display: grid; margin-block: var(--space-5); max-width: 44rem; }
.services li {
  display: grid; grid-template-columns: 1.25rem 1fr; gap: var(--space-3); align-items: baseline;
  padding-block: var(--space-3); border-top: var(--line) solid var(--rule); font-size: var(--text-lg); line-height: 1.35;
}
.services li:last-child { border-bottom: var(--line) solid var(--rule); }
.bullet { width: 0.85rem; color: var(--accent); }
.work-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-top: var(--space-5); }
.work-cta .mono { color: var(--ink-soft); }

/* ── Events ───────────────────────────────────────────────── */
.event-list { display: grid; gap: var(--space-6); }
.event { max-width: 44rem; padding-left: var(--space-4); border-left: var(--line) solid var(--accent); }
.event h3 { font-size: var(--text-xl); }
.event-when { margin-top: var(--space-2); font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: var(--tracking-mono); color: var(--accent); }
.event-details { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-3) var(--space-4); margin-top: var(--space-4); }
.event-details dt { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-mono); color: var(--ink-soft); padding-top: 0.35em; }
.event-details dd { margin: 0; }
.event-details ul { padding: 0; list-style: none; }
.address { display: block; color: var(--ink-soft); font-size: var(--text-sm); }
.events-empty { color: var(--ink-soft); }
/* "Next": etiqueta del próximo evento (solo el primero de la lista). */
.event-next { display: none; margin-bottom: var(--space-2); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-mono); color: var(--accent); }
.event:first-child .event-next { display: block; }
.events-past { margin-top: var(--space-5); max-width: 44rem; color: var(--ink-soft); font-size: var(--text-sm); }
@media (max-width: 30rem) {
  .event-details { grid-template-columns: 1fr; gap: 0; }
  .event-details dd { margin-bottom: var(--space-3); }
}

/* ── Friends: botones 88×31 ───────────────────────────────── */
.buttons-88 { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-5); }
/* Un poco más que la columna de lectura para que quepan tres botones por fila; la foto de la
   derecha siempre deja al menos --space-6 libre después de --measure, así que no se enciman. */
.section > .buttons-88 { max-width: calc(var(--measure) + 2.5rem); }
.button-88-link { display: inline-block; padding: 6px; }
/* Al doble (escala entera): cada píxel del botón se ve como un cuadro de 2×2. */
.button-88 { width: 176px; height: 62px; image-rendering: pixelated; }
.button-88-placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  border: var(--line) solid var(--ink); background: var(--paper); color: var(--ink);
  font-family: var(--font-mono); font-size: 14px; line-height: 1; text-align: center; overflow: hidden;
}
.button-88-link:hover .button-88 { outline: var(--line) solid var(--accent); outline-offset: 2px; }
.own-button { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-3); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { padding-block: var(--space-6) var(--space-4); border-top: var(--line) solid var(--ink); }
.footer-grid { display: grid; gap: var(--space-6); }
.site-footer h2 { font-size: var(--text-sm); font-family: var(--font-mono); letter-spacing: var(--tracking-mono); color: var(--ink-soft); margin-bottom: var(--space-3); }
@media (min-width: 60rem) {
  .footer-grid { grid-template-columns: 1fr 1.6fr 1fr; }
}
.social-list, .footer-links { display: grid; }
.social-list a, .footer-links a { display: inline-block; padding-block: var(--space-1); }
.social-list li { display: flex; align-items: center; gap: var(--space-2); }
.tag { font-size: var(--text-xs); border: var(--line) solid currentColor; padding: 0 0.35em; text-decoration: none; color: var(--ink-soft); }
.contact-list dt { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-mono); color: var(--ink-soft); }
.contact-list dd { margin: 0 0 var(--space-3); overflow-wrap: anywhere; }
.footer-links { margin-top: var(--space-2); }
.colophon { margin-top: var(--space-6); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-mono); color: var(--ink-soft); }

.newsletter { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.newsletter label { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-mono); color: var(--ink-soft); }
.newsletter-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.newsletter input {
  flex: 1 1 12rem; min-height: 48px; padding: var(--space-2) var(--space-3);
  background: transparent; border: var(--line) solid var(--ink); border-radius: var(--radius);
}
.newsletter input:focus-visible { outline-offset: 0; }
.newsletter button {
  min-height: 48px; padding: var(--space-2) var(--space-4); cursor: pointer;
  background: var(--accent); color: var(--paper); border: var(--line) solid var(--accent); border-radius: var(--radius);
}
.newsletter button:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); }
.newsletter button:disabled { cursor: not-allowed; background: transparent; color: var(--ink-soft); border-color: var(--rule); }
.fine, .form-pending { font-size: var(--text-sm); color: var(--ink-soft); }

/* ── Páginas de texto (manifiesto, privacidad) ────────────── */
.letter { max-width: var(--measure); padding-block: var(--space-7); }
.letter h1 { font-size: var(--text-2xl); margin-bottom: var(--space-6); }
.draft-note { font-size: var(--text-sm); margin-bottom: var(--space-5); }
.prose > * + * { margin-top: var(--space-3); }
.prose h2 { font-size: var(--text-lg); margin-top: var(--space-6); margin-bottom: 0; }
.prose ul { padding-left: var(--space-4); }
.prose li + li { margin-top: var(--space-2); }
.letter-signature { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-7); }
.letter-signature .firma { width: 13rem; }
.letter-dash { font-size: var(--text-lg); color: var(--ink-soft); }

/* ── Páginas simples (confirmación, 404) ──────────────────── */
.simple { max-width: var(--measure); padding-block: var(--space-7); }
.simple h1 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.simple p + p { margin-top: var(--space-5); }

/* ── /links ───────────────────────────────────────────────── */
.page-links main > * { width: min(100% - 2 * var(--gutter), 28rem); }
.links-page { padding-block: var(--space-5) var(--space-6); }
.links-head { display: grid; justify-items: center; gap: var(--space-3); text-align: center; margin-bottom: var(--space-5); }
.links-mark { width: 6.5rem; }
.link-stack { display: grid; gap: var(--space-2); }
.link-item {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 var(--space-2);
  min-height: 3.5rem; padding: var(--space-2) var(--space-3);
  border: var(--line) solid var(--ink); color: var(--ink); text-decoration: none; text-align: center;
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.link-item:hover { background: var(--ink); color: var(--paper); }
.link-item:hover .tag, .link-item:hover .link-handle { color: inherit; }
.link-item-primary { background: var(--accent); border-color: var(--accent); color: var(--paper); white-space: nowrap; }
.link-item-primary:hover { border-color: var(--ink); }
.link-handle { flex-basis: 100%; font-size: var(--text-xs); color: var(--ink-soft); }
.links-foot { text-align: center; margin-top: var(--space-5); font-family: var(--font-mono); font-size: var(--text-xs); }

/* ── /_specimen ───────────────────────────────────────────── */
.specimen { padding-block: var(--space-5); }
.specimen-head { max-width: var(--measure); margin-bottom: var(--space-6); display: grid; gap: var(--space-2); }
.specimen-head .mono { color: var(--accent); }
.specimen-combo { font-family: var(--font-serif); padding-block: var(--space-5) var(--space-7); border-top: var(--line) solid var(--ink); }
.specimen-name { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--accent); letter-spacing: var(--tracking-mono); margin-bottom: var(--space-4); }
.specimen-text { max-width: var(--measure); display: grid; gap: var(--space-3); }
.specimen-text h3 { font-size: var(--text-xl); font-style: italic; }
.specimen-mono { color: var(--ink-soft); }

/* ── Movimiento: un solo momento. La máquina encuentra la mano al cargar. ── */
@media (prefers-reduced-motion: no-preference) {
  .hero .detect::after { animation: lock-on 900ms var(--ease) 2.3s both; }
  .hero .detect-label { animation: label-in 300ms var(--ease) 3s both; }
}
@keyframes lock-on {
  from { opacity: 0; transform: scale(1.08); }
  to   { opacity: 1; transform: none; }
}
@keyframes label-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* Destellos: titilan dos veces al cargar y se quedan quietos, sin brillo.
   Menos de 5 s en total, así no necesitan control de pausa (WCAG 2.2.2). */
@media (prefers-reduced-motion: no-preference) {
  .hero-sparkle { animation: twinkle 1.8s ease-in-out 1.2s 2 both; }
  .hero-sparkle-small { animation: twinkle 1.8s ease-in-out 1.9s 2 both; }
}
@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  45%      { opacity: 0.25; transform: scale(0.82); }
}

/* ── 404: un solo guiño de ventana de sistema ─────────────── */
.notfound { padding-block: var(--space-6) var(--space-5); display: grid; justify-items: start; gap: var(--space-4); }
.os-window { width: min(100%, 36rem); border: var(--line) solid var(--ink); background: var(--paper); box-shadow: 0 1.5rem 3rem -1.5rem color-mix(in srgb, var(--ink) 35%, transparent); }
.os-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.35rem 0.6rem; background: var(--accent); color: var(--paper);
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-mono);
}
.os-x { width: 0.8rem; color: var(--paper); }
.os-body { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: start; padding: var(--space-5) var(--space-4) var(--space-4); }
.notfound-hand { width: clamp(3rem, 2.5rem + 3vw, 4.5rem); color: var(--accent); transform: rotate(-12deg); }
.os-body h1 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.os-actions { margin-top: var(--space-5); display: flex; justify-content: flex-end; }
.notfound-detect { color: var(--ink-soft); font-size: var(--text-xs); }
.notfound-detect span { color: var(--accent); }
@media (max-width: 30rem) {
  .os-body { grid-template-columns: 1fr; }
}

/* Bio: versión larga colapsable. */
.bio-more { display: grid; gap: var(--space-3); }
.bio-more > p { margin-top: var(--space-3); }
.bio-more summary {
  display: inline-flex; align-items: center; gap: var(--space-2); width: fit-content; min-height: 44px;
  cursor: pointer; list-style: none; color: var(--accent);
  font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: var(--tracking-mono);
  text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: var(--line);
}
.bio-more summary::-webkit-details-marker { display: none; }
.bio-more summary::before { content: "+"; display: inline-block; width: 1ch; text-decoration: none; }
.bio-more[open] summary::before { content: "−"; }
.bio-more summary:hover { text-decoration-thickness: 2px; }
.bio-more .bio-more-close, .bio-more[open] .bio-more-open { display: none; }
.bio-more[open] .bio-more-close { display: inline; }

/* ── Arte ASCII y brillo ──────────────────────────────────── */
.ascii {
  margin: 0; white-space: pre; overflow: hidden;
  font-family: var(--font-mono); font-size: 11px; line-height: 1.2; letter-spacing: 0;
  color: var(--accent); text-shadow: var(--glow-text);
}
.hero-ascii { display: none; }
@media (min-width: 75rem) {
  .hero-ascii { display: block; position: absolute; right: calc(var(--gutter) + var(--space-5)); top: 50%; translate: 0 -46%; }
  .hero-bird { top: var(--space-3); }
  .hero-sparkle { right: calc(var(--gutter) + 22rem); top: var(--space-6); }
}
.ascii-toggle {
  position: absolute; right: calc(-1 * var(--space-2)); top: calc(100% + var(--space-2));
  min-height: 44px; padding: 0 var(--space-2); background: none; border: 0; cursor: pointer;
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-mono); color: var(--ink-soft);
}
.ascii-toggle:hover { color: var(--accent); }
/* Jardín: flores sueltas sobre una línea de pasto. */
.ascii-garden {
  width: min(100% - 2 * var(--gutter), var(--wide)); margin: var(--space-6) auto 0;
  --garden-size: clamp(9px, calc(min(100vw - 2 * var(--gutter), var(--wide)) / 60), 19px);
}
.garden-flowers { display: flex; justify-content: space-between; align-items: flex-end; }
.ascii-garden .ascii { font-size: var(--garden-size); overflow: visible; }
.ascii-garden .garden-ground { overflow: hidden; }
@media (max-width: 30rem) { .flower:nth-child(n + 10) { display: none; } }
.flower:nth-child(1)  { --i: 0;  --a: -3; } .flower:nth-child(2)  { --i: 3;  --a: 4; }
.flower:nth-child(3)  { --i: 1;  --a: -2; } .flower:nth-child(4)  { --i: 5;  --a: 5; }
.flower:nth-child(5)  { --i: 2;  --a: -4; } .flower:nth-child(6)  { --i: 6;  --a: 3; }
.flower:nth-child(7)  { --i: 4;  --a: -3; } .flower:nth-child(8)  { --i: 7;  --a: 4; }
.flower:nth-child(9)  { --i: 3;  --a: -5; } .flower:nth-child(10) { --i: 8;  --a: 2; }
.flower:nth-child(11) { --i: 5;  --a: -3; } .flower:nth-child(12) { --i: 2;  --a: 4; }
.flower:nth-child(13) { --i: 6;  --a: -4; }

/* Movimiento del jardín (motion.js):
   - Al entrar en pantalla, las flores crecen una por una (.is-in).
   - Con el scroll se mecen (--sp, de 0 a 1 en toda la página), y con el viento se mecen solas. */
:root[data-motion] .flower {
  transform-origin: 50% 100%;
  scale: 1 0.15; opacity: 0;
  transition: scale 900ms var(--ease) calc(var(--i) * 90ms), opacity 600ms var(--ease) calc(var(--i) * 90ms);
}
:root[data-motion] .ascii-garden.is-in .flower { scale: 1 1; opacity: 1; }
:root[data-motion="on"] .flower {
  transform: rotate(calc(sin(var(--sp, 0) * 50rad + var(--i) * 1rad) * var(--a) * 1.4deg));
  animation: wind calc(3.2s + var(--i) * 0.35s) ease-in-out infinite alternate;
}
@keyframes wind { from { rotate: calc(var(--a) * -0.6deg); } to { rotate: calc(var(--a) * 0.6deg); } }

/* ── Rieles a los lados: solo cuando sobra margen (pantallas anchas) ── */
.rail { display: none; }
@media (min-width: 87rem) {
  .rail {
    display: block; position: fixed; top: 0; bottom: 0; z-index: -1;
    width: calc((100vw - var(--wide)) / 2 - var(--space-4)); overflow: hidden; pointer-events: none;
  }
  .rail-left { left: 0; }
  .rail-right { right: 0; }
  .rail-track { position: relative; display: flex; justify-content: center; }
  .rail-ascii { font-size: 13px; line-height: 1.35; opacity: 0.75; }
  .rail-left .rail-ascii { opacity: 0.55; }
  .rail-sparkle { position: absolute; color: var(--accent); filter: var(--glow); width: 2.2rem; }
  .rail-sparkle:nth-of-type(1) { top: 4%;  left: 18%; width: 3rem; }
  .rail-sparkle:nth-of-type(2) { top: 17%; right: 22%; }
  .rail-sparkle:nth-of-type(3) { top: 33%; left: 30%; width: 2.6rem; }
  .rail-sparkle:nth-of-type(4) { top: 52%; right: 16%; }
  .rail-sparkle:nth-of-type(5) { top: 70%; left: 20%; width: 3rem; }
}
/* La enredadera sube y el cielo baja más lento que la página (parallax con --sp);
   los destellos titilan solos. */
:root[data-motion="on"] .rail-left .rail-track { translate: 0 calc(var(--sp, 0) * -40%); }
:root[data-motion="on"] .rail-right .rail-track { translate: 0 calc((1 - var(--sp, 0)) * -40%); }
:root[data-motion="on"] .rail-sparkle { animation: twinkle-loop 4.5s ease-in-out infinite; }
:root[data-motion="on"] .rail-sparkle:nth-of-type(2n) { animation-duration: 3.4s; animation-delay: -1.2s; }
:root[data-motion="on"] .rail-sparkle:nth-of-type(3n) { animation-duration: 5.6s; animation-delay: -2.5s; }
:root[data-motion="on"] .hero-sparkle { animation: twinkle-loop 4s ease-in-out 1.2s infinite; }
:root[data-motion="on"] .hero-sparkle-small { animation: twinkle-loop 3.1s ease-in-out 1.9s infinite; }
@keyframes twinkle-loop {
  0%, 100% { opacity: 1; scale: 1; }
  40%      { opacity: 0.25; scale: 0.7; }
  55%      { opacity: 0.9; scale: 1.1; }
}
.hero-sparkle, .hero-sparkle-small, .os-x { filter: var(--glow); }

/* ── 404: el escrito de los 16 años ───────────────────────── */
.essay { padding-block: var(--space-5) var(--space-7); border-top: var(--line) solid var(--rule); }
.essay > * { max-width: var(--measure); }
.essay-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); }
.essay-head h2 { font-size: var(--text-xl); }
.essay-meta { color: var(--ink-soft); font-size: var(--text-xs); }
.ascii-memento { font-size: clamp(10px, 2.6vw, 14px); margin-bottom: var(--space-3); }
.essay-body h3 { font-size: var(--text-lg); font-style: italic; margin-bottom: var(--space-3); }
.essay-body p { text-wrap: pretty; }
.essay-claim {
  margin-block: var(--space-5) !important; padding-left: var(--space-4); border-left: var(--line) solid var(--accent);
  font-size: var(--text-lg); font-style: italic; color: var(--accent);
}
.essay-end { display: grid; justify-items: start; gap: var(--space-4); margin-top: var(--space-6); }
.ascii-hourglass { font-size: 13px; }

/* Pantallas muy angostas (320 px): el CTA principal sigue en una línea. */
@media (max-width: 22.4rem) {
  .button-primary, .link-item-primary { padding-inline: var(--space-2); font-size: 1rem; letter-spacing: -0.01em; }
}

/* ── Selector de skin ─────────────────────────────────────── */
.skin-picker { display: flex; align-items: center; }
.skin-picker[hidden] { display: none; }
.skin-swatch {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  background: none; border: 0; cursor: pointer;
}
.skin-swatch::before {
  content: ""; width: 16px; height: 16px; background: var(--swatch);
  outline: var(--line) solid transparent; outline-offset: 2px;
  transition: transform var(--duration) var(--ease);
}
.skin-swatch:hover::before { transform: scale(1.2); }
.skin-swatch[aria-pressed="true"]::before { outline-color: var(--ink); }
.skin-swatch:focus-visible { outline-offset: -2px; }
.skin-blue { --swatch: var(--skin-blue); }
.skin-red { --swatch: var(--skin-red); }
.skin-orange { --swatch: var(--skin-orange); }
.skin-green { --swatch: var(--skin-green); }
.skin-violet { --swatch: var(--skin-violet); }
.skin-magenta { --swatch: var(--skin-magenta); }
@media (max-width: 47.99rem) {
  .site-header { column-gap: var(--space-2); }
  .site-header .skin-picker { margin-left: auto; }
  .site-header .lang-switch { margin-left: 0; }
  .site-header .lang-switch ul { gap: 0; }
  .skin-swatch { width: 30px; height: 30px; }
  .skin-swatch::before { width: 14px; height: 14px; }
}

/* ── Lo sagrado: halos y milagritos ───────────────────────── */
/* Halo de estampa en ASCII (ascii-halo.js): anillo y rayos que giran y titilan.
   Centrado en la cabeza de la foto (40% del ancho, 22% del alto). */
.about-photo { position: relative; container-type: inline-size; }
.about-photo img { position: relative; z-index: 1; }
.about-halo {
  position: absolute; z-index: 0; pointer-events: none; overflow: visible;
  left: -23%; top: -24%; width: 126%;
  font-size: calc(126cqw / 60 / 0.6); line-height: 1;
}

/* Milagritos: cuelgan de un hilo junto al título, como ofrendas. Se mecen con el scroll y solos. */
.milagro { display: flex; flex-direction: column; align-items: center; align-self: flex-start; margin-top: calc(-1 * var(--space-section)); transform-origin: 50% 0; }
.milagro::before { content: ""; width: var(--line); height: calc(var(--space-section) + var(--space-3)); background: var(--accent); opacity: 0.6; }
.milagro-charm { width: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); height: auto; color: var(--accent); filter: var(--glow); }
:root[data-motion="on"] .milagro {
  transform: rotate(calc(sin(var(--sp, 0) * 40rad) * 5deg));
  animation: pendulum 5s ease-in-out infinite alternate;
}
@keyframes pendulum { from { rotate: -2.5deg; } to { rotate: 2.5deg; } }
.about-photo .detect-label { z-index: 2; }

/* Pausa global de animaciones (footer). */
.motion-toggle {
  min-height: 44px; margin-left: var(--space-3); padding: 0 var(--space-2); background: none; border: 0; cursor: pointer;
  font: inherit; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 0.3em;
}
.motion-toggle:hover { color: var(--accent); }

/* ── Fotos de Carlo en el espacio libre de las secciones ──── */
/* Solo cuando la columna de lectura deja libre la derecha; en móvil no alargan la página. */
.section-photo { display: none; }
@media (min-width: 64rem) {
  .manifesto-short, .work, .events, .friends { position: relative; }
  .section-photo {
    display: block; position: absolute; right: 0; top: calc(var(--space-section) + 7rem);
    width: min(22rem, 100% - var(--measure) - var(--space-6));
  }
  .section-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
  .events .section-photo img, .friends .section-photo img { aspect-ratio: 3 / 2; }
  .section-photo-forest { object-position: 50% 50%; }
  .section-photo-path { object-position: 45% 50%; }
  .section-photo-kitsune { object-position: 70% 50%; }
  .section-photo-axolotl { object-position: 30% 50%; }

  /* Fotos en ASCII (ascii-photo.js): 100 columnas que llenan el ancho de la caja.
     El recorte y el tono salen de site.yaml → photos.*.ascii (npm run ascii-photos). */
  .ascii-photo-figure { container-type: inline-size; }
  .ascii-photo {
    font-size: calc(100cqi / 100 / 0.6); line-height: 1;
    text-shadow: 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent);
    user-select: none; -webkit-user-select: none;
  }
  /* Fotos con otro número de columnas (site.yaml → ascii.cols): letras más grandes, se lee más como ASCII. */
  .ascii-photo[data-cols="60"] { font-size: calc(100cqi / 60 / 0.6); }
  .ascii-photo[data-cols="70"] { font-size: calc(100cqi / 70 / 0.6); }
  .ascii-photo[data-cols="80"] { font-size: calc(100cqi / 80 / 0.6); }
  /* ascii.inverse: letras en papel sobre fondo de acento (5.4:1, pasa AA). Nunca tinta sobre acento. */
  .ascii-photo-inverse { background: var(--accent); color: var(--paper); text-shadow: none; }
  /* Mixed media: la foto real detrás y el sujeto en ASCII encima. */
  .ascii-photo-figure.is-mixed .ascii-photo-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .ascii-photo-figure.is-mixed .ascii-photo { position: relative; }
  /* Mixed "under": el ASCII abajo y la foto con huecos encima (no atrapa el mouse, para que el ASCII reaccione). */
  .ascii-photo-figure .ascii-photo-over { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
}
@media (max-width: 47.99rem) { .site-nav li { flex: none; } }

/* ── La firma se escribe sola al cargar ───────────────────── */
/* Cada trazo se descubre de izquierda a derecha, en orden de escritura:
   triángulo izquierdo, triángulo de arriba, la W con su curva, las letras y el punto.
   Una sola vez y en menos de 5 s; con movimiento reducido, la firma ya está completa. */
@media (prefers-reduced-motion: no-preference) {
  .hero .firma-svg > g > g > g > path { animation: firma-write 650ms var(--ease) both; }
  .hero .firma-svg > g > g > g:nth-child(3) > path { animation-delay: 200ms; }
  .hero .firma-svg > g > g > g:nth-child(2) > path { animation-delay: 550ms; }
  .hero .firma-svg > g > g > g:nth-child(1) > path { animation-delay: 900ms; animation-duration: 800ms; }
  .hero .firma-svg > g > g > g:nth-child(4) > path { animation-delay: 1.45s; animation-duration: 1.1s; animation-timing-function: linear; }
  .hero .firma-svg .firma-dot path { animation: firma-dot 400ms var(--ease) 2.5s both; transform-box: fill-box; transform-origin: center; }
}
@keyframes firma-write {
  from { clip-path: inset(-10% 100% -10% -10%); }
  to   { clip-path: inset(-10% -10% -10% -10%); }
}
@keyframes firma-dot {
  from { scale: 0; }
  70%  { scale: 1.4; }
  to   { scale: 1; }
}

/* ── Nubes ASCII detrás del hero ──────────────────────────── */
.hero-clouds { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-signature, .hero-ascii { z-index: 1; }
.cloud { position: absolute; opacity: 0.4; font-size: clamp(10px, 0.6rem + 0.4vw, 15px); text-shadow: none; }
.cloud-1 { top: 12%; left: 8%; }
.cloud-2 { top: 4%;  left: 52%; }
.cloud-3 { top: 70%; left: 78%; }
:root[data-motion="on"] .cloud { animation: cloud-drift 110s linear infinite; }
:root[data-motion="on"] .cloud-1 { animation-delay: -15s; }
:root[data-motion="on"] .cloud-2 { animation-duration: 150s; animation-delay: -80s; }
:root[data-motion="on"] .cloud-3 { animation-duration: 130s; animation-delay: -95s; }
/* Cada nube conserva su lugar (sin saltos de layout) y cruza de un lado a otro con translate. */
@keyframes cloud-drift { from { translate: -110vw 0; } to { translate: 110vw 0; } }

/* ── Las cajas de detección escanean su foto al aparecer ─── */
:root[data-motion="on"] .detect:not(.hero .detect)::after,
:root[data-motion="on"] .detect:not(.hero .detect) > .detect-label { opacity: 0; }
:root[data-motion="on"] .detect.is-in::after { animation: lock-on 900ms var(--ease) 900ms both; }
:root[data-motion="on"] .detect.is-in > .detect-label { animation: label-in 300ms var(--ease) 1.6s both; }
:root[data-motion="on"] .detect.is-in::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-top: 2px solid var(--accent);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 70%, transparent));
  animation: scan 1.2s var(--ease) both;
}
@keyframes scan {
  from { translate: 0 0; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  to   { translate: 0 100%; opacity: 0; }
}

/* Bienvenida: los botones van alineados con el texto, no a la derecha como en el hero. */
.simple .hero-actions { justify-content: flex-start; margin-top: var(--space-5); }

/* ── Tráiler: fachada click-to-load ───────────────────────── */
.trailer { margin-top: var(--space-5); aspect-ratio: 16 / 9; max-width: 40rem; background: var(--ink); }
.trailer-facade { position: relative; display: block; width: 100%; height: 100%; color: var(--paper); text-decoration: none; }
.trailer-facade picture { display: block; height: 100%; }
.trailer-facade img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.trailer-label {
  position: absolute; left: var(--space-3); bottom: var(--space-3); display: inline-flex; gap: 0.6em; align-items: center;
  padding: var(--space-2) var(--space-3); background: var(--accent); color: var(--paper);
  font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: var(--tracking-mono);
}
.trailer-facade:hover .trailer-label { background: var(--ink); }
.trailer-frame { display: block; width: 100%; height: 100%; border: 0; }

/* ── Press kit ────────────────────────────────────────────── */
.presskit { padding-block: var(--space-6) var(--space-7); display: grid; gap: var(--space-6); }
.presskit > * { max-width: 48rem; }
.presskit h1 { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
.presskit h2 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.presskit-download { margin-top: var(--space-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.presskit-facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-4); }
.presskit-facts dt { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-mono); color: var(--ink-soft); padding-top: 0.35em; }
.presskit-facts dd { margin: 0; }
.presskit-note { font-size: var(--text-xs); letter-spacing: var(--tracking-mono); color: var(--ink-soft); }
.presskit-shown { display: grid; gap: var(--space-1); font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: var(--tracking-mono); }
.presskit-shown span { white-space: nowrap; }
ul.presskit-features { display: grid; gap: var(--space-3); padding-left: var(--space-4); border-left: var(--line) solid var(--accent); }
.presskit-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: var(--space-4); }
.presskit-shots a { display: grid; gap: var(--space-2); text-decoration: none; }
.presskit-shots a > span { font-size: var(--text-xs); text-decoration: underline; text-underline-offset: 0.2em; }
.presskit-shots img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: var(--line) solid var(--rule); }
.presskit-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: var(--space-4); }
.presskit-files li { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.presskit-files li > picture, .presskit-files li > img { align-self: stretch; }
.presskit-files picture { display: block; }
.presskit-files img { display: block; width: 100%; height: 8rem; object-fit: contain; background: var(--paper); border: var(--line) solid var(--rule); padding: var(--space-2); margin-bottom: var(--space-1); }
.presskit-files .on-ink img { background: var(--ink); border-color: var(--ink); }
.presskit-team { display: grid; gap: var(--space-2); }
@media (max-width: 30rem) { .presskit-facts { grid-template-columns: 1fr; gap: 0; } .presskit-facts dd { margin-bottom: var(--space-3); } }

