/* La marca en `noche`. Los colores son los de temas.noche.colores (src/theme.js) y las fuentes,
   copias de public/fuentes/: scripts/lib/web.test.js los compara y mide el contraste. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fuentes/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fuentes/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --fondo: #0B1D2E;
  --fondo-alto: #132C43;
  --texto: #F5F1E8;
  --tenue: #8CA0B3;
  --viento: #7FE3D4;
  --margen: clamp(1.25rem, 6vw, 3rem);
  color-scheme: dark;
}

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

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

body {
  min-height: 100vh;
  min-height: 100svh;
  background: radial-gradient(ellipse at 30% 35%, var(--fondo-alto) 0%, var(--fondo) 62%) fixed;
  color: var(--texto);
  font: 400 1.125rem/1.55 'Bricolage Grotesque', system-ui, sans-serif;
  overflow-x: hidden;
}

/* Las líneas de viento: viento.js las pinta. Sin JS, el SVG queda vacío. */
#rafagas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
#rafagas path {
  animation: soplo var(--duracion, 60s) ease-in-out var(--retraso, 0s) infinite alternate;
}
@keyframes soplo {
  from { transform: translateX(-2.5%); }
  to { transform: translateX(2.5%); }
}

.pagina {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 7vh, 4rem);
  width: 100%;
  max-width: calc(36rem + 2 * var(--margen));
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: clamp(3rem, 12vh, 7rem) var(--margen) 2rem;
}

main {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 7vh, 4rem);
  flex: 1;
}

/* Los textos entran desde la izquierda, como en los vídeos. */
.cabecera, main > section {
  animation: entrada 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
main > section:nth-child(1) { animation-delay: 0.08s; }
main > section:nth-child(2) { animation-delay: 0.16s; }
@keyframes entrada {
  from { transform: translateX(-1.5rem); }
}

.simbolo {
  display: block;
  width: clamp(4.5rem, 18vw, 6rem);
  height: auto;
  color: var(--viento);
  margin-bottom: 1.25rem;
}

h1 {
  font-size: clamp(2.5rem, 11vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lema {
  margin-top: 0.75rem;
  color: var(--tenue);
  font-size: clamp(1.2rem, 4.5vw, 1.5rem);
  line-height: 1.3;
}

.que-es p {
  max-width: 32rem;
  font-size: clamp(1.125rem, 3.8vw, 1.3rem);
  text-wrap: pretty;
}

h2 {
  font: 500 0.875rem/1.2 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--viento);
  margin-bottom: 0.5rem;
}
h2:not(:first-child) { margin-top: 2rem; }

.enlaces {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--fondo-alto);
}
.enlaces li { border-bottom: 1px solid var(--fondo-alto); }

.enlaces a {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 0.85rem;
  row-gap: 0.1rem;
  min-height: 3.5rem;
  padding: 0.6rem 0.25rem;
  color: var(--texto);
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background-color 0.2s, transform 0.2s;
}
.enlaces a:hover {
  background: var(--fondo-alto);
  transform: translateX(0.25rem);
}
.enlaces a:focus-visible {
  outline: 3px solid var(--viento);
  outline-offset: 2px;
}

.icono {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: var(--viento);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icono .relleno { fill: var(--viento); stroke: none; }

.red {
  font-weight: 600;
  min-width: 6.5rem;
}

.usuario {
  font: 400 0.95rem/1.3 'JetBrains Mono', ui-monospace, monospace;
  color: var(--tenue);
  overflow-wrap: anywhere;
}
.enlaces a:hover .usuario { color: var(--texto); }

.pie {
  color: var(--tenue);
  font-size: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .enlaces a:hover { transform: none; }
}
