/* ========================================
   RESET
======================================== */

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

html,
body {
  width: 100%;
  min-height: 100%;
}

body.story-body {
  font-family: "Inter", sans-serif;
  color: #ffffff;
  overflow-x: hidden;
  position: relative;
  background: #050816;
}

/* ========================================
   CANVAS + BACKGROUND
======================================== */

#space-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -30;
  display: block;
}

body.story-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -29;
  pointer-events: none;

  background:
    linear-gradient(
      rgba(4, 6, 18, 0.76),
      rgba(4, 6, 18, 0.86)
    ),
    url("../assets/images/storypage.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.42;
}

.space-overlay {
  position: fixed;
  inset: 0;
  z-index: -28;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(122, 92, 255, 0.12), transparent 28%),
    radial-gradient(circle at 78% 28%, rgba(255, 152, 88, 0.10), transparent 26%),
    radial-gradient(circle at 52% 88%, rgba(255, 84, 176, 0.08), transparent 30%);
}

.space-vignette {
  position: fixed;
  inset: 0;
  z-index: -27;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 36%, rgba(0, 0, 0, 0.26) 74%, rgba(0, 0, 0, 0.62) 100%);
}

/* ========================================
   NAVBAR
======================================== */

.navbar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: min(94%, 980px);
  z-index: 100;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.logo {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

/* ========================================
   STORY LAYOUT
======================================== */

.story-main {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  padding: 118px 18px 90px;
}

.story-hero,
.story-section,
.story-final {
  width: 100%;
  margin-bottom: 22px;
}

.story-container {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 34px 36px;
  border-radius: 28px;
  background: rgba(8, 14, 34, 0.56);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.story-container.narrow {
  padding: 30px 34px;
}

.story-badge {
  display: inline-flex;
  margin-bottom: 18px;
  color: #d59cff;
  font-size: 14px;
  font-weight: 800;
}

.story-title {
  max-width: 620px;
  font-size: clamp(42px, 7vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin-bottom: 28px;
}

.story-intro,
.story-section p,
.story-final p {
  max-width: 620px;
  font-size: 16px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 16px;
}

.story-section h2,
.story-final h2 {
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.story-section strong {
  color: #ffffff;
}

.story-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 18px;
  padding: 0 22px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffcf58 0%, #ffb61d 100%);
  color: #111111;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(255, 184, 0, 0.20);
}

/* ========================================
   FOOTER
======================================== */

.footer {
  position: fixed;
  left: 0;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: 100%;
  text-align: center;
  z-index: 20;
  pointer-events: none;
}

.footer p {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.56);
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 600px) {
  .navbar {
    top: 8px;
    width: min(94%, 980px);
  }

  .navbar-inner.compact {
    padding: 10px 12px;
    gap: 8px;
    border-radius: 18px;
  }

  .logo {
    font-size: 15px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links.compact {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(8, 14, 34, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.26);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 0.22s ease,
      transform 0.22s ease;
    z-index: 30;
  }

  .nav-links.compact a {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.04);
  }

  .navbar.menu-open .nav-links.compact {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .navbar.menu-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .navbar.menu-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .navbar.menu-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  body.story-body::before {
    opacity: 0.28;
    background-position: center top;
  }

  .story-main {
    padding: 96px 14px 84px;
  }

  .story-hero,
  .story-section,
  .story-final {
    margin-bottom: 16px;
  }

  .story-container,
  .story-container.narrow {
    width: 100%;
    padding: 24px 18px;
    border-radius: 22px;
    background: rgba(8, 14, 34, 0.62);
  }

  .story-badge {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .story-title {
    font-size: 38px;
    line-height: 1;
    margin-bottom: 22px;
  }

  .story-intro,
  .story-section p,
  .story-final p {
    font-size: 14px;
    line-height: 1.75;
  }

  .story-section h2,
  .story-final h2 {
    font-size: 25px;
  }

  .story-button {
    width: 100%;
  }

  .footer {
    display: none;
  }
}
/* ========================================
   SIRIUS GHOST BACKGROUND
======================================== */

.story-main::before {
  content: "";

  position: fixed;

  inset: 0;

  pointer-events: none;

  z-index: -26;

  background:
    url("../assets/images/storypage.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  opacity: 0.17;

  mix-blend-mode: screen;

  filter:
    blur(1px)
    saturate(1.1);
}