/* Aideas · «La sala oscura». Tokens de marca (cine oscuro / cine claro, oro). */
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-024F; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #0E0D0B;
  --surface: #17150F;
  --surface-2: #211E17;
  --ink: #EFE9DD;
  --muted: #B8B0A0;
  --accent: #E3B54C;
  --accent-ink: #0E0D0B;
  --paper: #F2EDE3;
  --paper-ink: #16140F;
  --paper-muted: #5E584C;

  --sans: "Space Grotesk", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --t-s: 13px;
  --t-b: 15px;
  --t-m: clamp(18px, 1.5vw, 22px);
  --t-l: clamp(30px, 3.2vw, 46px);
  --m: clamp(20px, 4vw, 56px);
  --gap: clamp(88px, 9vw, 150px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
:root[data-theme="claro"] {
  --bg: #F2EDE3;
  --surface: #E7E0D2;
  --surface-2: #DDD4C2;
  --ink: #16140F;
  --muted: #5E584C;
  --accent: #B8862B;
  --accent-ink: #FFFCF6;
  --paper: #16140F;
  --paper-ink: #F2EDE3;
  --paper-muted: #C9C1B1;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-b)/1.6 var(--sans); }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* botones: un solo tipo, esquinas rectas, oro relleno */
.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; background: var(--accent); color: var(--accent-ink);
  font: 500 var(--t-b)/1 var(--sans); text-decoration: none; border: 0; cursor: pointer; transition: transform .2s var(--ease), background-color .2s; }
.boton:hover { color: var(--accent-ink); transform: translateY(-2px); background: color-mix(in oklab, var(--accent) 88%, var(--ink)); }
.boton:active { transform: translateY(0) scale(.98); }
.enlace { text-decoration: underline; transition: color .2s; }
.tema { background: none; border: 0; color: var(--ink); font: 500 var(--t-s)/1 var(--sans); cursor: pointer; padding: 10px 0; min-height: 44px; }
.tema:hover { color: var(--accent); }

/* ── Hero: tira iluminada, cuatro esquinas ── */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: 44px var(--m); overflow: hidden; }
.hero-arriba, .hero-abajo { display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: var(--t-s); font-weight: 500; }
.marca { font-family: var(--serif); font-style: italic; font-size: var(--t-m); text-decoration: none; letter-spacing: 0; }
.hero-abajo { align-items: end; }
.hero h1 { font-size: clamp(38px, 5.6vw, 88px); font-weight: 300; line-height: .95; letter-spacing: -0.04em; max-width: 9ch; }
.hero .apoyo { font-size: var(--t-b); color: var(--muted); max-width: 36ch; margin-top: 32px; }
.tira-zona { align-self: center; margin: 0 calc(var(--m) * -1); }
.tira { display: flex; gap: 10px; height: 30vh; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--m); scrollbar-width: none; cursor: grab; }
.tira::-webkit-scrollbar { display: none; }
.tira figure { margin: 0; flex: 0 0 auto; height: 100%; scroll-snap-align: center; position: relative; }
.tira img { height: 100%; width: auto; aspect-ratio: 9 / 16; object-fit: cover; filter: brightness(.55); transition: filter .5s var(--ease), transform .5s var(--ease); }
.tira figure.centro img, .tira figure:hover img { filter: brightness(1); }

/* ── Intro: párrafo a la derecha, foto sola ── */
.intro { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: var(--gap) var(--m); }
.intro .declaracion { grid-column: 7 / 13; font-size: var(--t-m); line-height: 1.3; text-indent: 3em; }
.intro .foto { grid-column: 1 / 4; grid-row: 2; margin-top: 48px; }
.intro .foto img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 42%; }
.intro .nota { grid-column: 4 / 7; grid-row: 2; align-self: end; max-width: 30ch; font-size: var(--t-b); color: var(--muted); padding-left: 24px; }

/* ── Vídeos: paneles completos, una fila a media altura ── */
.paneles { position: relative; }
.panel { position: relative; min-height: 86svh; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 48px; padding: 7svh var(--m); text-decoration: none; color: var(--ink); background: var(--bg); }
.panel + .panel { background: var(--surface); }
.panel video { height: 72svh; width: auto; aspect-ratio: 9 / 16; object-fit: cover; filter: brightness(.92); transition: filter .5s var(--ease), transform .8s var(--ease); }
.panel:hover video { filter: brightness(1); transform: scale(1.015); }
.panel .fila { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "t t" "f d" "v v"; column-gap: 32px; row-gap: 20px; align-content: center; }
.panel h2 { grid-area: t; font-size: var(--t-l); max-width: 12ch; }
.panel .fecha { grid-area: f; color: var(--muted); }
.panel .dato { grid-area: d; color: var(--muted); }
.panel .ver { grid-area: v; font-weight: 500; text-decoration: underline; text-underline-offset: .25em; justify-self: start; }
.panel:hover .ver, .panel:hover h2 { color: var(--accent); }

/* ── Archivo: tabla a un solo tamaño ── */
.archivo { padding: var(--gap) 24px; }
.archivo table { width: 100%; border-collapse: collapse; font-size: clamp(17px, 1.6vw, 23px); font-variant-numeric: tabular-nums; }
.archivo caption { text-align: left; }
.archivo th[scope="rowgroup"], .archivo .grupo { text-align: left; font-weight: 400; color: var(--accent); padding: 72px 0 20px; position: sticky; top: 0; background: var(--bg); }
.archivo td { padding: 0; height: 1.5em; vertical-align: baseline; }
.archivo td:nth-child(1) { width: 33%; }
.archivo td:nth-child(2), .archivo td:nth-child(3) { width: 33%; color: var(--muted); }
.archivo td:nth-child(3) { width: auto; }
.archivo td:last-child { text-align: right; white-space: nowrap; }
.archivo a { text-decoration: none; }
.archivo a:hover { color: var(--accent); }
.archivo h2 { font-size: clamp(17px, 1.6vw, 23px); color: var(--accent); }

/* ── Cómo se hace: panel inset con el reel en forma de arco (lo vivo) ── */
.taller { margin: 0 20px; background: var(--surface); min-height: 90svh; position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; }
.taller-izq { padding: 56px; display: flex; flex-direction: column; gap: 40px; }
.taller h2 { font-size: var(--t-l); max-width: 12ch; }
.arco { width: min(30vw, 400px); aspect-ratio: 9 / 13; clip-path: inset(0 round 999px 999px 0 0); overflow: hidden; background: var(--bg); align-self: start; }
.arco video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.taller-der { padding: 56px 56px 56px 0; display: flex; flex-direction: column; gap: 56px; max-width: 520px; justify-self: start; margin-left: 13%; }
.taller h3 { font-size: var(--t-m); font-weight: 400; margin-bottom: 10px; }
.taller p { color: var(--ink); }
.mesa label { display: block; font-weight: 500; margin-bottom: 12px; }
.mesa input[type="range"] { width: 100%; height: 44px; accent-color: var(--accent); cursor: pointer; }
.mesa .palabras { margin-top: 16px; font-size: var(--t-m); line-height: 1.3; min-height: 2.6em; }
.mesa .palabras span { color: var(--muted); transition: color .15s; }
.mesa .palabras span.dicha { color: var(--ink); }
.mesa .palabras span.ahora { color: var(--accent); }
.mesa .tiempo { font-size: var(--t-s); color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 8px; }

/* ── Llamada: una frase, una acción ── */
.llamada { padding: var(--gap) var(--m); display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; }
.llamada p { font-size: var(--t-m); line-height: 1.3; max-width: 26ch; margin-bottom: 24px; }
.llamada img { justify-self: end; width: min(26vw, 340px); aspect-ratio: 9 / 16; object-fit: cover; filter: brightness(.9); }
.llamada .acciones { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

/* ── Contacto: tarjeta sobre la imagen ── */
.contacto { position: relative; min-height: 100svh; overflow: hidden; }
.contacto > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; filter: brightness(.8); }
.tarjeta { position: absolute; top: 60px; right: 60px; width: 380px; background: var(--paper); color: var(--paper-ink); padding: 32px 32px 0; display: flex; flex-direction: column; gap: 16px; }
.tarjeta h2 { font-size: var(--t-m); font-weight: 300; }
.tarjeta p { font-size: var(--t-b); }
.tarjeta dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-variant-numeric: tabular-nums; }
.tarjeta dt { color: var(--paper-muted); }
.tarjeta dd { margin: 0; text-align: right; }
.tarjeta .boton { margin: 16px -32px 0; min-height: 52px; }

/* ── Pie: invertido, nombre a todo lo ancho ── */
.pie { background: var(--paper); color: var(--paper-ink); display: grid; grid-template-rows: auto 160px auto; padding: 40px var(--m) 20px; }
.pie .columnas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; font-size: var(--t-b); }
.pie ul { list-style: none; margin: 0; padding: 0; }
.pie li { color: var(--paper-muted); }
.pie li:first-child { color: var(--paper-ink); font-weight: 500; }
.pie a:hover { color: var(--paper-ink); }
.pie .nombre { font-family: var(--serif); font-style: italic; font-size: 22vw; line-height: .8; letter-spacing: -0.02em; margin: 0 0 20px -0.04em; white-space: nowrap; }
.pie .legal { font-size: var(--t-s); color: var(--paper-muted); }

/* ── Artículo ── */
.barra { display: flex; justify-content: space-between; align-items: center; padding: 28px var(--m); font-size: var(--t-s); font-weight: 500; gap: 24px; }
.barra nav { display: flex; gap: 24px; align-items: center; }
.articulo { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: 80px var(--m) var(--gap); }
.articulo header { grid-column: 1 / 13; margin-bottom: 72px; }
.articulo h1 { font-size: var(--t-l); max-width: 18ch; }
.articulo .entradilla { margin-top: 36px; font-size: var(--t-m); line-height: 1.3; max-width: 34ch; color: var(--muted); }
.articulo .fotogramas { grid-column: 1 / 13; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 120px; }
.articulo .fotogramas figure { margin: 0; }
.articulo .fotogramas img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 62%; }
.articulo .fotogramas figcaption { font-size: var(--t-s); color: var(--muted); margin-top: 10px; }
.articulo .medio { grid-column: 1 / 5; position: sticky; top: 24px; align-self: start; }
.articulo .medio video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: var(--surface); }
.articulo .medio p { font-size: var(--t-s); color: var(--muted); margin-top: 12px; }
.articulo .cuerpo { grid-column: 6 / 12; display: flex; flex-direction: column; gap: 22px; max-width: 64ch; }
.articulo .cuerpo h2 { font-size: var(--t-m); margin-top: 32px; }
.articulo .cuerpo ul { margin: 0; padding-left: 1.2em; }
.articulo .cuerpo li { margin-bottom: 8px; }
.legales { padding: 80px var(--m) var(--gap); max-width: 72ch; display: flex; flex-direction: column; gap: 20px; }
.legales h1 { font-size: var(--t-l); }
.legales h2 { font-size: var(--t-m); margin-top: 24px; }


/* ── Comandos con / ── */
.pagina-comandos { padding: 80px var(--m) var(--gap); }
.pagina-comandos h1 { font-size: var(--t-l); }
.cabecera-comandos { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; min-height: 46svh; }
.cabecera-comandos .boton { margin-top: 32px; }
.teclas { display: flex; align-items: center; gap: 20px; font-family: var(--sans); }
.tecla { display: grid; place-items: center; position: relative; width: clamp(84px, 8vw, 128px); aspect-ratio: 1; background: var(--surface-2); color: var(--ink);
  font-size: var(--t-l); font-weight: 400; border-radius: 18px; border-bottom: 10px solid var(--surface); }
.tecla.ancha { width: clamp(140px, 13vw, 210px); aspect-ratio: auto; height: clamp(84px, 8vw, 128px); font-size: var(--t-m); }
.tecla small { position: absolute; top: 12%; left: 16%; font-size: var(--t-m); color: var(--accent); }
.mas { font-size: var(--t-l); color: var(--muted); }
.intro-grupo { display: grid; grid-template-columns: 1fr minmax(300px, 500px); gap: 48px; align-items: start; }
.menu-ui { max-width: 500px; width: 100%; background: var(--surface); padding: 18px; border-radius: 14px; }
.menu-ui .caja { background: var(--bg); padding: 14px 16px; border-radius: 10px; font-size: var(--t-m); color: var(--accent); display: flex; align-items: center; gap: 2px; }
.menu-ui .cursor { width: 2px; height: 1.1em; background: var(--ink); animation: parpadeo 1s steps(2) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }
.menu-ui ul { list-style: none; margin: 10px 0 0; padding: 0; }
.menu-ui li { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 12px; padding: 9px 16px; border-radius: 8px; }
.menu-ui li:first-child { background: var(--surface-2); }
.menu-ui li span { color: var(--muted); }
.menu-ui .herramienta { margin-top: 12px; padding: 0 16px; color: var(--muted); font-size: var(--t-s); }
.pagina-comandos .entradilla { margin-top: 32px; font-size: var(--t-m); line-height: 1.3; max-width: 34ch; }
.pagina-comandos .actualizado { margin-top: 20px; color: var(--muted); }
.buscador { margin-top: 48px; max-width: 560px; }
.buscador label { display: block; font-weight: 500; margin-bottom: 12px; }
.buscador input { width: 100%; min-height: 48px; padding: 0 18px; background: var(--surface); color: var(--ink); border: 0; font: 400 var(--t-m) var(--sans); }
.buscador input::placeholder { color: var(--muted); }
.buscador input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.buscador .resultado { margin-top: 10px; color: var(--muted); min-height: 1.6em; }
.banda { margin: 120px calc(var(--m) * -1) 0; }
.banda img { width: 100%; height: 46svh; object-fit: cover; object-position: 60% 50%; }
.banda figcaption { padding: 14px var(--m) 0; font-size: var(--t-s); color: var(--muted); }
.saltos { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 40px; font-weight: 500; }
.grupo-comandos { margin-top: 100px; }
.grupo-comandos h2 { font-size: var(--t-l); }
.grupo-comandos .nota { margin-top: 20px; max-width: 64ch; }
.tabla-comandos { width: 100%; margin-top: 32px; border-collapse: collapse; font-size: var(--t-b); }
.tabla-comandos th { text-align: left; font-weight: 500; color: var(--muted); font-size: var(--t-s); padding: 12px 16px; background: var(--surface-2); }
.tabla-comandos td { padding: 11px 16px; vertical-align: top; border-bottom: 1px solid var(--surface-2); }
.tabla-comandos tbody tr:nth-child(even) td { background: var(--surface); }
.tabla-comandos tbody tr:hover td { background: var(--surface-2); }
.tabla-comandos td:first-child { width: 28%; font-weight: 500; white-space: nowrap; }
.tabla-comandos td:last-child, .tabla-comandos th:last-child { width: 22%; color: var(--muted); text-align: right; }
.tabla-comandos .skill { display: inline-block; margin-left: 8px; padding: 1px 8px; font-size: var(--t-s); color: var(--accent); background: color-mix(in oklab, var(--accent) 14%, transparent); border-radius: 99px; font-weight: 500; }
.tabla-comandos tr[hidden], .grupo-comandos[hidden] { display: none; }
@media (max-width: 760px) {
  .pagina-comandos { padding: 48px 20px 120px; }
  .intro-grupo { grid-template-columns: 1fr; gap: 24px; }
  .tabla-comandos thead { display: none; }
  .tabla-comandos tr { display: grid; grid-template-columns: 1fr; padding: 10px 0; }
  .tabla-comandos td { display: block; width: auto !important; padding: 2px 12px; border: 0; white-space: normal !important; }
  .tabla-comandos td:last-child:empty { display: none; }
  .tabla-comandos td:last-child { text-align: left; }
  .grupo-comandos { margin-top: 96px; }
  .cabecera-comandos { grid-template-columns: 1fr; min-height: auto; }
  .teclas { gap: 12px; }
  .tecla { width: 96px; }
  .tecla.ancha { width: 150px; height: 96px; }
}

/* ── Entradas (solo si hay JS y se permite movimiento) ── */
@media (prefers-reduced-motion: no-preference) {
  .js .entra > * { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js .entra.visto > * { opacity: 1; transform: none; }
  .js .entra.visto > *:nth-child(2) { transition-delay: 80ms; }
  .js .entra.visto > *:nth-child(3) { transition-delay: 160ms; }
  .js .entra.visto > *:nth-child(4) { transition-delay: 240ms; }
  .js .entra.visto > *:nth-child(5) { transition-delay: 320ms; }
  .hero .tira-zona { animation: subir 1.1s var(--ease) both; }
  @keyframes subir { from { opacity: 0; transform: translateY(32px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .panel video, .arco video { animation: none; }
}

/* ── Móvil ── */
@media (max-width: 760px) {
  .hero { padding: 20px; grid-template-rows: auto 1fr auto; }
  .tira { height: 46vh; padding: 0 20px; }
  .hero-abajo { flex-direction: column; align-items: flex-start; gap: 20px; }
  .intro { display: flex; flex-direction: column; gap: 28px; padding: 120px 20px; }
  .intro .declaracion { font-size: 22px; text-indent: 0; }
  .intro .fila-m { display: flex; gap: 16px; align-items: flex-end; }
  .intro .foto { margin: 0; width: 62%; margin-left: auto; order: 2; }
  .intro .foto img { aspect-ratio: 4 / 5; }
  .intro .nota { padding: 0; font-size: var(--t-s); }
  .panel { grid-template-columns: 1fr; min-height: auto; padding: 72px 20px; gap: 28px; }
  .panel video { height: auto; width: 78vw; justify-self: end; }
  .panel h2 { font-size: 32px; }
  .archivo { padding: 120px 20px; }
  .archivo table, .archivo tbody, .archivo tr, .archivo td { display: block; width: auto !important; }
  .archivo tr { margin-bottom: 18px; display: grid; grid-template-columns: 1fr auto; }
  .archivo td:nth-child(1) { grid-column: 1 / 3; font-size: 22px; height: auto; }
  .archivo td:nth-child(2), .archivo td:nth-child(3), .archivo td:last-child { font-size: 14px; height: auto; display: inline; }
  .archivo td:nth-child(3) { display: none; }
  .taller { margin: 0 10px; grid-template-columns: 1fr; }
  .taller-izq, .taller-der { padding: 28px 20px; margin: 0; max-width: none; }
  .taller h2 { font-size: 8.5vw; }
  .arco { width: 86vw; margin: 0 auto; order: 3; }
  .taller-izq { display: contents; }
  .llamada { padding: 120px 20px; grid-template-columns: 1fr; }
  .llamada img { justify-self: start; width: 62%; }
  .taller h2, .taller .arco { margin-left: 20px; margin-right: 20px; }
  .taller h2 { padding-top: 28px; }
  .contacto { min-height: auto; padding-bottom: 0; }
  .contacto > img { position: relative; height: 70svh; }
  .tarjeta { position: relative; top: -80px; right: auto; margin: 0 16px; width: auto; }
  .tarjeta .boton { min-height: 56px; }
  .pie .columnas { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .pie .nombre { font-size: 33vw; }
  .articulo { display: flex; flex-direction: column; gap: 40px; padding: 48px 20px 120px; }
  .articulo header { margin: 0; }
  .articulo .medio { position: static; width: 70%; }
  .articulo .fotogramas { grid-template-columns: 1fr 1fr; margin: 0; }
  .barra { padding: 20px; }
  .legales { padding: 48px 20px 120px; }
}
