/*
  Ruse — hoja de estilos
  Las capas fijan el orden de prioridad de forma explícita, así una regla
  de componente nunca pierde contra una de base por culpa de la especificidad.
  Dentro de cada capa se usan clases sueltas (especificidad 0,1,0) siempre que se puede.
*/
@layer reset, base, layout, components, pages, utilities;

/* ---------- Fuentes (alojadas en el propio sitio, OFL) ---------- */
@font-face {
  font-family: "Big Shoulders Stencil";
  src: url("../fonts/big-shoulders-stencil.woff2") format("woff2-variations"),
       url("../fonts/big-shoulders-stencil.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4.woff2") format("woff2-variations"),
       url("../fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-italic.woff2") format("woff2-variations"),
       url("../fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --tarima: #241C17;
  --luz: #FFF1D6;
  --tungsteno: #E9A649;
  --bastidor: #E4E2DC;
  --cinta: #1E3A9E;
  --tiza: #A89C8C;
  --error: #A3271F;
  --texto-suave: #5A4F47;
  --campo: #F2F1ED;

  --stencil: "Big Shoulders Stencil", "Arial Narrow", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  /* Escala 1,25 sobre 18 px */
  --t-xs: 0.8rem;     /* 14,4 */
  --t-s: 1rem;        /* 18 */
  --t-m: 1.25rem;     /* 22,5 */
  --t-l: 1.5625rem;   /* 28 */
  --t-xl: 1.953rem;   /* 35 */
  --t-2xl: 2.441rem;  /* 44 */
  --t-hero: clamp(3.2rem, 1.6rem + 7.2vw, 6.25rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --section-y: clamp(4rem, 9vw, 8rem);
  --measure: 62ch;
  --radius: 2px;

  --focus: var(--cinta);
  color-scheme: light;
}

/* ---------- Reset ---------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset, legend { margin: 0; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  fieldset { border: 0; padding: 0; min-width: 0; }
  legend { padding: 0; }
  img, svg { display: block; max-width: 100%; }
  input, select, textarea, button { font: inherit; color: inherit; }
  [hidden] { display: none !important; }
}

/* ---------- Base ---------- */
@layer base {
  html {
    font-size: 112.5%; /* 18 px */
    scroll-behavior: smooth;
  }
  body {
    background: var(--bastidor);
    color: var(--tarima);
    font-family: var(--serif);
    font-size: var(--t-s);
    line-height: 1.6;
    font-optical-sizing: auto;
    text-rendering: optimizeLegibility;
  }
  h1, h2, h3 {
    font-family: var(--stencil);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: 0.005em;
    text-wrap: balance;
  }
  p { text-wrap: pretty; max-width: var(--measure); }
  a { color: var(--cinta); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
  a:hover { text-decoration-thickness: 2px; }
  :focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: var(--radius);
  }
  ::selection { background: var(--tarima); color: var(--luz); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Layout ---------- */
@layer layout {
  .wrap {
    width: 100%;
    max-width: 78rem;
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  /* Sección con título colgado en las columnas 1–4 y contenido en 5–12 */
  .section {
    padding-block: var(--section-y);
  }
  .section + .section {
    border-top: 1px solid rgb(36 28 23 / 0.18);
  }
  .section__grid {
    display: grid;
    gap: 2rem var(--gutter);
  }
  @media (min-width: 60em) {
    .section__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .section__head { grid-column: 1 / span 4; }
    .section__body { grid-column: 5 / -1; }
  }

  .on-dark {
    --focus: var(--tungsteno);
    background: var(--tarima);
    color: var(--luz);
  }
  .on-dark a { color: var(--luz); }
}

/* ---------- Componentes ---------- */
@layer components {

  /* Saltar al contenido */
  .skip {
    position: absolute;
    left: var(--gutter);
    top: -4rem;
    z-index: 10;
    background: var(--luz);
    color: var(--tarima);
    padding: 0.5rem 1rem;
  }
  .skip:focus { top: 1rem; }

  /* Wordmark provisional */
  .wordmark {
    font-family: var(--stencil);
    font-weight: 800;
    font-size: var(--t-xl);
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
  }

  /* Barra superior */
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1.25rem;
  }

  /* Selector de idioma */
  .lang {
    display: flex;
    gap: 0.25rem;
    font-size: var(--t-xs);
  }
  .lang a {
    display: inline-block;
    padding: 0.35rem 0.5rem;
    text-decoration: none;
    opacity: 0.75;
  }
  .lang a:hover { opacity: 1; text-decoration: underline; }
  .lang abbr { text-decoration: none; }
  .lang a[aria-current="true"] {
    opacity: 1;
    text-decoration: underline;
    text-decoration-thickness: 2px;
  }

  /* Botones */
  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0.7rem 1.4rem;
    border: 0;
    border-radius: var(--radius);
    background: var(--tarima);
    color: var(--luz);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
  }
  .button:hover { background: var(--cinta); }
  .button[disabled], .button[aria-disabled="true"] { cursor: progress; opacity: 0.7; }
  .on-dark .button { background: var(--luz); color: var(--tarima); }
  .on-dark .button:hover { background: var(--tungsteno); }

  /* ---------- Hero: la luz fantasma ---------- */
  .hero {
    --lamp-x: 78%;
    --tx: 0;   /* inclinación horizontal, de -1 a 1 (solo si el visitante la activa) */
    --ty: 0;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    min-height: min(100svh, 56rem);
    display: flex;
    flex-direction: column;
  }
  /* Charco de luz sobre el suelo del escenario, bajo la base del pie */
  .hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: var(--lamp-x);
    bottom: -6rem;
    width: 90rem;
    height: 18rem;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgb(255 214 150 / 0.16), rgb(255 214 150 / 0.05) 55%, transparent);
    pointer-events: none;
  }

  /* Capas, de abajo arriba: texto (1) · tapa (2) · lámpara y halo (3) · «Mira bien» (4) · oscuridad (5) */
  .hero__inner {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 2rem clamp(5rem, 12vw, 9rem);
  }
  .hero__title {
    font-size: var(--t-hero);
    max-width: 11ch;
    text-transform: uppercase;
    line-height: 0.9;
    /* Sombra proyectada por la bombilla, que está arriba a la derecha */
    text-shadow:
      calc(-0.06em + var(--tx) * 0.09em)
      calc(0.07em + var(--ty) * 0.06em)
      0 rgb(0 0 0 / 0.42);
  }
  .hero__lede {
    margin-top: 1.75rem;
    max-width: 38ch;
    font-size: var(--t-m);
    line-height: 1.5;
  }
  .hero__action {
    margin-top: 2.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 2rem;
    max-width: none;
  }

  .lamp {
    position: absolute;
    z-index: 3;
    left: var(--lamp-x);
    bottom: 1.5rem;
    height: min(78%, 36rem);
    aspect-ratio: 120 / 520;
    transform: translateX(-50%);
    pointer-events: none;
  }
  .lamp svg { position: relative; width: 100%; height: 100%; overflow: visible; }
  /* Halo centrado en la bombilla (a 11,5 % de la altura del dibujo). Es luz: se suma a lo que toca. */
  .lamp__glow {
    position: absolute;
    left: 50%;
    top: 11.5%;
    width: 170vmax;
    aspect-ratio: 1;
    translate: calc(-50% + var(--tx) * 5vmax) calc(-50% + var(--ty) * 4vmax);
    background: radial-gradient(closest-side,
      rgb(255 226 170 / 0.42),
      rgb(255 214 150 / 0.2) 16%,
      rgb(255 214 150 / 0.07) 38%,
      transparent 70%);
    mix-blend-mode: screen;
  }
  .lamp__bulb { fill: var(--luz); }
  .lamp__filament { stroke: var(--tungsteno); }
  .lamp__metal { stroke: var(--tiza); fill: none; }
  .lamp__metal-fill { fill: #6E6258; }

  /* Tapa y frase previa: solo existen si hay animación */
  .hero__cover,
  .hero__tease { display: none; }
  .hero__cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--tarima);
    pointer-events: none;
  }
  .hero__tease {
    position: absolute;
    inset: 0;
    z-index: 4;
    align-items: center;
    pointer-events: none;
  }
  .hero__tease p {
    font-family: var(--stencil);
    font-weight: 800;
    font-size: var(--t-hero);
    line-height: 0.9;
    text-transform: uppercase;
    color: var(--luz);
    max-width: 8ch;
    text-shadow: -0.06em 0.07em 0 rgb(0 0 0 / 0.42);
  }

  /* Oscuridad total del escenario */
  .hero__dark {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: var(--tarima);
    opacity: 0;
    pointer-events: none;
  }

  /* Botón opcional para mover la luz con la inclinación del móvil */
  .tilt {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.4rem 0;
    border: 0;
    background: none;
    color: var(--tiza);
    font-size: var(--t-xs);
    text-decoration: underline;
    text-underline-offset: 0.25em;
    cursor: pointer;
  }
  .tilt[aria-pressed="true"] { color: var(--luz); }
  .tilt__status { color: var(--tiza); font-size: var(--t-xs); }

  @media (prefers-reduced-motion: no-preference) {
    .hero__cover { display: block; animation: hero-cover 3.8s both; }
    .hero__tease { display: flex; animation: hero-cover 3.8s both; }
    .hero__dark { animation: stage 3.8s both; }
    .lamp__bulb-group { animation: filament 3.8s both; }

    /* Saltado por el visitante: estado final inmediato */
    .hero.is-skipped .hero__cover,
    .hero.is-skipped .hero__tease { display: none; }
    .hero.is-skipped .hero__dark,
    .hero.is-skipped .lamp__bulb-group { animation: none; }
  }
  /* 0,3 s oscuro · se enciende (2 encendidos) · 1,3 s «Mira bien.» · apagón 0,5 s · luz con el escenario cambiado */
  @keyframes stage {
    0%   { opacity: 1; }
    8%   { opacity: 1; }
    12%  { opacity: 0.45; }
    16%  { opacity: 0.9; }
    32%  { opacity: 0; }
    68%  { opacity: 0; }
    70%  { opacity: 1; }
    82%  { opacity: 1; }
    95%  { opacity: 0; }
    100% { opacity: 0; }
  }
  @keyframes filament {
    0%   { opacity: 0.05; }
    8%   { opacity: 0.05; }
    12%  { opacity: 0.8; }
    16%  { opacity: 0.15; }
    32%  { opacity: 1; }
    68%  { opacity: 1; }
    70%  { opacity: 0; }
    82%  { opacity: 0; }
    88%  { opacity: 1; }
    100% { opacity: 1; }
  }
  /* La tapa y la frase desaparecen durante el apagón */
  @keyframes hero-cover {
    0%, 75% { opacity: 1; visibility: visible; }
    76%, 100% { opacity: 0; visibility: hidden; }
  }

  /* ---------- Entrada de teatro (predicción) ---------- */
  .ticket {
    --paper: var(--bastidor);
    position: relative;
    display: inline-grid;
    grid-template-columns: auto 1fr;
    max-width: 22rem;
    color: var(--tarima);
    line-height: 1.25;
    rotate: -2deg;
  }
  .ticket__stub {
    width: 1.6rem;
    background: var(--paper);
    border-right: 2px dashed rgb(36 28 23 / 0.45); /* perforación */
    border-radius: var(--radius) 0 0 var(--radius);
  }
  .ticket__body {
    background: var(--paper);
    padding: 0.7rem 0.9rem;
    display: grid;
    align-content: center;
    gap: 0.15rem;
    border-radius: 0 var(--radius) var(--radius) 0;
  }
  .ticket__title {
    font-family: var(--stencil);
    font-weight: 800;
    font-size: var(--t-l);
    line-height: 1;
  }
  .ticket__note { font-size: var(--t-xs); font-style: italic; }
  .ticket__reveal { display: none; }

  .ticket.is-open .ticket__sealed { display: none; }
  .ticket.is-open .ticket__reveal { display: block; font-family: var(--stencil); font-weight: 800; font-size: var(--t-xl); line-height: 1; }

  .prediction { padding-block: 0 var(--section-y); }
  .prediction__honest {
    margin-top: 1.5rem;
    color: var(--texto-suave);
    font-size: var(--t-xs);
    max-width: 44ch;
  }
  .prediction .ticket {
    --paper: var(--luz);
    max-width: 26rem;
    rotate: -1deg;
    filter: drop-shadow(-0.2rem 0.3rem 0 rgb(36 28 23 / 0.16));
  }

  @media (prefers-reduced-motion: no-preference) {
    /* Al abrirse, el cuerpo se separa del talón por la perforación */
    .prediction .ticket.is-open .ticket__body { animation: tear 0.9s cubic-bezier(.2,.7,.2,1) both; transform-origin: 0 100%; }
    .prediction .ticket.is-open .ticket__reveal { animation: ink 0.6s 0.35s both; }
  }
  @keyframes tear {
    0%   { transform: none; }
    35%  { transform: translate(0.3rem, -0.1rem) rotate(-1.5deg); }
    100% { transform: translate(0.9rem, 0.35rem) rotate(3deg); }
  }
  @keyframes ink {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  @media (max-width: 47.99em) {
    .hero { --lamp-x: 84%; }
    .lamp { height: min(48%, 20rem); bottom: 1rem; }
    .hero__title,
    .hero__tease p { max-width: none; font-size: min(15.5vw, 4rem); }
    .hero__lede { max-width: 30ch; padding-right: 4.5rem; }
    .hero__action .ticket { max-width: calc(100% - 4rem); }
  }

  /* ---------- Títulos de sección ---------- */
  .section__title {
    font-size: var(--t-2xl);
    max-width: 10ch;
  }
  .section__intro {
    font-size: var(--t-m);
    line-height: 1.5;
  }
  .section__aside {
    margin-top: 1rem;
    color: var(--texto-suave);
  }

  /* ---------- Principios ---------- */
  .principles {
    display: grid;
    gap: 2.5rem;
    margin-top: 3rem;
  }
  .principle__title {
    font-family: var(--serif);
    font-size: var(--t-l);
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: 0;
  }
  .principle__text { margin-top: 0.6rem; }

  /* ---------- Lo que viene: baúles cerrados con luz por la junta ---------- */
  .pieces { border-top: 2px solid currentColor; }
  .piece {
    position: relative;
    display: grid;
    gap: 0.5rem 2rem;
    padding-block: 1.75rem;
    border-bottom: 1px solid rgb(36 28 23 / 0.25);
  }
  .on-dark .piece { border-bottom-color: rgb(255 241 214 / 0.22); }
  @media (min-width: 40em) {
    .piece { grid-template-columns: minmax(0, 1fr) auto; }
    .piece__status { grid-column: 2; grid-row: 1; }
  }
  /* La junta (línea) y la luz que se escapa por debajo (halo) */
  .piece::before,
  .piece::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
  }
  .piece::before {
    top: -2px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--tungsteno) 20%, #FFE2AA 50%, var(--tungsteno) 80%, transparent);
    transform: scaleX(0);
    opacity: 0;
  }
  .piece::after {
    top: 0;
    height: 3.5rem;
    background: radial-gradient(60% 100% at 50% 0, rgb(233 166 73 / 0.22), transparent 75%);
    opacity: 0;
  }
  .pieces.is-lit .piece::before { transform: scaleX(1); opacity: 0.85; }
  .pieces.is-lit .piece::after { opacity: 1; }
  @media (prefers-reduced-motion: no-preference) {
    .piece::before { transition: transform 1.1s cubic-bezier(.2,.7,.2,1) calc(var(--i, 0) * 0.35s), opacity 0.4s calc(var(--i, 0) * 0.35s); }
    .piece::after { transition: opacity 1.4s calc(var(--i, 0) * 0.35s + 0.3s); }
  }
  @media (prefers-reduced-motion: reduce) {
    .piece::before { transform: scaleX(1); opacity: 0.85; }
    .piece::after { opacity: 1; }
  }
  .piece__title {
    font-family: var(--serif);
    font-size: var(--t-l);
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: 0;
  }
  .piece__text { grid-column: 1; }
  .piece__status {
    align-self: start;
    font-style: italic;
    color: var(--texto-suave);
  }
  .on-dark .piece__status,
  .on-dark .section__aside,
  .on-dark .industry { color: var(--tiza); }
  .industry {
    margin-top: 2rem;
    color: var(--texto-suave);
  }

  /* ---------- Formulario ---------- */
  .form { display: grid; gap: 1.75rem; }
  .form__row { display: grid; gap: 1.75rem; }
  @media (min-width: 40em) {
    .form__row { grid-template-columns: 1fr 1fr; }
  }
  .field { display: grid; gap: 0.4rem; align-content: start; }
  .field__label, .group__legend {
    font-weight: 600;
    line-height: 1.3;
  }
  .field__hint {
    font-size: var(--t-xs);
    color: var(--texto-suave);
    line-height: 1.4;
  }
  .field__optional { font-weight: 400; color: var(--texto-suave); }

  .input {
    width: 100%;
    min-height: 3rem;
    padding: 0.6rem 0.8rem;
    border: 1.5px solid var(--texto-suave);
    border-radius: var(--radius);
    background: var(--campo);
    color: var(--tarima);
  }
  .input:hover { border-color: var(--tarima); }
  .input:focus-visible { outline-offset: 1px; border-color: var(--cinta); }
  select.input {
    appearance: none;
    padding-right: 2.5rem;
    background-image: linear-gradient(45deg, transparent 50%, var(--tarima) 50%),
                      linear-gradient(135deg, var(--tarima) 50%, transparent 50%);
    background-position: calc(100% - 1.15rem) 55%, calc(100% - 0.8rem) 55%;
    background-size: 0.35rem 0.35rem;
    background-repeat: no-repeat;
  }
  .input[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }

  .field__error {
    color: var(--error);
    font-size: var(--t-xs);
    font-weight: 600;
    line-height: 1.4;
  }

  .group { display: grid; gap: 0.5rem; align-content: start; }
  .group__legend { margin-bottom: 0.4rem; }
  .group__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.5rem;
  }
  .choice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    min-height: 2.25rem;
    padding-block: 0.25rem;
    line-height: 1.45;
    cursor: pointer;
  }
  .choice input {
    flex: none;
    width: 1.2rem;
    height: 1.2rem;
    margin: 0.15rem 0 0;
    accent-color: var(--cinta);
    cursor: pointer;
  }
  .group[aria-invalid="true"] .group__legend,
  .choice--invalid { color: var(--error); }

  .beta-toggle {
    padding: 1.1rem 1.2rem;
    border: 1.5px solid var(--tarima);
    border-radius: var(--radius);
    font-weight: 600;
  }
  .beta {
    display: grid;
    gap: 1.75rem;
    padding: 1.5rem 1.2rem 1.75rem;
    margin-top: -1.75rem; /* se une visualmente a la casilla que lo despliega */
    border: 1.5px solid var(--tarima);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: rgb(255 255 255 / 0.25);
  }
  .beta-toggle:has(input:checked) { border-radius: var(--radius) var(--radius) 0 0; }
  .beta__intro { color: var(--texto-suave); }

  .form__note { color: var(--texto-suave); font-size: var(--t-xs); }
  .form__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
  }

  /* Honeypot: fuera de la vista y del árbol de accesibilidad */
  .trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  /* Hueco para Cloudflare Turnstile */
  .turnstile:empty { display: none; }

  /* Mensajes de estado del envío */
  .status {
    padding: 1rem 1.2rem;
    border-left: 4px solid currentColor;
    background: rgb(255 255 255 / 0.45);
  }
  .status:empty { display: none; }
  .status--error { color: var(--error); }
  .status--error p { color: var(--tarima); }
  .status--success { color: var(--cinta); }
  .status--success p { color: var(--tarima); }
  .status__title { font-weight: 700; }
  .status__title + p { margin-top: 0.3rem; }

  .spinner {
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
  }
  @media (prefers-reduced-motion: no-preference) {
    .spinner { animation: spin 0.8s linear infinite; }
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  .waitlist-root { position: relative; }
  .waitlist-root::after {
    content: "";
    position: absolute;
    inset: -1rem;
    background: var(--tarima);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s;
  }
  .waitlist-root.is-blackout::after { opacity: 1; transition-duration: 0.12s; }

  .success-panel {
    display: grid;
    gap: 1rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: var(--tarima) radial-gradient(80% 120% at 85% 0, rgb(255 214 150 / 0.16), transparent 70%);
    color: var(--luz);
    border-radius: var(--radius);
  }
  .success-panel p { max-width: 52ch; }
  .success-panel__title {
    font-size: var(--t-2xl);
    text-shadow: -0.06em 0.07em 0 rgb(0 0 0 / 0.42);
  }
  .success-panel .button { background: var(--luz); color: var(--tarima); }
  .success-panel .button:hover { background: var(--tungsteno); }
  .success-panel :focus-visible { outline-color: var(--tungsteno); }

  /* ---------- Pie ---------- */
  .footer { padding-block: 3rem 2.5rem; }
  .footer__grid {
    display: grid;
    gap: 2rem var(--gutter);
  }
  @media (min-width: 60em) {
    .footer__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
    .footer__brand { grid-column: 1 / span 4; }
    .footer__nav { grid-column: 5 / span 5; }
    .footer__lang { grid-column: 10 / -1; justify-self: end; }
  }
  .footer__brand p { color: var(--tiza); margin-top: 0.5rem; font-size: var(--t-xs); }
  .footer__nav ul { display: grid; gap: 0.4rem; }
  .footer__legal {
    margin-top: 3rem;
    color: var(--tiza);
    font-size: var(--t-xs);
  }
}

/* ---------- Páginas legales ---------- */
@layer pages {
  .legal-head { padding-bottom: 3rem; }
  .legal-head .topbar { margin-bottom: 3rem; }
  .legal-head h1 { font-size: var(--t-2xl); }
  .legal-head p { margin-top: 1rem; color: var(--tiza); }

  .legal { padding-block: 3rem var(--section-y); }
  .legal__body { max-width: var(--measure); }
  .legal__body h2 {
    font-size: var(--t-xl);
    margin-top: 3rem;
    margin-bottom: 0.75rem;
  }
  .legal__body h2:first-child { margin-top: 0; }
  .legal__body p + p,
  .legal__body p + ul,
  .legal__body ul + p { margin-top: 1rem; }
  .legal__body ul { padding-left: 1.2rem; }
  .legal__body li + li { margin-top: 0.4rem; }
  .legal__body dl { display: grid; gap: 0.75rem; }
  .legal__body dt { font-weight: 650; }
  .legal__body dd { margin-left: 0; }

  /* Datos de relleno, bien visibles para que nadie publique sin cambiarlos */
  .placeholder {
    background: #F4E3A1;
    color: var(--tarima);
    padding: 0 0.2em;
    outline: 1px dashed #8A6D00;
  }
  .placeholder-banner {
    padding: 1rem 1.2rem;
    border: 1.5px dashed #8A6D00;
    background: #F4E3A1;
    margin-bottom: 3rem;
  }
}

/* ---------- Utilidades ---------- */
@layer utilities {
  .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}
