/* ==========================================================================
   Earendel Gaming — Single-Screen Cosmic Launch Page
   Zero-scroll 100dvh stage inspired by WHL0137-LS & the Sunrise Arc
   ========================================================================== */

:root {
  --void: #04060d;
  --void-deep: #020308;
  --starlight: #f8fafc;
  --starlight-soft: rgba(226, 232, 240, 0.84);
  --starlight-muted: rgba(203, 213, 225, 0.56);
  --sunrise-gold: #f5b952;
  --sunrise-pale: #fde68a;
  --aether-blue: #38bdf8;
  --nebula-indigo: #818cf8;

  --font-display: 'Space Grotesk', 'Avenir Next', 'Futura', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Outfit', 'Avenir Next', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

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

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--void);
  color: var(--starlight);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* --------------------------------------------------------------------------
   Layered Cosmic Background
   -------------------------------------------------------------------------- */
.cosmos-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 28%, #0c1328 0%, var(--void) 62%, var(--void-deep) 100%);
}

.cosmos-image {
  position: absolute;
  inset: -4%;
  background-image: url('assets/cosmos-bg.jpg');
  background-size: cover;
  background-position: 50% 34%;
  background-repeat: no-repeat;
  opacity: 0.95;
  transform: scale(1.025);
  will-change: transform;
  animation: cosmicDrift 38s ease-in-out infinite alternate;
}

.starfield-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Subtle warm/cool halo behind center copy & upper Earendel star */
.cosmos-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 25%, rgba(56, 189, 248, 0.13) 0%, rgba(245, 185, 82, 0.06) 18%, transparent 46%),
    radial-gradient(ellipse 62% 44% at 50% 58%, rgba(4, 6, 13, 0.62) 0%, rgba(4, 6, 13, 0.25) 56%, transparent 100%);
}

.cosmos-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 6, 13, 0.6) 0%, transparent 18%, transparent 78%, rgba(4, 6, 13, 0.82) 100%),
    radial-gradient(ellipse at 50% 50%, transparent 46%, rgba(2, 3, 8, 0.74) 100%);
}

/* --------------------------------------------------------------------------
   Single-Screen Stage Layout
   -------------------------------------------------------------------------- */
.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100vw;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  padding: clamp(18px, 3vh, 36px) clamp(18px, 4vw, 48px);
  overflow: hidden;
}

/* Top Brand Mark */
.brand-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeDown 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 12px;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.brand-link:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 20px rgba(245, 185, 82, 0.32));
}

.brand-link:focus-visible {
  outline: 1.5px solid rgba(245, 185, 82, 0.75);
  outline-offset: 6px;
}

.brand-logo {
  height: clamp(50px, 7.2vh, 72px);
  max-width: min(82vw, 280px);
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 22px rgba(4, 6, 13, 0.75));
}

/* Center Hero Composition — positioned cleanly beneath the Sunrise Arc apex */
.hero-center {
  width: 100%;
  max-width: min(920px, 100%);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: clamp(52px, 15vh, 146px);
}

.hero-copy {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.2vh, 24px);
}

.headline {
  width: 100%;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.9vw, 4.25rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--starlight);
  text-shadow: 0 8px 38px rgba(4, 6, 13, 0.9);
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.headline-line {
  display: block;
}

.earendel-word {
  font-weight: 600;
  background: linear-gradient(108deg, #e0f2fe 6%, #ffffff 36%, #fde68a 70%, #f5b952 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(245, 185, 82, 0.3));
}

.subheadline {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.65vw, 1.32rem);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--starlight-soft);
  text-shadow: 0 2px 18px rgba(4, 6, 13, 0.92);
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}

/* Coming Soon Cosmic Signal Pill */
.status-badge {
  margin-top: clamp(4px, 0.8vh, 10px);
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 11px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(8, 13, 28, 0.62));
  border: 1px solid rgba(245, 185, 82, 0.38);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.1) inset,
    0 12px 32px rgba(2, 3, 8, 0.6),
    0 0 28px rgba(245, 185, 82, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.star-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sunrise-pale);
  box-shadow: 0 0 10px var(--sunrise-gold), 0 0 18px rgba(245, 185, 82, 0.75);
}

.star-pulse::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(253, 230, 138, 0.6);
  animation: pulseRing 2.8s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.status-label {
  font-family: var(--font-display);
  font-size: clamp(0.74rem, 0.95vw, 0.86rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sunrise-pale);
}

/* Quiet Floor Footer */
.stage-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.pillars {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--starlight-muted);
}

.pillars .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(245, 185, 82, 0.62);
}

.cosmic-note {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.44);
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes cosmicDrift {
  0% {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.07) translate3d(0, -1.1%, 0);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseRing {
  0% {
    transform: scale(0.75);
    opacity: 0.85;
  }
  70% {
    transform: scale(2.1);
    opacity: 0;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   Responsive Fine-Tuning (strictly zero-scroll on all viewports)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .cosmos-image {
    background-position: 50% 24%;
  }

  .hero-center {
    padding-top: clamp(44px, 13vh, 118px);
  }

  .headline {
    font-size: clamp(1.5rem, 6.4vw, 2.35rem);
    line-height: 1.16;
    text-wrap: balance;
  }

  .subheadline {
    font-size: clamp(0.78rem, 3.1vw, 1rem);
    letter-spacing: 0.16em;
  }

  .brand-logo {
    height: 48px;
  }

  .status-badge {
    padding: 10px 22px;
  }
}

@media (max-height: 640px) {
  .hero-center {
    padding-top: clamp(24px, 8vh, 64px);
  }

  .brand-logo {
    height: 44px;
  }

  .hero-copy {
    gap: 12px;
  }

  .cosmic-note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cosmos-image,
  .brand-header,
  .headline,
  .subheadline,
  .status-badge,
  .stage-footer,
  .star-pulse::after {
    animation: none;
  }
}
