/* ===== Orbital Nine: Space Tourism Showpiece ===== */

:root{
  --void: #050710;
  --void-2: #0a0d1a;
  --void-3: #101526;
  --off-white: #EAEEF6;
  --off-white-dim: #A9B2C6;
  --cyan: #4FD2E8;
  --rust: #E1653B;
  --line: rgba(234,238,246,0.14);
  --line-strong: rgba(234,238,246,0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1240px;
}

*, *::before, *::after{ box-sizing: border-box; }

.preloader{ position:fixed; inset:0; z-index:9999; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:22px; background:var(--void); transition:opacity .5s var(--ease), visibility .5s var(--ease); }
.preloader.is-hidden{ opacity:0; visibility:hidden; pointer-events:none; }
.preloader-mark{ display:flex; align-items:center; gap:10px; opacity:0; animation:preloaderIn .6s var(--ease) forwards; }
.preloader-bar{ width:120px; height:2px; background:var(--line); overflow:hidden; border-radius:2px; }
.preloader-bar-fill{ display:block; height:100%; width:0%; background:var(--cyan); transition:width .25s var(--ease); }
@keyframes preloaderIn{ to{ opacity:1; } }
body.is-preloading{ overflow:hidden; }
@media (prefers-reduced-motion:reduce){ .preloader-mark{ animation:none; opacity:1; } }

html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body{
  margin: 0;
  background: var(--void);
  color: var(--off-white);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3{
  font-family: 'Syncopate', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--off-white);
}

p{ margin: 0; }
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
ul{ list-style: none; margin: 0; padding: 0; }

.eyebrow{
  font-family: 'Syncopate', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}

.accent{ color: var(--cyan); }

/* film grain overlay, flat tiling data uri, no gradient */
.grain{
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Buttons ===== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  font-family: 'Syncopate', sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 220ms var(--ease), background-color 220ms var(--ease), color 220ms var(--ease), border-color 220ms var(--ease);
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-2px); }
.btn-primary{
  background: var(--cyan);
  color: var(--void);
}
.btn-primary:hover{ background: #6fdcee; }
.btn-ghost{
  background: transparent;
  color: var(--off-white);
  border-color: var(--line-strong);
}
.btn-ghost:hover{ border-color: var(--cyan); color: var(--cyan); }
.btn-block{ width: 100%; margin-top: 28px; }
.btn-large{ padding: 20px 46px; font-size: 13px; }
.btn-nav{ padding: 12px 22px; }

/* ===== Header ===== */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  background: rgba(5,7,16,0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand{ display: flex; align-items: center; gap: 10px; }
.brand-mark{
  font-family: 'Syncopate', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--void);
  background: var(--cyan);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px;
}
.brand-name{
  font-family: 'Syncopate', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
}
.main-nav{ display: flex; gap: 36px; }
.main-nav a{
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--off-white-dim);
  transition: color 200ms var(--ease);
  position: relative;
}
.main-nav a:hover{ color: var(--off-white); }
.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span{
  width: 24px; height: 2px;
  background: var(--off-white);
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
}
.mobile-nav{
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(320px, 82vw);
  background: var(--void-2);
  border-left: 1px solid var(--line);
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 100px 32px 40px;
  transform: translateX(100%);
  transition: transform 320ms var(--ease);
}
.mobile-nav.open{ transform: translateX(0); }
.mobile-nav a{
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-family: 'Syncopate', sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mobile-nav .btn{ margin-top: 24px; border: none; }

/* ===== Hero ===== */
.hero{
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: var(--void);
}
#heroCanvas{
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  opacity: 0;
  transition: opacity 900ms var(--ease);
}
#heroCanvas.ready{ opacity: 1; }
.hero-fallback{
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: opacity 900ms var(--ease);
}
.hero-scrim{
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(5,7,16,0.42);
}
.hero-content{
  position: relative;
  z-index: 3;
  max-width: var(--container);
  margin: 0 auto;
  padding: 140px clamp(20px, 5vw, 56px) 0;
  width: 100%;
}
.hero h1{
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.04;
  max-width: 820px;
  text-shadow: 0 4px 40px rgba(5,7,16,0.6);
}
.hero-sub{
  margin-top: 28px;
  max-width: 480px;
  font-size: 17px;
  color: var(--off-white-dim);
  line-height: 1.6;
}
.hero-cta-row{
  display: flex;
  gap: 18px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.hero-stats{
  position: relative;
  z-index: 3;
  display: flex;
  gap: clamp(28px, 6vw, 64px);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px) 56px;
  margin-top: auto;
}
.hero-stats div{ display: flex; flex-direction: column; gap: 6px; }
.hero-stats strong{
  font-family: 'Syncopate', sans-serif;
  font-size: clamp(20px, 3vw, 28px);
  color: var(--off-white);
}
.hero-stats span{
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--off-white-dim);
  text-transform: uppercase;
}

/* ===== Section shared ===== */
main > section{
  padding: 120px clamp(20px, 5vw, 56px);
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
}
.section-head{
  margin-bottom: 64px;
  max-width: 640px;
}
.section-head h2{
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.12;
}

.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.in-view{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; transition: none; }
}

/* ===== Flights ===== */
.flight-cards{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.flight-card{
  background: var(--void-2);
  border: 1px solid var(--line);
  padding: 40px;
  display: flex;
  flex-direction: column;
}
.flight-card-featured{
  background: var(--void-3);
  border-color: var(--cyan);
  box-shadow: 0 30px 80px -30px rgba(79,210,232,0.28);
}
.flight-card-top{ margin-bottom: 22px; }
.flight-tag{
  display: inline-block;
  font-family: 'Syncopate', sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  color: var(--off-white-dim);
  margin-bottom: 16px;
}
.flight-tag-accent{
  border-color: var(--cyan);
  color: var(--cyan);
}
.flight-card h3{
  font-size: 26px;
}
.flight-desc{
  color: var(--off-white-dim);
  line-height: 1.65;
  margin-top: 18px;
}
.flight-specs{
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.flight-specs li{
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.flight-specs li span{ color: var(--off-white-dim); }
.flight-specs li strong{ font-weight: 600; }

/* ===== Vehicle ===== */
.vehicle{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.vehicle-media{
  aspect-ratio: 4/5;
  overflow: hidden;
  border: 1px solid var(--line);
}
.vehicle-media img{
  width: 100%; height: 100%;
  object-fit: cover;
}
.vehicle-copy h2{
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}
.vehicle-lead{
  margin-top: 24px;
  font-size: 17px;
  color: var(--off-white-dim);
  line-height: 1.65;
  max-width: 460px;
}
.vehicle-specs{
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 24px;
}
.vspec strong{
  display: block;
  font-family: 'Syncopate', sans-serif;
  font-size: 22px;
  color: var(--cyan);
}
.vspec span{
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--off-white-dim);
  text-transform: uppercase;
}
.vehicle-media-mobile{ display: none; }
.vehicle-note{
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--off-white-dim);
  line-height: 1.6;
  font-size: 15px;
}

/* ===== Training ===== */
.training-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.training-step{ display: flex; flex-direction: column; }
.step-num{
  font-family: 'Syncopate', sans-serif;
  font-size: 13px;
  color: var(--rust);
  margin-bottom: 14px;
}
.step-media{
  aspect-ratio: 4/5;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 18px;
}
.step-media img{
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}
.training-step:hover .step-media img{ transform: scale(1.06); }
.training-step h3{
  font-size: 17px;
  margin-bottom: 10px;
}
.training-step p{
  color: var(--off-white-dim);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== Gallery ===== */
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 20px;
}
.gallery-item{
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--void-3);
  margin: 0;
}
.gallery-item-tall{ grid-row: span 2; }
.gallery-item-wide{ grid-column: span 2; }
.gallery-item img{
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: transform 700ms var(--ease), opacity 400ms var(--ease);
}
.gallery-item img.loaded{ opacity: 1; }
.gallery-item:hover img{ transform: scale(1.08); }
.gallery-item figcaption{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 18px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--off-white);
  background: rgba(5,7,16,0.62);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}
.gallery-item:hover figcaption{ opacity: 1; transform: translateY(0); }

/* ===== Calendar ===== */
.calendar-table{
  border: 1px solid var(--line);
}
.calendar-row{
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.3fr 1.5fr 1fr;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  font-size: 14px;
}
.calendar-row:last-child{ border-bottom: none; }
.calendar-head{
  font-family: 'Syncopate', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--off-white-dim);
  background: var(--void-2);
}
.mission-name{ font-weight: 600; }
.status{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.03em;
}
.status::before{
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status-open{ color: var(--cyan); }
.status-filling{ color: var(--rust); }
.status-waitlist{ color: var(--off-white-dim); }

/* ===== Reserve ===== */
.reserve{
  max-width: 100%;
  padding: 0;
}
.reserve-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 140px clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.reserve h2{
  font-size: clamp(30px, 5.4vw, 58px);
  line-height: 1.1;
  margin-top: 8px;
}
.reserve-sub{
  margin-top: 26px;
  max-width: 480px;
  color: var(--off-white-dim);
  font-size: 16px;
  line-height: 1.6;
}
.reserve .btn{ margin-top: 44px; }

/* ===== Footer ===== */
.site-footer{
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px clamp(20px, 5vw, 56px) 120px;
}
.footer-top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand{ display: flex; align-items: center; gap: 10px; }
.footer-nav{ display: flex; gap: 28px; flex-wrap: wrap; }
.footer-nav a{
  font-size: 13px;
  color: var(--off-white-dim);
  transition: color 200ms var(--ease);
}
.footer-nav a:hover{ color: var(--off-white); }
.footer-bottom{
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-bottom p{
  font-size: 12px;
  color: var(--off-white-dim);
  max-width: 620px;
  line-height: 1.6;
}

/* ===== Demo pill ===== */
.demo-pill{
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 200;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--off-white-dim);
  background: rgba(10,13,26,0.82);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
.demo-pill:hover{ color: var(--cyan); border-color: var(--cyan); }

/* ===== Responsive ===== */
@media (max-width: 900px){
  .main-nav{ display: none; }
  .btn-nav{ display: none; }
  .nav-toggle{ display: flex; }

  .flight-cards{ grid-template-columns: 1fr; }

  .vehicle{ grid-template-columns: 1fr; gap: 40px; }
  .vehicle-media{ display: none; }
  .vehicle-media-mobile{ display: block; aspect-ratio: 16/10; overflow: hidden; border: 1px solid var(--line); margin-top: 32px; }
  .vehicle-media-mobile img{ width: 100%; height: 100%; object-fit: cover; }

  .training-grid{ grid-template-columns: 1fr 1fr; gap: 32px 20px; }

  .gallery-grid{ grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
  .gallery-item-tall{ grid-row: span 1; }
  .gallery-item-wide{ grid-column: span 2; }

  .calendar-row{ grid-template-columns: 1fr; gap: 8px; padding: 20px; }
  .calendar-head{ display: none; }
  .calendar-row span{ display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .calendar-row span::before{
    content: attr(data-label);
    flex: 0 0 auto;
    width: auto; height: auto;
    border-radius: 0;
    background: none;
    color: var(--off-white-dim);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Syncopate', sans-serif;
  }
  .calendar-row .status::after{
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
    order: 3;
  }
}

@media (max-width: 560px){
  main > section{ padding: 84px 20px; }
  .hero{ min-height: auto; padding-bottom: 90px; }
  .hero-content{ padding-top: 108px; }
  .hero h1{ font-size: clamp(34px, 10vw, 44px); }
  .hero-sub{ margin-top: 20px; font-size: 15px; }
  .hero-cta-row{ margin-top: 32px; }
  .hero-stats{ position: relative; flex-wrap: wrap; row-gap: 20px; padding: 36px 20px 0; margin-top: 36px; }
  .training-grid{ grid-template-columns: 1fr; }
  .gallery-grid{ grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .gallery-item-wide{ grid-column: span 1; }
  .reserve-inner{ padding: 100px 20px; }
}

@media (pointer: coarse){
  .btn:hover{ transform: none; }
}
