/*
  PLAN DE DISEÑO: European Cordeiro Team (demo)
  -------------------------------------------------
  Sin logo utilizable (sin permiso), así que la paleta sale del mundo del BJJ:
  el sistema de cinturones. Cada clase del horario lleva el color del cinturón
  que mejor la representa, así que el color informa en vez de decorar.

  Tokens (contraste calculado sobre --kimono / blanco):
    --kimono  #F6F7F9  fondo (blanco frío de kimono, no crema)
    --tinta   #15213B  texto (índigo de kimono azul)            14.9:1
    --faixa   #C8102E  rojo de la "ponteira" del cinturón negro  5.5:1 (texto) / blanco sobre rojo 5.9:1
    --tatami  #DCE3EA  superficie de bandas (gris azulado de tatami)
    --muted   #4A5568  texto secundario                         7.0:1
    Cinturones del horario (texto blanco salvo amarillo):
      azul #1F5BB5 (BJJ adultos) 6.5 · morado #5B2A86 (BJJ+Lucha) 9.9 · marrón #6B4226 (MMA ppio.) 8.6
      negro=tinta (MMA avanzado) 16 · verde #2E7D4F (Open Mat) 5.1 · amarillo #F2B705 con tinta (Kids) 8.8
      rojo faixa (Muay Thai + Boxeo) 5.9
  Tipografía: Archivo variable (OFL), una sola familia. Titulares en anchura
  expandida (wdth 125) y peso 800: anchos y asentados, como el tatami; el
  cuerpo va en anchura normal. Así se evita el condensado típico de gimnasio.
  Lo memorable: el hero con vídeo de BJJ en blanco y negro bajo un velo índigo,
  que se apaga y desenfoca al bajar, rematado por el cinturón negro con la
  ponteira roja y sus cuatro grados. El resto es sobrio.
  Horario: además de las tablas por día, una imagen-calendario (horario.png)
  generada con herramientas/calendario.py y Chrome headless, pensada para compartir.
  Cambios tras la revisión: descarté negro+rojo como fondo (cliché del sector);
  el horario pasó de una tabla semanal enorme a una tabla por día (legible en móvil).
*/

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-vf-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --kimono: #F6F7F9;
  --tinta: #15213B;
  --faixa: #C8102E;
  --faixa-claro: #FF5A6E;
  --tatami: #DCE3EA;
  --muted: #4A5568;
  --azul: #1F5BB5;
  --morado: #5B2A86;
  --marron: #6B4226;
  --verde: #2E7D4F;
  --amarillo: #F2B705;
  --whatsapp: #1E7F4F;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 5vw, 2.6rem);
  --step-4: clamp(2.4rem, 9vw, 4.6rem);

  --space: clamp(1rem, 4vw, 2rem);
  --section: clamp(3.5rem, 10vw, 6.5rem);
  --max: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--tinta);
  background: var(--kimono);
  padding-bottom: 5.5rem; /* hueco para el botón flotante de WhatsApp */
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--faixa); outline-offset: 3px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 {
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.2; }
p { margin: 0 0 1em; max-width: 62ch; }

.wrap { width: min(100% - 2 * var(--space), var(--max)); margin-inline: auto; }
.section { padding-block: var(--section); }
[id] { scroll-margin-top: 4.5rem; }
.section--tatami { background: var(--tatami); }
.lead { font-size: var(--step-1); color: var(--muted); }

/* ---------- Aviso de demo ---------- */
.demo-bar {
  background: var(--tinta);
  color: var(--kimono);
  font-size: var(--step--1);
  text-align: center;
  padding: 0.5rem var(--space);
}
.demo-bar p { margin: 0 auto; }

/* ---------- Cabecera ---------- */
.header { position: sticky; top: 0; z-index: 20; background: rgba(246, 247, 249, 0.96); border-bottom: 1px solid var(--tatami); }
.header__in { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-stretch: 125%; font-weight: 800; line-height: 1; font-size: 1.05rem; }
.brand small { display: block; font-stretch: 100%; font-weight: 500; font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }
.nav { margin-left: auto; }
.nav__toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0 0.9rem; border: 2px solid var(--tinta); border-radius: 999px;
  background: transparent; color: var(--tinta); font: inherit; font-weight: 700; cursor: pointer;
}
.nav__list { list-style: none; margin: 0; padding: 0; }
.nav__list a { display: block; padding: 0.8rem 0; text-decoration: none; font-weight: 600; }
.nav__list a:hover { text-decoration: underline; }
.js .nav__list { display: none; }
.js .nav[data-open="true"] .nav__list {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--kimono); border-bottom: 1px solid var(--tatami); padding: 0.5rem var(--space) 1rem;
}
.btn.header__cta { display: none; }

@media (min-width: 60rem) {
  .nav__toggle { display: none; }
  .js .nav__list, .nav__list { display: flex !important; position: static !important; gap: 1.4rem; padding: 0 !important; border: 0 !important; background: none !important; }
  .nav__list a { padding: 0.5rem 0; }
  .btn.header__cta { display: inline-flex; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 52px; padding: 0.8rem 1.4rem; border-radius: 6px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent;
}
.btn--faixa { background: var(--faixa); color: #fff; }
.btn--faixa:hover { background: #A50D26; }
.btn--line { border-color: var(--tinta); color: var(--tinta); background: transparent; }
.btn--line:hover { background: var(--tinta); color: var(--kimono); }
.btn--small { min-height: 44px; padding: 0.5rem 1rem; font-size: var(--step--1); }
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }

/* ---------- Fotos de ejemplo ---------- */
.foto { position: relative; margin: 0; }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto figcaption {
  position: absolute; left: 0.6rem; bottom: 0.6rem;
  background: rgba(21, 33, 59, 0.85); color: #fff;
  font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 3px;
}

/* ---------- Hero + cinturón ---------- */
/* Vídeo de fondo: --p (0 a 1) lo pone el JS según el scroll; el vídeo se apaga y desenfoca al bajar */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; --p: 0; }
.hero__media { position: absolute; inset: 0; z-index: -1; background: var(--tinta) url("../assets/video/poster.jpg") center / cover; }
.hero__video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(1) contrast(1.05) blur(calc(var(--p) * 12px));
  opacity: calc(1 - var(--p) * 0.9);
  transform: scale(calc(1.02 + var(--p) * 0.08));
}
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(21, 33, 59, 0.55) 0%, rgba(21, 33, 59, 0.78) 55%, rgba(21, 33, 59, 0.92) 100%);
}
.hero__content {
  min-height: min(80svh, 46rem);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-block: clamp(5rem, 14vw, 8rem) clamp(2.5rem, 6vw, 4rem);
}
.hero h1 { font-size: var(--step-4); margin-bottom: 0.4em; max-width: 14ch; }
.hero__sub { font-size: var(--step-1); color: #DCE3EA; max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn--claro { border-color: #fff; color: #fff; background: rgba(21, 33, 59, 0.35); }
.btn--claro:hover { background: #fff; color: var(--tinta); }
.hero :focus-visible { outline-color: #fff; }
.hero__credito, .hero__pausa {
  position: absolute; right: var(--space); z-index: 1;
  font-size: 0.75rem; font-weight: 600; color: #fff; background: rgba(21, 33, 59, 0.85); border-radius: 3px; margin: 0;
}
.hero__credito { top: 1rem; padding: 0.2rem 0.5rem; }
.hero__pausa { top: 2.75rem; min-height: 44px; padding: 0 0.8rem; border: 1px solid rgba(255,255,255,.6); font-family: inherit; cursor: pointer; }

/* El cinturón: banda negra a todo el ancho con la ponteira roja y 4 grados */
.cinturon {
  height: clamp(2.6rem, 7vw, 3.8rem);
  background:
    linear-gradient(to bottom, transparent 46%, rgba(255,255,255,0.06) 46%, rgba(255,255,255,0.06) 54%, transparent 54%),
    var(--tinta);
  display: flex; justify-content: flex-end;
  padding-right: clamp(1rem, 12vw, 9rem);
}
.cinturon__ponteira {
  width: clamp(8rem, 30vw, 15rem);
  background: var(--faixa);
  display: flex; justify-content: flex-end; gap: clamp(0.35rem, 1.2vw, 0.6rem);
  padding: 0 clamp(0.6rem, 2vw, 1.2rem);
}
.cinturon__ponteira span { width: clamp(0.4rem, 1.2vw, 0.65rem); background: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .cinturon__ponteira span { transform-origin: top; animation: grado 0.5s cubic-bezier(.2,.7,.2,1) both; }
  .cinturon__ponteira span:nth-child(2) { animation-delay: 0.12s; }
  .cinturon__ponteira span:nth-child(3) { animation-delay: 0.24s; }
  .cinturon__ponteira span:nth-child(4) { animation-delay: 0.36s; }
  @keyframes grado { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}

/* ---------- Disciplinas ---------- */
.disc-principal { display: grid; gap: 1.5rem; margin-bottom: 3rem; }
.disc-principal .foto { aspect-ratio: 4 / 3; }
@media (min-width: 52rem) { .disc-principal { grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; } }
.disc-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.disc-lista li { padding: 1.4rem 0; border-top: 2px solid var(--tinta); display: grid; gap: 0.4rem; }
.disc-lista h3 { margin: 0; display: flex; align-items: center; gap: 0.7rem; }
.disc-lista p { margin: 0; }
.disc-lista .cuando { font-weight: 600; font-size: var(--step--1); }
@media (min-width: 52rem) { .disc-lista { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.fotos-par { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 2.5rem; }
.fotos-par .foto { aspect-ratio: 3 / 4; }

/* Muestra de color del cinturón */
.cinta { display: inline-block; width: 1.6rem; height: 0.55rem; border-radius: 1px; flex: none; box-shadow: inset 0 0 0 1px rgba(21,33,59,.15); }
.c-bjj { background: var(--azul); } .c-kids { background: var(--amarillo); } .c-open { background: var(--verde); }
.c-lucha { background: var(--morado); } .c-mt { background: var(--faixa); } .c-mmaa { background: var(--tinta); } .c-mmap { background: var(--marron); }

/* ---------- Horarios ---------- */
.filtros { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.filtros button {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.4rem 0.9rem;
  border: 2px solid var(--tinta); border-radius: 999px; background: var(--kimono); color: var(--tinta);
  font: inherit; font-size: var(--step--1); font-weight: 600; cursor: pointer;
}
.filtros button[aria-pressed="true"] { background: var(--tinta); color: var(--kimono); }
.semana { display: grid; gap: 1.25rem; }
@media (min-width: 40rem) { .semana { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .semana { grid-template-columns: repeat(3, 1fr); } }
.dia { width: 100%; border-collapse: collapse; background: var(--kimono); }
.dia caption { text-align: left; font-stretch: 125%; font-weight: 800; font-size: var(--step-1); padding: 0.6rem 0.8rem; background: var(--tinta); color: var(--kimono); }
.dia th, .dia td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--tatami); vertical-align: top; }
.dia th[scope="row"] { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; width: 7.5rem; }
.dia td { display: flex; align-items: center; gap: 0.6rem; }
.dia tr[hidden] { display: none; }
.dia .vacio td { color: var(--muted); }
.horario-nota { margin-top: 1.5rem; font-size: var(--step--1); color: var(--muted); }
.cal { margin: 1.5rem 0 3rem; }
.cal a:has(img) { display: block; border: 2px solid var(--tinta); border-radius: 6px; overflow: hidden; background: var(--kimono); }
.cal img { width: 100%; }
.cal figcaption { margin-top: 0.75rem; font-size: var(--step--1); }
.horario-dias { font-size: var(--step-2); margin-bottom: 0.3em; }

/* ---------- Pendiente (demo) ---------- */
.pendiente {
  border: 2px dashed var(--muted); border-radius: 6px; padding: 1.5rem; color: var(--muted); max-width: 46rem;
}
.pendiente strong { color: var(--tinta); }

/* ---------- Precios ---------- */
.gratis {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between;
  background: var(--tinta); color: var(--kimono); padding: 1.25rem 1.5rem; border-radius: 6px; margin-bottom: 2rem;
}
.gratis p { margin: 0; font-stretch: 125%; font-weight: 800; font-size: var(--step-1); }
.tabla-scroll { overflow-x: auto; border: 2px solid var(--tinta); border-radius: 6px; background: var(--kimono); }
.precios-nota { font-weight: 600; }
.precios { width: 100%; border-collapse: collapse; min-width: 19rem; font-variant-numeric: tabular-nums; }
.precios th, .precios td { padding: 0.8rem 0.7rem; text-align: right; border-top: 1px solid var(--tatami); }
.precios thead th { border-top: 0; }
@media (min-width: 40rem) { .precios th, .precios td { padding: 0.9rem 1.1rem; } }
@media (max-width: 39.99rem) { .precios th, .precios td { padding: 0.7rem 0.4rem; } .precios td { font-size: 1rem; } .precios thead th { font-size: 0.75rem; } }
.precios thead th { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.precios th[scope="row"], .precios thead th:first-child { text-align: left; }
.precios td { font-weight: 700; font-size: var(--step-1); white-space: nowrap; }
.precios td small { font-weight: 500; font-size: 0.75rem; color: var(--muted); }
.precios .na { color: var(--muted); font-weight: 400; }
.extras { display: grid; gap: 1rem; margin-top: 1.5rem; list-style: none; padding: 0; }
@media (min-width: 40rem) { .extras { grid-template-columns: repeat(3, 1fr); } }
.extras li { border-left: 4px solid var(--faixa); padding: 0.2rem 0 0.2rem 1rem; }
.extras b { display: block; font-size: var(--step-1); font-stretch: 125%; }

/* ---------- Formulario ---------- */
.reserva-grid { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .reserva-grid { grid-template-columns: 1fr 1.2fr; gap: 4rem; } }
.form { display: grid; gap: 1rem; }
.campo { display: grid; gap: 0.35rem; }
.campo label, .form legend { font-weight: 700; }
.form input[type="text"], .form input[type="tel"], .form input[type="email"], .form select {
  width: 100%; min-height: 48px; padding: 0.6rem 0.75rem; font: inherit; color: var(--tinta);
  background: #fff; border: 2px solid var(--tinta); border-radius: 6px;
}
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.opcion { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; }
.opcion input { width: 1.25rem; height: 1.25rem; accent-color: var(--faixa); flex: none; }
.form.enviado :invalid { border-color: var(--faixa); }
.info-rgpd { font-size: 0.8rem; color: var(--muted); }
.estado { font-weight: 700; color: var(--faixa); min-height: 1.5em; margin: 0; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.aviso-demo { font-size: var(--step--1); background: #fff; border-left: 4px solid var(--amarillo); padding: 0.75rem 1rem; }

/* ---------- Ubicación ---------- */
.ubic-grid { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .ubic-grid { grid-template-columns: 1fr 1.3fr; } }
.datos { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.9rem; }
.datos b { display: block; font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.mapa { min-height: 18rem; background: var(--tinta); color: var(--kimono); border-radius: 6px; display: grid; place-items: center; text-align: center; padding: 2rem; overflow: hidden; }
.mapa p { margin-inline: auto; }
.mapa iframe { width: 100%; height: 100%; min-height: 22rem; border: 0; }
.mapa.cargado { padding: 0; }
.mapa .btn--line { border-color: var(--kimono); color: var(--kimono); }

/* ---------- FAQ ---------- */
.faq { max-width: 48rem; }
.faq details { border-top: 2px solid var(--tinta); }
.faq details:last-child { border-bottom: 2px solid var(--tinta); }
.faq summary { cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; font-weight: 700; font-size: var(--step-1); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.9rem; font-size: 1.6rem; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 1.2rem; }

/* ---------- Pie ---------- */
.footer { background: var(--tinta); color: var(--kimono); padding-block: 3rem; font-size: var(--step--1); }
.footer a { color: var(--kimono); }
.footer__grid { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer .brand { color: var(--kimono); margin-bottom: 0.75rem; }
.footer .brand small { color: #B8C2D3; }
.footer__legal { margin-top: 2rem; color: #B8C2D3; }

/* ---------- WhatsApp flotante ---------- */
.wa-flotante {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 30;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--whatsapp); color: #fff;
  box-shadow: 0 6px 18px rgba(21, 33, 59, 0.35);
}
.wa-flotante svg { width: 30px; height: 30px; }

/* ---------- Páginas interiores ---------- */
.interior { padding-block: var(--section); }
.interior h1 { font-size: var(--step-3); }
.interior h2 { font-size: var(--step-1); margin-top: 2rem; }
.interior ul { max-width: 62ch; }
.borrador { background: #FFF4CC; border-left: 4px solid var(--amarillo); padding: 1rem; margin-bottom: 2rem; max-width: 62ch; }
.pasos { display: grid; gap: 0.75rem; margin: 2rem 0; }
@media (min-width: 40rem) { .pasos { display: flex; flex-wrap: wrap; } }
