/* ==========================================================================
   Telefónica · Stay tuned — hoja de estilos (variante Aurora)
   Paleta y tipografía corporativas oficiales. Sin recursos de terceros.
   ========================================================================== */

/* ------------------------------- Fuentes -------------------------------- */
@font-face {
  font-family: 'Telefonica Sans';
  src: url('../assets/fonts/Telefonica_Sans_ExtraLight.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Telefonica Sans';
  src: url('../assets/fonts/Telefonica_Sans_Light.woff2') format('woff2');
  font-weight: 350;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Telefonica Sans';
  src: url('../assets/fonts/Telefonica_Sans_Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------- Tokens --------------------------------- */
:root {
  /* Paleta corporativa oficial (subconjunto usado por la variante Aurora) */
  --blue: #0066ff;
  --navy: #031a34; /* gray-9 */
  --turquoise: #59c2c9;
  --white: #ffffff;

  --font: 'Telefonica Sans', system-ui, -apple-system, sans-serif;

  /* Tamaño fluido del titular */
  --title-size: clamp(3.25rem, 15vw, 12rem);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --------------------------- Layout general ----------------------------- */
.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(120% 120% at 50% 0%, #062a52 0%, var(--navy) 60%);
}

.bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.content {
  position: relative;
  z-index: 1;
  grid-row: 1;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  padding: 2rem 1.25rem;
  text-align: center;
  width: 100%;
}

/* Marca (pentágono de 5 puntos) */
.mark {
  width: clamp(44px, 9vw, 74px);
  height: auto;
  fill: currentColor;
  filter: drop-shadow(0 0 18px rgba(0, 102, 255, 0.55));
}

/* Titular */
.title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 clamp(0.5rem, 2.5vw, 1.75rem);
  font-size: var(--title-size);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(0, 102, 255, 0.35);
}
.word {
  display: inline-flex;
}

/* Tagline */
.tagline {
  font-weight: 350;
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  letter-spacing: 0.02em;
  opacity: 0.9;
  max-width: 32ch;
}

/* Pie */
.foot {
  grid-row: 2;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  font-weight: 400;
  text-align: center;
}
.foot__logo {
  width: auto;
  height: 26px;
  fill: currentColor;
}
.foot__copy {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  opacity: 0.7;
}

/* ----------------------------- Animaciones ------------------------------ */
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  mix-blend-mode: screen;
}
.aurora-blob--a {
  width: 60vmax;
  height: 60vmax;
  left: -10vmax;
  top: -18vmax;
  background: radial-gradient(circle, var(--blue) 0%, transparent 65%);
  animation: auroraDriftA 18s ease-in-out infinite alternate;
}
.aurora-blob--b {
  width: 52vmax;
  height: 52vmax;
  right: -14vmax;
  bottom: -20vmax;
  background: radial-gradient(circle, var(--turquoise) 0%, transparent 65%);
  animation: auroraDriftB 22s ease-in-out infinite alternate;
}
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: radial-gradient(var(--white) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

/* Pulso secuencial de los 5 puntos: solo brillo (opacidad), sin cambio de
   tamano para que la T no se deforme ni se desborde. */
.dot {
  animation: dotPulse 2.8s ease-in-out infinite;
}
.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.15s; }
.dot:nth-child(3) { animation-delay: 0.3s; }
.dot:nth-child(4) { animation-delay: 0.45s; }
.dot:nth-child(5) { animation-delay: 0.6s; }

@keyframes auroraDriftA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(10vmax, 6vmax, 0) scale(1.15); }
}
@keyframes auroraDriftB {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to { transform: translate3d(-8vmax, -6vmax, 0) scale(0.9); }
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.4; }
  40% { opacity: 1; }
}

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 380px) {
  :root { --title-size: clamp(2.75rem, 17vw, 4rem); }
  .foot__logo { height: 22px; }
}

/* ---- Movimiento reducido: detiene toda animación (WCAG 2.3.3 / 2.2.2) --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
