/* =========================================================
   San Juan 1944 · Estilos base compartidos
   ========================================================= */

@font-face {
  font-family: "Josefin Sans";
  src: url("../fonts/josefin-sans.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Noche de verano sanjuanina, adobe y tinta de sismógrafo */
  --noche: #111a2e;
  --noche-alta: #1a2540;
  --noche-baja: #0a1020;
  --adobe: #d8c3a0;
  --papel: #f1ece2;
  --polvo: #a3abbd;
  --tinta: #e5483b;
  --linea: rgba(216, 195, 160, 0.16);
  --linea-fuerte: rgba(216, 195, 160, 0.32);

  --f-titulo: "Josefin Sans", "Futura", "Century Gothic", system-ui, sans-serif;
  --f-texto: "Newsreader", "Georgia", "Times New Roman", serif;

  /* Escala tipográfica (razón 1.25) */
  --t-xs: 0.8rem;
  --t-s: 0.9rem;
  --t-m: 1.0625rem;
  --t-l: 1.33rem;
  --t-xl: 1.66rem;
  --t-xxl: 2.6rem;

  --gutter: 20px;
  --radio: 14px;
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
  --seguro-arriba: env(safe-area-inset-top, 0px);
}

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

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

body {
  margin: 0;
  background-color: var(--noche);
  color: var(--papel);
  font-family: var(--f-texto);
  font-size: var(--t-m);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 {
  font-family: var(--f-titulo);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0.01em;
}

p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--adobe);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* Marca de destino tras el sismo: rojo = perdido, adobe = sigue en pie */
.destino {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-titulo);
  font-size: var(--t-s);
  color: var(--polvo);
  letter-spacing: 0.02em;
}
.destino::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--adobe);
  flex: none;
}
.destino--perdido::before { background: var(--tinta); }

/* Botón principal */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--papel);
  color: var(--noche);
  font-family: var(--f-titulo);
  font-weight: 600;
  font-size: var(--t-m);
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.2s ease;
}
.boton:active { transform: scale(0.97); }
.boton svg { width: 20px; height: 20px; flex: none; }

.boton--secundario {
  background: rgba(241, 236, 226, 0.08);
  color: var(--papel);
  border: 1px solid var(--linea-fuerte);
}

/* Sismograma */
.sismo path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
