/*
 * alteago.com: la hoja de estilos de la web pública.
 *
 * Los valores de `:root` salen de `game/design/projects/altea/tokens.json`: la web viste como el juego. Todo color y
 * toda medida se escriben una vez aquí y el resto usa `var()`. Las capas van de lo que hace falta para leer, moverse y
 * jugar (reset, base, layout, components) a lo que solo adorna (motion): entradas, flotaciones, efectos al pasar el
 * ratón y al hacer scroll. Sin `motion` la página es la misma, quieta; con `prefers-reduced-motion` se apaga entera.
 *
 * La idea madre es «Altea es el tablero»: el camino de piedras de la ilustración une las secciones, los móviles son
 * las fichas y las pegatinas, las chapas del juego.
 */

@layer reset, base, layout, components, motion;

@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

@font-face {
  font-family: "Comic Kids";
  src: url("/fonts/ComicKids.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;

  --color-accent: #ffc21a;
  --color-accent-dark: #e59a00;
  --color-accent-soft: #fff5d6;
  --color-bg: #eef6ff;
  --color-border: #d9e6f7;
  --color-danger: #e5484d;
  /* El celeste de arriba del cielo en el hero y en la cabecera de las páginas interiores. */
  --color-dawn: #dcecff;
  /* El `color-muted` del juego (#6b7c9c) no llega al contraste AA sobre blanco (4,2:1); aquí va más oscuro (5,6:1). */
  --color-muted: #56688a;
  --color-muted-soft: #eef2f8;
  --color-navy: #0f2a5c;
  --color-on-primary: #ffffff;
  --color-primary: #0067b5;
  --color-primary-dark: #003b7f;
  --color-primary-soft: #e4efff;
  --color-sky: #cfe3ff;
  --color-success: #23a455;
  --color-success-soft: #e2f7e8;
  --color-surface: #ffffff;
  --color-surface-2: #f5f9ff;
  --color-text: #1b2c4f;

  --font-base: "Nunito", system-ui, sans-serif;
  --font-display: "Comic Kids", "Nunito", system-ui, sans-serif;
  --size-xs: 12px;
  --size-sm: 14px;
  --size-md: 16px;
  --size-lg: 18px;
  --size-xl: 22px;
  --size-2xl: 30px;
  --weight-bold: 800;
  --line-height: 1.45;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --shadow-card: 0 6px 18px #1f5fc41f;
  --shadow-lip: 0 4px 0 #003b7f;
  --shadow-lip-accent: 0 4px 0 #e59a00;
  --shadow-lip-light: 0 3px 0 #d0def2;
  --shadow-nav: 0 -6px 20px #1f5fc41a;
  --shadow-raised: 0 10px 24px #1f5fc433;

  --size-touch: 48px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;

  --wrap: 72rem;
  --gutter: 16px;
  --wave: 56px;

  /* Movimiento: una curva con rebote para lo que salta y dos duraciones. */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.18s;
  --dur: 0.35s;
  --dots: radial-gradient(circle, var(--color-border) 1.3px, transparent 1.7px);
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; }
  img, svg { display: block; max-width: 100%; height: auto; }
  h1, h2, h3, p, figure { margin: 0; }
  ul[class], ol[class], nav ul { margin: 0; padding: 0; list-style: none; }
  a { color: inherit; }
  button { font: inherit; }
}

@layer base {
  html {
    font-family: var(--font-base);
    font-size: 100%;
    line-height: var(--line-height);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Que el foco y las anclas no queden bajo la cabecera pegajosa ni bajo la barra de jugar. */
    scroll-padding-block: 100px 90px;
  }
  body { min-height: 100dvh; display: flex; flex-direction: column; }
  .main { flex: 1 0 auto; }

  .display {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-navy);
    letter-spacing: 0.01em;
    text-wrap: balance;
  }
  h1.display { font-size: clamp(2.2rem, 5vw + 1rem, 3.6rem); }
  h2.display { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.4rem); }
  /* El subrayado a mano bajo los títulos: un trazo amarillo dibujado en SVG, del ancho de una palabra. */
  h1.display, h2.display {
    padding-bottom: 0.35em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8C40 2 80 11 120 6S180 3 197 7' fill='none' stroke='%23ffc21a' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 100% / 4.5em 0.3em;
  }
  h3 { font-size: var(--size-lg); font-weight: var(--weight-bold); color: var(--color-navy); }
  p { max-width: 65ch; text-wrap: pretty; }
  .lead { font-size: var(--size-lg); }
  .kicker {
    font-size: var(--size-sm);
    font-weight: var(--weight-bold);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .kicker::before { content: "★ " / ""; color: var(--color-accent-dark); }
  /* Los enlaces del texto, sin subrayado y en el azul oscuro de la marca (#003b7f); al pasar, el azul de los botones. */
  a { color: var(--color-primary-dark); text-decoration: none; }
  a:hover { color: var(--color-primary); }
  :focus-visible { outline: 3px solid var(--color-accent-dark); outline-offset: 3px; border-radius: var(--radius-sm); }
  /* Lo que solo oye el lector de pantalla: la etiqueta de un icono, el nombre del comercio tras «Cómo llegar». */
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .skip {
    position: absolute;
    top: -100px;
    left: var(--gutter);
    z-index: 100;
    padding: 0.6em 1em;
    border-radius: var(--radius-pill);
    background: var(--color-navy);
    color: var(--color-on-primary);
  }
  .skip:focus { top: var(--gutter); }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
  }
}

@layer layout {
  .wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
  .section { position: relative; padding-block: clamp(2.5rem, 6vw, 5rem); }
  .section > .wrap > * + * { margin-top: var(--space-lg); }
  .section--white { background-color: var(--color-surface); }
  .section--dots { background-image: var(--dots); background-size: 22px 22px; }

  .hero {
    position: relative;
    overflow: hidden;
    /* Arriba poco aire: el logo grande ya lo trae. */
    padding-block: clamp(1.25rem, 2.5vw, 2rem) calc(clamp(1.5rem, 5vw, 4rem) + var(--wave));
    background: linear-gradient(180deg, var(--color-dawn) 0%, var(--color-bg) 70%);
  }
  .hero__decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
  /* En móvil no hay sol: la esquina de arriba es del logo. En escritorio se asoma por la derecha. */
  .hero__sun { display: none; position: absolute; top: -70px; right: -60px; width: 260px; color: var(--color-accent); }
  @media (min-width: 60rem) {
    .hero__sun { display: block; }
  }
  .hero__cloud { position: absolute; width: 150px; color: var(--color-surface); filter: drop-shadow(0 8px 12px #1f5fc426); }
  .hero__cloud--1 { top: 10%; left: -170px; }
  .hero__cloud--2 { top: 58%; left: -240px; width: 110px; }
  /* En móvil va el logo, debajo el escenario y al final el texto; en escritorio el logo corona el texto a la izquierda
   * y el escenario ocupa la derecha. El orden del documento sigue siendo logo, texto, escenario. En la portada de
   * escritorio el logo no es este, sino el de la cabecera, que cuelga sobre el hero (ver `.brand`). */
  .hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-areas: "logo" "art" "copy";
    gap: calc(var(--space-xl) + var(--space-lg)) var(--space-xl);
    align-items: center;
  }
  .hero__logo { grid-area: logo; justify-self: center; width: min(60vw, 270px); }
  .hero__logo img { display: block; }
  /* El margen es para la pegatina que cuelga por debajo del escenario. */
  .hero__copy { grid-area: copy; margin-top: var(--space-xl); }
  .hero__copy > * + * { margin-top: var(--space-md); }
  .hero__cta { margin-top: var(--space-lg); }
  .hero__note { font-size: var(--size-sm); color: var(--color-text); }
  .hero__art { grid-area: art; justify-self: center; width: min(78vw, 400px); }
  /* El escenario: la ilustración detrás, un móvil delante, dos pegatinas y tres fichas flotando. */
  .hero__stage { position: relative; aspect-ratio: 4 / 5; }
  .hero__illus {
    position: absolute;
    inset: 0 auto 0 0;
    width: 84%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 12%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-raised);
    rotate: -4deg;
  }
  @media (min-width: 60rem) {
    .hero__grid { grid-template-columns: 1.1fr 0.9fr; grid-template-areas: "logo art" "copy art"; row-gap: var(--space-lg); }
    .hero__logo { justify-self: start; }
    .hero__copy { margin-top: 0; }
    /* El escenario se apoya abajo y baja un poco más que el botón; el logo queda arriba solo. */
    .hero__art { align-self: end; width: min(100%, 440px); translate: 0 var(--space-xl); }
    /* En la portada el logo grande cuelga de la cabecera y el del hero sobra. El texto empieza debajo del logo: 142 px
     * son lo que el logo baja dentro del hero más un respiro. El escenario arranca arriba, a su altura. */
    .page--portada .hero__logo { display: none; }
    .page--portada .hero__grid { grid-template-areas: "copy art"; align-items: start; }
    .page--portada .hero__copy { margin-top: 142px; }
    .page--portada .hero__art { align-self: start; translate: 0 var(--space-lg); }
  }

  /* Las páginas interiores: el mismo cielo, más bajo, con el título a la izquierda y el escenario de cada página a la
   * derecha. Las legales no llevan escenario y el texto ocupa una columna de lectura. */
  .pagehead {
    position: relative;
    overflow: hidden;
    padding-block: clamp(1.5rem, 4vw, 3rem) calc(clamp(1.5rem, 4vw, 3rem) + var(--wave));
    background: linear-gradient(180deg, var(--color-dawn) 0%, var(--color-bg) 70%);
  }
  .pagehead__sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
  .pagehead__sun { position: absolute; top: -130px; right: -120px; width: 220px; color: var(--color-accent); }
  .pagehead__grid { position: relative; z-index: 1; display: grid; gap: var(--space-xl); align-items: center; }
  .pagehead__copy > * + * { margin-top: var(--space-md); }
  /* En móvil el escenario es pequeño: acompaña al título sin empujar el contenido una pantalla más abajo. */
  .pagehead__art { justify-self: center; width: min(56vw, 230px); }
  @media (min-width: 60rem) {
    .pagehead__sun { top: -90px; right: -80px; width: 240px; }
    .pagehead__grid { grid-template-columns: 1.15fr 0.85fr; }
    .pagehead--plain .pagehead__grid { grid-template-columns: minmax(0, 50rem); }
    .pagehead__art { width: min(100%, 360px); }
  }
}

@layer components {
  /* Cabecera */
  .site-header {
    z-index: 50;
    background: color-mix(in oklab, var(--color-surface) 92%, transparent);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(10px);
  }
  .site-header__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-md);
    min-height: 72px;
    padding-block: var(--space-sm);
  }
  .brand img { width: 64px; height: auto; }
  /* `min-width: 0`: sin él, el ítem flexible crece hasta el ancho de sus tres enlaces y desborda la página a 320 px. */
  .site-nav { order: 10; flex: 1 0 100%; min-width: 0; }
  .site-nav ul { display: flex; gap: var(--space-xs); overflow-x: auto; scrollbar-width: none; }
  .site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 0.8em;
    border-radius: var(--radius-pill);
    color: var(--color-navy);
    font-weight: var(--weight-bold);
    text-decoration: none;
    white-space: nowrap;
    background-image: linear-gradient(var(--color-accent), var(--color-accent));
    background-repeat: no-repeat;
    background-size: 0 3px;
    background-position: 0.8em calc(100% - 7px);
  }
  .site-nav a:hover, .site-nav a[aria-current] { background-color: var(--color-primary-soft); color: var(--color-primary-dark); }
  .langs { margin-inline-start: auto; }
  .langs ul { display: flex; gap: 2px; }
  .langs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    border-radius: var(--radius-pill);
    color: var(--color-muted);
    font-size: var(--size-sm);
    font-weight: var(--weight-bold);
    text-decoration: none;
  }
  .langs a:hover { color: var(--color-primary-dark); background: var(--color-primary-soft); }
  .langs a[aria-current] { background: var(--color-navy); color: var(--color-on-primary); }
  /* En móvil el botón de jugar vive en la barra fija de abajo; con la clase sola, `.btn` lo volvería a enseñar. */
  .site-header .site-header__play { display: none; }
  /* En la portada la marca es el logo grande del hero: el de la cabecera sale al bajar (clase que pone site.js). */
  html:not(.is-scrolled) .page--portada .site-header .brand { display: none; }
  @media (min-width: 48rem) {
    .site-header { position: sticky; top: 0; }
    .brand img { width: 88px; }
    .site-nav { order: 0; flex: 0 1 auto; margin-inline-start: var(--space-md); }
    .site-header .site-header__play { display: inline-flex; }
  }
  /* En escritorio, en la portada y arriba del todo, la marca es el logo grande: cuelga de la cabecera sobre el cielo
   * del hero, como en la captura de Carlos, y al bajar se encoge hasta el de siempre. La caja mide lo que el logo de
   * las otras páginas, para que la barra no crezca y el logo sobresalga por debajo. */
  @media (min-width: 60rem) {
    html:not(.is-scrolled) .page--portada .site-header .brand { display: block; width: 203px; height: 88px; }
    html:not(.is-scrolled) .page--portada .brand img { width: 228px; max-width: none; margin: 22px 0 0 12px; }
  }

  /* Botones */
  .btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    min-height: var(--size-touch);
    padding: 0.6em 1.4em;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-weight: var(--weight-bold);
    text-decoration: none;
    box-shadow: var(--shadow-lip);
  }
  .btn--play { overflow: hidden; background: var(--color-accent); color: var(--color-navy); box-shadow: var(--shadow-lip-accent); }
  /* El brillo que cruza el botón amarillo al pasar el ratón. */
  .btn--play::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(100deg, #ffffff00, #ffffffa6, #ffffff00);
    pointer-events: none;
  }
  .btn--big { padding: 0.7em 1.8em; font-size: var(--size-xl); }
  .btn--small { min-height: 40px; padding: 0.4em 1.1em; font-size: var(--size-sm); }
  .btn--light { background: var(--color-surface); color: var(--color-primary-dark); box-shadow: var(--shadow-lip-light); }

  /* Pegatinas, fichas y adornos */
  .sticker {
    position: absolute;
    z-index: 3;
    display: inline-block;
    padding: 0.3em 0.9em;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
    color: var(--color-navy);
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 3px 0 var(--color-accent-dark);
    rotate: -8deg;
  }
  /* Cinco pegatinas alrededor del escenario, en tres colores, y tres fichas entre ellas. */
  .sticker--1 { top: 2%; left: -6%; }
  .sticker--2 { top: 15%; right: -5%; rotate: 7deg; }
  .sticker--3 { top: 40%; right: -8%; rotate: -6deg; }
  .sticker--4 { bottom: 6%; left: -6%; rotate: 5deg; }
  .sticker--5 { bottom: -5%; right: 14%; rotate: -4deg; }
  .sticker--2, .sticker--4 { background: var(--color-surface); color: var(--color-primary-dark); box-shadow: var(--shadow-lip-light); }
  .sticker--3 { background: var(--color-primary); color: var(--color-on-primary); box-shadow: var(--shadow-lip); }
  .float { position: absolute; z-index: 2; width: 52px; height: auto; filter: drop-shadow(0 6px 8px #0f2a5c33); }
  .float--coin { top: -5%; right: 22%; }
  .float--star { top: 86%; left: 46%; width: 46px; }
  .float--pin { top: 60%; right: 4%; width: 40px; }
  .deco { position: absolute; z-index: 0; width: 64px; height: auto; pointer-events: none; filter: drop-shadow(0 6px 8px #0f2a5c22); }
  .deco--about { top: 28px; right: 6%; rotate: 12deg; }
  .deco--sponsors { top: 24px; right: 8%; rotate: -10deg; }

  /* La silueta de móvil: marco oscuro, isla, botones laterales y un reflejo. Dentro, la captura. */
  .phone {
    position: relative;
    aspect-ratio: 9 / 19;
    padding: 8px;
    border-radius: 38px;
    background: linear-gradient(160deg, #2b4878 0%, var(--color-navy) 55%, #223d6b 100%);
    box-shadow: inset 0 0 0 1.5px #52699a, 0 24px 40px -16px #0f2a5ca6;
  }
  .phone::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 50%;
    z-index: 2;
    width: 30%;
    height: 15px;
    translate: -50% 0;
    border-radius: var(--radius-pill);
    background: #08162f;
  }
  .phone::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    background: linear-gradient(110deg, #ffffff38 0%, #ffffff00 36%);
    pointer-events: none;
  }
  .phone__screen { position: relative; height: 100%; overflow: hidden; border-radius: 30px; background: var(--color-surface); }
  .phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
  .phone__buttons::before, .phone__buttons::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #1b355f; }
  .phone__buttons::before { left: -3px; top: 20%; height: 56px; box-shadow: 0 68px 0 #1b355f; }
  .phone__buttons::after { right: -3px; top: 28%; height: 48px; }
  /* El móvil del hero va a la izquierda, delante de la foto, para que la iglesia quede a la vista a la derecha. Vive
   * aquí y no en `layout` porque `.phone` fija `position: relative` en esta capa y una capa anterior no lo ganaría. */
  .phone--hero { position: absolute; left: -3%; top: 5%; width: 46%; rotate: 6deg; }

  /* Los escenarios de las cabeceras interiores. Para comercios: dos móviles, la lista detrás y la ficha delante. */
  .duo { position: relative; aspect-ratio: 5 / 5.4; }
  .phone--back { position: absolute; left: 0; top: 8%; width: 46%; rotate: -8deg; }
  .phone--front { position: absolute; right: 2%; top: 0; z-index: 1; width: 50%; rotate: 5deg; }
  .sticker--duo-1 { top: 12%; left: -10%; rotate: -8deg; }
  .sticker--duo-2 { top: 44%; right: -12%; rotate: 6deg; background: var(--color-surface); color: var(--color-primary-dark); box-shadow: var(--shadow-lip-light); }
  .sticker--duo-3 { bottom: 2%; left: 4%; rotate: -4deg; background: var(--color-primary); color: var(--color-on-primary); box-shadow: var(--shadow-lip); }
  .duo .float--qr { top: -6%; left: 34%; width: 46px; }
  .duo .float--pin { top: auto; bottom: 18%; right: -2%; }
  /* Comercios: el icono de la tienda con las chapas de los logos de verdad alrededor. */
  .shopstage { position: relative; aspect-ratio: 1; }
  .shopstage__icon {
    position: absolute;
    inset: 16%;
    width: 68%;
    padding: 11%;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow-lip-light), var(--shadow-raised);
    rotate: -6deg;
  }
  .chapa {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34%;
    aspect-ratio: 1;
    padding: 6%;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow-lip-light), var(--shadow-card);
  }
  .chapa img { width: 100%; height: 100%; object-fit: contain; }
  .chapa--1 { top: -2%; left: -2%; rotate: -10deg; }
  .chapa--2 { top: 6%; right: -4%; width: 28%; rotate: 8deg; }
  .chapa--3 { bottom: -2%; left: 30%; width: 30%; rotate: -4deg; }
  .shopstage .float--coin { top: auto; bottom: 10%; right: 2%; }
  .shopstage .float--pin { top: 46%; left: -6%; }
  /* Preguntas: un interrogante grande en una piedra amarilla y una exclamación azul. */
  .qstage { position: relative; aspect-ratio: 1; }
  .qstage__mark {
    position: absolute;
    inset: 10% 20% 12% 10%;
    display: grid;
    place-items: center;
    border-radius: 46% 54% 50% 50% / 56% 48% 52% 44%;
    background: var(--color-accent);
    color: var(--color-navy);
    font-family: var(--font-display);
    font-size: clamp(7rem, 26vw, 11rem);
    line-height: 1;
    box-shadow: 0 10px 0 var(--color-accent-dark), var(--shadow-raised);
    rotate: -8deg;
  }
  .qstage__mark--small {
    inset: auto 0 2% auto;
    width: 36%;
    aspect-ratio: 1;
    font-size: clamp(3rem, 10vw, 4.5rem);
    background: var(--color-primary);
    color: var(--color-on-primary);
    box-shadow: 0 6px 0 var(--color-primary-dark), var(--shadow-raised);
    rotate: 12deg;
  }
  .qstage .float--star { top: -2%; left: 0; width: 52px; }
  .qstage .float--tick { top: 6%; right: 8%; width: 46px; }

  /* Las olas entre secciones: el SVG mide el doble y se desplaza la mitad, así el agua no para. */
  .wave-wrap { position: absolute; inset-inline: 0; z-index: 1; height: var(--wave); overflow: hidden; line-height: 0; pointer-events: none; }
  .wave-wrap--bottom { bottom: -1px; }
  .wave-wrap--top { top: -1px; scale: 1 -1; }
  /* `max-width: none`: el reset limita los SVG al 100 % y la ola, que mide el doble para desplazarse, se cortaría. */
  .wave-wrap svg { display: block; width: 200%; max-width: none; height: 100%; }
  .wave-wrap--white { color: var(--color-surface); }
  .wave-wrap--bg { color: var(--color-bg); }
  .wave-wrap--navy { color: var(--color-navy); }

  /* Tarjetas */
  .cards { display: grid; gap: var(--space-lg) var(--space-md); padding-top: 26px; }
  .card {
    position: relative;
    padding: calc(var(--space-lg) + 12px) var(--space-lg) var(--space-lg);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
  }
  .card > * + * { margin-top: var(--space-sm); }
  .card__icon {
    position: absolute;
    top: -26px;
    right: var(--space-lg);
    width: 64px;
    height: 64px;
    padding: 10px;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow-lip-light), var(--shadow-card);
    rotate: 8deg;
  }
  .cards > li:nth-child(3n + 1) { background: linear-gradient(180deg, var(--color-surface) 45%, var(--color-primary-soft)); }
  .cards > li:nth-child(3n + 2) { background: linear-gradient(180deg, var(--color-surface) 45%, var(--color-accent-soft)); }
  .cards > li:nth-child(3n) { background: linear-gradient(180deg, var(--color-surface) 45%, var(--color-success-soft)); }
  @media (min-width: 40rem) {
    .cards { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
  }
  /* Con más de una fila, aire para que el icono de abajo no toque la tarjeta de arriba. */
  .cards--benefits { row-gap: calc(var(--space-xl) + 8px); }
  @media (min-width: 64rem) {
    .cards--benefits { grid-template-columns: repeat(3, 1fr); }
  }
  /* Lo que aún no está en producción: su pegatina y el icono apagado. */
  .card__tag {
    position: absolute;
    top: -14px;
    left: var(--space-lg);
    padding: 0.2em 0.9em;
    border-radius: var(--radius-pill);
    background: var(--color-navy);
    color: var(--color-on-primary);
    font-family: var(--font-display);
    font-size: var(--size-sm);
    box-shadow: var(--shadow-lip);
    rotate: -5deg;
  }
  .card--soon .card__icon { filter: saturate(0.35); }

  /* Pasos: casillas sobre el camino de piedras */
  .steps { view-timeline: --steps block; }
  .steps__board { position: relative; }
  .steps__path { position: absolute; left: 0; right: 0; top: -10px; z-index: 0; display: none; width: 100%; height: auto; pointer-events: none; }
  .steps__list { position: relative; z-index: 1; display: grid; gap: var(--space-xl) var(--space-md); padding-top: 22px; }
  .step {
    position: relative;
    padding: calc(var(--space-lg) + 18px) var(--space-lg) var(--space-lg);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
  }
  .step > * + * { margin-top: var(--space-sm); }
  /* En una columna, tres piedras unen cada casilla con la siguiente. */
  .step + .step::before {
    content: "";
    position: absolute;
    left: calc(var(--space-lg) + 16px);
    top: calc(-1 * var(--space-xl) - 12px);
    width: 12px;
    height: calc(var(--space-xl) - 6px);
    background: radial-gradient(circle, var(--color-sky) 4px, transparent 4.6px) 0 0 / 12px 13px repeat-y;
  }
  .step__n {
    position: absolute;
    top: -20px;
    left: var(--space-lg);
    display: grid;
    place-items: center;
    width: 48px;
    height: 46px;
    border-radius: 46% 54% 50% 50% / 56% 48% 52% 44%;
    background: var(--color-accent);
    color: var(--color-navy);
    font-family: var(--font-display);
    font-size: var(--size-xl);
    box-shadow: 0 3px 0 var(--color-accent-dark);
    rotate: -6deg;
  }
  .step__icon {
    position: absolute;
    top: -16px;
    right: var(--space-md);
    width: 52px;
    height: 52px;
    padding: 9px;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow-lip-light);
    rotate: 10deg;
  }
  @media (min-width: 40rem) {
    .steps__list { grid-template-columns: repeat(2, 1fr); }
    .step + .step::before { display: none; }
  }
  @media (min-width: 64rem) {
    .steps__list { grid-template-columns: repeat(4, 1fr); padding-top: 64px; }
    .steps__list--3 { grid-template-columns: repeat(3, 1fr); }
    .steps__path { display: block; }
  }

  /* Capturas: la sección oscura con las fichas */
  .shots {
    padding-block: calc(clamp(2.5rem, 6vw, 5rem) + var(--wave));
    background: linear-gradient(180deg, var(--color-navy) 0%, var(--color-primary-dark) 60%, #0a4a96 100%);
    color: var(--color-on-primary);
  }
  .shots::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(#ffffff2b 1px, transparent 1.6px) 0 0 / 28px 28px;
    pointer-events: none;
  }
  .shots > .wrap { position: relative; z-index: 1; }
  .shots .display { color: var(--color-on-primary); }
  .shots__hint { display: none; color: var(--color-sky); }
  .shots__row {
    position: relative;
    z-index: 1;
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg) var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }
  .shot { position: relative; flex: 0 0 auto; width: 200px; scroll-snap-align: center; }
  .shot figcaption { margin-top: var(--space-md); font-size: var(--size-sm); color: var(--color-sky); text-align: center; }
  @media (hover: hover) {
    .shots__hint { display: block; }
  }
  @media (min-width: 72rem) {
    .shots__row {
      width: min(100% - 2 * var(--gutter), var(--wrap));
      margin-inline: auto;
      padding: var(--space-xl) 0 var(--space-lg);
      justify-content: center;
      gap: var(--space-lg);
      overflow: visible;
      scroll-snap-type: none;
    }
    /* El abanico: cada móvil con su inclinación y su altura, como fichas dejadas sobre la mesa. */
    .shot:nth-child(1) { rotate: -6deg; translate: 0 18px; }
    .shot:nth-child(2) { rotate: 3deg; translate: 0 -6px; }
    .shot:nth-child(3) { rotate: -2deg; translate: 0 10px; }
    .shot:nth-child(4) { rotate: 4deg; translate: 0 -8px; }
    .shot:nth-child(5) { rotate: -5deg; translate: 0 16px; }
  }

  /* Comercios */
  .sponsors__grid { display: grid; gap: var(--space-md); grid-template-columns: repeat(2, 1fr); }
  @media (min-width: 40rem) { .sponsors__grid { grid-template-columns: repeat(3, 1fr); } }
  @media (min-width: 60rem) { .sponsors__grid { grid-template-columns: repeat(6, 1fr); } }
  .sponsor {
    display: grid;
    height: 100%;
    align-content: start;
    justify-items: center;
    color: inherit;
    text-decoration: none;
    gap: var(--space-xs);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
    text-align: center;
  }
  .sponsors.section--white .sponsor { background: var(--color-surface-2); }
  .sponsor img, .sponsor__initial { width: 72px; height: 72px; object-fit: contain; border-radius: var(--radius-sm); }
  .sponsor__initial {
    display: grid;
    place-items: center;
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    font-family: var(--font-display);
    font-size: var(--size-2xl);
  }
  .sponsor__name { font-size: var(--size-sm); font-weight: var(--weight-bold); color: var(--color-navy); }
  .sponsor__sector { font-size: var(--size-xs); color: var(--color-muted); }

  /* Tu negocio: la caja azul con confeti y el cartel */
  .business__box {
    position: relative;
    overflow: hidden;
    padding: clamp(var(--space-lg), 5vw, 60px);
    border-radius: var(--radius-xl);
    background:
      radial-gradient(circle at 12% 20%, #ffc21a33 0 7px, transparent 8px),
      radial-gradient(circle at 88% 12%, #ffffff24 0 5px, transparent 6px),
      radial-gradient(circle at 70% 88%, #ffc21a2e 0 9px, transparent 10px),
      radial-gradient(circle at 30% 92%, #ffffff1f 0 4px, transparent 5px),
      radial-gradient(circle at 52% 40%, #ffffff14 0 3px, transparent 4px),
      radial-gradient(circle at 6% 70%, #ffffff1a 0 5px, transparent 6px),
      var(--color-navy);
    color: var(--color-on-primary);
  }
  .business__box .display { color: var(--color-accent); }
  .business__box > * + * { margin-top: var(--space-md); }
  .business__box p { max-width: 55ch; }
  .business__icon {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 64px;
    height: 64px;
    padding: 8px;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow-lip-light);
    rotate: -8deg;
  }
  @media (min-width: 48rem) {
    .business__box { padding-right: clamp(190px, 28%, 300px); }
    .business__icon {
      top: 50%;
      right: clamp(24px, 6%, 64px);
      width: clamp(110px, 15vw, 160px);
      height: auto;
      padding: clamp(14px, 2vw, 22px);
      translate: 0 -50%;
    }
  }

  /* Redes */
  .social { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
  .social a {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    min-height: var(--size-touch);
    padding: 0.4em 1em 0.4em 0.7em;
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    color: var(--color-navy);
    font-weight: var(--weight-bold);
    text-decoration: none;
    box-shadow: var(--shadow-lip-light);
  }
  .social a:hover { background: var(--color-primary-soft); }

  /* La barra de jugar, solo en móvil */
  .play-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 40;
    padding: var(--space-sm) var(--gutter) calc(var(--space-sm) + env(safe-area-inset-bottom));
    background: color-mix(in oklab, var(--color-surface) 92%, transparent);
    box-shadow: var(--shadow-nav);
    backdrop-filter: blur(10px);
  }
  .play-bar .btn { width: 100%; }
  @media (max-width: 47.99rem) {
    body { padding-bottom: calc(var(--size-touch) + 2 * var(--space-sm) + env(safe-area-inset-bottom)); }
  }
  @media (min-width: 48rem) {
    .play-bar { display: none; }
  }

  /* Pie */
  .site-footer {
    position: relative;
    margin-top: auto;
    padding-block: calc(var(--space-xl) + var(--wave)) var(--space-lg);
    background: radial-gradient(#ffffff12 1.2px, transparent 1.6px) 0 0 / 24px 24px, var(--color-navy);
    color: var(--color-sky);
  }
  .site-footer a { color: var(--color-on-primary); }
  .site-footer__cols { display: grid; gap: var(--space-lg); }
  .site-footer__title { margin-bottom: var(--space-sm); font-family: var(--font-display); font-size: var(--size-lg); color: var(--color-on-primary); }
  .site-footer__list { display: grid; gap: var(--space-xs); }
  .site-footer__list a { display: inline-block; padding-block: 0.3em; }
  .site-footer .social a { background: color-mix(in oklab, var(--color-on-primary) 12%, transparent); color: var(--color-on-primary); box-shadow: none; }
  .site-footer .social a:hover { background: color-mix(in oklab, var(--color-on-primary) 24%, transparent); }
  .site-footer__legal {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid color-mix(in oklab, var(--color-on-primary) 20%, transparent);
    font-size: var(--size-sm);
  }
  .site-footer__legal > * + * { margin-top: var(--space-xs); }
  @media (min-width: 48rem) {
    .site-footer__cols { grid-template-columns: repeat(3, 1fr); }
  }

  /* Los socios de honor: la franja azul marino bajo el hero de la portada, con los logos en blanco o en grises del tamaño
   * que les da `sponsor_band_logo()`, para que todos pesen lo mismo a la vista. La misma fila, más pequeña, va en el pie
   * de las demás páginas y en el del teaser. En el móvil la fila entera encoge un quinto y se reparte en dos líneas. */
  .honor {
    position: relative;
    padding-block: var(--space-md) calc(var(--space-xl) + var(--wave));
    background: radial-gradient(#ffffff12 1.2px, transparent 1.6px) 0 0 / 24px 24px, var(--color-navy);
    color: var(--color-sky);
    text-align: center;
  }
  .honor__title {
    margin-bottom: var(--space-lg);
    font-family: var(--font-base);
    font-size: var(--size-sm);
    font-weight: var(--weight-bold);
    line-height: var(--line-height);
    color: var(--color-sky);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .honor__title::before { content: "★ " / ""; color: var(--color-accent); }
  .honor-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-lg) clamp(24px, 5vw, 56px); }
  .honor-logos li, .honor-logos a { display: block; }
  .honor-logos img { display: block; }
  @media (max-width: 40rem) {
    .honor-logos { zoom: 0.8; }
  }
  .site-footer__honor {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid color-mix(in oklab, var(--color-on-primary) 20%, transparent);
    text-align: center;
  }
  .site-footer__honor .honor__title { margin-bottom: var(--space-md); }

  /* La fecha de las legales, como una etiqueta pegada bajo la entradilla. */
  .pagehead__date {
    display: inline-block;
    padding: 0.25em 0.9em;
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: var(--size-sm);
    font-weight: var(--weight-bold);
    box-shadow: var(--shadow-lip-light);
    rotate: -1.5deg;
  }

  /* La etiqueta dorada de socio de honor: en su tarjeta de la lista y bajo la entradilla de su ficha. */
  .honor-badge {
    display: inline-block;
    padding: 0.25em 0.9em;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
    color: var(--color-navy);
    font-size: var(--size-sm);
    font-weight: var(--weight-bold);
    box-shadow: var(--shadow-lip-accent);
    rotate: -1.5deg;
  }
  .honor-badge::before { content: "★ " / ""; }
  /* El respaldo de las asociaciones en «Para comercios», como una nota pegada bajo la entradilla. */
  .pagehead__note {
    display: inline-block;
    padding: 0.6em 1em;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-navy);
    font-size: var(--size-sm);
    font-weight: var(--weight-bold);
    box-shadow: var(--shadow-lip-light);
    rotate: -1deg;
  }
  .pagehead__note::before { content: "★ " / ""; color: var(--color-accent-dark); }

  /* Comercios: cada uno es una ficha como la del juego, con la chapa del logo asomando y el sector de pegatina. */
  .shops { display: grid; gap: calc(var(--space-xl) + 8px) var(--space-lg); padding-top: 34px; }
  .shop {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: 54px var(--space-lg) var(--space-lg);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
  }
  .shop__logo {
    position: absolute;
    top: -34px;
    left: var(--space-lg);
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    padding: 12px;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow-lip-light), var(--shadow-card);
    rotate: -6deg;
  }
  .shop__logo img { width: 100%; height: 100%; object-fit: contain; }
  .shop__initial { font-family: var(--font-display); font-size: var(--size-2xl); color: var(--color-primary-dark); }
  .shop__sector {
    position: absolute;
    top: 14px;
    right: var(--space-md);
    padding: 0.2em 0.85em;
    border-radius: var(--radius-pill);
    color: var(--color-navy);
    font-size: var(--size-sm);
    font-weight: var(--weight-bold);
    box-shadow: 0 2px 0 var(--color-border);
    rotate: 4deg;
  }
  .shop__sector--0 { background: var(--color-primary-soft); }
  .shop__sector--1 { background: var(--color-accent-soft); }
  .shop__sector--2 { background: var(--color-success-soft); }
  .shop__sector--3 { background: var(--color-sky); }
  .shop__name { font-family: var(--font-display); font-size: var(--size-xl); font-weight: 400; line-height: 1.15; color: var(--color-navy); }
  .shop__name a, .shop__desc a { color: inherit; text-decoration: none; }
  .shop__name a:hover, .shop__desc a:hover { color: var(--color-primary); }
  a.shop__logo { color: inherit; }
  .shop__info { display: grid; gap: 6px; margin: 0; font-size: var(--size-sm); }
  .shop__info > div { display: flex; align-items: flex-start; gap: var(--space-sm); }
  .shop__info dt { flex: none; padding-top: 1px; color: var(--color-primary); }
  .shop__info dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
  .shop__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); margin-top: auto; padding-top: var(--space-sm); }
  .shop__more { display: inline-flex; align-items: center; min-height: 40px; font-weight: var(--weight-bold); }
  .shop__social { display: flex; gap: var(--space-xs); margin-inline-start: auto; }
  .shop__social a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
  }
  /* Los socios de honor, antes de los comercios y separados de ellos: canto y chapa dorados y la etiqueta sobre el nombre. */
  .shops-honor { margin-bottom: var(--space-xl); padding-bottom: calc(var(--space-xl) + var(--space-md)); border-bottom: 2px dashed var(--color-border); }
  .shops-honor > .lead { margin-top: var(--space-sm); }
  .shops--honor { margin-top: var(--space-lg); }
  .shop--honor { box-shadow: inset 0 0 0 3px var(--color-accent), var(--shadow-card); }
  .shop--honor .shop__logo { box-shadow: 0 0 0 3px var(--color-accent), var(--shadow-card); }
  .shop .honor-badge { align-self: flex-start; }
  @media (min-width: 40rem) {
    .shops { grid-template-columns: repeat(2, 1fr); }
  }
  @media (min-width: 64rem) {
    .shops { grid-template-columns: repeat(3, 1fr); }
  }

  /* La ficha de un comercio: la chapa de su logo en la cabecera, la descripción y las fotos, y la tarjeta de datos. */
  /* Compacta: la chapa va junto al título también en el móvil, con poco cielo debajo, y los datos suben a la vista. */
  .page--comercio .pagehead { padding-bottom: calc(var(--space-md) + var(--wave)); }
  .page--comercio .pagehead__grid { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-md); }
  .page--comercio .pagehead__art { width: clamp(96px, 24vw, 200px); }
  .shopstage--ficha .shopstage__icon { aspect-ratio: 1; height: auto; object-fit: contain; }
  .shopstage--ficha .shop__initial { display: grid; place-items: center; font-size: clamp(28px, 7vw, 64px); }
  .shopstage--ficha .float { width: clamp(24px, 6vw, 44px); }
  .ficha-section { padding-block: var(--space-md) var(--space-xl); }
  .ficha-section > .wrap > * + * { margin-top: var(--space-sm); }
  .ficha__back a { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 40px; font-weight: var(--weight-bold); }
  .ficha { display: grid; gap: var(--space-lg); align-items: start; }
  .ficha__main > * + * { margin-top: var(--space-md); }
  .ficha__main > .ficha__title { margin-top: var(--space-lg); }
  .ficha__main > .ficha__title:first-child { margin-top: 0; }
  .ficha__title { font-family: var(--font-display); font-size: var(--size-xl); font-weight: 400; color: var(--color-navy); }
  .ficha__text { max-width: 65ch; font-size: var(--size-lg); white-space: pre-line; }
  .ficha__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--space-sm); }
  .ficha-foto {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
    overflow: hidden;
    cursor: zoom-in;
    box-shadow: var(--shadow-card);
  }
  .ficha-foto img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
  .ficha__card {
    display: grid;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
  }
  .ficha__card .shop__info { gap: var(--space-sm); font-size: var(--size-md); }
  .ficha__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
  .ficha__card .shop__social { margin-inline-start: 0; }
  @media (min-width: 52rem) {
    .ficha { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); }
    .ficha__card { position: sticky; top: 96px; }
  }

  /* El visor de fotos: a pantalla completa sobre el azul de noche. En el móvil se pasa de foto deslizando y se amplía
     pellizcando; las flechas y la lupa son para el ratón. */
  html:has(.visor[open]) { overflow: hidden; }
  .visor {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #001028f5;
    color: #fff;
    overflow: hidden;
  }
  .visor::backdrop { background: #001028f5; }
  .visor__stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; cursor: grab; }
  .visor__stage.is-zoomed { cursor: move; }
  .visor__stage.is-dragging { cursor: grabbing; }
  .visor__track { display: flex; height: 100%; }
  .visor__slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; padding: 3.5rem 0.75rem; }
  .visor__slide img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-sm);
    transform-origin: center center;
    -webkit-user-drag: none;
    pointer-events: none;
  }
  .visor__btn {
    position: absolute;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ffffff24;
    color: #fff;
    cursor: pointer;
  }
  .visor__btn:hover { background: #ffffff42; }
  .visor__btn:disabled { opacity: 0.3; cursor: default; }
  .visor__close { top: 0.75rem; right: 0.75rem; }
  .visor__prev, .visor__next { top: 50%; translate: 0 -50%; }
  .visor__prev { left: 0.75rem; }
  .visor__next { right: 0.75rem; }
  .visor__zoom { position: absolute; z-index: 1; top: 0.75rem; right: 4.25rem; display: flex; gap: var(--space-sm); }
  .visor__zoom .visor__btn { position: static; }
  .visor__count { position: absolute; z-index: 1; top: 1.35rem; left: 1rem; font-size: var(--size-sm); opacity: 0.85; }
  .visor__help { position: absolute; z-index: 1; bottom: 1rem; left: 0; right: 0; max-width: none; margin: 0; padding-inline: var(--space-md); text-align: center; font-size: var(--size-sm); opacity: 0.75; }
  .visor__count, .visor__help { text-shadow: 0 1px 3px #0009; }
  .visor__help--touch { display: none; }
  .visor:has(.is-zoomed) .visor__help { display: none; }
  .visor[data-single] .visor__prev, .visor[data-single] .visor__next { display: none; }
  @media (hover: none), (pointer: coarse) {
    .visor__prev, .visor__next, .visor__zoom, .visor__help--mouse { display: none; }
    .visor__help--touch { display: block; }
  }

  /* El contacto dentro de la caja azul: el correo en amarillo, el teléfono en blanco, y el valor a la vista. */
  .contact { display: flex; flex-wrap: wrap; gap: var(--space-md); }
  .btn:has(.contact__value) { flex-wrap: wrap; column-gap: 0.4em; }
  .contact__value { font-weight: 600; overflow-wrap: anywhere; }

  /* La caja amarilla: una duda pendiente o un aviso amable, con su icono asomando. */
  .callout {
    position: relative;
    padding: clamp(var(--space-lg), 5vw, 48px);
    border-radius: var(--radius-xl);
    background:
      radial-gradient(circle at 90% 85%, #ffffff8c 0 9px, transparent 10px),
      radial-gradient(circle at 8% 18%, #ffffff8c 0 6px, transparent 7px),
      radial-gradient(circle at 60% 10%, #ffc21a40 0 5px, transparent 6px),
      var(--color-accent-soft);
    box-shadow: inset 0 0 0 2px #ffc21a59;
  }
  .callout > * + * { margin-top: var(--space-md); }
  .callout h2 { padding-right: 64px; }
  .callout p { max-width: 55ch; }
  .callout h2:not(.display) { font-family: var(--font-display); font-size: var(--size-xl); font-weight: 400; color: var(--color-navy); }
  .callout__icon {
    position: absolute;
    top: -26px;
    right: var(--space-lg);
    width: 72px;
    height: 72px;
    padding: 10px;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow-lip-light);
    rotate: 8deg;
  }

  /* Preguntas: casillas numeradas que se despliegan, unidas por piedras como los pasos. */
  .faq__list { display: grid; gap: var(--space-lg); max-width: 52rem; }
  .faq__item { position: relative; }
  .faq__item + .faq__item::before {
    content: "";
    position: absolute;
    left: 32px;
    top: calc(-1 * var(--space-lg));
    width: 12px;
    height: var(--space-lg);
    background: radial-gradient(circle, var(--color-sky) 4px, transparent 4.6px) 0 0 / 12px 12px repeat-y;
  }
  .faq details { border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-card); }
  .faq details[open] { box-shadow: var(--shadow-raised); }
  .faq summary {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-height: 68px;
    padding: var(--space-md) var(--space-md) var(--space-md) var(--space-md);
    border-radius: inherit;
    color: var(--color-navy);
    font-size: var(--size-lg);
    font-weight: var(--weight-bold);
    line-height: 1.3;
    list-style: none;
    cursor: pointer;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq__n {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 44px;
    border-radius: 46% 54% 50% 50% / 56% 48% 52% 44%;
    background: var(--color-accent);
    color: var(--color-navy);
    font-family: var(--font-display);
    font-size: var(--size-xl);
    font-weight: 400;
    box-shadow: 0 3px 0 var(--color-accent-dark);
    rotate: -6deg;
  }
  .faq__item:nth-child(even) .faq__n { rotate: 5deg; }
  .faq__q { flex: 1; min-width: 0; }
  /* El más que se vuelve aspa al abrir. */
  .faq__toggle { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--color-primary-soft); }
  .faq__toggle::before, .faq__toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 3px;
    border-radius: 2px;
    background: var(--color-primary-dark);
    translate: -50% -50%;
  }
  .faq__toggle::after { rotate: 90deg; }
  .faq details[open] .faq__toggle { rotate: 45deg; background: var(--color-accent-soft); }
  .faq__a { padding: 0 var(--space-lg) var(--space-lg) calc(2 * var(--space-md) + 46px); }
  @media (max-width: 30rem) {
    .faq__a { padding-left: var(--space-md); }
  }

  /* Legales: los apartados son paradas numeradas de un camino de piedras que baja por la izquierda, y el titular va
   * en un recuadro que en escritorio se queda a la vista a la derecha. */
  .legal__grid { display: grid; gap: var(--space-xl); align-items: start; }
  .owner { padding: var(--space-lg); border-radius: var(--radius-lg); background: var(--color-surface-2); box-shadow: inset 0 0 0 2px var(--color-border); }
  .owner__title { font-family: var(--font-display); font-size: var(--size-xl); font-weight: 400; color: var(--color-navy); }
  .owner__list { display: grid; gap: var(--space-sm); margin: var(--space-md) 0 0; }
  .owner__list dt { color: var(--color-muted); font-size: var(--size-xs); font-weight: var(--weight-bold); letter-spacing: 0.06em; text-transform: uppercase; }
  .owner__list dd { margin: 0; color: var(--color-navy); font-weight: var(--weight-bold); overflow-wrap: anywhere; }
  .legal__list { position: relative; display: grid; gap: var(--space-xl); padding-left: clamp(52px, 8vw, 68px); }
  .legal__list::before {
    content: "";
    position: absolute;
    top: 44px;
    bottom: 0;
    left: clamp(16px, 2.6vw, 20px);
    width: 12px;
    background: radial-gradient(circle, var(--color-sky) 4px, transparent 4.6px) 0 0 / 12px 18px repeat-y;
  }
  .legal__section { position: relative; }
  .legal__n {
    position: absolute;
    top: -6px;
    left: calc(-1 * clamp(52px, 8vw, 68px));
    z-index: 1;
    display: grid;
    place-items: center;
    width: clamp(42px, 6vw, 52px);
    height: clamp(40px, 5.8vw, 50px);
    border-radius: 46% 54% 50% 50% / 56% 48% 52% 44%;
    background: var(--color-accent);
    color: var(--color-navy);
    font-family: var(--font-display);
    font-size: var(--size-xl);
    box-shadow: 0 3px 0 var(--color-accent-dark);
    rotate: -6deg;
  }
  .legal__section:nth-child(even) .legal__n { rotate: 5deg; }
  .legal__h { font-family: var(--font-display); font-size: var(--size-xl); font-weight: 400; line-height: 1.2; color: var(--color-navy); }
  .legal__p { margin-top: var(--space-sm); white-space: pre-line; }
  .cookies { margin-bottom: calc(var(--space-xl) + var(--space-md)); }
  .cookies__table {
    width: 100%;
    margin-top: var(--space-md);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: inset 0 0 0 2px var(--color-border);
  }
  .cookies__table th, .cookies__table td { padding: var(--space-sm) var(--space-md); text-align: left; vertical-align: top; }
  .cookies__table thead th { background: var(--color-navy); color: var(--color-on-primary); }
  .cookies__table tbody tr:nth-child(even) { background: var(--color-surface-2); }
  .cookies__table code {
    padding: 0.1em 0.45em;
    border-radius: 6px;
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
    font-size: 0.92em;
  }
  /* En móvil cada cookie es una ficha, con el nombre de la columna encima de cada dato. */
  @media (max-width: 40rem) {
    .cookies__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .cookies__table, .cookies__table tbody, .cookies__table tr, .cookies__table th, .cookies__table td { display: block; }
    .cookies__table tbody tr { padding-block: var(--space-sm); }
    .cookies__table tbody tr + tr { border-top: 2px solid var(--color-border); }
    .cookies__table tbody th, .cookies__table td { padding-block: 4px; }
    .cookies__table td::before {
      content: attr(data-label);
      display: block;
      color: var(--color-muted);
      font-size: var(--size-xs);
      font-weight: var(--weight-bold);
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }
  }
  @media (min-width: 60rem) {
    .legal__grid:has(.owner) { grid-template-columns: minmax(0, 1fr) 19rem; }
    .owner { position: sticky; top: 120px; grid-column: 2; grid-row: 1; }
    .legal__body { grid-column: 1; grid-row: 1; }
  }

  /* 404 */
  .notfound .wrap > * + * { margin-top: var(--space-md); }

  /* El teaser: solo el hero, sin cabecera y centrado en la pantalla, con «Próximamente» donde irá el botón, y una línea
   * de pie. La marca es el logo grande del hero. */
  .page--teaser { padding-bottom: 0; background: var(--color-surface); }
  .page--teaser .hero { display: flex; flex-direction: column; justify-content: center; min-height: 100dvh; }
  .soon {
    display: inline-block;
    padding: 0.45em 1.2em;
    border-radius: var(--radius-pill);
    background: var(--color-navy);
    color: var(--color-on-primary);
    font-family: var(--font-display);
    font-size: var(--size-xl);
    box-shadow: var(--shadow-lip);
    rotate: -2deg;
  }
  .teaser__foot { padding-block: var(--space-md) var(--space-lg); font-size: var(--size-sm); color: var(--color-muted); text-align: center; }
  .teaser__foot p { margin-inline: auto; }
  .teaser__foot--honor {
    padding-block: var(--space-sm) var(--space-lg);
    background: radial-gradient(#ffffff12 1.2px, transparent 1.6px) 0 0 / 24px 24px, var(--color-navy);
    color: var(--color-sky);
  }
  .teaser__foot--honor a { color: var(--color-on-primary); }
  .teaser__foot--honor .honor-logos { margin-bottom: var(--space-xl); }
}

@layer motion {
  @keyframes rise { from { opacity: 0; translate: 0 22px; } }
  @keyframes pop { from { opacity: 0; scale: 0.8; } }
  @keyframes bob { 50% { translate: 0 -10px; } }
  @keyframes float { 50% { translate: 0 -12px; rotate: 6deg; } }
  @keyframes spin { to { rotate: 1turn; } }
  @keyframes drift { to { translate: calc(100vw + 420px) 0; } }
  @keyframes wave { to { translate: -50% 0; } }
  @keyframes shine { to { translate: 350% 0; } }
  @keyframes nudge { 0%, 8%, 100% { rotate: 0deg; } 2% { rotate: -4deg; } 4% { rotate: 4deg; } 6% { rotate: -2deg; } }
  @keyframes wobble { 0%, 100% { rotate: -6deg; } 25% { rotate: 8deg; } 50% { rotate: -10deg; } 75% { rotate: 4deg; } }
  @keyframes bounce { 0%, 100% { translate: 0 0; } 40% { translate: 0 -6px; } 70% { translate: 0 2px; } }
  @keyframes reveal { from { opacity: 0; translate: 0 36px; } }
  @keyframes draw { from { stroke-dashoffset: 1; } }
  @keyframes lift { to { translate: 0 -160px; } }

  /* La entrada: el texto sube por escalones, el escenario salta, las pegatinas llegan las últimas. */
  .hero__copy > * { animation: rise 0.7s var(--ease-spring) both; }
  .hero__copy > :nth-child(2) { animation-delay: 0.08s; }
  .hero__copy > :nth-child(3) { animation-delay: 0.16s; }
  .hero__copy > :nth-child(4) { animation-delay: 0.24s; }
  .hero__copy > :nth-child(5) { animation-delay: 0.32s; }
  .hero__logo { animation: pop 0.8s var(--ease-spring) both; }
  .hero__stage { animation: pop 0.8s var(--ease-spring) both 0.15s; }
  .sticker { animation: pop 0.6s var(--ease-spring) both 0.8s; }
  .sticker--2 { animation-delay: 0.9s; }
  .sticker--3 { animation-delay: 1s; }
  .sticker--4 { animation-delay: 1.1s; }
  .sticker--5 { animation-delay: 1.2s; }
  .play-bar { animation: rise 0.6s var(--ease-spring) both 0.6s; }

  /* Lo que no para: la ilustración y el móvil respiran a contratiempo, las fichas flotan, el sol gira, las nubes pasan. */
  .hero__illus { animation: bob 7s ease-in-out infinite 1s; }
  .phone--hero { animation: bob 6s ease-in-out infinite reverse; }
  .float { animation: float 5s ease-in-out infinite; }
  .float--star { animation-duration: 6.5s; animation-delay: -2s; }
  .float--pin { animation-duration: 5.5s; animation-delay: -1s; }
  .deco { animation: float 7s ease-in-out infinite; }
  .hero__sun svg { animation: spin 90s linear infinite; }
  .hero__cloud--1 { animation: drift 55s linear infinite; }
  .hero__cloud--2 { animation: drift 75s linear infinite -30s; }
  .wave-wrap svg { animation: wave 18s linear infinite; }
  .wave-wrap--slow svg { animation-duration: 28s; animation-direction: reverse; }
  .btn--big { animation: nudge 8s ease-in-out infinite 3s; }

  /* Al pasar el ratón */
  .btn { transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease, background-color var(--dur-fast) ease; }
  .brand { transition: width 0.25s ease, height 0.25s ease; }
  .brand img { transition: rotate 0.45s var(--ease-spring), scale 0.45s var(--ease-spring), width 0.25s ease, margin 0.25s ease; }
  .langs a { transition: scale 0.25s var(--ease-spring), background-color var(--dur-fast) ease, color var(--dur-fast) ease; }
  .site-nav a { transition: background-size var(--dur) ease, background-color var(--dur-fast) ease; }
  .site-header__bar { transition: min-height 0.25s ease; }
  .card, .step, .sponsor { transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) ease; }
  .card__icon, .step__icon, .business__icon, .sponsor img, .sponsor__initial { transition: rotate 0.4s var(--ease-spring), scale 0.4s var(--ease-spring); }
  .shot { transition: rotate var(--dur) var(--ease-spring), translate var(--dur) var(--ease-spring), scale var(--dur) var(--ease-spring); }
  .phone__screen img { transition: object-position 2.4s ease-in-out; }
  .social a { transition: transform var(--dur-fast) ease, background-color var(--dur-fast) ease; }
  .site-nav a:hover, .site-nav a:focus-visible { background-size: calc(100% - 1.6em) 3px; }
  @media (hover: hover) {
    .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--color-primary-dark); background: var(--color-primary-dark); color: var(--color-on-primary); }
    .btn--play:hover { background: color-mix(in oklab, var(--color-accent) 85%, white); color: var(--color-navy); box-shadow: 0 6px 0 var(--color-accent-dark); }
    .btn--play:hover::after { animation: shine 0.7s ease forwards; }
    .btn--light:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); box-shadow: 0 5px 0 #d0def2; }
    .brand:hover img { rotate: -8deg; scale: 1.08; }
    .langs a:hover { scale: 1.12; }
    .card:hover, .step:hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: var(--shadow-raised); }
    .card:hover .card__icon { rotate: -6deg; scale: 1.12; }
    .step:hover .step__icon { rotate: -4deg; scale: 1.12; }
    .step:hover .step__n { animation: wobble 0.7s ease; }
    .sponsor:hover { transform: translateY(-5px) rotate(-1.5deg); box-shadow: var(--shadow-raised); }
    .sponsor:hover img, .sponsor:hover .sponsor__initial { scale: 1.1; }
    .business__box:hover .business__icon { rotate: 0deg; scale: 1.06; }
    .shot:hover { rotate: 0deg; translate: 0 -14px; scale: 1.05; z-index: 2; }
    .phone:hover .phone__screen img { object-position: 50% 100%; }
    .social a:hover { transform: translateY(-2px); }
    .social a:hover svg { animation: bounce 0.5s ease; }
  }
  .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--color-primary-dark); }
  .btn--play:active { box-shadow: 0 1px 0 var(--color-accent-dark); }
  .btn--light:active { box-shadow: 0 1px 0 #d0def2; }

  /* La cabecera se encoge al bajar (clase que pone site.js). */
  @media (min-width: 48rem) {
    .is-scrolled .site-header__bar { min-height: 58px; }
    .is-scrolled .brand img { width: 60px; }
  }
  /* En la portada de escritorio la caja del logo también tiene medida al bajar, para que encoja con él en vez de saltar. */
  @media (min-width: 60rem) {
    .is-scrolled .page--portada .site-header .brand { width: 60px; height: 61px; }
  }

  /* Con el scroll: lo que entra en pantalla sube y aparece, el camino de piedras se dibuja, el sol se aleja. */
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
    .reveal:nth-child(2) { animation-range: entry 10% entry 55%; }
    .reveal:nth-child(3) { animation-range: entry 20% entry 65%; }
    .reveal:nth-child(4) { animation-range: entry 30% entry 75%; }
    .reveal:nth-child(n + 5) { animation-range: entry 35% entry 80%; }
    .steps__draw { animation: draw linear both; animation-timeline: --steps; animation-range: entry 15% cover 45%; }
    .hero__decor { animation: lift linear both; animation-timeline: scroll(root); animation-range: 0 120vh; }
  }
  /* Sin animaciones guiadas por el scroll, site.js observa los `.reveal` y los va soltando. */
  .js-reveal .reveal { opacity: 0; translate: 0 36px; transition: opacity 0.7s ease, translate 0.7s var(--ease-spring); transition-delay: calc(var(--i, 0) * 90ms); }
  .js-reveal .reveal:nth-child(2) { --i: 1; }
  .js-reveal .reveal:nth-child(3) { --i: 2; }
  .js-reveal .reveal:nth-child(4) { --i: 3; }
  .js-reveal .reveal:nth-child(n + 5) { --i: 4; }
  .js-reveal .reveal.is-in { opacity: 1; translate: 0 0; }

  /* Las páginas interiores entran como la portada: el texto por escalones, el escenario de un salto. */
  .pagehead__copy > * { animation: rise 0.7s var(--ease-spring) both; }
  .pagehead__copy > :nth-child(2) { animation-delay: 0.08s; }
  .pagehead__copy > :nth-child(3) { animation-delay: 0.16s; }
  .pagehead__copy > :nth-child(4) { animation-delay: 0.24s; }
  .pagehead__art { animation: pop 0.8s var(--ease-spring) both 0.15s; }
  .sticker--duo-2 { animation-delay: 0.9s; }
  .sticker--duo-3 { animation-delay: 1s; }
  .pagehead__sun svg { animation: spin 90s linear infinite; }
  .phone--back { animation: bob 7s ease-in-out infinite 1s; }
  .phone--front { animation: bob 6s ease-in-out infinite reverse; }
  .chapa { animation: float 6s ease-in-out infinite; }
  .chapa--2 { animation-duration: 7s; animation-delay: -2s; }
  .chapa--3 { animation-duration: 5.5s; animation-delay: -4s; }
  .shopstage__icon, .qstage__mark { animation: bob 7s ease-in-out infinite; }
  .qstage__mark--small { animation: float 5s ease-in-out infinite -1s; }

  /* Al pasar el ratón y al abrir */
  .shop { transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) ease; }
  /* El visor desliza la tira al pasar de foto y suaviza la lupa; mientras el dedo arrastra, sigue al dedo sin retraso. */
  .visor__track { transition: transform 0.3s ease; }
  .visor__slide img { transition: transform 0.2s ease; }
  .visor__stage.is-dragging .visor__track, .visor__stage.is-dragging .visor__slide img { transition: none; }
  .ficha-foto img { transition: scale var(--dur) var(--ease-spring); }
  .ficha-foto:hover img { scale: 1.04; }
  .shop__logo { transition: rotate 0.4s var(--ease-spring), scale 0.4s var(--ease-spring); }
  .shop__social a, .faq__toggle { transition: rotate var(--dur) var(--ease-spring), scale var(--dur-fast) ease, background-color var(--dur-fast) ease; }
  .faq details { transition: box-shadow var(--dur) ease; }
  .faq__n { transition: rotate 0.4s var(--ease-spring); }
  .callout__icon { transition: rotate 0.4s var(--ease-spring), scale 0.4s var(--ease-spring); }
  .honor-logos a { transition: scale var(--dur) var(--ease-spring); }
  @media (hover: hover) {
    .shop:hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: var(--shadow-raised); }
    .shop--honor:hover { box-shadow: inset 0 0 0 3px var(--color-accent), var(--shadow-raised); }
    .honor-logos a:hover { scale: 1.08; }
    .shop:hover .shop__logo { rotate: 4deg; scale: 1.08; }
    .shop__social a:hover { scale: 1.12; background: var(--color-sky); }
    .faq summary:hover .faq__n { animation: wobble 0.7s ease; }
    .faq summary:hover .faq__toggle { scale: 1.1; }
    .callout:hover .callout__icon { rotate: -6deg; scale: 1.08; }
  }
  /* La respuesta se despliega con altura, donde el navegador sabe animar hasta `auto`; si no, se abre sin más. */
  @supports (interpolate-size: allow-keywords) {
    .faq details { interpolate-size: allow-keywords; }
    .faq details::details-content { height: 0; overflow: clip; transition: height var(--dur) ease, content-visibility var(--dur) allow-discrete; }
    .faq details[open]::details-content { height: auto; }
  }
  @supports (animation-timeline: view()) {
    .pagehead__sky { animation: lift linear both; animation-timeline: scroll(root); animation-range: 0 120vh; }
  }
}
