/* Teatradas. Hoja de estilo única. Tokens y decisiones en web/DESIGN.md */

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url(../fuentes/fredoka-latin-variable.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: 'Nunito';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fuentes/nunito-latin-variable.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;
}

/* ---------- Tokens ---------- */
:root {
  /* Colores de marca (medidos en marca/README.md) */
  --azul: #1A3D85;
  --azul-noche: #122C63;
  --rojo: #D7282B;
  --rojo-oscuro: #B81F22;
  --amarillo: #F8B924;
  --crema: #FCF4E2;
  --crema-fuerte: #F6E8C8;
  --blanco: #FFFFFF;
  --tinta: #26324F;

  /* Tipografía */
  --fuente-titulo: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --fuente-texto: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-xs: 0.875rem;
  --t-s: 1rem;
  --t-m: 1.125rem;
  --t-l: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --t-xl: clamp(1.6rem, 1.3rem + 1.3vw, 2.25rem);
  --t-2xl: clamp(2rem, 1.5rem + 2.4vw, 3.25rem);
  --t-3xl: clamp(2.3rem, 1.6rem + 3.4vw, 4rem);

  /* Espaciado */
  --e-1: 0.25rem;
  --e-2: 0.5rem;
  --e-3: 0.75rem;
  --e-4: 1rem;
  --e-5: 1.5rem;
  --e-6: 2rem;
  --e-7: 3rem;
  --e-8: clamp(3.5rem, 2.5rem + 4vw, 6rem);

  --ancho: 72rem;
  --margen: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --radio: 1.25rem;
  --radio-s: 0.75rem;
  --sombra: 0 0.5rem 1.5rem rgba(18, 44, 99, 0.12);

  /* Pespunte vaquero */
  --pespunte: 2px dashed rgba(252, 244, 226, 0.55);
  --pespunte-azul: 2px dashed rgba(26, 61, 133, 0.35);

  --foco: var(--azul);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font-family: var(--fuente-texto);
  font-size: var(--t-m);
  line-height: 1.6;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  line-height: 1.1;
  color: var(--azul);
  margin: 0 0 var(--e-4);
  text-wrap: balance;
}
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-xl); }
h4 { font-size: var(--t-xl); }

p { margin: 0 0 var(--e-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--azul); text-underline-offset: 0.2em; }
a:hover { color: var(--rojo-oscuro); }

:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
  border-radius: 4px;
}

[id] { scroll-margin-top: 1rem; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.saltar {
  position: absolute;
  left: var(--e-4);
  top: -4rem;
  z-index: 10;
  background: var(--azul);
  color: var(--crema);
  padding: var(--e-2) var(--e-4);
  border-radius: var(--radio-s);
}
.saltar:focus { top: var(--e-4); color: var(--crema); }

.contenedor {
  width: 100%;
  max-width: calc(var(--ancho) + 2 * var(--margen));
  margin-inline: auto;
  padding-inline: var(--margen);
}

.seccion { padding-block: var(--e-8); }

.antetitulo {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  font-weight: 700;
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rojo-oscuro);
  margin-bottom: var(--e-3);
}
.antetitulo::before {
  content: "";
  width: 0.9em;
  height: 0.9em;
  background: var(--amarillo);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.icono { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

/* ---------- Botones ---------- */
.botones { display: flex; flex-wrap: wrap; gap: var(--e-3); }

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e-2);
  min-height: 3rem;
  padding: var(--e-3) var(--e-5);
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: var(--t-m);
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}
.boton--pequeno { min-height: 2.5rem; padding: var(--e-2) var(--e-4); font-size: var(--t-s); }

.boton--rojo { background: var(--rojo); color: var(--blanco); }
.boton--rojo:hover { background: var(--rojo-oscuro); color: var(--blanco); }

.boton--borde { border-color: var(--azul); color: var(--azul); background: transparent; }
.boton--borde:hover { background: var(--azul); color: var(--crema); }

.boton--amarillo { background: var(--amarillo); color: var(--azul-noche); }
.boton--amarillo:hover { background: var(--crema); color: var(--azul-noche); }

.boton--claro { border-color: var(--crema); color: var(--crema); background: transparent; }
.boton--claro:hover { background: var(--crema); color: var(--azul-noche); }

@media (prefers-reduced-motion: no-preference) {
  .boton:hover { transform: translateY(-2px); }
}

/* ---------- Cabecera ---------- */
.cabecera { background: var(--crema); }

.cabecera__fila {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--e-3) var(--e-5);
  padding-block: var(--e-3);
}

.cabecera__logo { display: block; flex: none; border-radius: var(--radio-s); }
.cabecera__logo img { width: 8.5rem; }

.cabecera__boton { margin-left: auto; }

.menu { order: 3; width: 100%; }
.menu ul {
  list-style: none;
  margin: 0;
  padding: var(--e-2) 0 0;
  border-top: var(--pespunte-azul);
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--e-4);
}
.menu a {
  display: inline-block;
  padding: var(--e-2) 0;
  font-weight: 700;
  font-size: var(--t-s);
  text-decoration: none;
  color: var(--azul);
}
.menu a:hover { color: var(--rojo-oscuro); text-decoration: underline; }

@media (min-width: 60em) {
  .cabecera__logo img { width: 10.5rem; }
  .menu { order: 0; width: auto; margin-left: auto; }
  .menu ul { border-top: 0; padding: 0; gap: var(--e-5); }
  .cabecera__boton { margin-left: 0; }
}

/* ---------- Portada ---------- */
.portada { position: relative; padding-bottom: var(--e-8); }

/* Bambalina: el borde festoneado del telón */
.bambalina {
  height: 1.75rem;
  background:
    radial-gradient(circle at 50% 0, var(--rojo) 0.95rem, transparent 1rem) 0 0.4rem / 2rem 1.4rem repeat-x,
    linear-gradient(var(--rojo), var(--rojo)) 0 0 / 100% 0.5rem no-repeat;
  margin-bottom: var(--e-7);
}

.portada__rejilla {
  display: grid;
  gap: var(--e-7);
  align-items: center;
}

.portada__entrada { font-size: var(--t-l); line-height: 1.5; max-width: 34em; }
.portada__estreno { font-weight: 700; margin-bottom: var(--e-5); }

.portada__foto { position: relative; margin: 0; }

/* Arco: el marco del escenario, como el del logo */
.arco {
  border: 0.5rem solid var(--azul);
  border-radius: 50% 50% var(--radio) var(--radio) / 40% 40% var(--radio) var(--radio);
  overflow: hidden;
  background: var(--azul);
  box-shadow: var(--sombra);
}
.arco img { width: 100%; height: 100%; object-fit: cover; }

.arco__estrella {
  position: absolute;
  top: -1.1rem;
  left: 50%;
  width: 2.75rem;
  height: 2.75rem;
  transform: translateX(-50%);
  fill: var(--amarillo);
  stroke: var(--azul);
  stroke-width: 1.5;
}

@media (min-width: 60em) {
  .portada__rejilla { grid-template-columns: 1fr 1.1fr; }
}

/* ---------- Tilly y Lou ---------- */
.tl { padding-top: var(--e-8); background: var(--crema-fuerte); }

.tl__cabeza {
  display: grid;
  gap: var(--e-5);
  align-items: center;
  justify-items: start;
}
.tl__logo { width: min(15rem, 70%); }
.tl__cabeza p:not(.antetitulo) { font-size: var(--t-l); max-width: 30em; }

@media (min-width: 40em) {
  .tl__cabeza { grid-template-columns: 14rem 1fr; }
  .tl__logo { width: 100%; }
}

.personajes { padding-block: var(--e-7); text-align: center; }
.personajes__titulo { font-size: var(--t-xl); }

.personajes__rejilla {
  display: grid;
  gap: var(--e-5);
  justify-items: center;
  align-items: center;
  margin-top: var(--e-5);
}
.personajes__sello { width: min(14rem, 70%); order: -1; }

.personaje { max-width: 20rem; }
.personaje__nombre {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: var(--t-2xl);
  line-height: 1;
  color: var(--rojo);
  margin-bottom: var(--e-2);
}
.personaje__rasgo { font-weight: 700; color: var(--azul); margin-bottom: var(--e-2); }

@media (min-width: 48em) {
  .personajes__rejilla { grid-template-columns: 1fr auto 1fr; gap: var(--e-6); }
  .personajes__sello { order: 0; width: 15rem; }
  .personaje--tilly { justify-self: end; text-align: right; }
  .personaje--lou { justify-self: start; text-align: left; }
}

/* Bloque vaquero de las obras */
.vaquero {
  position: relative;
  background-color: var(--azul);
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.06) 0 2px, transparent 2px 7px);
  padding-block: var(--e-8);
  color: var(--crema);
}
.vaquero::before,
.vaquero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  border-top: var(--pespunte);
}
.vaquero::before { top: 0.75rem; }
.vaquero::after { bottom: 0.75rem; }

.vaquero__titulo { color: var(--crema); text-align: center; margin-bottom: var(--e-7); }

.obra {
  display: grid;
  background: var(--crema);
  color: var(--tinta);
  border-radius: var(--radio);
  outline: var(--pespunte-azul);
  outline-offset: -0.6rem;
  overflow: hidden;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.25);
}
.obra + .obra { margin-top: var(--e-7); }

.obra__imagen img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1400 / 788; }

.obra__texto { padding: var(--e-6) var(--e-5) var(--e-6); }
.obra__texto h4 { font-size: var(--t-xl); color: var(--rojo); }

.obra__trimestre {
  display: inline-block;
  background: var(--amarillo);
  color: var(--azul-noche);
  font-weight: 700;
  font-size: var(--t-xs);
  padding: var(--e-1) var(--e-3);
  border-radius: 999px;
  margin-bottom: var(--e-3);
}

.obra__mensaje {
  background: var(--rojo);
  color: var(--blanco);
  font-weight: 700;
  padding: var(--e-3) var(--e-4);
  border-radius: var(--radio-s);
}

.obra__valores,
.obra__participa { font-size: var(--t-s); }
.obra__valores strong,
.obra__participa strong { color: var(--azul); }
.obra__participa { margin-top: var(--e-2); padding-top: var(--e-3); border-top: var(--pespunte-azul); }

@media (min-width: 60em) {
  .obra { grid-template-columns: 1.15fr 1fr; }
  .obra--invertida { grid-template-columns: 1fr 1.15fr; }
  .obra--invertida .obra__imagen { order: 2; }
  .obra__imagen img { aspect-ratio: auto; min-height: 100%; }
  .obra__texto { padding: var(--e-7) var(--e-6); align-self: center; }
}

.dossier {
  margin-top: var(--e-7);
  padding: var(--e-6) var(--e-5);
  background: var(--amarillo);
  color: var(--azul-noche);
  border-radius: var(--radio);
  outline: var(--pespunte-azul);
  outline-offset: -0.6rem;
  text-align: center;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.25);
}
.dossier h3 { color: var(--azul); font-size: var(--t-xl); }
.dossier p { font-size: var(--t-m); max-width: 40em; margin-inline: auto; }
.dossier .botones { justify-content: center; margin-top: var(--e-4); }

/* ---------- Cómo trabajamos ---------- */
.ficha {
  list-style: none;
  margin: var(--e-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--e-4);
}
.ficha__dato {
  display: flex;
  flex-direction: column;
  gap: var(--e-1);
  background: var(--blanco);
  border: 2px solid var(--azul);
  border-radius: var(--radio);
  padding: var(--e-5);
  position: relative;
}
.ficha__dato::before {
  content: "";
  position: absolute;
  top: var(--e-5);
  right: var(--e-5);
  width: 1rem;
  height: 1rem;
  background: var(--amarillo);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.ficha__grande {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: var(--t-l);
  line-height: 1.15;
  color: var(--rojo-oscuro);
  padding-right: var(--e-5);
}

@media (min-width: 40em) {
  .ficha { grid-template-columns: repeat(2, 1fr); }
  .ficha__dato--ancho { grid-column: 1 / -1; }
}
@media (min-width: 60em) {
  .ficha { grid-template-columns: repeat(4, 1fr); }
  .ficha__dato--ancho {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: baseline;
    gap: var(--e-5);
    background: var(--azul);
    color: var(--crema);
  }
  .ficha__dato--ancho .ficha__grande { color: var(--amarillo); flex: none; }
}

/* ---------- Quiénes somos ---------- */
.somos { background: var(--blanco); }

.somos__rejilla { display: grid; gap: var(--e-7); align-items: center; }
.somos__destacado { font-size: var(--t-l); font-weight: 700; color: var(--azul); line-height: 1.4; }

.somos__retratos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--e-4);
}

.retrato { margin: 0; }
.arco--retrato {
  border-width: 0.35rem;
  border-radius: 50% 50% var(--radio-s) var(--radio-s) / 25% 25% var(--radio-s) var(--radio-s);
  aspect-ratio: 900 / 1200;
}
.arco--retrato img { object-position: 50% 15%; }

.retrato figcaption {
  display: flex;
  flex-direction: column;
  text-align: center;
  margin-top: var(--e-3);
  font-size: var(--t-s);
  line-height: 1.35;
}
.retrato__nombre {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: var(--t-l);
  color: var(--azul);
}
.retrato__papel { color: var(--rojo-oscuro); font-weight: 700; margin-top: var(--e-1); }

@media (min-width: 60em) {
  .somos__rejilla { grid-template-columns: 1fr 1fr; gap: var(--e-8); }
  .somos__retratos { gap: var(--e-5); }
}

/* ---------- Próximamente ---------- */
.pronto__caja {
  display: grid;
  gap: var(--e-6);
  align-items: center;
  justify-items: start;
}
.pronto__caja p:not(.antetitulo) { font-size: var(--t-l); max-width: 32em; }

/* Telón cerrado, dibujado con CSS */
.telon {
  position: relative;
  width: 13rem;
  height: 8.5rem;
  display: flex;
  border: 0.45rem solid var(--azul);
  border-bottom: 0.6rem solid var(--amarillo);
  border-radius: 1rem 1rem 0.3rem 0.3rem;
  overflow: hidden;
  background: var(--crema-fuerte);
  box-shadow: var(--sombra);
}
.telon::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1.3rem;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 0, var(--azul) 0.7rem, transparent 0.75rem) 0 0.3rem / 1.5rem 1rem repeat-x,
    linear-gradient(var(--azul), var(--azul)) 0 0 / 100% 0.4rem no-repeat;
}
.telon__mitad {
  flex: 1;
  background: repeating-linear-gradient(90deg, var(--rojo) 0 0.85rem, var(--rojo-oscuro) 0.85rem 1.1rem);
}
.telon__mitad--izq { border-right: 1px solid var(--rojo-oscuro); }
.telon__estrella {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.5rem;
  height: 2.5rem;
  transform: translate(-50%, -40%);
  fill: var(--amarillo);
  stroke: var(--azul);
  stroke-width: 1.5;
}

@media (min-width: 40em) {
  .pronto__caja { grid-template-columns: auto 1fr; gap: var(--e-7); }
}

/* ---------- Contacto ---------- */
.contacto {
  --foco: var(--amarillo);
  background: var(--azul-noche);
  color: var(--crema);
  padding-block: var(--e-8);
}
.contacto h2 { color: var(--crema); }
.contacto .antetitulo { color: var(--amarillo); }
.contacto a:not(.boton) { color: var(--crema); }
.contacto__entrada { font-size: var(--t-l); max-width: 34em; }

.contactos {
  list-style: none;
  margin: var(--e-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--e-4);
}
.tarjeta-contacto {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--e-2);
  padding: var(--e-5);
  border-radius: var(--radio);
  background: var(--azul);
  outline: var(--pespunte);
  outline-offset: -0.5rem;
}
.tarjeta-contacto p { margin: 0; }
.tarjeta-contacto__quien { font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-l); }
.tarjeta-contacto__quien span { color: var(--amarillo); }
.tarjeta-contacto__dato {
  font-family: var(--fuente-titulo);
  font-weight: 500;
  font-size: var(--t-xl);
  letter-spacing: 0.01em;
  margin-bottom: var(--e-3) !important;
}
.tarjeta-contacto .boton { margin-top: auto; }
.contacto__dossier { margin-top: var(--e-6); font-size: var(--t-m); max-width: 40em; }
.contacto__dossier strong { color: var(--amarillo); }

@media (min-width: 60em) {
  .contactos { grid-template-columns: repeat(3, 1fr); gap: var(--e-5); }
}

/* ---------- Pie ---------- */
.pie {
  --foco: var(--amarillo);
  background: var(--azul);
  color: var(--crema);
  padding-block: var(--e-6);
  font-size: var(--t-s);
  border-top: 0.5rem solid var(--rojo);
}
.pie__fila {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--e-3) var(--e-6);
}
.pie__fila p { margin: 0; }
.pie__logo { width: 7.5rem; }
.pie__legal { opacity: 0.85; margin-left: auto !important; }

@media (max-width: 39.99em) {
  .pie__fila { flex-direction: column; align-items: flex-start; }
  .pie__legal { margin-left: 0 !important; }
}
