/* ============================================================
   Landing · tema oscuro/estelar (coherente con la línea de tiempo)
   Vacío azul-negro + nebulosas + marco de hueso + garabato
   ============================================================ */

:root {
  --void: #07090f;
  --void-2: #0b0e18;
  --nebula-1: #15103a;
  --nebula-2: #0c2330;

  --bone: #efe6cf;
  --bone-soft: #cbc3ad;
  --text: #f2ede0;
  --muted: #8d8676;

  --c-basal:   #c08a5e;
  --c-austro:  #7fae5a;
  --c-homo-e:  #54a8e0;
  --c-homo-a:  #e8696f;

  --frame: rgba(239, 230, 207, 0.28);

  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-ui);
  background:
    radial-gradient(1200px 700px at 18% 8%, var(--nebula-1) 0%, transparent 60%),
    radial-gradient(1000px 800px at 85% 75%, var(--nebula-2) 0%, transparent 55%),
    linear-gradient(180deg, var(--void) 0%, var(--void-2) 100%);
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  overflow: hidden;
}

/* Estrellas */
.starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.star {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #fff; opacity: 0.6;
  animation: twinkle var(--tw, 4s) ease-in-out infinite;
  animation-delay: var(--td, 0s);
}
@keyframes twinkle { 0%,100% { opacity: 0.12; } 50% { opacity: 0.85; } }

/* Marca y sonido */
.brand {
  position: fixed; top: 22px; left: 26px; z-index: 6;
  font-family: var(--font-display); font-style: italic; font-weight: 600;
  font-size: 1.05rem; letter-spacing: 0.02em; color: var(--bone-soft);
}
.sound {
  position: fixed; top: 18px; right: 22px; z-index: 6;
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--frame); border-radius: 50%;
  background: rgba(16, 19, 30, 0.6); color: var(--bone-soft);
  font-size: 1rem; cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.sound:hover { background: rgba(16, 19, 30, 0.85); transform: scale(1.05); border-color: var(--bone); color: var(--bone); }
.sound[aria-pressed="true"] { border-color: var(--c-homo-e); color: var(--c-homo-e); }

/* Marco */
.frame {
  position: relative; z-index: 2;
  width: min(92vw, 1180px); height: min(86svh, 760px);
  border: 1.5px solid var(--frame);
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(239, 230, 207, 0.06) inset, 0 30px 80px rgba(0,0,0,0.5);
  display: grid; place-items: center;
}

/* Hero */
.hero { position: relative; z-index: 3; text-align: center; padding: 0 24px; }
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 6rem); line-height: 1;
  letter-spacing: -0.01em; margin: 0; color: var(--bone);
  text-shadow: 0 0 30px rgba(239, 230, 207, 0.15);
}
.squiggle { display: block; width: clamp(220px, 36vw, 380px); height: 22px; margin: 12px auto 42px; }

/* Botón Entrar (vidrio oscuro, como las tarjetas del timeline) */
.enter {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 30px;
  border: 1.5px solid var(--frame); border-radius: 12px;
  background: rgba(16, 19, 30, 0.6); backdrop-filter: blur(6px);
  color: var(--bone); font-family: var(--font-ui);
  font-size: 1.1rem; letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  transform-origin: center; will-change: transform, box-shadow;
}
.enter:hover { background: rgba(16, 19, 30, 0.85); border-color: var(--bone); }
.enter__arrow { display: inline-block; font-size: 1.2rem; will-change: transform; }
.enter:focus-visible { outline: 3px solid var(--c-homo-e); outline-offset: 4px; }

/* Ornamentos */
.ornament { position: absolute; z-index: 1; pointer-events: none; }
.ornament--tr { top: -4px; right: -4px; width: clamp(110px, 16vw, 190px); }
.ornament--bl { bottom: -4px; left: -4px; width: clamp(110px, 16vw, 190px); }
.ornament--tl { top: 16px; left: 18px; width: clamp(54px, 7vw, 84px); }

/* Velo de salida (mismo color que el fondo del timeline) */
.leave-veil { position: fixed; inset: 0; z-index: 20; background: #07090f; opacity: 0; pointer-events: none; }

@media (max-width: 560px) {
  .frame { height: min(82svh, 620px); }
  .ornament--tl { display: none; }

  /* Asegura que la frase completa y el botón quepan y queden centrados */
  .hero { padding: 0 16px; width: 100%; }
  .hero__title { font-size: clamp(1.9rem, 10vw, 3.4rem); }
  .squiggle { width: clamp(160px, 60vw, 300px); margin: 10px auto 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .star { animation: none; }
}
