@font-face {
  font-family: "Oswald";
  src: url("../fonts/oswald-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Special Elite";
  src: url("../fonts/special-elite-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--color-fondo);
  margin: 0;
  height: 100%;
}

body,
h1,
h2,
h3,
p,
ul,
ol,
figure,
fieldset,
legend,
dl,
dd {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

fieldset {
  border: 0;
  min-width: 0;
}

[hidden] {
  display: none !important;
}

/* Tipografia */
body {
  height: 100%;
  font-family: var(--fuente-cuerpo);
  font-size: var(--texto-base);
  line-height: 1.5;
  color: var(--color-texto);
  background-color: var(--color-fondo);
  background-image: var(--luz-flexo);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

h1,
h2 {
  font-family: var(--fuente-titulos);
  font-weight: 600;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h1 {
  font-size: var(--texto-titulo);
}

h2 {
  font-size: clamp(1.8rem, 8vw, 2.5rem);
}

kbd {
  font-family: var(--fuente-datos);
}

a {
  color: var(--color-ambar);
}

/* Foco visible */
:focus-visible {
  outline: 3px solid var(--color-foco);
  outline-offset: 3px;
}

/* Titulos que reciben el foco por programa: sin aro */
[tabindex="-1"]:focus {
  outline: none;
}

/* Utilidad: oculto a la vista, accesible */
.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Layout movil primero: la ventana entera, sin deslizar (2.6, R1 a R4) */
#app {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* La seccion visible llena el alto. El overflow es solo una reserva (R3, R13) */
.pantalla:not([hidden]) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 1.5dvh, var(--espacio-4));
  width: 100%;
  min-height: 0;
  max-width: var(--ancho-contenido);
  margin-inline: auto;
  padding: clamp(8px, 2dvh, var(--espacio-5)) clamp(12px, 4vw, var(--espacio-5));
  overflow: auto;
}

@media (orientation: landscape) {
  .pantalla:not([hidden]) {
    max-width: 72rem;
  }
}

noscript {
  display: block;
  max-width: var(--ancho-contenido);
  margin: var(--espacio-6) auto;
  padding: var(--espacio-4);
  font-family: var(--fuente-datos);
  color: var(--color-tinta);
  background: var(--color-papel);
  border-left: 6px solid var(--color-sello);
}

/* Movimiento reducido: sin animaciones decorativas ni sacudidas */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
  *:not(#temporizador-cinta) {
    transition-duration: 0.01ms !important;
  }
}
