/**
 * RECHARGE v8 — Faceted lightning · cyan + gold · full-bright regional BGs
 * Palette from recharge-logo-faceted-cyan
 */
:root {
  --bg-void: #050608;
  --hw-dark: #121418;
  --hw-panel: #1a1c22;
  --hw-chrome: #c0c4c8;

  --em-cyan: #00e5ff;
  --em-cyan-glow: rgba(0, 229, 255, 0.35);
  --em-cyan-deep: #007788;

  --gold-bright: #ffd700;
  --gold-deep: #b38f00;
  --gold-glow: rgba(255, 215, 0, 0.25);

  --crit-red: #ff003c;
  --orange-hazard: #ff5722;
  --purple-lore: #a366ff;

  --text-main: #e2e8f0;
  --text-muted: #8b939c;

  --font-ui: "Inter", sans-serif;
  --font-macro: "Teko", sans-serif;
  --font-data: "JetBrains Mono", monospace;

  --facet-cut-sm: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
  --facet-cut-md: polygon(30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%, 0 30px);
  --facet-cut-btn: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);

  --nav-offset: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-ui);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

html.landing-locked {
  overflow: hidden;
  height: 100%;
}

body.landing-locked {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

body.landing-locked #journey-main {
  display: none;
}

body.landing-locked .timeline-spine {
  opacity: 0;
}

/* ─── Full-bright regional backgrounds (NO dim overlay) ─── */
#bg-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-layer.active {
  opacity: 1;
}

#bg-00 { background-color: var(--bg-void); }

/* ─── Nav ─── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 11, 13, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--hw-dark);
  padding: 10px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.nav-brand-link {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
}

.nav-brand-img {
  height: 50px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px var(--em-cyan-glow)) drop-shadow(0 0 8px var(--gold-glow));
}

.nav-status {
  font-family: var(--font-data);
  font-size: 0.8rem;
  color: var(--gold-bright);
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid var(--gold-bright);
  padding: 6px 12px;
  border-radius: 4px;
  box-shadow: 0 0 15px var(--gold-glow);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: bold;
}

/* ─── Layout + spine ─── */
.content-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: var(--nav-offset);
}

.timeline-spine {
  position: fixed;
  top: 70px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  background: var(--hw-dark);
  z-index: 2;
  pointer-events: none;
}

.spine-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--em-cyan);
  box-shadow: 0 0 20px var(--em-cyan), 0 0 40px var(--em-cyan);
  transition: height 0.2s ease-out;
}

/* ─── Landing ─── */
.landing {
  width: 100%;
  min-height: calc(100dvh - var(--nav-offset));
  max-height: calc(100dvh - var(--nav-offset));
  padding: clamp(8px, 2vh, 20px) 24px clamp(12px, 2vh, 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 6;
  box-sizing: border-box;
}

.landing__inner {
  width: 100%;
  max-width: 920px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.8vh, 18px);
  flex: 1 1 auto;
  min-height: 0;
  opacity: 0;
  transform: translateY(24px);
  transition: 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.landing.visible .landing__inner {
  opacity: 1;
  transform: translateY(0);
}

.landing__logo {
  width: min(88vw, 620px);
  max-height: clamp(100px, 26vh, 220px);
  height: auto;
  object-fit: contain;
  flex-shrink: 1;
  filter:
    drop-shadow(0 0 28px rgba(0, 229, 255, 0.45))
    drop-shadow(0 0 18px rgba(255, 215, 0, 0.25));
}

.landing__tagline {
  font-family: var(--font-macro);
  font-size: clamp(1.75rem, 5vw, 3.4rem);
  color: #fff;
  line-height: 1;
  text-transform: uppercase;
  font-style: italic;
  letter-spacing: 1px;
  text-shadow: 3px 3px 0 #000, 0 0 24px rgba(0, 229, 255, 0.12);
  flex-shrink: 0;
}

.landing__tagline span {
  color: var(--em-cyan);
}

.landing__sub {
  max-width: 560px;
  font-size: clamp(0.82rem, 1.8vw, 1.05rem);
  line-height: 1.5;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 1;
}

.landing__cta {
  margin-top: clamp(4px, 1vh, 10px);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  max-width: 100%;
}

.btn-ignite.landing__cta {
  font-size: clamp(1.35rem, 3.5vw, 2.2rem);
  padding: clamp(10px, 1.5vh, 14px) clamp(24px, 5vw, 48px);
}

.landing__hint {
  font-family: var(--font-data);
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 215, 0, 0.65);
  flex-shrink: 0;
  animation: landing-pulse 2.4s ease-in-out infinite;
}

@keyframes landing-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@media (max-width: 899px) {
  :root {
    --nav-offset: 108px;
  }

  .landing {
    padding: 6px 16px 10px;
  }

  .landing__logo {
    width: min(82vw, 300px);
    max-height: clamp(72px, 20vh, 140px);
  }

  .landing__tagline {
    font-size: clamp(1.45rem, 6.5vw, 2rem);
  }

  .landing__sub {
    font-size: 0.78rem;
    line-height: 1.4;
    max-width: 92%;
  }

  .landing__inner {
    gap: clamp(8px, 1.4vh, 12px);
  }

  .btn-ignite.landing__cta {
    font-size: clamp(1.2rem, 5.5vw, 1.55rem);
    padding: 11px 20px;
    width: min(100%, 300px);
  }

  .landing__hint {
    font-size: 0.6rem;
    letter-spacing: 1.5px;
  }
}

/* ─── Sections ─── */
.journey-sec {
  width: 100%;
  min-height: 100vh;
  padding: 100px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 5;
}

.chapter-box {
  background: linear-gradient(145deg, rgba(26, 28, 34, 0.94) 0%, rgba(8, 9, 11, 0.97) 100%);
  border: 2px solid rgba(192, 196, 200, 0.15);
  padding: 36px 32px;
  width: 100%;
  max-width: 720px;
  position: relative;
  clip-path: var(--facet-cut-md);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  transition: 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chapter-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--em-cyan), transparent);
  z-index: 2;
}

.journey-sec.visible .chapter-box {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (min-width: 900px) {
  .journey-sec:nth-child(odd) .chapter-box {
    margin-right: auto;
    margin-left: 6%;
  }

  .journey-sec:nth-child(even) .chapter-box {
    margin-left: auto;
    margin-right: 6%;
  }

  .journey-sec:nth-child(even) .chapter-box::before {
    background: linear-gradient(270deg, var(--em-cyan), transparent);
  }
}

@media (max-width: 899px) {
  .timeline-spine { left: 20px; }
  .chapter-box {
    margin-left: 44px !important;
    width: calc(100% - 44px);
    padding: 28px 22px;
  }
  .site-nav {
    padding: 12px 16px;
    flex-direction: column;
    gap: 8px;
  }
  .nav-brand-img { height: 40px; }
}

/* ─── Titles (minimal — body is narration) ─── */
.ch-kicker {
  font-family: var(--font-data);
  font-size: 0.85rem;
  color: var(--gold-bright);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 3px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ch-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--gold-bright);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  box-shadow: 0 0 10px var(--gold-bright);
}

.ch-title {
  font-family: var(--font-macro);
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  color: #fff;
  line-height: 0.88;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-style: italic;
  letter-spacing: 1px;
  text-shadow: 3px 3px 0 #000, 0 0 24px rgba(0, 229, 255, 0.15);
}

.ch-title span {
  color: var(--em-cyan);
}

.gold-accent .ch-title span {
  color: var(--gold-bright);
}

/* ─── Narration panel (primary content) ─── */
.narration-panel {
  background: rgba(5, 6, 8, 0.75);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-left: 5px solid var(--em-cyan);
  padding: 28px 26px;
  margin-top: 8px;
  position: relative;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.4);
}

.narration-panel__tag {
  position: absolute;
  top: -11px;
  right: 12px;
  background: var(--bg-void);
  color: var(--em-cyan);
  font-family: var(--font-data);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 0 8px;
}

.comm-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.comm-avatar {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border: 2px solid var(--em-cyan);
  background: var(--hw-dark);
  clip-path: var(--facet-cut-sm);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--em-cyan);
  font-family: var(--font-macro);
  font-size: 1.6rem;
  box-shadow: 0 0 16px var(--em-cyan-glow);
}

.comm-avatar--fallback {
  font-size: 1.4rem;
}

.comm-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comm-speaker {
  font-family: var(--font-macro);
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: #fff;
  line-height: 1;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.comm-role {
  font-family: var(--font-data);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.narration-body {
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  line-height: 1.75;
  color: var(--text-main);
  font-weight: 500;
}

.narration-p {
  margin-bottom: 1.1em;
}

.narration-p:last-child {
  margin-bottom: 0;
}

.hl-cyan { color: var(--em-cyan); font-weight: 700; }
.hl-gold { color: var(--gold-bright); font-weight: 700; }
.hl-red { color: var(--crit-red); font-weight: 700; }
.hl-purple { color: var(--purple-lore); font-weight: 700; }
.hl-orange { color: var(--orange-hazard); font-weight: 700; }

/* ─── Widget slot (future interactives) ─── */
.widget-slot {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px dashed rgba(0, 229, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-data);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.widget-slot__icon {
  font-size: 1.2rem;
  color: var(--em-cyan);
}

/* ─── Character themes ─── */
.theme-sam .narration-panel { border-left-color: var(--gold-bright); }
.theme-sam .narration-panel__tag { color: var(--gold-bright); }
.theme-sam .comm-avatar { border-color: var(--gold-bright); color: var(--gold-bright); box-shadow: 0 0 16px var(--gold-glow); }

.theme-doreen .narration-panel { border-left-color: var(--purple-lore); }
.theme-doreen .narration-panel__tag { color: var(--purple-lore); }
.theme-doreen .comm-avatar { border-color: var(--purple-lore); color: var(--purple-lore); }

.theme-kairo .narration-panel { border-left-color: var(--orange-hazard); }
.theme-kairo .narration-panel__tag { color: var(--orange-hazard); }
.theme-kairo .comm-avatar { border-color: var(--orange-hazard); color: var(--orange-hazard); }

.theme-vex .narration-panel { border-left-color: var(--crit-red); }
.theme-vex .narration-panel__tag { color: var(--crit-red); }
.theme-vex .comm-avatar { border-color: var(--crit-red); color: var(--crit-red); }
.theme-vex .comm-speaker { color: var(--crit-red); }

/* ─── CTA ─── */
.journey-sec--cta {
  padding-bottom: 120px;
}

.hero-cta {
  background: linear-gradient(160deg, rgba(17, 17, 20, 0.95), rgba(5, 6, 8, 0.98));
  border: 3px solid var(--gold-bright);
  padding: 48px 36px;
  text-align: center;
  clip-path: var(--facet-cut-md);
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.12);
  max-width: 720px;
  margin: 0 auto;
}

.narration-panel--cta {
  text-align: left;
  margin-bottom: 28px;
}

.btn-ignite {
  background: var(--gold-bright);
  color: #000;
  border: none;
  font-family: var(--font-macro);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  padding: 14px 48px;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: var(--facet-cut-btn);
  box-shadow: 0 8px 0 var(--gold-deep), 0 0 30px rgba(255, 215, 0, 0.4);
  transition: 0.15s;
  letter-spacing: 2px;
  font-style: italic;
  font-weight: 700;
}

.btn-ignite:hover {
  filter: brightness(1.15);
  transform: translateY(2px);
  box-shadow: 0 6px 0 var(--gold-deep), 0 0 40px rgba(255, 215, 0, 0.55);
}

.btn-ignite:active {
  transform: translateY(8px);
  box-shadow: none;
}

/* ─── Modal ─── */
#contract-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}

#contract-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--hw-panel);
  border: 2px solid var(--em-cyan);
  padding: 40px;
  text-align: center;
  clip-path: var(--facet-cut-md);
  max-width: 500px;
  margin: 20px;
  box-shadow: 0 0 50px rgba(0, 229, 255, 0.2);
  transform: scale(0.9);
  transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#contract-modal.show .modal-box {
  transform: scale(1);
}

.modal-title {
  font-family: var(--font-macro);
  font-size: 2.8rem;
  color: var(--em-cyan);
  line-height: 1;
  margin-bottom: 15px;
  font-style: italic;
}

.modal-text {
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 28px;
  line-height: 1.6;
}

.btn-close {
  background: transparent;
  border: 2px solid #555;
  color: #fff;
  font-family: var(--font-data);
  font-size: 0.9rem;
  padding: 10px 24px;
  cursor: pointer;
  transition: 0.2s;
  text-transform: uppercase;
}

.btn-close:hover {
  background: #444;
  border-color: var(--em-cyan);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chapter-box { transition: none; opacity: 1; transform: none; }
  .landing__inner { transition: none; opacity: 1; transform: none; }
  .landing__hint { animation: none; opacity: 0.8; }
  .bg-layer { transition: none; }
}
