@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* Paleta del manual de marca */
:root {
  --naranja: #FFA300;
  --cacao: #170200;
  --melocoton: #FFB070;
  --crema: #FFF1E6;      /* fondo del hero, melocotón aclarado */
  --papel: #FFF9F4;      /* fondo de servicios */
  --gris: #4A3B33;       /* texto secundario */
  --linea: rgba(23, 2, 0, .1);
  --radio: 18px;
  --f: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; font: 400 17px/1.55 var(--f); color: var(--cacao); background: var(--papel); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 0; }
.contenedor { width: min(1200px, 100% - 64px); margin-inline: auto; }
.saltar { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--cacao); color: #fff; padding: 10px 16px; border-radius: 8px; }
.saltar:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--cacao); outline-offset: 3px; border-radius: 6px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; flex: none; }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px;
  font-weight: 700; font-size: 17px; text-decoration: none; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.boton--lleno { background: var(--naranja); color: var(--cacao); box-shadow: 0 6px 0 -1px rgba(23,2,0,.15); }
.boton--lleno:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -8px rgba(255,163,0,.8); }
.boton--borde { border: 2.5px solid var(--naranja); color: var(--cacao); }
.boton--borde:hover { background: var(--naranja); }
.boton--peq { padding: 12px 22px; font-size: 15px; }

/* ---------- Cabecera ---------- */
.cabecera { position: sticky; top: 0; z-index: 20; background: rgba(255,241,230,.92); backdrop-filter: blur(10px); }
.cabecera__fila { display: flex; align-items: center; gap: 32px; height: 92px; }
.marca img { width: auto; height: 78px; transition: transform .3s; }
.marca:hover img { transform: rotate(-3deg) scale(1.03); }
.menu { display: flex; gap: 36px; margin: 0 auto; }
.menu a { position: relative; text-decoration: none; font-weight: 600; font-size: 15.5px; padding: 6px 0; }
.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-radius: 3px; background: var(--naranja); transform: scaleX(0); transition: transform .25s; }
.menu a:hover::after, .menu a.activo::after { transform: scaleX(1); }
.menu a.activo { font-weight: 800; }
.menu-movil { display: none; }
.desplegable { display: none; }
/* Selector de idioma: ES ⇄ EN */
.idioma { flex: none; display: flex; align-items: center; gap: 6px; padding: 7px 13px; border: 2px solid var(--cacao); border-radius: 999px; font-size: 13.5px; font-weight: 800; letter-spacing: .06em; line-height: 1; }
.idioma a { text-decoration: none; opacity: .5; transition: opacity .2s; }
.idioma a:hover, .idioma a:focus-visible { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.idioma__sep { opacity: .5; }

/* ---------- Hero ---------- */
.hero { background: var(--crema); overflow: hidden; }
.hero__fila { display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 24px; min-height: 560px; padding-block: 24px 0; }
.antetitulo, .eti { font-size: 13px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gris); margin: 0 0 18px; }
.eti { display: flex; align-items: center; gap: 14px; }
.eti::after { content: ""; width: 44px; height: 3px; border-radius: 3px; background: var(--naranja); }
h1 { font-size: clamp(42px, 5.2vw, 66px); margin-bottom: 26px; }
.subrayado { position: relative; white-space: nowrap; }
.subrayado::after {
  content: ""; position: absolute; left: -2px; right: 18%; bottom: -10px; height: 12px;
  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 9 C 60 1, 140 1, 197 6' fill='none' stroke='%23FFA300' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.entrada { font-size: 18px; color: var(--gris); max-width: 31em; margin: 0 0 32px; }
.hero__imagen { align-self: end; }
.mascota-viva { position: relative; width: 112%; margin-left: -4%; animation: flota 6s ease-in-out infinite; }
.mascota-viva img { display: block; width: 100%; }
@keyframes flota { 50% { transform: translateY(-8px); } }
/* Ojos encima de la imagen: el párpado espera fuera del ojo y baja al parpadear */
.ojos { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.parpado { transform: translateY(var(--abierto)); }
.parpado.cierra { animation: parpadeo .22s ease-in-out; }
@keyframes parpadeo { 45%, 55% { transform: translateY(var(--cerrado)); } }

/* ---------- Servicios ---------- */
.servicios { padding: 96px 0 104px; background: var(--papel); }
h2 { font-size: clamp(34px, 3.6vw, 46px); margin-bottom: 18px; }
.sub { font-size: 18px; color: var(--gris); max-width: 27em; margin: 0; }
.sub b { color: var(--cacao); }
.tarjetas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.tarjeta {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radio);
  padding: 22px 22px 24px; border: 1.5px solid var(--linea);
  /* sombra plana: un bloque desplazado, sin difuminar */
  box-shadow: 0 4px 0 rgba(23,2,0,.08);
  position: relative; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s cubic-bezier(.2,.8,.2,1);
}
.tarjeta:hover, .tarjeta:focus-within { z-index: 2; transform: translateY(-10px); box-shadow: 0 14px 0 rgba(23,2,0,.1); }
.tarjeta__ico {
  height: 150px; display: grid; place-items: center; margin-bottom: 18px;
}
.tarjeta__ico img { width: 100%; height: 100%; object-fit: contain; }
.tarjeta h3 { font-size: 19px; letter-spacing: -.015em; margin-bottom: 10px; }
.tarjeta p { font-size: 14.5px; line-height: 1.5; color: var(--gris); margin: 0 0 20px; }
.flecha {
  margin-top: auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--naranja); text-decoration: none; font-weight: 800; transition: transform .2s;
}
.tarjeta:hover .flecha { transform: translateX(4px); }
/* Todo el panel es clicable (script.js reenvía el clic a la flecha) */
.tarjeta:has(.flecha[data-dossier]) { cursor: pointer; }
.tarjeta:has(.flecha:focus-visible) { outline: 3px solid var(--naranja); outline-offset: 3px; }
.flecha:focus-visible { outline: none; }

/* ---------- Portafolio ---------- */
.portafolio { padding: 96px 0; background: #FDEEE1; }
.portafolio__fila { display: grid; grid-template-columns: .8fr 1.7fr; gap: 48px; align-items: center; }
.portafolio .sub { margin-bottom: 32px; }
/* Cuatro casillas iguales, en dos filas */
.rejilla { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rejilla figure { position: relative; margin: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--melocoton); }
.rejilla img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.rejilla figure:hover img { transform: scale(1.06); }
/* Cada casilla es una categoría: nombre y número de trabajos siempre a la vista */
.rejilla figcaption {
  position: absolute; left: 10px; bottom: 10px; display: flex; align-items: baseline; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(23,2,0,.86); color: #fff; font-size: 13px; transition: background .25s;
}
.rejilla figcaption b { font-weight: 700; }
.rejilla figcaption span { color: var(--naranja); font-weight: 600; font-size: 12px; }
.rejilla figure:hover figcaption, .rejilla figure:focus-within figcaption { background: var(--cacao); }
/* Botón invisible sobre cada casilla que abre el documento de su categoría */
.rejilla__abrir { position: absolute; inset: 0; z-index: 1; width: 100%; border: 0; padding: 0; background: none; cursor: pointer; border-radius: inherit; }
.rejilla__abrir:focus-visible { outline: 3px solid var(--naranja); outline-offset: -3px; }

/* ---------- Documento de una categoría ---------- */
/* El diálogo ocupa la pantalla y hace scroll; dentro, una hoja de papel centrada */
.dossier { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 40px 16px; border: 0; background: transparent; overflow-y: auto; overscroll-behavior: contain; }
.dossier::backdrop { background: rgba(23,2,0,.82); }
.dossier__doc { max-width: 980px; margin: 0 auto; background: var(--papel); border-radius: 18px; padding: 48px 56px 24px; box-shadow: 0 14px 0 rgba(0,0,0,.25); }
.dossier[open] .dossier__doc { animation: dossier-sube .35s cubic-bezier(.2,.8,.2,1); }
@keyframes dossier-sube { from { opacity: 0; transform: translateY(40px); } }
.dossier__cab { padding-bottom: 28px; border-bottom: 1.5px solid var(--linea); }
.dossier__cab h2 { margin-bottom: 8px; }
.dossier__cab p:last-child { margin: 0; max-width: 620px; color: var(--gris); }
.dossier__cerrar { position: fixed; top: 16px; right: 16px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--cacao); font-size: 20px; font-weight: 700; cursor: pointer; transition: background .2s; }
.dossier__cerrar:hover { background: var(--naranja); }
.dossier__cerrar:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; }
.trabajo { padding: 36px 0; border-bottom: 1.5px solid var(--linea); }
.trabajo:last-child { border-bottom: 0; }
.trabajo h3 { font-size: 26px; margin: 0; }
.trabajo__meta { margin: 2px 0 10px; font-size: 13px; font-weight: 700; color: var(--gris); letter-spacing: .08em; text-transform: uppercase; }
.trabajo p:not(.trabajo__meta) { margin: 0 0 20px; max-width: 640px; }
.trabajo img { display: block; width: 100%; height: auto; border-radius: 12px; cursor: zoom-in; }
.trabajo img + img { margin-top: 14px; }
/* Más pantallas de cada web, bajo su mockup */
.trabajo__capturas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.trabajo__capturas img, .trabajo__capturas img + img { margin: 0; border-radius: 10px; box-shadow: 0 0 0 1px var(--linea), 0 5px 0 rgba(23,2,0,.07); }
.trabajo img:focus { outline: none; }
.trabajo img:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; }
.trabajo--ejemplo img { max-width: 620px; }
html:has(.dossier[open]) { overflow: hidden; }

/* ---------- Visor de imágenes ---------- */
.visor { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 56px 72px; border: 0; background: transparent; }
.visor[open] { display: grid; place-items: center; }
.visor::backdrop { background: rgba(23,2,0,.9); }
.visor__fig { margin: 0; display: grid; justify-items: center; gap: 14px; max-height: 100%; }
.visor__fig img { max-width: 100%; max-height: calc(100dvh - 150px); width: auto; height: auto; border-radius: 10px; box-shadow: 0 10px 0 rgba(0,0,0,.25); }
.visor figcaption { color: #fff; font-weight: 600; font-size: 15px; text-align: center; }
.visor__btn { position: fixed; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--cacao); font-size: 20px; font-weight: 700; cursor: pointer; display: grid; place-items: center; transition: background .2s, transform .2s; }
.visor__btn:hover { background: var(--naranja); }
.visor__btn:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; }
.visor__cerrar { top: 16px; right: 16px; }
.visor__ant { left: 16px; top: 50%; transform: translateY(-50%); }
.visor__sig { right: 16px; top: 50%; transform: translateY(-50%); }
.visor[open] .visor__fig { animation: visor-entra .25s cubic-bezier(.2,.8,.2,1); }
@keyframes visor-entra { from { opacity: 0; transform: scale(.96); } }
html:has(.visor[open]) { overflow: hidden; }

/* ---------- Contacto ---------- */
.cta { position: relative; background: #231C1A; color: #fff; padding: 58px 0; }
.cta__fila { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-left: 300px; }
.cta h2 { color: var(--naranja); font-size: clamp(34px, 3.4vw, 46px); margin-bottom: 4px; }
.cta p { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
/* La mascota asoma por la izquierda, por encima de la franja, sobre una mancha naranja. Sin animación. */
.cta__mascota { position: absolute; left: 0; bottom: 0; width: 340px; height: calc(100% + 64px); pointer-events: none; }
.cta__mancha { position: absolute; left: 0; top: 0; width: 225px; height: auto; }
.cta__mascota img { position: absolute; left: 10px; bottom: 0; width: 262px; height: auto; }
.cta__chispa { position: absolute; left: 270px; top: 112px; width: 56px; }

/* ---------- Pie ---------- */
.pie { position: relative; overflow: hidden; border-top: 1px solid rgba(255,255,255,.08); background: #1C1513; color: rgba(255,255,255,.75); font-size: 14px; padding: 28px 0 22px; }
.pie__fila { display: flex; align-items: center; gap: 28px; }
.pie p { margin: 0; }
.legal { display: flex; gap: 18px; margin-right: auto; }
.legal a, .creditos a { color: rgba(255,255,255,.75); }
.redes { display: flex; gap: 18px; }
.redes a { color: #fff; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; transition: background .2s, color .2s; }
.redes a:hover { background: var(--naranja); color: var(--cacao); }
.redes svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.pie .creditos { margin: 14px auto 0; font-size: 12px; color: rgba(255,255,255,.55); }

.pie__mancha { position: absolute; right: 0; bottom: 0; width: 170px; height: auto; }
.pie__fila, .pie .creditos { position: relative; }

/* ---------- Aparición al hacer scroll ---------- */
.aparece { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.aparece.visto { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .tarjetas { grid-template-columns: repeat(2, 1fr); }
  .portafolio__fila { grid-template-columns: 1fr; gap: 28px; }
  .menu { gap: 22px; }
}
@media (max-width: 860px) {
  .contenedor { width: calc(100% - 32px); }
  .menu, .cabecera .boton { display: none; }
  .cabecera__fila { height: 72px; justify-content: space-between; }
  .idioma { margin-left: auto; margin-right: -16px; }
  .marca img { height: 60px; }
  .menu-movil { display: grid; gap: 5px; padding: 12px; background: none; border: 0; cursor: pointer; }
  .menu-movil span { width: 24px; height: 2.5px; border-radius: 2px; background: var(--cacao); transition: .25s; }
  .menu-movil[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .menu-movil[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-movil[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .desplegable:not([hidden]) { display: flex; flex-direction: column; padding: 8px 16px 18px; }
  .desplegable a { padding: 12px 0; border-top: 1px solid var(--linea); font-weight: 600; text-decoration: none; }
  html { scroll-padding-top: 76px; }
  .hero__fila { grid-template-columns: 1fr; min-height: 0; padding-top: 32px; }
  .mascota-viva { width: 100%; margin: 0; }
  .tarjetas { grid-template-columns: 1fr; gap: 10px; margin-top: 24px; }
  /* En móvil: solo imagen y título, en una fila */
  .tarjeta { display: grid; grid-template-columns: 74px 1fr 34px; align-items: center; gap: 14px; padding: 8px 12px; }
  .tarjeta__ico { height: 60px; margin: 0; }
  .tarjeta h3 { font-size: 16.5px; margin: 0; }
  .tarjeta p { display: none; }
  .flecha { width: 34px; height: 34px; margin: 0; }
  .tarjeta:hover, .tarjeta:focus-within { transform: translateY(-4px); box-shadow: 0 8px 0 rgba(23,2,0,.1); }
  .rejilla { grid-template-columns: 1fr 1fr; }
  .rejilla figcaption { left: 6px; right: 6px; bottom: 6px; flex-direction: column; gap: 0; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; line-height: 1.25; }
  .rejilla figcaption span { font-size: 11px; }
  /* Documento en móvil: hoja a todo el ancho */
  .dossier { padding: 64px 8px 16px; }
  .dossier__doc { padding: 28px 18px 8px; border-radius: 14px; }
  .trabajo { padding: 26px 0; }
  .trabajo h3 { font-size: 22px; }
  /* En móvil las capturas extra se deslizan en horizontal */
  .trabajo__capturas { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .trabajo__capturas img { scroll-snap-align: start; }
  /* Visor en móvil: la foto a todo el ancho y las flechas abajo */
  .visor { padding: 64px 12px 84px; }
  .visor__fig img { max-height: calc(100dvh - 190px); }
  .visor__ant, .visor__sig { top: auto; bottom: 18px; transform: none; }
  .visor__ant { left: calc(50% - 56px); }
  .visor__sig { right: calc(50% - 56px); }
  .servicios, .portafolio { padding: 64px 0; }
  .cta { padding: 160px 0 44px; margin-top: 40px; }
  .cta__fila { flex-direction: column; align-items: flex-start; padding-left: 0; }
  .cta__mascota { width: 260px; height: 190px; top: -40px; bottom: auto; }
  .cta__mascota img { width: 190px; }
  .cta__mancha { width: 160px; bottom: 10px; }
  .cta__chispa { left: 196px; top: 50px; width: 44px; }
  .pie__fila { flex-wrap: wrap; gap: 14px 24px; }
}
@media (max-width: 520px) {
  .boton { white-space: normal; }
}
/* ---------- Pop-up de contacto ---------- */
.contacto { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 32px 16px; border: 0; background: transparent; overflow-y: auto; overscroll-behavior: contain; }
.contacto[open] { display: grid; place-items: center; }
.contacto::backdrop { background: rgba(23,2,0,.82); }
html:has(.contacto[open]) { overflow: hidden; }
.contacto__caja { position: relative; width: min(940px, 100%); display: grid; grid-template-columns: 300px 1fr; background: var(--papel); border-radius: 22px; overflow: hidden; box-shadow: 0 14px 0 rgba(0,0,0,.25); }
.contacto[open] .contacto__caja { animation: dossier-sube .35s cubic-bezier(.2,.8,.2,1); }
/* Lado naranja con la mascota */
.contacto__lado { position: relative; display: flex; flex-direction: column; align-items: flex-start; background: var(--naranja); padding: 40px 32px 0; overflow: hidden; }
.contacto__lado .eti { color: var(--cacao); }
.contacto__lado .eti::after { background: var(--cacao); }
.contacto__lado h2 { font-size: 38px; margin: 6px 0 14px; }
.contacto__lado p { margin: 0 0 22px; font-size: 16px; line-height: 1.5; }
.contacto__correo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; text-decoration: none; padding: 9px 14px; border-radius: 999px; background: rgba(255,255,255,.4); }
.contacto__correo:hover { background: #fff; }
/* La mascota apunta en su libreta, de pie sobre el borde inferior (la imagen viene cortada por abajo) */
/* La mascota va en el flujo, siempre debajo del correo: el lateral crece si hace falta y nunca la monta encima */
.contacto__mascota { flex: none; align-self: center; width: 250px; max-width: none; height: auto; margin: auto 0 0; padding-top: 28px; translate: 3% 0; pointer-events: none; }
/* Formulario */
.contacto__form, .contacto__hecho { padding: 40px 40px 32px; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.campo { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.campo label, .campo legend { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.req { color: #C25E00; }
.opc { font-weight: 500; color: var(--gris); }
.campo input, .campo textarea, .campo select { width: 100%; font: inherit; font-size: 16px; color: var(--cacao); background: #fff; border: 1.5px solid rgba(23,2,0,.18); border-radius: 12px; padding: 11px 14px; transition: border-color .2s, box-shadow .2s; }
.campo textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
.campo select { appearance: none; padding-right: 40px; cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23170200' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px; }
.campo input::placeholder, .campo textarea::placeholder { color: #8A7B72; }
.campo input:hover, .campo textarea:hover, .campo select:hover { border-color: rgba(23,2,0,.35); }
.campo input:focus, .campo textarea:focus, .campo select:focus { outline: none; border-color: var(--naranja); box-shadow: 0 0 0 4px rgba(255,163,0,.25); }
.campo--medio { max-width: 280px; }
.campo__error { display: none; margin: 6px 0 0; font-size: 13.5px; font-weight: 600; color: #B42318; }
.campo [aria-invalid="true"] { border-color: #B42318; }
.campo:has([aria-invalid="true"]) .campo__error { display: block; }
/* Servicios como fichas marcables */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0 !important; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid rgba(23,2,0,.18); background: #fff; font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s; }
.chip:hover span { border-color: var(--naranja); }
.chip input:checked + span { background: var(--cacao); border-color: var(--cacao); color: #fff; }
.chip input:checked + span::before { content: "✓"; color: var(--naranja); font-weight: 800; }
.chip input:focus-visible + span { outline: 3px solid var(--naranja); outline-offset: 2px; }
.contacto__pie { display: flex; align-items: center; gap: 18px; margin-top: 8px; padding-top: 20px; border-top: 1.5px solid var(--linea); }
.contacto__pie .boton { border: 0; cursor: pointer; font-family: inherit; }
.contacto__nota { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--gris); }
/* Casilla de privacidad y trampa antispam */
.check { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 500 !important; font-size: 14px !important; line-height: 1.45; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--cacao); cursor: pointer; }
.check a { font-weight: 700; }
.campo--check:has([aria-invalid="true"]) .check input { outline: 2px solid #B42318; outline-offset: 2px; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contacto__pie .boton[aria-busy="true"] { opacity: .7; cursor: progress; transform: none; }
/* Resultado: enviado o error */
.contacto__hecho .contacto__res { display: none; }
.contacto__hecho[data-estado="ok"] .contacto__res--ok, .contacto__hecho[data-estado="error"] .contacto__res--error { display: block; }
.contacto__ok--error { background: #FDE3DF; color: #B42318; }
/* Estado «listo» */
.contacto__hecho { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 420px; }
.contacto__hecho:focus { outline: none; }
.contacto__hecho[hidden], .contacto__form[hidden] { display: none; }
.contacto__form, .contacto__hecho { grid-column: 2; grid-row: 1; }
@media (max-width: 860px) { .contacto__form, .contacto__hecho { grid-column: 1; grid-row: 2; } }
.contacto__ok { width: 64px; height: 64px; border-radius: 50%; background: var(--naranja); display: grid; place-items: center; font-size: 30px; font-weight: 800; margin: 0 0 18px; }
.contacto__hecho h2 { font-size: 34px; margin-bottom: 10px; }
.contacto__hecho > p { margin: 0 0 24px; max-width: 460px; color: var(--gris); }
.contacto__acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.contacto__acciones .boton { background: none; cursor: pointer; font-family: inherit; }
.contacto__volver { border: 0; background: none; font: inherit; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--cacao); padding: 6px 0; }
.contacto__copiado { min-height: 1.4em; margin: 14px 0 0 !important; font-size: 14px; font-weight: 600; color: #1F7A3A !important; }
.contacto__cerrar { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: var(--cacao); font-size: 18px; font-weight: 700; cursor: pointer; box-shadow: 0 0 0 1.5px var(--linea); }
.contacto__cerrar:hover { background: var(--naranja); }
@media (max-width: 860px) {
  .contacto { padding: 0; }
  .contacto[open] { place-items: end center; }
  .contacto__caja { grid-template-columns: 1fr; border-radius: 20px 20px 0 0; max-height: 100dvh; overflow-y: auto; }
  .contacto__lado { padding: 26px 20px 18px; padding-right: 120px; }
  .contacto__lado h2 { font-size: 28px; margin-bottom: 8px; }
  .contacto__lado p { font-size: 14.5px; margin-bottom: 14px; }
  .contacto__mascota { position: absolute; width: 104px; right: 10px; bottom: 0; margin: 0; padding: 0; translate: none; }
  .contacto__form, .contacto__hecho { padding: 22px 20px 28px; }
  .campos { grid-template-columns: 1fr; }
  .campo--medio { max-width: none; }
  .contacto__pie { flex-direction: column; align-items: stretch; text-align: center; }
  .contacto__pie .boton { justify-content: center; }
  .contacto__hecho { min-height: 0; }
  .contacto__cerrar { top: 12px; right: 12px; }
}
/* ---------- Índice lateral de los documentos del portafolio ---------- */
.indice { position: fixed; top: 50%; left: max(20px, calc((100vw - 980px) / 2 - 76px)); transform: translateY(-50%); z-index: 2; }
.indice ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; }
.indice li { display: flex; flex-direction: column; align-items: center; opacity: .7; transition: opacity .25s; }
/* Línea blanca entre número y número */
/* Separación doble entre números; la línea queda suelta, sin tocar los círculos */
.indice li + li::before { content: ""; width: 2px; height: 40px; margin: 10px 0; border-radius: 2px; background: #fff; opacity: .7; }
.indice li.activo { opacity: 1; }
.indice li.activo + li::before { opacity: 1; }
.indice a { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; text-decoration: none; font-variant-numeric: tabular-nums; transition: background .25s, color .25s, transform .25s; }
.indice a:hover { transform: scale(1.08); }
.indice li.activo a { background: #fff; color: var(--cacao); transform: scale(1.18); }
.indice a:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; }
/* Sin hueco a la izquierda del documento: se aparta para dejar sitio al índice */
@media (max-width: 1140px) { .dossier { padding-left: 84px; } .indice { left: 20px; } }
@media (max-width: 860px) {
  .dossier { padding-left: 46px; }
  .indice { left: 8px; }
  .indice a { width: 30px; height: 30px; font-size: 13px; }
  .indice li + li::before { height: 24px; margin: 6px 0; }
}
/* ---------- Páginas legales ---------- */
.pagina-legal { background: var(--papel); }
.volver { margin-left: auto; font-weight: 700; font-size: 15px; text-decoration: none; padding: 8px 4px; }
.volver:hover { text-decoration: underline; text-underline-offset: 4px; }
.pagina-legal .cabecera .idioma { margin: 0; }
.textos-legales { padding: 56px 0 96px; }
.textos-legales__doc { max-width: 760px; }
.textos-legales h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 10px; }
.textos-legales__fecha { color: var(--gris); font-size: 14px; margin: 0 0 36px; padding-bottom: 28px; border-bottom: 1.5px solid var(--linea); }
.textos-legales h2 { font-size: 22px; letter-spacing: -.02em; margin: 40px 0 12px; }
.textos-legales p, .textos-legales li { color: #2E211B; line-height: 1.65; }
.textos-legales p { margin: 0 0 14px; }
.textos-legales ul { margin: 0 0 14px; padding-left: 22px; }
.textos-legales li { margin-bottom: 8px; }
.textos-legales a { font-weight: 600; text-underline-offset: 3px; }
.textos-legales .ficha { list-style: none; padding: 20px 22px; background: #fff; border: 1.5px solid var(--linea); border-radius: 14px; }
.textos-legales .ficha li:last-child { margin-bottom: 0; }
/* Datos del titular pendientes de rellenar: bien visibles hasta que se completen */
.dato { background: #FFE58A; color: var(--cacao); padding: 1px 6px; border-radius: 5px; font-weight: 700; }
.pie .legal a[aria-current="page"] { color: #fff; font-weight: 700; }
@media (max-width: 860px) {
  .pagina-legal .cabecera .idioma { margin-right: 0; }
  .volver { font-size: 14px; }
  .textos-legales { padding: 36px 0 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .aparece { opacity: 1; transform: none; }
}
