/* base.css - Identidad ARCO compartida por el sitio publico, Mi agenda, el panel y las legales.
   Paleta lila de noche (DISENO.md 1): el lila es el acento dominante y el verde el secundario.
   Las fuentes se alojan en /fonts (ver scripts/bajar-fuentes.mjs): Big Shoulders Display 800
   (display, condensada y alta como la barra), Jost variable (cuerpo) y Caveat 600 (letra a mano). */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("/fonts/big-shoulders-display.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("/fonts/jost.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("/fonts/caveat.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark; /* date, time y select nativos del panel salen oscuros */

  --fondo: #16111B;       /* luz de estudio de noche */
  --superficie: #211A28;  /* tarjetas y paneles */
  --borde: #3A3142;       /* bordes, pistas de barras */
  --lila: #D7B4EA;        /* acento principal: CTA, seleccion, marquesina, cierre */
  --verde: #9DBE7A;       /* chips de dato y detalles (el verde del logo) */
  --verde-texto: #B9D69A; /* verde para texto chico sobre fondo oscuro */
  --estrella: #F3D35B;    /* solo el sticker de estrella */
  --texto: #F5EEF6;
  --texto-2: #D9CEDE;     /* texto secundario */
  --texto-3: #B6A9BE;     /* metadatos */
  --tinta-lila: #4B3A57;  /* texto secundario sobre fondo lila (5,7:1) */
  --error: #F2B8B5;       /* 10:1 sobre --superficie */

  --display: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --sans: "Jost", "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --mano: "Caveat", "Comic Sans MS", cursive;

  --pad: clamp(1.25rem, 5vw, 3rem);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--lila); outline-offset: 3px; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.solo-lectores {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.salto {
  position: absolute; left: var(--pad); top: -4rem; z-index: 50;
  background: var(--lila); color: var(--fondo); padding: .75rem 1rem;
}
.salto:focus { top: .75rem; }

/* Display (Big Shoulders) y letra a mano (Caveat) */
.disp {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.9;
}
.mano { font-family: var(--mano); font-weight: 600; }

/* Marca: logo real de ARCO (arco con enredadera + "Pole Sport Studio"), recoloreado
   para el tema oscuro en sitio/img/logo-arco.svg. El accesible lo da el aria-label del <a>. */
.marca { display: inline-flex; line-height: 0; text-decoration: none; }
.marca__img { height: 64px; width: auto; display: block; }

/* Boton pastilla lila (el acento dominante). .boton--salvia conserva el nombre porque el JS lo usa:
   es la misma pastilla, ahora lila en vez de salvia. */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .8rem 1.5rem;
  border: 0; border-radius: 999px; background: var(--lila); color: var(--fondo);
  font: 600 1rem/1.1 var(--sans); text-align: center;
  text-decoration: none; cursor: pointer;
  transition: transform .2s cubic-bezier(.2, .7, .2, 1), opacity .2s ease;
}
.boton:hover { transform: translateY(-2px); }
.boton:active { transform: translateY(0); }
.boton--chico { min-height: 2.75rem; padding: .5rem 1rem; font-size: .9375rem; }
.boton[disabled], .boton[aria-disabled="true"] {
  background: var(--borde); color: var(--texto-3); cursor: not-allowed; transform: none;
}

/* Formularios: etiqueta arriba, ayuda y error debajo */
.campo { display: grid; gap: .4rem; }
.campo label { font-weight: 500; font-size: .9375rem; }
.campo .ayuda { color: var(--texto-3); font-size: .875rem; }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 3rem; padding: .7rem .9rem;
  border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); color: var(--texto);
}
.campo input::placeholder { color: var(--texto-3); opacity: 1; }
.error { color: var(--error); font-size: .9375rem; font-weight: 500; }
.aviso { padding: .85rem 1rem; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); font-size: .9375rem; }

/* Dialogos */
/* Safari <15.4 no conoce <dialog> (display:inline siempre): sin esta regla los dialogos quedan
   visibles al pie de la pagina y el fallback por atributo `open` no logra cerrarlos. */
dialog:not([open]) { display: none; }
dialog {
  width: min(32rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto;
  padding: 0; border: 1px solid var(--borde); border-radius: 16px; background: var(--superficie); color: var(--texto);
}
dialog::backdrop { background: rgba(22, 17, 27, .65); }
.dialogo { display: grid; gap: 1.1rem; padding: 1.5rem; }
.dialogo h2 { font-size: 1.75rem; }
.dialogo__resumen { padding: .9rem 1rem; background: var(--fondo); border: 1px solid var(--borde); border-radius: 10px; }
.dialogo__resumen strong { font-family: var(--display); font-size: 1.4rem; letter-spacing: .02em; display: block; }
.dialogo__acciones { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (min-width: 720px) { .dialogo { padding: 2rem; } }

/* Pausa global: sitio.js pone .en-pausa a lo que sale de pantalla y .tab-oculta en <html>
   con la pestana oculta, para que nada se mueva donde nadie lo ve. */
.en-pausa, .en-pausa *, .tab-oculta, .tab-oculta * { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
