/* =============================================
   PAGE SYSTEM
   ============================================= */
.page { display: none; opacity: 0; transform: translateY(18px); transition: opacity 0.5s cubic-bezier(0.16,1,0.3,1), transform 0.5s cubic-bezier(0.16,1,0.3,1); }
.page.active { display: block; opacity: 1; transform: translateY(0); }


/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; overflow: hidden;
  padding-top: var(--nav-height);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg-img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  transform: scale(1.05); animation: heroImgFloat 20s ease-in-out infinite alternate;
}
.hero__bg-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(2,14,33,0.2) 0%, rgba(2,14,33,0.65) 55%, rgba(2,14,33,0.97) 100%);
}
.hero__bg-fog {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 100% 50% at 50% 85%, rgba(47,108,158,0.13) 0%, transparent 55%),
    radial-gradient(ellipse 60% 30% at 15% 65%, rgba(111,169,214,0.05) 0%, transparent 50%),
    radial-gradient(ellipse 60% 30% at 85% 45%, rgba(111,169,214,0.05) 0%, transparent 50%);
  animation: fogDrift 14s ease-in-out infinite alternate;
}

/* Content */
.hero__content {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 28px; padding: 60px 24px 40px; max-width: 780px; width: 100%;
  justify-content: center;
}

/* Emblem */
.hero__emblem {
  position: relative; width: 160px; height: 160px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hero__emblem-ring { position: absolute; border-radius: 50%; animation: emblemSpin 30s linear infinite; }
.hero__emblem-ring--outer {
  inset: 0; border: 1px solid var(--border-subtle);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation-duration: 42s;
}
.hero__emblem-ring--inner { inset: 18px; border: 1px solid var(--border-normal); animation-direction: reverse; animation-duration: 20s; }
.hero__emblem-logo {
  width: 96px; height: 96px; object-fit: contain; position: relative; z-index: 1;
  filter: drop-shadow(0 0 18px var(--accent-glow-strong)) drop-shadow(0 0 36px var(--accent-glow));
  animation: logoPulse 4s ease-in-out infinite;
}

/* Text */
.hero__eyebrow { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent-secondary); opacity: 0.75; }
.hero__title {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(3.5rem, 11vw, 8rem);
  letter-spacing: 0.26em; color: var(--text-primary); line-height: 0.9;
  text-shadow: 0 0 40px var(--accent-glow-strong), 0 0 80px var(--accent-glow), 0 4px 24px rgba(0,0,0,0.5);
  animation: titleGlow 4s ease-in-out infinite alternate;
}
.hero__divider { display: flex; align-items: center; gap: 14px; width: 180px; }
.hero__divider span:first-child, .hero__divider span:last-child { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border-active), transparent); }
.hero__divider-rune { font-size: 1.1rem; color: var(--accent-secondary); animation: runePulse 3s ease-in-out infinite; line-height: 1; }
.hero__tagline { font-family: var(--font-body); font-size: clamp(0.88rem, 2.2vw, 1.05rem); font-weight: 400; color: var(--text-secondary); line-height: 1.85; letter-spacing: 0.04em; font-style: italic; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }


/* =============================================
   SCROLL BRIDGE — seamless line from hero to synopsis
   ============================================= */
.scroll-bridge {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  padding-bottom: 0; flex-shrink: 0;
  /* This element sits at the bottom of hero flex container */
}

.scroll-bridge__text {
  font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 12px;
  animation: scrollTextFade 2.5s ease-in-out infinite;
}

/* The track is a tall container; the dot slides down through it */
.scroll-bridge__track {
  width: 1px;
  height: 100px;               /* connects visually to synopsis */
  position: relative;
  background: rgba(111,169,214,0.06);  /* faint static line */
  overflow: hidden;
}

.scroll-bridge__dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 40%;
  background: linear-gradient(180deg, transparent 0%, var(--accent-secondary) 50%, transparent 100%);
  animation: bridgeDot 2s cubic-bezier(0.4,0,0.6,1) infinite;
}


/* =============================================
   SYNOPSIS — top connects to scroll-bridge
   ============================================= */
.synopsis {
  position: relative; padding: 0 24px 120px;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 40%, var(--bg-primary) 100%);
}

/* Continues the line visually (no gap) */
.synopsis::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 1px; height: 80px;
  background: linear-gradient(180deg, rgba(111,169,214,0.2) 0%, rgba(111,169,214,0.5) 50%, transparent 100%);
}

.synopsis__container { max-width: 720px; margin: 0 auto; text-align: center; padding-top: 80px; }

.synopsis__header { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 56px; }
.synopsis__rune { font-family: var(--font-display); font-size: 1.4rem; line-height: 1; color: var(--accent-secondary); opacity: 0.4; flex-shrink: 0; display: flex; align-items: center; }
.synopsis__title { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: 0.12em; color: var(--text-primary); line-height: 1; margin: 0; display: flex; align-items: center; }
.synopsis__paragraph { font-size: clamp(0.9rem, 1.8vw, 1rem); color: var(--text-secondary); line-height: 1.9; margin-bottom: 26px; }
.synopsis__paragraph--lead { font-size: clamp(1rem, 2.2vw, 1.12rem); color: var(--text-primary); font-style: italic; }

.synopsis__quote {
  position: relative; font-family: var(--font-display);
  font-size: clamp(0.88rem, 1.8vw, 1rem); font-weight: 600; letter-spacing: 0.06em;
  line-height: 2.1; color: var(--text-highlight);
  padding: 36px 52px; margin: 48px 0;
  background: rgba(6,22,50,0.7); border-radius: 12px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-normal);
}
.synopsis__quote::before, .synopsis__quote::after {
  content: ''; position: absolute; width: 20px; height: 20px;
  border-color: var(--accent-secondary); border-style: solid; opacity: 0.45;
}
.synopsis__quote::before { top: 10px; left: 10px; border-width: 1px 0 0 1px; border-radius: 3px 0 0 0; }
.synopsis__quote::after { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; border-radius: 0 0 3px 0; }
.synopsis__question { font-family: var(--font-display); font-size: clamp(0.95rem, 2.5vw, 1.2rem); font-weight: 600; color: var(--accent-secondary); letter-spacing: 0.08em; font-style: italic; margin-top: 48px; padding: 24px 0; border-top: 1px solid var(--border-subtle); }


/* =============================================
   FACTIONS PREVIEW
   ============================================= */
.factions-preview { padding: 100px 24px 140px; background: var(--bg-primary); position: relative; }
.factions-preview__header { text-align: center; margin-bottom: 60px; }
.factions-preview__title { font-family: var(--font-display); font-size: clamp(2rem, 5.5vw, 3.4rem); font-weight: 900; letter-spacing: 0.14em; color: var(--text-primary); margin-bottom: 12px; text-shadow: 0 0 40px var(--accent-glow); }
.factions-preview__sub { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-muted); }
.factions-preview__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; max-width: var(--section-max); margin: 0 auto 60px; }
.factions-preview__cta { text-align: center; }


/* =============================================
   FOOTER
   ============================================= */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--border-subtle); padding: 60px 24px; }
.footer__inner { max-width: var(--section-max); margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer__logo { width: 44px; height: 44px; object-fit: contain; opacity: 0.35; filter: grayscale(0.5); }
.footer__copy { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.1em; }
.footer__tagline { font-family: var(--font-display); font-size: 0.78rem; font-style: italic; color: var(--accent-secondary); opacity: 0.55; letter-spacing: 0.1em; }


/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .factions-preview__grid { grid-template-columns: repeat(2, 1fr); }
  .factions-preview__grid .faction-card:last-child { grid-column: 1 / -1; max-width: 260px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .nav { padding: 0 20px; } .nav__links { display: none; } .nav__burger { display: flex; }
  .synopsis__quote { padding: 24px 24px; }
  .hero__cta { flex-direction: column; align-items: center; }
  .hero__emblem { width: 128px; height: 128px; } .hero__emblem-logo { width: 80px; height: 80px; }
  .hero__content { gap: 22px; padding: 40px 20px 32px; }
}
@media (max-width: 480px) {
  .factions-preview__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .nav { padding: 0 16px; }
  .btn--large { padding: 15px 28px; font-size: 0.82rem; }
  .stub-page__content { padding: 40px 20px; }
  .synopsis__quote { padding: 20px 18px; }
  .audio-player { width: 200px; height: 44px; align-self: center; }
  .audio-player__btn { width: 32px !important; min-width: 32px !important; height: 32px !important; max-height: 32px !important; }
}