:root {
  --obsidian: #0f1522;
  --gold: #eab308;
  --gold-bright: #facc15;
  --gold-pale: #fef08a;
  --ink: #ffffff;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  background-color: var(--obsidian);
  color: var(--ink);
  font-family: "Onest", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Interactive Elements: Native Pointer Cursor */
a, button, select, [role="button"] {
  cursor: pointer;
}

#cursor-ring,
#cursor-dot {
  display: none !important;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #0f1522;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.85s;
}
#preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Brighter Black, Yellow & White Studio Backdrop Stage */
#backdrop-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #1b2538 0%, #101726 55%, #0c111d 100%);
  pointer-events: none;
}

@keyframes mistFlow {
  0% { transform: translateX(-3%) translateY(0); opacity: 0.42; }
  50% { transform: translateX(3%) translateY(-1.5%); opacity: 0.56; }
  100% { transform: translateX(-3%) translateY(0); opacity: 0.42; }
}

.mist-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 32% 48%, rgba(255, 255, 255, 0.20) 0%, transparent 58%),
              radial-gradient(ellipse at 74% 36%, rgba(250, 204, 21, 0.18) 0%, transparent 55%);
  filter: blur(36px);
  animation: mistFlow 18s ease-in-out infinite;
  pointer-events: none;
}

#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  pointer-events: none;
}

.scene-scrim {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 65% 40%, rgba(255, 255, 255, 0.08) 0%, rgba(12, 17, 28, 0.42) 100%);
  z-index: 3;
  pointer-events: none;
  transition: background 0.9s ease;
}

.film-grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.02;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

/* Scrollable Story Wrapper */
#story-wrapper {
  position: relative;
  z-index: 10;
}

.act-section {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 84px 4vw 52px 236px;
}
@media (max-width: 1024px) {
  .act-section {
    padding: 88px 5vw 64px 5vw;
  }
}

/* Crisp Black, Yellow & White HUD Panels */
.glass-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(16, 22, 35, 0.76) 0%, rgba(10, 14, 23, 0.72) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.glass-panel::before,
.glass-card::before,
.case-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #facc15 50%, transparent 100%);
  pointer-events: none;
}

.glass-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(17, 24, 38, 0.76) 0%, rgba(10, 14, 23, 0.72) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-3px);
  border-color: #facc15;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5), 0 0 22px rgba(250, 204, 21, 0.18);
}

.case-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(18, 26, 42, 0.78) 0%, rgba(11, 16, 26, 0.76) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.55);
  color: #facc15;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.18);
  flex-shrink: 0;
}

.text-readable,
.act-section h1,
.act-section h2,
.act-section h3,
.act-section h4,
.act-section p {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

/* Native Cyrillic Luxury Editorial Typography */
.font-display {
  font-family: "Tenor Sans", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.font-ui {
  font-family: "Onest", "Plus Jakarta Sans", sans-serif;
}

/* Hero Mobile Responsive H1 Protection */
.hero-title {
  font-size: clamp(1.05rem, 1.95vw, 1.76rem);
  line-height: 1.22;
  letter-spacing: 0.03em;
}

/* Interactive Stage Button-Cards (Act 3) */
.stage-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  text-align: left;
  background: rgba(13, 19, 31, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease,
              background 0.25s ease,
              box-shadow 0.25s ease;
}

.stage-tab:hover {
  transform: translateY(-3px);
  border-color: #facc15;
  background: rgba(20, 28, 46, 0.88);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.48), 0 0 18px rgba(250, 204, 21, 0.18);
}

.stage-tab.is-active {
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.24) 0%, rgba(14, 20, 34, 0.92) 100%);
  border: 1.5px solid #facc15;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.52), 0 0 26px rgba(250, 204, 21, 0.32);
}

.stage-tab .stage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transition: background 0.25s ease, color 0.25s ease;
}

.stage-tab.is-active .stage-badge {
  background: #facc15;
  color: #090d16;
}

.stage-tab .stage-arrow {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.65);
  transition: transform 0.25s ease, color 0.25s ease;
}

.stage-tab:hover .stage-arrow,
.stage-tab.is-active .stage-arrow {
  color: #facc15;
  transform: translateX(3px);
}

.stage-tab .stage-cta-hint {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.25s ease;
}

.stage-tab.is-active .stage-cta-hint {
  color: #facc15;
  font-weight: 700;
}

#stage-detail-card {
  transition: opacity 0.22s ease, transform 0.22s ease;
}
#stage-detail-card.is-switching {
  opacity: 0.35;
  transform: translateY(4px);
}

/* Interactive Corridor Capsule Pills (Act 4) */
.corridor-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(13, 19, 31, 0.80);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.corridor-tab:hover {
  transform: translateY(-2px);
  color: #ffffff;
  border-color: #facc15;
  background: rgba(22, 31, 50, 0.92);
}

.corridor-tab.is-active {
  color: #090d16;
  font-weight: 700;
  background: #facc15;
  border-color: #facc15;
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.45);
}

/* Left Progress Rail with Frosted Capsule Backing */
#rail-nav {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 16px 14px;
  background: rgba(12, 17, 28, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}
@media (max-width: 1024px) {
  #rail-nav { display: none; }
}
.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
}
.rail-diamond {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.rail-item.active .rail-diamond {
  background: #facc15;
  transform: scale(1.45);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.9);
}
.rail-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
.rail-item:hover .rail-label,
.rail-item.active .rail-label {
  color: #facc15;
  font-weight: 700;
  transform: translateX(3px);
}

.glass-panel--dropdown {
  overflow: visible;
  z-index: 25;
}

/* Form Input & Custom Select Styling */
input.form-field,
select.form-field {
  width: 100%;
  min-height: 49px;
  background-color: rgba(12, 18, 30, 0.90) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.30) !important;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14px;
  color: #ffffff !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
input.form-field::placeholder {
  color: rgba(255, 255, 255, 0.72) !important;
  opacity: 1 !important;
}
input.form-field:focus,
select.form-field:focus {
  outline: none !important;
  border-color: #facc15 !important;
  background-color: rgba(16, 24, 40, 0.96) !important;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.22) !important;
}

/* Custom Branded Destination Dropdown (Act 7) */
.custom-select {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 30;
}

.custom-select.is-open {
  z-index: 60;
}

.custom-select-trigger {
  width: 100%;
  height: 100%;
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 10px 12px;
  border-radius: 12px;
  background: rgba(12, 18, 30, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.30);
  color: #ffffff;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.custom-select-trigger:hover {
  border-color: rgba(250, 204, 21, 0.65);
  background: rgba(16, 24, 40, 0.94);
}

.custom-select-trigger:focus-visible,
.custom-select.is-open .custom-select-trigger {
  outline: none;
  border-color: #facc15;
  background: rgba(16, 24, 40, 0.98);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.22);
}

.custom-select-value {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.custom-select-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.55);
  color: #facc15;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-shrink: 0;
  transition: background-color 0.22s ease, color 0.22s ease;
}

.custom-select.is-open .custom-select-code {
  background: #facc15;
  color: #090d16;
}

.custom-select-label {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-chevron {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), color 0.22s ease;
}

.custom-select-trigger:hover .custom-select-chevron,
.custom-select.is-open .custom-select-chevron {
  color: #facc15;
}

.custom-select.is-open .custom-select-chevron {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 70;
  padding: 8px;
  border-radius: 15px;
  background: linear-gradient(165deg, rgba(16, 24, 40, 0.98) 0%, rgba(9, 13, 22, 0.98) 100%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(250, 204, 21, 0.42);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.72), 0 0 28px rgba(250, 204, 21, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.22s ease;
}

.custom-select-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #facc15 50%, transparent 100%);
  pointer-events: none;
}

.custom-select.is-open .custom-select-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.custom-select-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 204, 21, 0.9);
}

.custom-select-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.custom-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(250, 204, 21, 0.45);
  transform: translateX(2px);
}

.custom-select-option.is-selected {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.22) 0%, rgba(250, 204, 21, 0.06) 100%);
  border-color: rgba(250, 204, 21, 0.65);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.custom-select-opt-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.custom-select-opt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 28px;
  padding: 0 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.custom-select-option:hover .custom-select-opt-badge {
  border-color: rgba(250, 204, 21, 0.55);
  color: #facc15;
}

.custom-select-option.is-selected .custom-select-opt-badge {
  background: #facc15;
  border-color: #facc15;
  color: #090d16;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.35);
}

.custom-select-opt-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.custom-select-opt-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.custom-select-opt-sub {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.25;
}

.custom-select-check {
  font-size: 18px;
  color: #facc15;
  opacity: 0;
  transform: scale(0.75);
  flex-shrink: 0;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.custom-select-option.is-selected .custom-select-check {
  opacity: 1;
  transform: scale(1);
}

/* Fullscreen Menu Overlay */
#menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 14, 24, 0.96);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
  overflow-y: auto;
}
#menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Lighter GPU compositing for older mobile / low-power devices (same dark obsidian glass look) */
body.perf-lite .glass-panel,
body.perf-lite .glass-card,
body.perf-lite .case-card,
body.perf-lite .stage-tab:not(.is-active),
body.perf-lite .corridor-tab:not(.is-active) {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: linear-gradient(165deg, rgba(14, 20, 33, 0.86) 0%, rgba(10, 14, 23, 0.84) 100%);
}
body.perf-lite .stage-tab.is-active {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.perf-lite .corridor-tab.is-active {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: #facc15;
  color: #090d16;
  border-color: #facc15;
}
body.perf-lite .mist-layer {
  filter: blur(22px);
}
@media (prefers-reduced-motion: reduce) {
  .mist-layer {
    animation: none;
  }
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #0f1522; }
::-webkit-scrollbar-thumb { background: rgba(250, 204, 21, 0.55); border-radius: 999px; }
