@font-face {
  font-family: 'Anton';
  src: url('../fonts/anton-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: #1a1a1a;
}

body {
  font-family: Inter, Arial, sans-serif;
}

h1,
p {
  margin: 0;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 16px;
  left: 16px;
  padding: 12px 20px;
  background: #ffc72c;
  color: #1a1a1a;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  outline: 3px solid #e5e5e5;
  outline-offset: 3px;
}

/* ===============================
   HERO — "Space Station" (scoped to .wrld-hero)
================================ */
.wrld-hero {
  --hero-ink: #1a1a1a;
  --hero-text: #e5e5e5;
  --hero-cream: #e9e4d8;
  --hero-red: #e2231a;
  --hero-yellow: #ffc72c;
  --hero-navy: #1e2f75;
  --hero-poster: 'Anton', Impact, 'Arial Narrow', sans-serif;
  /* fine paper grain, used only on graphic accents */
  --hero-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--hero-ink);
  color: var(--hero-text);
}

/* ---------- Headline block (real HTML, visible before Spline loads) ---------- */
.wrld-hero__intro {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  max-width: min(64%, 900px);
  padding: clamp(40px, 7vh, 72px) 0 0 clamp(24px, 5vw, 88px);
  pointer-events: none;
}

.wrld-hero__intro a {
  pointer-events: auto;
}

.wrld-hero__tape {
  position: relative;
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 14px 4px;
  background: var(--hero-yellow);
  color: var(--hero-ink);
  font-family: var(--hero-poster);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-2.5deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.wrld-hero__tape::after,
.wrld-hero__red::after,
.wrld-hero__label::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-grain);
  mix-blend-mode: multiply;
  opacity: 0.35;
  pointer-events: none;
}

.wrld-hero__title {
  max-width: 9.4em;
  font-family: var(--hero-poster);
  font-weight: 400;
  font-size: clamp(3rem, 6.2vw, 6.9rem);
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--hero-text);
  text-wrap: balance;
  text-shadow: 0 2px 3px #1a1a1a, 0 0 12px #1a1a1a;
}

/* keep every span in the headline on the poster face */
.wrld-hero__title * {
  font-family: inherit;
}

.wrld-hero__red {
  position: relative;
  display: inline-block;
  padding: 0.03em 0.12em 0;
  margin: 0.02em 0 0.04em;
  background: var(--hero-red);
  color: var(--hero-text);
  white-space: nowrap;
  transform: rotate(-1.2deg);
}

.wrld-hero__phrase {
  white-space: nowrap;
}

.wrld-hero__yellow {
  color: var(--hero-yellow);
  white-space: nowrap;
}

.wrld-hero__lede {
  display: inline-block;
  max-width: 30em;
  margin-top: 1rem;
  margin-left: -0.5rem;
  padding: 0.25rem 0.5rem;
  font-family: Inter, Arial, sans-serif;
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.45;
  color: var(--hero-text);
  background: rgba(26, 26, 26, 0.92);
}

/* Plain-text fallback destinations (loading / failure only) */
.wrld-hero__quicklinks[hidden] {
  display: none;
}

.wrld-hero__quicklinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  margin-top: 0.75rem;
  font-size: 1rem;
}

.wrld-hero__quicklinks a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--hero-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--hero-yellow);
  text-underline-offset: 4px;
}

.wrld-hero__quicklinks a:focus-visible {
  outline: 3px solid var(--hero-yellow);
  outline-offset: 3px;
}

/* ---------- Stage: reserved space for the single Spline canvas ---------- */
.wrld-hero__stage {
  position: relative;
  width: 100%;
  height: clamp(600px, 100svh, 1080px);
  background: linear-gradient(180deg, #1a1a1a 0%, #1a1a1a 42%, #1b2244 78%, #1e2f75 100%);
  touch-action: pan-y; /* swiping over the scene still scrolls the page */
}

.wrld-hero__canvas,
.wrld-hero__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none; /* no drag/orbit; destinations are HTML buttons */
}

.wrld-hero__stage[data-status='fallback'] .wrld-hero__canvas {
  display: none;
}

.wrld-hero__fallback {
  display: none;
  object-fit: cover;
  object-position: center;
}

.wrld-hero__stage[data-status='fallback'] .wrld-hero__fallback {
  display: block;
}

/* ---------- Destination controls (positioned over the station / rocket) ---------- */
.wrld-hero__dest {
  position: absolute;
  z-index: 3;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.wrld-hero__dest::before {
  content: '';
  position: absolute;
  inset: 0 0 60px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 199, 44, 0.16), rgba(255, 199, 44, 0) 72%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.wrld-hero__dest[hidden] {
  display: none;
}

.wrld-hero__label {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 18px 8px;
  background: var(--hero-cream);
  color: var(--hero-ink);
  font-family: var(--hero-poster);
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wrld-hero__dest--rocket .wrld-hero__label {
  background: var(--hero-yellow);
}

.wrld-hero__dest:hover::before,
.wrld-hero__dest:focus-visible::before {
  opacity: 1;
}

.wrld-hero__dest:hover .wrld-hero__label,
.wrld-hero__dest:focus-visible .wrld-hero__label {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45), 0 0 0 3px var(--hero-red), 0 0 22px rgba(255, 199, 44, 0.45);
}

.wrld-hero__dest:focus-visible {
  outline: none;
}

.wrld-hero__dest:focus-visible .wrld-hero__label {
  outline: 3px solid var(--hero-text);
  outline-offset: 4px;
}

/* ---------- Narrow screens: stack the headline above the scene ---------- */
@media (max-width: 899px) {
  .wrld-hero__intro {
    position: relative;
    max-width: none;
    padding: 40px clamp(20px, 6vw, 48px) 8px;
  }

  .wrld-hero__title {
    font-size: clamp(2.5rem, 11vw, 4.6rem);
  }

  /* the hero is the whole page: center it so tall phones don't end in a dead band */
  .wrld-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100svh;
  }

  /* fixed shape: the scene is width-limited on phones, so a taller stage only adds empty sky */
  .wrld-hero__stage {
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: 78svh;
  }

  .wrld-hero__label {
    width: max-content;
    padding: 8px 11px 7px;
    font-size: 0.86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wrld-hero__dest::before,
  .wrld-hero__label {
    transition: none;
  }
}
