:root {
  --bg: #05070b;
  --panel: rgba(10, 14, 24, 0.8);
  --panel-strong: rgba(19, 24, 36, 0.95);
  --text: #f2f4f8;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #6cc7ff;
  --accent-2: #ff9d45;
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(108, 199, 255, 0.16), transparent 30%),
    linear-gradient(135deg, #03040a 0%, #090d16 50%, #02040a 100%);
  min-height: 100vh;
}
body.night-mode {
  --bg: #02040a;
  --panel: rgba(5, 7, 13, 0.86);
  --panel-strong: rgba(6, 8, 16, 0.96);
  --text: #dfeaff;
  --muted: #7d8ca4;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #5dc5ff;
  --accent-2: #ffb36b;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.page-shell {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 80px;
}

.topbar {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  backdrop-filter: blur(20px);
  background: rgba(0,0,0,0.18);
  border-radius: 24px;
}
.topbar.scrolled {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  background: rgba(2, 4, 10, 0.86);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.icon-button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(108,199,255,0.16);
}
.brand {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-links a { color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }
.hero-fallback {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
  padding: 56px; background: rgba(2, 4, 10, 0.72); opacity: 0; pointer-events: none; transition: opacity 360ms ease;
}
.hero-fallback.visible {
  opacity: 1;
}
.hero-fallback::before {
  content: 'REJAY';
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2.8rem, 5vw, 5.4rem);
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  opacity: 0.12;
  position: absolute;
}

.hero {
  min-height: 100vh; border-radius: 34px; overflow: hidden; position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 0; background: center/cover no-repeat url('https://upload.wikimedia.org/wikipedia/commons/f/f7/Lockheed_Martin_F-22A_Raptor.jpg'); box-shadow: var(--shadow);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.55) 70%);
  z-index: 1;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.92; filter: saturate(0.92) contrast(1.05) brightness(0.78);
  transition: opacity 360ms ease;
}
.hero-video.hidden {
  opacity: 0;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 1; filter: saturate(0.95) contrast(1.05) brightness(0.88);
  transition: opacity 360ms ease;
}
.hero-video.hidden {
  opacity: 0;
}
.hero-overlay {
  position: absolute; inset: 0; background: radial-gradient(circle at 35% 20%, rgba(255,255,255,0.04), transparent 22%), linear-gradient(180deg, rgba(2, 4, 10, 0.72), rgba(2, 4, 10, 0.94));
}
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: 34px;
  height: 54px;
  border: 1.8px solid rgba(255,255,255,0.8);
  border-radius: 999px;
  display: grid;
  place-items: center;
  opacity: 0.82;
  z-index: 2;
}
.hero-scroll::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255,255,255,0.9);
  border-bottom: 2px solid rgba(255,255,255,0.9);
  transform: rotate(45deg);
  animation: scrollBounce 1.4s infinite ease-in-out;
}
@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
  40% { transform: translateY(8px) rotate(45deg); }
  60% { transform: translateY(4px) rotate(45deg); }
}
.hero-fallback {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
  padding: 56px; background: radial-gradient(circle at top, rgba(12, 18, 30, 0.16), transparent 22%), linear-gradient(180deg, rgba(2, 4, 10, 0.94), rgba(2, 4, 10, 0.98));
  opacity: 0; pointer-events: none; transition: opacity 360ms ease;
}
.hero-fallback.visible {
  opacity: 1;
}
.hero-fallback-copy {
  max-width: 760px; text-align: center; opacity: 0;
}
.hero-fallback-copy h1 {
  font-size: clamp(2.6rem, 5vw, 5.2rem); line-height: 1; margin: 0 0 18px; font-family: 'Orbitron', sans-serif;
}
.hero-fallback-copy p { margin: 0; color: #d8e2ef; font-size: 1.05rem; line-height: 1.75; }
.hero-content, .hero-metrics { position: relative; z-index: 2; display: none; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.32em; color: var(--accent); font-size: 0.77rem; font-weight: 700; margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2.8rem, 5vw, 5.3rem); line-height: 0.95; margin: 0 0 18px; font-family: 'Orbitron', sans-serif; }
.hero-copy { font-size: 1.06rem; line-height: 1.7; max-width: 640px; color: #dfe7f1; }
.hero-actions { display: flex; gap: 14px; margin-top: 24px; }
.hero-metrics { display: flex; gap: 24px; flex-wrap: wrap; }
.hero-metrics > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(0,0,0,0.2); min-width: 140px; }
.hero-metrics strong { display: block; font-size: 1.4rem; margin-bottom: 4px; }
.hero-metrics span { color: var(--muted); font-size: 0.9rem; }

.strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 22px 0 8px;
}
.strip-card { border: 1px solid var(--line); border-radius: 22px; padding: 18px; background: var(--panel); }
.strip-card span { display: block; color: var(--accent); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.28em; margin-bottom: 6px; }
.strip-card strong { line-height: 1.5; }

.section { padding: 54px 0 8px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: clamp(1.4rem, 2.1vw, 1.9rem); }

.featured-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.moment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.moment-card { position: relative; overflow: hidden; border-radius: 28px; min-height: 420px; display: grid; grid-template-rows: 1fr auto; background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.15)); box-shadow: var(--shadow); }
.moment-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.moment-copy { padding: 24px; background: rgba(2, 8, 18, 0.9); }
.moment-copy .eyebrow { margin-bottom: 12px; }
.moment-copy h3 { margin: 0 0 12px; font-size: 1.3rem; line-height: 1.3; }
.moment-copy p { margin: 0; color: var(--muted); line-height: 1.75; }
.feature-card, .card, .detail-card, .compare-card, .video-card, .gallery-card, .engine-card, .news-card, .timeline-item {
  border: 1px solid var(--line); background: var(--panel); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
}
.feature-card { padding: 0; min-height: 320px; position: relative; cursor: pointer; transition: transform 250ms ease, box-shadow 250ms ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 24px 94px rgba(0,0,0,0.35); }
.feature-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgba(2,4,10,0.82) 100%); }
.feature-card-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-card .content { position: absolute; inset: auto 16px 16px 16px; z-index: 1; }
.feature-card h3 { margin: 0 0 6px; font-size: 1.12rem; }
.feature-card p { margin: 0; color: #dce7f4; font-size: 0.92rem; }

.card-image { width: 100%; height: 220px; object-fit: cover; border-radius: 18px; margin-bottom: 14px; }
.detail-image { width: 100%; border-radius: 18px; max-height: 280px; object-fit: cover; margin-bottom: 16px; }

.archive-controls { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.archive-controls input, select {
  width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 12px 14px; background: rgba(255,255,255,0.04); color: var(--text);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; cursor: pointer; color: var(--muted); background: transparent; }
.chip.active { border-color: var(--accent); color: var(--text); }

.archive-layout { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 18px; }
.cards-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { padding: 16px; transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 24px 40px rgba(0,0,0,0.14); border-color: rgba(108,199,255,0.24); }
.card-video { width: 100%; height: 180px; border-radius: 16px; object-fit: cover; margin-bottom: 12px; display: block; }
.card h3 { margin: 0 0 8px; font-size: 1rem; }
.card .meta { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.card .pill { display: inline-block; padding: 6px 10px; border-radius: 999px; background: rgba(108,199,255,0.14); color: var(--accent); font-size: 0.78rem; margin-top: 10px; }
.detail-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; min-height: 240px; }
.detail-card h3 { margin: 0; font-size: 1.4rem; }
.detail-card p { margin: 0; line-height: 1.7; color: var(--muted); }
.detail-card .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.detail-card .stats div { border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.detail-card .stats strong { display: block; }

.compare-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.compare-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.compare-card { padding: 18px; }
.compare-card h3 { margin: 0 0 8px; }
.compare-card .metric { border-top: 1px solid var(--line); padding: 8px 0; display: flex; justify-content: space-between; color: var(--muted); }
.compare-card .metric strong { color: var(--text); }

.watch-tabs { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 24px; }
.watch-tagline { color: var(--muted); font-size: 0.95rem; }
.watch-tab { border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; background: rgba(255,255,255,0.04); color: var(--muted); cursor: pointer; transition: background 220ms ease, color 220ms ease; }
.watch-tab.active { background: linear-gradient(135deg, rgba(108,199,255,0.16), rgba(255,157,69,0.16)); color: var(--text); border-color: rgba(108,199,255,0.4); }
.watch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.video-card { padding: 0; background: transparent; }
.video-card .video-card-video { width: 100%; height: 240px; object-fit: cover; display: block; }
.video-card .content { padding: 14px 16px 18px; background: var(--panel); border: 1px solid var(--line); }

.spotter-image { width: 100%; height: 100%; object-fit: cover; min-height: 400px; }
.video-card h3 { margin: 0 0 8px; }
.video-card p { margin: 0 0 10px; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.video-card small { color: rgba(255,255,255,0.7); font-size: 0.84rem; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery-card img { width: 100%; height: 260px; object-fit: cover; display: block; }
.gallery-card .content { padding: 16px; }
.gallery-card h3 { margin: 0 0 8px; }
.gallery-card p { margin: 0 0 10px; color: var(--muted); font-size: 0.95rem; line-height: 1.65; }
.gallery-card small { color: rgba(255,255,255,0.7); font-size: 0.82rem; }

.spotter-shell { display: flex; justify-content: center; }
.spotter-card { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; width: 100%; max-width: 1200px; background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.10)); border: 1px solid rgba(255,255,255,0.08); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.spotter-card img { width: 100%; height: 100%; object-fit: cover; }
.spotter-detail { padding: 28px; display: grid; gap: 18px; }
.spotter-options { display: grid; gap: 12px; }
.spotter-option { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; cursor: pointer; transition: transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.spotter-option:hover { transform: translateY(-2px); border-color: var(--accent); }
.spotter-option.correct { background: rgba(92, 197, 255, 0.18); border-color: #5dc5ff; }
.spotter-option.incorrect { background: rgba(255, 157, 69, 0.18); border-color: #ff9d45; }
.spotter-status { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.spotter-status span { color: var(--accent); font-weight: 700; }
.empty-state { grid-column: 1 / -1; padding: 26px; border: 1px solid rgba(255,255,255,0.12); border-radius: 22px; text-align: center; color: var(--muted); background: rgba(255,255,255,0.03); }

.cockpit-panel { display: grid; grid-template-columns: 1.2fr 0.6fr 0.8fr; gap: 16px; }
.cockpit-image { min-height: 360px; border: 1px solid var(--line); border-radius: 24px; background-image: url('https://upload.wikimedia.org/wikipedia/commons/6/6e/F-35_Cockpit.jpg'); background-size: cover; background-position: center; }
.hotspot-list { display: grid; gap: 10px; }
.hotspot { border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: left; background: var(--panel); color: var(--text); cursor: pointer; }
.hotspot-detail { border: 1px solid var(--line); border-radius: 24px; padding: 18px; background: var(--panel); }
.hotspot-detail h3 { margin-top: 0; }

.engine-grid { display: grid; grid-template-columns: 1.1fr 0.9fr 0.9fr 0.9fr; gap: 16px; }
.engine-card { padding: 18px; }
.engine-card.large { min-height: 320px; }
.engine-graphic { position: relative; height: 180px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg, rgba(108,199,255,0.2), rgba(255,157,69,0.12)); margin-bottom: 14px; overflow: hidden; }
.engine-graphic span { position: absolute; border: 1px solid rgba(255,255,255,0.4); } 
.engine-graphic span:nth-child(1){ inset: 42px 34px 40px 34px; border-radius: 999px; } 
.engine-graphic span:nth-child(2){ inset: 60px 54px 58px 54px; border-radius: 999px; } 
.engine-graphic span:nth-child(3){ inset: 18px 120px 18px 120px; border-radius: 999px; background: rgba(255,255,255,0.12); }

.timeline { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.timeline-item { min-width: 260px; padding: 18px; }
.timeline-item h3 { margin: 0 0 8px; }
.timeline-item p { margin: 0; color: var(--muted); line-height: 1.7; }

.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.news-card { padding: 18px; }
.news-card h3 { margin: 0 0 8px; }
.news-card p { margin: 0 0 8px; color: var(--muted); line-height: 1.7; }
.news-card .tag { display: inline-block; color: var(--accent); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.24em; }

.footer { margin-top: 48px; border-top: 1px solid var(--line); padding: 26px 0 10px; color: var(--muted); text-align: center; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .featured-grid, .cards-grid, .compare-grid, .video-grid, .gallery-grid, .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-layout { grid-template-columns: 1fr; }
  .cockpit-panel { grid-template-columns: 1fr; }
  .engine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .page-shell { width: min(100% - 20px, 100%); }
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav-links { flex-wrap: wrap; }
  .search-pill input { width: 180px; }
  .hero { padding: 30px 22px; min-height: 84vh; }
  .strip, .compare-controls, .featured-grid, .cards-grid, .compare-grid, .video-grid, .gallery-grid, .news-grid, .engine-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .section-heading { flex-direction: column; align-items: flex-start; }
}
