/*
 * SOS Dukier — sistema visual «Pet Tag»
 * ----------------------------------------------------------------------------
 * Continuación del packaging y del manual de marca de Dukier:
 * crema + tinta + naranja Dukier, y un color de colección por modelo de chapa (tema).
 * Esquinas rectas, líneas de 1,5 px, módulos pegados, sombras duras, trazos a mano.
 *
 * Uso: templates/sos/base.html.twig + templates/sos/_macros.html.twig (documentados ahí).
 * Guía viva (solo en debug): /public/estilo   ·   /public/estilo?pantalla=main&tema=avocado
 *
 * Tema: <body> recibe --sos-tema-cabeza, --sos-tema-titulo y --sos-tema-texto (desde chapa_theme()).
 * Todas las clases llevan el prefijo «sos-». Modificadores con doble guion: .sos-boton--tinta.
 */

/* ---------------------------------------------------------------- Tipografías (locales, OFL) */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url(../fonts/syne-latin-ext-wght-normal.woff2) format('woff2-variations'), url(../fonts/syne-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url(../fonts/syne-latin-wght-normal.woff2) format('woff2-variations'), url(../fonts/syne-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lexend Mega';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/lexend-mega-latin-ext-wght-normal.woff2) format('woff2-variations'), url(../fonts/lexend-mega-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lexend Mega';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/lexend-mega-latin-wght-normal.woff2) format('woff2-variations'), url(../fonts/lexend-mega-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/karla-latin-ext-wght-normal.woff2) format('woff2-variations'), url(../fonts/karla-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/karla-latin-wght-normal.woff2) format('woff2-variations'), url(../fonts/karla-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------------------------------------------------------------- Variables */
:root {
  /* Paleta institucional */
  --sos-crema: #F1E8D9;
  --sos-tinta: #141414;
  --sos-naranja: #FD4616;
  --sos-rosa: #F7C8D7;
  --sos-azul: #245FE2;          /* solo enlaces al pasar / foco */
  --sos-blanco: #FFFFFF;
  /* Secundarios */
  --sos-amarillo: #FDF08F;
  --sos-verde: #1C4E1B;         /* WhatsApp */
  --sos-mandarina: #FF8800;
  --sos-gris-anilla: #8C8C8C;

  /* Tema de la chapa (lo sobrescribe <body style="…"> según chapa_theme()); por defecto el neutro «dukier» */
  --sos-tema-cabeza: #F7C8D7;   /* cabeza del logo, bloques y sombras de color */
  --sos-tema-titulo: #FD4616;   /* rótulo PET TAG (decorativo, ≥ 24 px) */
  --sos-tema-texto: #E93A0D;    /* variante del título apta como texto ≥ 24 px (AA 3:1 sobre crema/blanco) */

  /* Tipografía */
  --sos-f-titular: 'Syne', 'Arial Black', sans-serif;
  --sos-f-etiqueta: 'Lexend Mega', 'Arial', sans-serif;
  --sos-f-texto: 'Karla', 'Helvetica Neue', Arial, sans-serif;

  /* Forma y medida */
  --sos-linea: 1.5px;
  --sos-sombra: 6px;
  --sos-gutter: 22px;
  --sos-columna: 430px;
  --sos-nav-alto: 62px;

  /* Movimiento */
  --sos-ease: cubic-bezier(.2, .7, .2, 1);
  --sos-pisada: 120ms;
}

@media (max-width: 340px) {
  :root { --sos-gutter: 16px; }
}

/* ---------------------------------------------------------------- Reset mínimo */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg, picture { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- Base */
body.sos {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--sos-crema);
  color: var(--sos-tinta);
  font-family: var(--sos-f-texto);
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.sos a { color: var(--sos-tinta); text-decoration-thickness: var(--sos-linea); text-underline-offset: 3px; }
.sos a:hover { color: var(--sos-azul); }
.sos :focus-visible { outline: 3px solid var(--sos-azul); outline-offset: 3px; }
.sos ::selection { background: var(--sos-tema-cabeza); color: var(--sos-tinta); }

.sos-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sos-saltar {
  position: absolute; left: 8px; top: -60px; z-index: 50;
  padding: 12px 16px; background: var(--sos-tinta); color: var(--sos-crema) !important;
  font-family: var(--sos-f-etiqueta); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
}
.sos-saltar:focus { top: 8px; }

/* ---------------------------------------------------------------- Página (columna móvil) */
.sos-pagina {
  position: relative;
  width: 100%;
  max-width: var(--sos-columna);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--sos-crema);
  overflow-x: clip;
  container-type: inline-size; /* los titulares se ajustan al ancho de la columna (cqw) */
  container-name: sos-pagina;
}
.sos-principal { flex-grow: 1; display: flex; flex-direction: column; }
.sos-contenido { padding: 0 var(--sos-gutter); }
.sos-pila { display: flex; flex-direction: column; gap: var(--sos-hueco, 18px); }
.sos-pila--s { --sos-hueco: 12px; }
.sos-pila--l { --sos-hueco: 26px; }
.sos-pareja { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
/* Dos botones en fila en un móvil estrecho (320 px): una palabra larga («LOCALIZAÇÃO») no cabe con el espaciado
   normal y se salía del botón; se aprietan el margen y el espaciado de letras. */
@media (max-width: 359px) { .sos-pareja .sos-boton { padding-left: 6px; padding-right: 6px; letter-spacing: .1em; font-size: 11px; } }
.sos-empuja { margin-top: auto; }

/* Fondo de marca en pantallas anchas: la columna queda centrada y la marca la rodea */
.sos-fondo { display: none; }
@media (min-width: 760px) {
  .sos-pagina {
    border-left: var(--sos-linea) solid var(--sos-tinta);
    border-right: var(--sos-linea) solid var(--sos-tinta);
    box-shadow: 10px 0 0 var(--sos-tema-cabeza);
    z-index: 1;
  }
  .sos-fondo {
    display: block; position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  }
  .sos-fondo__cabeza {
    position: absolute; left: -5vw; bottom: -9vh; width: 36vw; max-width: 640px; aspect-ratio: 900 / 683;
    background: var(--sos-tema-cabeza);
    -webkit-mask: url(../brand/cabeza.png) center / contain no-repeat;
    mask: url(../brand/cabeza.png) center / contain no-repeat;
    animation: sos-sube 1s var(--sos-ease) both;
  }
  .sos-fondo__rotulo {
    position: absolute; right: 4vw; top: 50%; transform: translateY(-50%);
    writing-mode: vertical-rl;
    font-family: var(--sos-f-titular); font-weight: 800; font-size: min(8vw, 10.5vh); line-height: .9;
    letter-spacing: .02em; color: var(--sos-tema-titulo); white-space: nowrap; text-transform: uppercase;
  }
  .sos-fondo__marca {
    position: absolute; right: 4vw; bottom: 32px; display: flex; flex-direction: column; gap: 6px;
    font-family: var(--sos-f-etiqueta); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; text-align: right;
  }
  .sos-fondo__anillo { position: absolute; left: 6vw; top: 8vh; }
}
@media (min-width: 760px) and (max-width: 1100px) {
  .sos-fondo__rotulo, .sos-fondo__marca { display: none; }
}

/* ---------------------------------------------------------------- Etiquetas y texto */
.sos-etiqueta {
  font-family: var(--sos-f-etiqueta); font-weight: 400; font-size: 10px; letter-spacing: .2em;
  line-height: 1.6; text-transform: uppercase;
}
.sos-etiqueta--m { font-size: 11px; }
.sos-etiqueta--l { font-size: 12px; }
.sos-texto { font-size: 17px; line-height: 1.4; max-width: 34ch; }
.sos-texto--s { font-size: 15px; max-width: 38ch; }
.sos-texto--xs { font-size: 13px; }
.sos-texto--fuerte { font-weight: 700; }
.sos-enlace {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 700; font-size: 15px;
}

/* ---------------------------------------------------------------- Cabecera y logo */
.sos-cabecera {
  position: relative; z-index: 3;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px var(--sos-gutter) 0;
}
.sos-cabecera__extra { text-align: right; min-width: 0; overflow-wrap: anywhere; }   /* un correo largo baja de línea en vez de salirse */
.sos-cabecera--bloque {
  background: var(--sos-tema-cabeza); border-bottom: var(--sos-linea) solid var(--sos-tinta);
  display: block; padding-bottom: 22px; overflow: hidden; min-height: 180px;
}
.sos-cabecera--bloque .sos-cabecera__extra { position: absolute; right: var(--sos-gutter); top: 22px; }
.sos-cabecera__titular { margin-top: 22px; max-width: calc(100% - 104px); font-size: clamp(26px, 8.4cqw, 36px); overflow-wrap: normal; }
.sos-cabecera__chapa { position: absolute; right: 26px; top: -6px; }
.sos-logo { display: inline-block; flex-shrink: 0; line-height: 0; }
.sos-logo img { width: var(--sos-logo-w, 60px); height: auto; aspect-ratio: 600 / 530; }
.sos-logo--compartido { view-transition-name: sos-logo; }
a.sos-logo { min-width: 44px; min-height: 44px; }

/* ---------------------------------------------------------------- Héroe: cabeza + PET TAG + perro + tag + sticker */
.sos-heroe {
  position: relative; container-type: inline-size;
  width: 100%; aspect-ratio: 390 / 318; flex-shrink: 0;
}
.sos-cabeza {
  background: var(--sos-tema-cabeza);
  -webkit-mask: url(../brand/cabeza.png) center / contain no-repeat;
  mask: url(../brand/cabeza.png) center / contain no-repeat;
}
.sos-heroe__cabeza {
  position: absolute; left: .77%; top: 0; width: 98.46%; height: 91.5%;
  animation: sos-sube .7s var(--sos-ease) both;
}
.sos-heroe__rotulo {
  position: absolute; left: 0; right: 0; top: 17.5%;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; /* única excepción al texto alineado a la izquierda: el rótulo del packaging */
  font-family: var(--sos-f-titular); font-weight: 800; font-size: 47px; font-size: 12.2cqw;
  line-height: .9; letter-spacing: .02em; color: var(--sos-tema-titulo); text-transform: uppercase; white-space: nowrap;
  animation: sos-sube .6s .1s var(--sos-ease) both;
}
/* Héroe 'texto' (código no válido, errores 403/404/500): la cifra o el signo en grande sobre un bloque rosa, sin grafismo detrás */
.sos-heroe--texto {
  aspect-ratio: auto; margin-top: 14px; padding: 7cqw var(--sos-gutter) 5.5cqw; background: var(--sos-rosa);
  border-top: var(--sos-linea) solid var(--sos-tinta); border-bottom: var(--sos-linea) solid var(--sos-tinta);
}
.sos-heroe--texto .sos-heroe__rotulo {
  position: static; align-items: flex-start; text-align: left;
  font-size: 120px; font-size: 31cqw; line-height: .82; letter-spacing: -.01em; color: var(--sos-naranja);
}
.sos-heroe__marca { font-size: .36em; letter-spacing: .04em; margin-bottom: .12em; }
.sos-heroe__chapa { position: absolute; left: 50%; top: 41.5%; transform: translateX(-50%); --sos-chapa-base: 35.4cqw; }
.sos-heroe__anillo { position: absolute; right: 2.56%; top: 59.7%; --sos-anillo-tam: 29.7cqw; }

/* Héroe 'bloque': perro real recortado sobre un bloque del color del tema. El tag cuelga de la esquina como grafismo
   (no va montado sobre el perro) y no hay rótulo detrás. */
.sos-heroe--bloque {
  aspect-ratio: 390 / 372; overflow: hidden; background: var(--sos-tema-cabeza);
  border-top: var(--sos-linea) solid var(--sos-tinta); border-bottom: var(--sos-linea) solid var(--sos-tinta);
}
.sos-heroe__perro {
  position: absolute; left: 12cqw; bottom: 0; width: 68cqw; height: auto;
  animation: sos-sube .7s .1s var(--sos-ease) both;
}
.sos-heroe--bloque .sos-heroe__chapa { left: auto; right: 6cqw; top: -1.5%; transform: none; --sos-chapa-base: 21cqw; }
.sos-heroe--bloque .sos-heroe__anillo { right: auto; left: 3.5%; top: auto; bottom: 5%; --sos-anillo-tam: 27cqw; }

/* El logo de la cabecera no debe tocar la línea superior de la foto o del bloque: aire entre ambos */
.sos-heroe--foto, .sos-heroe--bloque { margin-top: 14px; }

/* Héroe 'foto': la foto de estudio a sangre, solo con el sticker */
.sos-heroe--foto { aspect-ratio: 1040 / 1174; overflow: hidden; border-top: var(--sos-linea) solid var(--sos-tinta); border-bottom: var(--sos-linea) solid var(--sos-tinta); }
.sos-heroe__foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; animation: sos-zoom 1.4s var(--sos-ease) both; }
.sos-heroe--foto .sos-heroe__anillo { right: auto; left: 3.5%; top: auto; bottom: 5%; --sos-anillo-tam: 27cqw; }

/* ---------------------------------------------------------------- Chapa colgando de su anilla */
.sos-chapa {
  /* --sos-chapa-base (ancho de referencia, 96px por defecto), --sos-chapa-escala, --sos-anilla-x y --sos-cordon
     llegan en línea desde la macro chapa(); --sos-chapa-base también puede heredarse del contenedor (héroe). */
  --sos-anilla-color: var(--sos-gris-anilla);
  display: inline-block; width: calc(var(--sos-chapa-base, 96px) * var(--sos-chapa-escala, 1));
}
.sos-chapa--cae { animation: sos-cae .9s .25s var(--sos-ease) both; }
.sos-chapa__vaiven {
  display: flex; flex-direction: column; align-items: center;
  transform-origin: 50% 0;
  animation: sos-vaiven 3.6s ease-in-out infinite;
}
.sos-chapa--cae .sos-chapa__vaiven { animation-delay: 1.15s; }
.sos-chapa__cordon { display: block; width: 2px; height: var(--sos-cordon, 0px); background: var(--sos-tinta); }
.sos-chapa__anilla {
  width: calc(var(--sos-chapa-base, 96px) * .217); height: auto; aspect-ratio: 1;
  margin-bottom: calc(var(--sos-chapa-base, 96px) * -.072);
  position: relative; z-index: 1;
}
.sos-chapa__anilla circle { stroke: var(--sos-anilla-color); }
.sos-chapa--tinta { --sos-anilla-color: var(--sos-tinta); }
.sos-chapa__img {
  width: 100%; height: auto;
  transform: translateX(calc(50% - var(--sos-anilla-x, 50%)));
  filter: drop-shadow(0 0 0 transparent);
}
.sos-chapa--compartida { view-transition-name: sos-chapa; }

/* ---------------------------------------------------------------- Sticker con texto en anillo */
.sos-anillo {
  position: relative; width: var(--sos-anillo-tam, 116px); height: var(--sos-anillo-tam, 116px); flex-shrink: 0;
}
.sos-anillo__giro { width: 100%; height: 100%; animation: sos-gira 14s linear infinite; }
.sos-anillo__giro text {
  font-family: var(--sos-f-etiqueta); font-size: 9.5px; letter-spacing: .06em; fill: var(--sos-tinta); text-transform: uppercase;
}
.sos-anillo__centro { position: absolute; inset: 0; width: 100%; height: 100%; }
.sos-anillo__chapa {
  position: absolute; left: 50%; top: 50%; width: 40%; height: auto;
  transform: translate(-50%, -50%);
}
.sos-anillo--lento .sos-anillo__giro { animation-duration: 20s; }

/* ---------------------------------------------------------------- Cinta de texto en movimiento */
.sos-cinta {
  --sos-cinta-fondo: var(--sos-tema-cabeza);
  --sos-cinta-color: var(--sos-tinta);
  --sos-cinta-dur: 15s;
  position: relative; overflow: hidden; flex-shrink: 0;
  height: 38px; display: flex; align-items: center;
  background: var(--sos-cinta-fondo); color: var(--sos-cinta-color);
  border-top: var(--sos-linea) solid var(--sos-tinta);
}
.sos-cinta--abajo { border-top: 0; border-bottom: var(--sos-linea) solid var(--sos-tinta); }
.sos-cinta--ambos { border-bottom: var(--sos-linea) solid var(--sos-tinta); }
.sos-cinta--sin-borde { border-top: 0; }
.sos-cinta__pista {
  display: flex; width: max-content; flex-shrink: 0;
  animation: sos-desliza var(--sos-cinta-dur) linear infinite;
  font-family: var(--sos-f-etiqueta); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap;
}
.sos-cinta__pista > span { flex-shrink: 0; padding-right: .2em; }
.sos-cinta--amarillo { --sos-cinta-fondo: var(--sos-amarillo); --sos-cinta-dur: 14s; }
.sos-cinta--naranja { --sos-cinta-fondo: var(--sos-naranja); }
.sos-cinta--rosa { --sos-cinta-fondo: var(--sos-rosa); }
.sos-cinta--blanco { --sos-cinta-fondo: var(--sos-blanco); }
.sos-cinta--tinta { --sos-cinta-fondo: var(--sos-tinta); --sos-cinta-color: var(--sos-crema); }
.sos-cinta--inclinada { transform: rotate(-2.5deg); margin: 8px -12px; border-bottom: var(--sos-linea) solid var(--sos-tinta); }

/* ---------------------------------------------------------------- Titulares y subrayado manual */
.sos-titular {
  font-family: var(--sos-f-titular); font-weight: 500;
  font-size: 38px; font-size: clamp(30px, 9.4cqw, 38px); line-height: 1.02; letter-spacing: -.015em;
  overflow-wrap: break-word; hyphens: manual;
}
.sos-titular--xl { font-size: 46px; font-size: clamp(36px, 11.8cqw, 46px); line-height: .98; letter-spacing: -.02em; }
.sos-titular--l { font-size: 38px; font-size: clamp(30px, 9.4cqw, 38px); }
.sos-titular--m { font-size: 34px; font-size: clamp(28px, 8.8cqw, 36px); line-height: 1; }
.sos-titular--s { font-size: 28px; font-size: clamp(24px, 7.2cqw, 28px); line-height: 1.05; letter-spacing: -.01em; }
.sos-titular--xs { font-size: 22px; line-height: 1.1; letter-spacing: 0; }
.sos-titular--nombre { font-weight: 800; letter-spacing: -.02em; }
.sos-subrayado { position: relative; display: inline-block; white-space: nowrap; }
.sos-subrayado__trazo {
  position: absolute; left: -4px; bottom: -.2em; width: calc(100% + 8px); height: .37em; min-height: 10px;
  overflow: visible; pointer-events: none;
}
.sos-subrayado__trazo path {
  stroke: var(--sos-subrayado, var(--sos-naranja)); stroke-width: 4; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  animation: sos-dibuja .9s 1s ease-out both;
}

/* ---------------------------------------------------------------- Flechas de trazo manual */
.sos-flecha { flex-shrink: 0; fill: none; stroke: var(--sos-flecha, currentColor); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sos-flecha--naranja { --sos-flecha: var(--sos-naranja); }
.sos-flecha--dibuja path { stroke-dasharray: 80; animation: sos-dibuja-80 .8s .6s ease-out both; }

/* ---------------------------------------------------------------- Botón-bloque (sombra dura que se «pisa») */
.sos-boton {
  --sos-boton-fondo: var(--sos-naranja);
  --sos-boton-color: var(--sos-tinta);
  --sos-boton-sombra: var(--sos-tinta);
  --sos-boton-desp: var(--sos-sombra);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; min-height: 64px; padding: 0 22px;
  border: 0; border-radius: 0;
  background: var(--sos-boton-fondo); color: var(--sos-boton-color) !important;
  box-shadow: var(--sos-boton-desp) var(--sos-boton-desp) 0 var(--sos-boton-sombra);
  font-family: var(--sos-f-etiqueta); font-weight: 500; font-size: 14px; letter-spacing: .2em; line-height: 1.3;
  text-transform: uppercase; text-decoration: none; text-align: left;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform var(--sos-pisada) ease-out, box-shadow var(--sos-pisada) ease-out;
}
.sos-boton:hover { color: var(--sos-boton-color) !important; transform: translate(-2px, -2px); box-shadow: calc(var(--sos-boton-desp) + 2px) calc(var(--sos-boton-desp) + 2px) 0 var(--sos-boton-sombra); }
.sos-boton:active, .sos-boton.is-pisado { transform: translate(var(--sos-boton-desp), var(--sos-boton-desp)); box-shadow: 0 0 0 var(--sos-boton-sombra); }
.sos-boton:focus-visible { outline: 3px solid var(--sos-azul); outline-offset: 4px; }
.sos-boton[disabled], .sos-boton[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.sos-boton .sos-flecha, .sos-boton__icono { stroke: currentColor; }
.sos-boton__texto { padding: 10px 0; }
.sos-boton--parte .sos-boton__texto { min-width: 0; overflow-wrap: anywhere; }   /* botones que llevan un nombre: si una palabra no cabe, se parte en vez de salirse */

.sos-boton--tinta { --sos-boton-fondo: var(--sos-tinta); --sos-boton-color: var(--sos-crema); --sos-boton-sombra: var(--sos-tema-cabeza); }
.sos-boton--blanco { --sos-boton-fondo: var(--sos-blanco); box-shadow: inset 0 0 0 var(--sos-linea) var(--sos-tinta), var(--sos-boton-desp) var(--sos-boton-desp) 0 var(--sos-boton-sombra); }
.sos-boton--blanco:active { box-shadow: inset 0 0 0 var(--sos-linea) var(--sos-tinta); }
.sos-boton--whatsapp { --sos-boton-fondo: var(--sos-verde); --sos-boton-color: var(--sos-crema); --sos-boton-sombra: var(--sos-tinta); }
.sos-boton--tema { --sos-boton-fondo: var(--sos-tema-cabeza); }
.sos-boton--crema { --sos-boton-fondo: var(--sos-crema); box-shadow: inset 0 0 0 var(--sos-linea) var(--sos-tinta), var(--sos-boton-desp) var(--sos-boton-desp) 0 var(--sos-boton-sombra); }

/* Tamaños: l (64–68 px, texto + icono a los lados), m (58 px), s (50 px) — m y s centran la palabra */
.sos-boton--xl { min-height: 68px; }
.sos-boton--m { min-height: 58px; font-size: 12px; font-weight: 400; justify-content: center; padding: 0 12px; }
.sos-boton--s { min-height: 50px; font-size: 11px; font-weight: 400; justify-content: center; padding: 0 10px; }
.sos-boton--plano { --sos-boton-desp: 0px; }
.sos-boton--plano:hover { transform: none; box-shadow: none; }
.sos-boton--blanco.sos-boton--plano, .sos-boton--blanco.sos-boton--plano:hover, .sos-boton--crema.sos-boton--plano, .sos-boton--crema.sos-boton--plano:hover { box-shadow: inset 0 0 0 var(--sos-linea) var(--sos-tinta); }
.sos-boton--plano:active { transform: translate(2px, 2px); }
.sos-boton--auto { width: auto; display: inline-flex; }

/* ---------------------------------------------------------------- Ficha de formulario */
.sos-ficha {
  background: var(--sos-blanco);
  border: var(--sos-linea) solid var(--sos-tinta);
  box-shadow: 7px 7px 0 var(--sos-tema-cabeza);
  display: flex; flex-direction: column;
}
.sos-ficha--sin-sombra { box-shadow: none; }
.sos-ficha__fila {
  position: relative;
  padding: 16px 18px 18px;
  border-bottom: var(--sos-linea) solid var(--sos-tinta);
  display: flex; flex-direction: column; gap: 8px;
}
.sos-ficha__fila:last-child { border-bottom: 0; }
/* Filas sueltas (form_row de Symfony fuera de una .sos-ficha): sin aspecto de módulo */
:not(.sos-ficha) > .sos-ficha__fila--casilla { padding: 0; border: 0; }
.sos-ficha__fila--error { box-shadow: inset 6px 0 0 var(--sos-naranja); }
.sos-ficha__fila--error .sos-campo { border-bottom-color: var(--sos-naranja); }
.sos-ficha__titulo { padding: 14px 18px; border-bottom: var(--sos-linea) solid var(--sos-tinta); background: var(--sos-tema-cabeza); }

.sos-campo {
  display: block; width: 100%; min-width: 0; height: 44px;
  padding: 0; margin: 0;
  border: 0; border-bottom: 2px solid var(--sos-tinta); border-radius: 0;
  background: transparent; color: var(--sos-tinta);
  font-family: var(--sos-f-texto); font-size: 20px; line-height: 1.2;
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--sos-pisada), box-shadow var(--sos-pisada);
}
.sos-campo::placeholder { color: #6E6A64; opacity: 1; }
.sos-campo:focus { outline: none; }
.sos-campo:focus-visible, .sos-campo:focus { border-bottom-color: var(--sos-tinta); box-shadow: 0 3px 0 var(--sos-naranja); }
.sos-campo--grande {
  height: 48px; font-family: var(--sos-f-titular); font-weight: 500; font-size: 30px; color: var(--sos-tema-texto);
}
textarea.sos-campo { height: auto; min-height: 96px; padding: 8px 0; resize: vertical; line-height: 1.4; font-size: 18px; }
select.sos-campo {
  padding-right: 22px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10' fill='none' stroke='%23141414' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 2.5 C 4 4, 5 6, 7 8 C 9 5, 10.5 3.5, 12.5 1.5'/%3E%3C/svg%3E") right 2px center / 14px 10px no-repeat;
}
.sos-telefono { display: flex; gap: 12px; }
.sos-telefono__prefijo { width: 108px; flex-shrink: 0; }
.sos-telefono__numero { flex-grow: 1; }

/* Contraseña con botón mostrar/ocultar (sos.js) */
.sos-clave { position: relative; display: flex; align-items: flex-end; }
.sos-clave .sos-campo { padding-right: 64px; }
.sos-clave__ver {
  position: absolute; right: 0; bottom: 2px; min-width: 56px; height: 42px; padding: 0 0 0 8px;
  border: 0; background: transparent; text-align: right;
  font-family: var(--sos-f-etiqueta); font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
}
.sos-clave__ver:hover { color: var(--sos-azul); }

/* Ayuda con flecha y error */
.sos-ayuda { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.sos-ayuda--m { font-size: 15px; }
.sos-error {
  display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; font-weight: 700;
}
.sos-error::before {
  content: '!'; flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sos-naranja); color: var(--sos-tinta);
  font-family: var(--sos-f-etiqueta); font-size: 11px; font-weight: 500; letter-spacing: 0;
}
.sos-errores { display: flex; flex-direction: column; gap: 6px; }
.sos-errores--bloque { padding: 14px 16px; border: var(--sos-linea) solid var(--sos-tinta); background: var(--sos-blanco); box-shadow: 6px 6px 0 var(--sos-naranja); }

/* Casillas cuadradas */
.sos-casilla { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-top: 10px; font-size: 16px; line-height: 1.4; cursor: pointer; }
.sos-casilla--s { font-size: 14px; line-height: 1.45; }
.sos-casilla input[type="checkbox"], .sos-casilla input[type="radio"] {
  -webkit-appearance: none; appearance: none; flex-shrink: 0;
  width: 22px; height: 22px; margin: 0; border: 2px solid var(--sos-tinta); border-radius: 0;
  background: var(--sos-blanco) center / 16px 16px no-repeat; cursor: pointer;
  transition: background-color var(--sos-pisada);
}
.sos-casilla input[type="radio"] { border-radius: 50%; }
.sos-casilla input:checked {
  background-color: var(--sos-tinta);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F1E8D9' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 13 L10 19 L20 6'/%3E%3C/svg%3E");
}
.sos-casilla input:focus-visible { outline: 3px solid var(--sos-azul); outline-offset: 2px; }
.sos-casilla--error input { border-color: var(--sos-naranja); box-shadow: 0 0 0 2px var(--sos-naranja); }
.sos-trampa { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- Foto a sangre */
.sos-foto { position: relative; flex-shrink: 0; height: var(--sos-foto-alto, 280px); }
.sos-foto__marco { position: absolute; inset: 0; overflow: hidden; background: var(--sos-tema-cabeza); }
.sos-foto__img {
  width: 100%; height: 100%; object-fit: cover; object-position: var(--sos-foto-pos, 50% 30%);
  animation: sos-zoom 1.4s var(--sos-ease) both;
}
.sos-foto__vacia { position: absolute; inset: 12% 10% 0; }
.sos-foto .sos-logo { position: absolute; left: 20px; top: 16px; z-index: 2; --sos-logo-w: 56px; }
.sos-foto__anillo { position: absolute; right: 14px; bottom: -40px; z-index: 4; --sos-anillo-tam: 124px; }
.sos-foto + .sos-nombre { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- Nombre gigante sobre naranja */
.sos-nombre {
  --sos-nombre-fondo: var(--sos-naranja);
  --sos-nombre-color: var(--sos-blanco);
  --sos-letras: 4;
  container-type: inline-size;
  background: var(--sos-nombre-fondo);
  padding: 18px var(--sos-gutter) 20px;
  border-top: var(--sos-linea) solid var(--sos-tinta);
  border-bottom: var(--sos-linea) solid var(--sos-tinta);
}
.sos-nombre--hueco::before { content: "";  float: right; width: 120px; height: 16px; } /* solo la línea de la etiqueta */
.sos-nombre__nombre {
  margin: 2px 0 0;
  font-family: var(--sos-f-titular); font-weight: 800; line-height: .92; letter-spacing: -.02em;
  font-size: 86px;
  /* Syne 800 ocupa ≈ 1 em por letra: la palabra más larga del nombre llena el ancho sin pasarse (máx. 86 px, mín. 26 px) */
  font-size: clamp(26px, calc((100cqw - 2 * var(--sos-gutter)) / var(--sos-letras)), 86px);
  color: var(--sos-nombre-color); overflow-wrap: break-word;
  animation: sos-sube .6s .2s var(--sos-ease) both;
}
.sos-nombre__detalle { clear: both; margin-top: 8px; font-size: 17px; font-weight: 500; }
.sos-nombre--tema { --sos-nombre-fondo: var(--sos-tema-cabeza); --sos-nombre-color: var(--sos-tinta); }
.sos-nombre--tinta { --sos-nombre-fondo: var(--sos-tinta); --sos-nombre-color: var(--sos-crema); color: var(--sos-crema); }

/* ---------------------------------------------------------------- Nota (OJO) con garabato */
.sos-nota {
  --sos-nota-fondo: var(--sos-tema-cabeza);
  position: relative; background: var(--sos-nota-fondo);
  border: var(--sos-linea) solid var(--sos-tinta); padding: 16px 18px;
}
/* el garabato se estira a lo ancho con la palabra (centrado en el texto, un 12 % y 24 px más ancho que su caja); el trazo no se deforma */
.sos-nota__garabato { position: absolute; left: calc(50% + 6px); top: 50%; width: calc(112% + 24px); max-width: none; height: 34px; transform: translate(-50%, -50%); overflow: visible; fill: none; stroke: var(--sos-tinta); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.sos-nota__garabato path { stroke-dasharray: 700; animation: sos-dibuja-700 1.6s .6s ease-out both; }
.sos-nota__titulo { position: relative; display: inline-block; padding-left: 12px; font-family: var(--sos-f-etiqueta); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.sos-nota__texto { margin-top: 12px; font-size: 17px; line-height: 1.4; }
.sos-nota--rosa { --sos-nota-fondo: var(--sos-rosa); }
.sos-nota--amarillo { --sos-nota-fondo: var(--sos-amarillo); }
.sos-nota--blanco { --sos-nota-fondo: var(--sos-blanco); }
.sos-nota--sombra { box-shadow: 6px 6px 0 var(--sos-tinta); }

/* ---------------------------------------------------------------- Tabla de datos */
.sos-tabla { background: var(--sos-blanco); border: var(--sos-linea) solid var(--sos-tinta); }
.sos-tabla__fila {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  min-height: 46px; padding: 12px 16px; border-bottom: var(--sos-linea) solid var(--sos-tinta);
}
.sos-tabla__fila:last-child { border-bottom: 0; }
.sos-tabla__fila--enlace { align-items: center; padding-top: 4px; padding-bottom: 4px; }
.sos-tabla__dato { flex-shrink: 0; max-width: 48%; padding-top: 2px; overflow-wrap: anywhere; }
.sos-tabla__valor { min-width: 0; font-size: 16px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.sos-tabla__valor a { display: inline-flex; align-items: center; min-height: 44px; }
.sos-tabla__valor--vacio { font-weight: 400; color: #5E5A55; }

/* ---------------------------------------------------------------- Progreso por cuadrados */
.sos-progreso { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sos-progreso__cuadros { display: grid; grid-auto-flow: column; grid-auto-columns: 22px; gap: 5px; }
.sos-progreso__cuadro { height: 22px; border: var(--sos-linea) solid var(--sos-tinta); }
.sos-progreso__cuadro--hecho { background: var(--sos-tinta); animation: sos-llena .4s var(--sos-ease) both; animation-delay: calc(.5s + var(--sos-i, 0) * .08s); }
.sos-progreso__texto { font-size: 15px; font-weight: 700; white-space: nowrap; }

/* ---------------------------------------------------------------- Tarjeta de peludo (panel) */
.sos-tarjeta {
  background: var(--sos-blanco); border: var(--sos-linea) solid var(--sos-tinta);
  box-shadow: 7px 7px 0 var(--sos-tema-cabeza);
}
.sos-tarjeta__cabecera { display: grid; grid-template-columns: min(148px, 44%) minmax(0, 1fr); border-bottom: var(--sos-linea) solid var(--sos-tinta); }
.sos-tarjeta__foto { width: 100%; aspect-ratio: 1; height: 100%; min-height: 128px; object-fit: cover; border-right: var(--sos-linea) solid var(--sos-tinta); background: var(--sos-crema); }
.sos-tarjeta__foto--vacia { display: flex; align-items: flex-end; justify-content: center; padding: 18px 10px 0; }
.sos-tarjeta__foto--vacia .sos-cabeza { width: 100%; aspect-ratio: 900 / 683; }
.sos-tarjeta__bloque {
  --sos-letras: 4;
  container-type: inline-size;
  position: relative; overflow: hidden; background: var(--sos-tema-cabeza);
  padding: 14px 14px 12px; padding-top: max(14px, var(--sos-tarjeta-reserva, 14px));   /* hueco del tag: el nombre no puede quedar debajo */
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
}
.sos-tarjeta__chapa { position: absolute; right: 12px; top: -4px; }
.sos-tarjeta__nombre {
  position: relative;
  font-family: var(--sos-f-titular); font-weight: 800; line-height: .95; letter-spacing: -.02em;
  font-size: 44px; font-size: clamp(14px, calc((100cqw - 28px) / var(--sos-letras)), 44px); overflow-wrap: break-word;
}
.sos-tarjeta__nombre a { text-decoration: none; }
.sos-tarjeta__estado { display: flex; align-items: center; gap: 8px; }
.sos-tarjeta__dato { background: var(--sos-amarillo); padding: 12px 16px; border-bottom: var(--sos-linea) solid var(--sos-tinta); display: flex; flex-direction: column; gap: 4px; }
.sos-tarjeta__dato-valor { font-size: 17px; font-weight: 700; }
.sos-tarjeta__cuerpo { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.sos-tarjeta__acciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ---------------------------------------------------------------- Módulo discontinuo «añadir» */
.sos-anadir {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 16px;
  border: var(--sos-linea) dashed var(--sos-tinta); text-decoration: none;
  transition: background-color var(--sos-pisada);
}
.sos-anadir:hover { background: var(--sos-blanco); color: var(--sos-tinta) !important; }
.sos-anadir__chapa { flex-shrink: 0; width: 40px; display: flex; justify-content: center; }
.sos-anadir__chapa img { width: auto; height: 48px; max-width: 54px; object-fit: contain; transform-origin: 50% 0; animation: sos-vaiven 3.6s ease-in-out infinite; }
.sos-anadir__titulo { font-family: var(--sos-f-titular); font-weight: 500; font-size: 22px; line-height: 1.1; }
.sos-anadir__texto { font-size: 15px; }

/* ---------------------------------------------------------------- Navegación inferior de 3 celdas */
.sos-nav {
  position: sticky; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(var(--sos-nav-celdas, 3), minmax(0, 1fr));
  border-top: var(--sos-linea) solid var(--sos-tinta);
  background: var(--sos-crema);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.sos-nav__celda {
  min-height: var(--sos-nav-alto); display: flex; align-items: center; justify-content: center; padding: 0 6px;
  font-family: var(--sos-f-etiqueta); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; text-align: center; line-height: 1.3;
  text-decoration: none; border-right: var(--sos-linea) solid var(--sos-tinta);
  transition: background-color var(--sos-pisada);
}
.sos-nav__celda:last-child { border-right: 0; }
.sos-nav__celda:hover { background: var(--sos-blanco); color: var(--sos-tinta) !important; }
.sos-nav__celda[aria-current="page"] { background: var(--sos-naranja); }
@media (max-width: 350px) { .sos-nav__celda { font-size: 9px; letter-spacing: .14em; } }

/* ---------------------------------------------------------------- Avisos (flash) con aspecto de nota/sticker */
.sos-avisos { position: relative; z-index: 20; display: flex; flex-direction: column; gap: 14px; padding: 14px var(--sos-gutter) 4px; }
.sos-aviso {
  --sos-aviso-fondo: var(--sos-amarillo);
  display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: start; gap: 4px 8px;
  padding: 12px 6px 14px 16px;
  background: var(--sos-aviso-fondo); border: var(--sos-linea) solid var(--sos-tinta);
  box-shadow: 6px 6px 0 var(--sos-tinta);
  transform: rotate(-1deg);
  animation: sos-aviso-entra .55s var(--sos-ease) both;
}
.sos-aviso:nth-child(even) { transform: rotate(.8deg); }
.sos-aviso__tipo { padding-top: 8px; }
.sos-aviso__texto { grid-column: 1; font-size: 16px; line-height: 1.4; }
.sos-aviso__cerrar {
  grid-column: 2; grid-row: 1 / span 2; width: 44px; height: 44px; padding: 0; margin: -4px 0 0;
  display: flex; align-items: center; justify-content: center; border: 0; background: transparent;
}
.sos-aviso__cerrar svg { width: 18px; height: 18px; stroke: var(--sos-tinta); stroke-width: 2.6; stroke-linecap: round; fill: none; }
.sos-aviso__cerrar:hover svg { stroke: var(--sos-azul); }
.sos-aviso--exito { --sos-aviso-fondo: var(--sos-tema-cabeza); }
.sos-aviso--error { --sos-aviso-fondo: var(--sos-naranja); }
.sos-aviso--info { --sos-aviso-fondo: var(--sos-blanco); }
.sos-aviso.is-cerrando { animation: sos-aviso-sale .3s ease-in both; }

/* Nota emergente de la demo (data-sos-nota, sos.js) */
.sos-emergente {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0)); z-index: 60;
  width: min(calc(100% - 2 * var(--sos-gutter)), calc(var(--sos-columna) - 2 * var(--sos-gutter)));
  transform: translateX(-50%) rotate(-1.2deg);
  display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 6px 8px; padding: 14px 6px 16px 18px;
  background: var(--sos-amarillo); border: var(--sos-linea) solid var(--sos-tinta); box-shadow: 6px 6px 0 var(--sos-tinta);
  animation: sos-emergente .45s var(--sos-ease) both;
}
.sos-emergente__texto { grid-column: 1; font-size: 16px; line-height: 1.4; }
.sos-emergente .sos-aviso__cerrar { grid-row: 1 / span 2; }

/* ---------------------------------------------------------------- Franja del dueño («Es tu peludo · Editar») */
.sos-franja {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 var(--sos-gutter);
  background: var(--sos-tinta); color: var(--sos-crema);
  font-family: var(--sos-f-etiqueta); font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
}
.sos .sos-franja a { color: var(--sos-crema); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.sos .sos-franja a:hover { color: var(--sos-tema-cabeza); }

/* ---------------------------------------------------------------- Bloques de color y colección de chapas */
.sos-bloque {
  --sos-bloque-fondo: var(--sos-tema-cabeza);
  background: var(--sos-bloque-fondo);
  border-top: var(--sos-linea) solid var(--sos-tinta);
  padding: 20px var(--sos-gutter) 22px; display: flex; flex-direction: column; gap: 14px;
}
.sos-bloque--rosa { --sos-bloque-fondo: var(--sos-rosa); }
.sos-bloque--amarillo { --sos-bloque-fondo: var(--sos-amarillo); }
.sos-bloque--blanco { --sos-bloque-fondo: var(--sos-blanco); }
.sos-bloque--crema { --sos-bloque-fondo: var(--sos-crema); }
.sos-bloque--caja { border: var(--sos-linea) solid var(--sos-tinta); padding: 18px; }

.sos-coleccion { display: flex; justify-content: space-between; align-items: flex-end; gap: 4px; height: 62px; }
.sos-coleccion img { flex: 0 1 auto; min-width: 0; height: auto; animation: sos-flota 3s ease-in-out infinite; animation-delay: calc(var(--sos-i, 0) * .3s); }

/* Vídeo de la demo (templates/demo/perfil.html.twig): marco con sombra dura, con la forma del vídeo para que no salte
   al cargarlo (preload="none") y sin pasar de ~78 % de la pantalla de alto, para verlo entero sin desplazarse. */
.sos-demo-video { margin-top: 30px; }
/* Demo: «cómo funciona» en tres pasos, para quien aún no lo ha comprado */
.sos-demo-compra { border-top: var(--sos-linea) solid var(--sos-tinta); }
.sos-perfil ~ .sos-demo-compra, .sos-contenido + .sos-demo-compra { margin-top: 30px; }
.sos-pasos { list-style: none; margin: 4px 0 0; padding: 0; border-top: var(--sos-linea) solid var(--sos-tinta); }
.sos-pasos li { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: baseline; gap: 4px; padding: 14px 0; border-bottom: var(--sos-linea) solid var(--sos-tinta); font-size: 16px; line-height: 1.4; }
.sos-pasos .sos-etiqueta { font-size: 14px; }
.sos-demo-video__marco {
  --sos-video-forma: .5625;
  position: relative; width: min(100% - 7px, 78svh * var(--sos-video-forma)); aspect-ratio: var(--sos-video-forma);
  margin: 2px auto 7px; background: var(--sos-tinta); border: var(--sos-linea) solid var(--sos-tinta);
  box-shadow: 7px 7px 0 var(--sos-naranja);
}
.sos-demo-video__marco--horizontal { --sos-video-forma: 1.7778; }
.sos-demo-video__marco--cuadrado { --sos-video-forma: 1; }
.sos-demo-video__video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--sos-tinta); }
.sos-demo-video__video p { padding: 16px; color: var(--sos-crema); }
.sos .sos-demo-video__video a { color: var(--sos-crema); }

/* ---------------------------------------------------------------- Pie */
.sos-pie {
  margin-top: auto; padding: 28px var(--sos-gutter) 18px;
  display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.4;
}
.sos-pie__linea { display: flex; align-items: center; gap: 12px; }
.sos-pie__logo { width: 34px; height: auto; flex-shrink: 0; }
.sos-pie__extra { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; padding-left: 46px; }
.sos-pie__extra a, .sos-pie__extra summary { min-height: 44px; display: inline-flex; align-items: center; }
.sos-pie__geo { font-size: 11px; color: #4D4A46; }
.sos-pie__geo a { color: inherit; }
.sos-nav ~ .sos-pie, .sos-pie--con-nav { padding-bottom: 12px; }

/* Lista de idiomas (details/summary, sin JS) */
.sos-idiomas summary {
  list-style: none; cursor: pointer; gap: 8px;
  text-decoration: underline; text-decoration-thickness: var(--sos-linea); text-underline-offset: 3px;
}
.sos-idiomas summary::-webkit-details-marker { display: none; }
.sos-idiomas summary::after {
  content: ''; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform var(--sos-pisada);
}
.sos-idiomas[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.sos-idiomas summary:hover { color: var(--sos-azul); }
.sos-idiomas__lista {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 6px 0 8px; border: var(--sos-linea) solid var(--sos-tinta); background: var(--sos-blanco);
  animation: sos-sube .35s var(--sos-ease) both;
}
.sos-idiomas__lista li { border-bottom: var(--sos-linea) solid var(--sos-tinta); }
.sos-idiomas__lista li:nth-child(odd) { border-right: var(--sos-linea) solid var(--sos-tinta); }
.sos-idiomas__lista li:last-child { border-bottom: 0; }
.sos-idiomas__lista li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.sos-idiomas__lista a { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; font-size: 15px; text-decoration: none; }
.sos-idiomas__lista a[aria-current="true"] { font-weight: 700; }
.sos-idiomas__lista a[aria-current="true"]::before { content: ''; width: 10px; height: 10px; background: var(--sos-naranja); flex-shrink: 0; }
.sos-idiomas { flex-basis: 100%; }
.sos-idiomas:not([open]) { flex-basis: auto; }

/* ---------------------------------------------------------------- Entrada escalonada */
.sos-entra { animation: sos-sube .6s var(--sos-retardo, 0s) var(--sos-ease) both; }
.sos-escalonado > * { animation: sos-sube .6s var(--sos-ease) both; }
.sos-escalonado > :nth-child(1) { animation-delay: .1s; }
.sos-escalonado > :nth-child(2) { animation-delay: .2s; }
.sos-escalonado > :nth-child(3) { animation-delay: .3s; }
.sos-escalonado > :nth-child(4) { animation-delay: .4s; }
.sos-escalonado > :nth-child(5) { animation-delay: .5s; }
.sos-escalonado > :nth-child(6) { animation-delay: .6s; }
.sos-escalonado > :nth-child(7) { animation-delay: .7s; }
.sos-escalonado > :nth-child(n+8) { animation-delay: .8s; }

/* ---------------------------------------------------------------- Animaciones */
@keyframes sos-sube { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sos-cae { 0% { opacity: 0; translate: 0 -90px; } 70% { opacity: 1; translate: 0 8px; } 100% { opacity: 1; translate: 0 0; } }
@keyframes sos-vaiven { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes sos-gira { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes sos-desliza { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes sos-dibuja { from { stroke-dashoffset: 170; } to { stroke-dashoffset: 0; } }
@keyframes sos-dibuja-80 { from { stroke-dashoffset: 80; } to { stroke-dashoffset: 0; } }
@keyframes sos-dibuja-220 { from { stroke-dashoffset: 220; } to { stroke-dashoffset: 0; } }
@keyframes sos-dibuja-700 { from { stroke-dashoffset: 700; } to { stroke-dashoffset: 0; } }
@keyframes sos-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes sos-flota { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-7px) rotate(4deg); } }
@keyframes sos-llena { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes sos-aviso-entra { from { opacity: 0; translate: 0 -24px; } to { opacity: 1; translate: 0 0; } }
@keyframes sos-aviso-sale { to { opacity: 0; translate: 0 -16px; } }
@keyframes sos-emergente { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }

/* ---------------------------------------------------------------- Transiciones entre páginas */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; }
::view-transition-group(sos-logo), ::view-transition-group(sos-chapa) { animation-duration: .45s; animation-timing-function: var(--sos-ease); }

/* ---------------------------------------------------------------- Movimiento reducido: todo quieto */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------- Impresión */
@media print {
  .sos-nav, .sos-cinta, .sos-fondo, .sos-avisos, .sos-idiomas { display: none !important; }
  .sos-pagina { max-width: none; border: 0; box-shadow: none; }
}
