:root {
  --space: #070d1f;
  --panel: #0e1a38;
  --steel: #2a4070;
  --ion: #7fd6ff;
  --amber: #ffa62b;
  --amber-dark: #e88a0c;
  --text: #e6edfb;
  --muted: #9aaacb;
  --line: rgba(127, 214, 255, 0.22);
  --display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --body: "Barlow", "Segoe UI", "Noto Sans", "Noto Sans Arabic", "Microsoft YaHei", "Yu Gothic", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: radial-gradient(1200px 700px at 78% -10%, #17295a 0%, var(--space) 60%) fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main, .topbar, .footer { position: relative; z-index: 1; }

a { color: var(--ion); }
a:hover { color: #b8e8ff; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 64px);
  background: rgba(7, 13, 31, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
}
.brand svg { color: var(--ion); }

.topbar nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
}
.topbar nav a:hover { color: var(--text); }
.topbar nav a.nav-download {
  color: #1a1000;
  background: var(--amber);
  padding: 7px 16px;
  border-radius: 6px;
  font-weight: 600;
}
.topbar nav a.nav-download:hover { background: #ffbb55; color: #1a1000; }

.lang {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ion);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
}
.lang:hover { border-color: var(--ion); }
select.lang option { background: var(--panel); color: var(--text); font-family: var(--body); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(20px, 4vw, 60px);
  min-height: calc(100vh - 66px);
  padding: 40px clamp(20px, 5vw, 64px) 70px;
  max-width: 1280px;
  margin: 0 auto;
}

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; }

h1 {
  font-size: clamp(42px, 6.4vw, 84px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lead {
  max-width: 34em;
  margin: 24px 0 32px;
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--muted);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.free-note { margin: 18px 0 0; font-size: 15px; color: var(--muted); }

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn-primary {
  color: #1a1000;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(255, 166, 43, 0.5);
}
.btn-primary:hover { background: #ffbb55; color: #1a1000; transform: translateY(-1px); }
.btn-primary:active { background: var(--amber-dark); transform: none; }
.btn-ghost { color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ion); color: var(--text); }
.btn-big { font-size: 20px; padding: 17px 34px; text-align: center; width: 100%; }

.hero-art { display: flex; justify-content: center; }
.ships { width: 100%; max-width: 520px; height: auto; overflow: visible; }

/* the one orchestrated motion: the ghost fades in and out beside the ship */
.ghost { animation: ghost-pulse 5s ease-in-out infinite; }
.player { animation: hover 6s ease-in-out infinite; }
.flame { transform-box: fill-box; transform-origin: top center; animation: burn 0.5s ease-in-out infinite alternate; }

@keyframes ghost-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes hover { 0%, 100% { transform: translate(150px, 190px); } 50% { transform: translate(150px, 178px); } }
@keyframes burn { from { transform: scaleY(0.85); } to { transform: scaleY(1.1); } }

/* ---------- sections ---------- */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 90px clamp(20px, 5vw, 64px);
}

.section h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: 18px;
}
.section-sub { color: var(--muted); margin: 0 0 36px; }

/* about */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(30px, 6vw, 90px);
  margin-top: 40px;
}
.about-item { padding-left: 22px; border-left: 3px solid var(--steel); }
.about-item:nth-child(4) { border-left-color: var(--ion); }
.about-item h3 { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.about-item p { margin: 0; color: var(--muted); max-width: 30em; }

.notice {
  display: block;
  margin-top: 56px;
  padding: 20px 24px;
  background: rgba(255, 166, 43, 0.08);
  border: 1px solid rgba(255, 166, 43, 0.5);
  border-radius: 8px;
  max-width: 52em;
}
.notice strong { display: block; color: var(--amber); font-family: var(--display); font-size: 19px; margin-bottom: 4px; }
.notice span { color: var(--text); }

/* limits */
.limits {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(30px, 6vw, 90px);
  align-items: start;
}
.spec { margin: 0; border-top: 1px solid var(--line); }
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.spec dt { color: var(--muted); font-size: 17px; }
.spec dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 34px);
  color: var(--ion);
  text-align: right;
}
.not-available { padding-left: 22px; border-left: 3px solid var(--amber); }
.not-available h3 { font-size: 22px; font-weight: 600; margin-bottom: 12px; }
.not-available ul { margin: 0; padding: 0; list-style: none; }
.not-available li {
  padding: 8px 0;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 2px;
}

/* videos */
.video-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto;
  gap: 28px;
}
.video-main { grid-row: 1 / span 2; }

.video-slot { margin: 0; }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background:
    repeating-linear-gradient(135deg, rgba(127, 214, 255, 0.04) 0 14px, transparent 14px 28px),
    var(--panel);
  overflow: hidden;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.play {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: rgba(7, 13, 31, 0.6);
  color: var(--ion);
}
.play:disabled { cursor: default; }
.video-main .play { width: 88px; height: 88px; }

.soon {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: var(--display);
  font-size: 14px;
  color: var(--muted);
}
.video-slot figcaption { margin-top: 12px; font-size: 16px; color: var(--muted); }
.video-slot.is-live .video-frame { border-style: solid; }

/* download */
.download {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(30px, 6vw, 90px);
  align-items: start;
  border-top: 1px solid var(--line);
}
.steps { margin: 24px 0 0; padding-left: 1.4em; color: var(--muted); }
.steps li { margin-bottom: 10px; padding-left: 6px; }
.steps li::marker { color: var(--amber); font-family: var(--display); font-weight: 700; }

.download-box {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.meta { display: grid; grid-template-columns: repeat(3, auto); gap: 16px; margin: 24px 0 18px; justify-content: space-between; }
.meta dt { font-size: 14px; color: var(--muted); }
.meta dd { margin: 2px 0 0; font-family: var(--display); font-weight: 600; font-size: 18px; }
.small { font-size: 15px; color: var(--muted); margin: 0; }

/* faq */
.faq { max-width: 52em; margin-top: 30px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 40px 20px 0;
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  color: var(--ion);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--muted); max-width: 40em; }

/* footer */
.footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 64px) 60px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.footer p { max-width: 50em; margin: 0 0 10px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 50px; }
  .hero-art { order: -1; max-width: 340px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .limits { grid-template-columns: 1fr; }
  .video-main { grid-row: auto; }
  .download { grid-template-columns: 1fr; }
  .topbar nav a:not(.nav-download) { display: none; }
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  .meta { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ghost, .player, .flame { animation: none; }
  .ghost { opacity: 0.7; }
  .btn { transition: none; }
}

/* ---------- right-to-left (Arabic) ---------- */
[dir="rtl"] .about-item,
[dir="rtl"] .not-available { padding-left: 0; border-left: 0; padding-right: 22px; border-right: 3px solid var(--steel); }
[dir="rtl"] .about-item:nth-child(4) { border-right-color: var(--ion); }
[dir="rtl"] .not-available { border-right-color: var(--amber); }
[dir="rtl"] .steps { padding-left: 0; padding-right: 1.4em; }
[dir="rtl"] .steps li { padding-left: 0; padding-right: 6px; }
[dir="rtl"] .faq summary { padding: 20px 0 20px 40px; }
[dir="rtl"] .faq summary::after { right: auto; left: 6px; }
[dir="rtl"] .spec dd { text-align: left; }
[dir="rtl"] .soon { left: auto; right: 14px; }
