:root {
  --bg-dark: #0a1118;
  --card-bg: #121c27;
  --card-border: rgba(255, 255, 255, 0.08);
  --navy-light: #192736;
  --blue-accent: #38bdf8;
  --blue-cta: #2563eb;
  --blue-cta-hover: #1d4ed8;
  --text-white: #ffffff;
  --text-ice: #e2e8f0;
  --text-muted: #8fa0b5;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html, body {
  width: 100%;
  overflow-x: hidden;
  background: var(--bg-dark);
}

html { 
  scroll-behavior: smooth; 
}

body {
  color: var(--text-ice);
  font-family: var(--font-sans);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Stable Header */
.site-header {
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  background: rgba(10, 17, 24, 0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}

@media (min-width: 640px) {
  .site-header { padding: 1rem 2rem; }
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.nav-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .nav-logo-img { width: 44px; height: 44px; }
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-white);
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--blue-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.nav-text-btn {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-ice);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.nav-text-btn:hover { 
  color: var(--blue-accent);
  border-color: var(--blue-accent);
}

/* Main Viewport Stage */
.viewport-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: radial-gradient(circle at 50% 20%, #162433 0%, var(--bg-dark) 75%);
  width: 100%;
}

.card-modal {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.75rem 1.25rem 2rem;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

@media (min-width: 640px) {
  .viewport-stage { padding: 2.5rem 1rem; }
  .card-modal {
    border-radius: 20px;
    padding: 2.5rem 2.25rem;
  }
}

/* Screen 1: Original Circular Emblem */
.logo-hero {
  text-align: center;
  margin-bottom: 1.25rem;
}

.logo-hero img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

/* Screens 2 & 3: Panoramic Flagship Banner */
.banner-frame {
  width: 100%;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.banner-frame img {
  width: 100%;
  height: auto;
  display: block;
}

h1, h2 {
  font-family: var(--font-serif);
  color: var(--text-white);
  text-align: center;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 0.65rem;
}

@media (min-width: 640px) {
  h1, h2 { font-size: clamp(1.75rem, 3.2vw, 2.2rem); }
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Eligibility Gate Section */
.gate-card {
  background: rgba(56, 189, 248, 0.04);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
}

.gate-prompt {
  font-weight: 600;
  color: var(--text-white);
  font-size: 1.05rem;
  margin-bottom: 0.65rem;
}

.microcopy {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1rem;
}

.decline-box {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 1rem;
  background: var(--navy-light);
  border-radius: 10px;
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  touch-action: manipulation;
}

.btn-primary {
  background: var(--blue-cta);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover { background: var(--blue-cta-hover); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background: var(--navy-light);
  color: var(--text-ice);
  border: 1px solid var(--card-border);
}
.btn-secondary:hover { background: #223447; }
.btn-secondary:active { background: #223447; }

.btn-group {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

.btn-full { 
  width: 100%; 
  margin-top: 1rem; 
  padding: 0.9rem;
}

/* Scroll Window */
.scroll-window {
  max-height: 48vh;
  max-height: 48dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.25rem;
  margin-bottom: 1.25rem;
  overscroll-behavior: contain;
}

.scroll-window::-webkit-scrollbar { width: 5px; }
.scroll-window::-webkit-scrollbar-thumb {
  background: var(--navy-light);
  border-radius: 4px;
}

.question-block {
  border: none;
  margin-bottom: 1.5rem;
}

legend {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 0.65rem;
  display: block;
}

.field-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.choice-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.45rem;
  background: var(--navy-light);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-ice);
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.choice-item:hover {
  border-color: var(--blue-accent);
  background: #203144;
}

.choice-item input {
  accent-color: var(--blue-accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.text-input {
  width: 100%;
  background: var(--navy-light);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 16px; /* Prevents auto-zoom on iOS Safari */
  color: var(--text-white);
  outline: none;
  transition: border-color 0.2s;
}
.text-input:focus { border-color: var(--blue-accent); }

textarea.text-input {
  resize: vertical;
  min-height: 80px;
}

/* Screen 3: Narrative & Closure */
.check-icon {
  font-size: 2.2rem;
  color: var(--blue-accent);
  text-align: center;
  margin-bottom: 0.25rem;
}

.quote-callout {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: var(--navy-light);
  border-left: 3px solid var(--blue-accent);
  border-radius: 0 10px 10px 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-white);
  font-style: italic;
  text-align: center;
}

.story-body {
  font-size: 0.92rem;
  color: var(--text-ice);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  text-align: left;
}

.story-body p { margin-bottom: 0.85rem; }
.story-body strong { color: var(--text-white); }
.story-body em { color: var(--blue-accent); font-style: normal; }

.story-list {
  list-style: none;
  padding-left: 0;
  margin: 0.65rem 0 1rem;
}

.story-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.45rem;
  color: var(--text-ice);
}

.story-list li::before {
  content: "•";
  color: var(--blue-accent);
  font-size: 1.2rem;
  position: absolute;
  left: 0.2rem;
  top: -0.1rem;
}

.story-punchline {
  color: var(--text-white);
  font-weight: 600;
  border-top: 1px solid var(--card-border);
  padding-top: 0.85rem;
  margin-top: 0.85rem;
}

.closure-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-direction: column;
}

@media (min-width: 480px) {
  .closure-actions { flex-direction: row; }
}

.error-msg {
  color: #f87171;
  text-align: center;
  margin-top: 0.85rem;
  font-size: 0.85rem;
}

/* Footer */
footer {
  padding: 1.75rem 1rem;
  text-align: center;
  border-top: 1px solid var(--card-border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-logo {
  color: var(--text-white);
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

footer a {
  color: var(--blue-accent);
  text-decoration: none;
}

.footer-copy {
  font-size: 0.72rem;
  margin-top: 0.5rem;
}