/* =========================================================
   CELESTIA — Private Orbital Experiences
   Luxury spaceflight concept · stylesheet
   Palette: deep space / ice blue / warm gold
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* palette */
  --space:      #05070d;
  --space-2:    #080b14;
  --space-3:    #0d111c;
  --ice:        #9cc6e6;
  --ice-bright: #d6ebfb;
  --gold:       #d9b25a;
  --gold-soft:  #e7cd95;
  --ink:        #e8eef6;
  --muted:      #8593a6;
  --line:       rgba(156, 198, 230, 0.16);

  /* fluid type (clamp min / vw / max) */
  --fs-display: clamp(3.4rem, 13vw, 13rem);
  --fs-h2:      clamp(2.1rem, 5.2vw, 4.6rem);
  --fs-h3:      clamp(1.5rem, 2.6vw, 2.2rem);
  --fs-lede:    clamp(1.05rem, 1.7vw, 1.5rem);
  --fs-body:    clamp(1rem, 1.15vw, 1.18rem);
  --fs-label:   clamp(0.66rem, 0.8vw, 0.78rem);

  /* spacing */
  --gutter: clamp(1.25rem, 5vw, 7rem);
  --section-y: clamp(6rem, 14vh, 14rem);

  --serif: "Cormorant", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--space);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* When Lenis is active it adds smooth scrolling; before that keep native */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: var(--space); }

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

/* hide default cursor on fine pointer (custom cursor takes over) */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, select, input, [data-cursor] { cursor: none; }
}

/* =========================================================
   3D CANVAS + FALLBACK
   ========================================================= */
.webgl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  display: block;
}

.space-fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: none;
  background:
    radial-gradient(120% 90% at 70% 18%, rgba(156,198,230,0.10), transparent 55%),
    radial-gradient(90% 70% at 24% 78%, rgba(217,178,90,0.07), transparent 60%),
    radial-gradient(circle at 50% 50%, #0a1020 0%, #06080f 45%, #04050a 100%);
}
.space-fallback::after {
  /* CSS starfield */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 70% 65%, #cfe2f5, transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, #fff, transparent),
    radial-gradient(1px 1px at 85% 22%, #fff, transparent),
    radial-gradient(1px 1px at 55% 50%, #bcd6ee, transparent),
    radial-gradient(1px 1px at 12% 70%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 90% 88%, #fff, transparent);
  background-repeat: repeat;
  background-size: 480px 480px;
  opacity: 0.6;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: .7; } }

body.no-webgl .space-fallback { display: block; }

/* =========================================================
   PRELOADER
   ========================================================= */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--space);
  display: grid;
  place-items: center;
  transition: opacity 0.9s var(--ease), visibility 0.9s var(--ease);
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__inner { text-align: center; padding: 0 6vw; }
.preloader__wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 9vw, 6rem);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--ink);
}
.preloader__line {
  width: min(260px, 60vw);
  height: 1px;
  margin: 2rem auto 1rem;
  background: var(--line);
  overflow: hidden;
}
.preloader__line-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ice), var(--gold));
}
.preloader__count {
  font-size: var(--fs-label);
  letter-spacing: 0.3em;
  color: var(--ice);
}
.preloader__pct { color: var(--muted); }
.preloader__sub {
  margin-top: 0.6rem;
  font-size: var(--fs-label);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   CUSTOM CURSOR
   ========================================================= */
.cursor { position: fixed; top: 0; left: 0; z-index: 999; pointer-events: none; mix-blend-mode: difference; }
.cursor__dot {
  position: fixed; top: 0; left: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; transform: translate(-50%, -50%);
}
.cursor__ring {
  position: fixed; top: 0; left: 0;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease), height .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.cursor.is-hover .cursor__ring { width: 64px; height: 64px; border-color: var(--gold); background: rgba(217,178,90,0.08); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.1rem, 2.4vw, 2rem) var(--gutter);
  transition: background .5s var(--ease), backdrop-filter .5s var(--ease), padding .5s var(--ease);
}
.nav.is-scrolled {
  background: rgba(5, 7, 13, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: clamp(0.8rem, 1.6vw, 1.2rem);
  padding-bottom: clamp(0.8rem, 1.6vw, 1.2rem);
}
.nav__brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
}
.nav__links { display: flex; gap: clamp(1.4rem, 2.4vw, 2.8rem); align-items: center; }
.nav__link {
  font-size: var(--fs-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  color: var(--ink);
}
.nav__link span { display: inline-block; position: relative; }
.nav__link span::after {
  content: "";
  position: absolute; left: 0; bottom: -3px;
  width: 100%; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav__link:hover span::after { transform: scaleX(1); transform-origin: left; }
.nav__link--cta {
  border: 1px solid var(--line);
  padding: 0.7em 1.4em;
  border-radius: 100px;
  transition: border-color .4s var(--ease), color .4s var(--ease);
}
.nav__link--cta:hover { border-color: var(--gold); color: var(--gold-soft); }
.nav__link--cta span::after { display: none; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  padding: 8px;
}
.nav__toggle span { width: 26px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease), opacity .3s; }
.nav.is-open .nav__toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* Mobile menu overlay */
.menu {
  position: fixed; inset: 0; z-index: 90;
  background: linear-gradient(180deg, #06080f, #04050a);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--gutter);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .8s var(--ease);
  pointer-events: none;
}
.menu.is-open { clip-path: inset(0 0 0 0); pointer-events: auto; }
.menu__nav { display: flex; flex-direction: column; gap: 0.3rem; }
.menu__link {
  display: flex; align-items: baseline; gap: 1.2rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 11vw, 4rem);
  padding: 0.35em 0;
  border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(40px);
}
.menu__idx { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.2em; color: var(--gold); }
.menu__foot {
  display: flex; justify-content: space-between;
  margin-top: 3rem; font-size: var(--fs-label);
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}

/* =========================================================
   LAYOUT / SECTIONS
   ========================================================= */
main { position: relative; z-index: 10; }

.section {
  position: relative;
  padding: var(--section-y) var(--gutter);
  max-width: 1500px;
  margin: 0 auto;
}
.section__index {
  display: flex; align-items: center; gap: 1rem;
  font-size: var(--fs-label);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ice);
  margin-bottom: clamp(2rem, 5vw, 4rem);
}
.section__index span:first-child { color: var(--gold); }
.section__index::before { content: ""; width: 38px; height: 1px; background: var(--gold); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 var(--gutter);
  z-index: 10;
}
.hero__inner { max-width: 60ch; }
.hero__eyebrow {
  font-size: var(--fs-label);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ice);
  margin-bottom: clamp(1rem, 3vw, 2rem);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 0.92;
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  background: linear-gradient(180deg, var(--ice-bright), var(--ice) 55%, #6f93b3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 60px rgba(156,198,230,0.18));
}
.hero__lede {
  font-family: var(--serif);
  font-size: var(--fs-lede);
  font-style: italic;
  color: var(--ink);
  margin: clamp(1.4rem, 3vw, 2.4rem) auto 0;
  max-width: 44ch;
}
.hero__scroll {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  font-size: var(--fs-label);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__scroll-line {
  width: 1px; height: 56px;
  background: linear-gradient(180deg, var(--gold), transparent);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: var(--ice-bright);
  animation: scrollPulse 2.2s var(--ease) infinite;
}
@keyframes scrollPulse { 0% { top: -50%; } 60%,100% { top: 110%; } }

.hero__meta {
  position: absolute;
  bottom: clamp(1.5rem, 4vw, 3rem);
  left: var(--gutter); right: var(--gutter);
  display: flex; justify-content: space-between;
  font-size: var(--fs-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   VISION
   ========================================================= */
.vision__lead { max-width: 22ch; margin-bottom: clamp(2rem, 5vw, 4rem); }
.vision__head {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.04;
}
.vision__body {
  display: grid; gap: 1.6rem;
  max-width: 62ch;
  margin-left: auto;
  font-size: var(--fs-lede);
  color: var(--ink);
}
.vision__body p { color: #c2cedd; }
.vision__quote { margin-top: 1.4rem; padding-left: 1.6rem; border-left: 1px solid var(--gold); }
.vision__quote blockquote { font-family: var(--serif); font-style: italic; font-size: var(--fs-lede); color: var(--ice-bright); }
.vision__quote cite { display: block; margin-top: 0.8rem; font-size: var(--fs-label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-style: normal; }

.vision__figure {
  position: relative;
  margin-top: clamp(3rem, 8vw, 7rem);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.vision__figure img { width: 100%; height: clamp(320px, 55vh, 680px); object-fit: cover; will-change: transform; }
.vision__figure figcaption {
  position: absolute; bottom: 1rem; left: 1.2rem;
  font-size: var(--fs-label); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ice);
  background: rgba(5,7,13,0.45); padding: 0.4em 0.9em; backdrop-filter: blur(6px);
}

/* =========================================================
   CRAFT
   ========================================================= */
.craft__head { display: grid; gap: 1.4rem; max-width: 70ch; }
.craft__title { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h2); line-height: 1.04; }
.craft__sub { font-size: var(--fs-lede); color: #c2cedd; max-width: 56ch; }

.craft__figure {
  margin: clamp(2.5rem, 6vw, 5rem) 0;
  border-radius: 4px; overflow: hidden; border: 1px solid var(--line);
}
.craft__figure img { width: 100%; height: clamp(300px, 60vh, 720px); object-fit: cover; will-change: transform; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 5vw, 3.5rem);
}
.stat__num {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  color: var(--ice-bright);
}
.stat__label {
  margin-top: 0.8rem;
  font-size: var(--fs-label);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   JOURNEY / TIMELINE
   ========================================================= */
.journey__title { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h2); margin-bottom: clamp(3rem, 7vw, 6rem); max-width: 18ch; }

.timeline { list-style: none; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: clamp(18px, 3vw, 36px); top: 0; bottom: 0;
  width: 1px; background: linear-gradient(180deg, transparent, var(--line) 8%, var(--line) 92%, transparent);
}
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: clamp(48px, 8vw, 90px) 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-bottom: clamp(3.5rem, 9vw, 8rem);
}
.timeline__marker {
  display: grid; place-items: center;
  width: clamp(38px, 6vw, 72px); height: clamp(38px, 6vw, 72px);
  border-radius: 50%;
  border: 1px solid var(--gold);
  font-family: var(--serif); font-size: clamp(1rem, 1.6vw, 1.5rem); color: var(--gold);
  background: var(--space-2);
  position: relative; z-index: 2;
}
.timeline__phase { font-size: var(--fs-label); letter-spacing: 0.26em; text-transform: uppercase; color: var(--ice); }
.timeline__heading { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h3); margin: 0.4rem 0 0.9rem; }
.timeline__content p { color: #bcc8d8; max-width: 56ch; }
.timeline__img {
  margin-top: 1.8rem; border-radius: 4px; overflow: hidden; border: 1px solid var(--line);
  max-width: 640px;
}
.timeline__img img { width: 100%; height: clamp(220px, 36vh, 400px); object-fit: cover; will-change: transform; }

/* =========================================================
   RESERVE / FORM
   ========================================================= */
.reserve__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.reserve__title { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h2); margin-bottom: 1.4rem; }
.reserve__intro p { color: #c2cedd; font-size: var(--fs-lede); max-width: 46ch; }
.reserve__list { list-style: none; margin-top: 2rem; display: grid; gap: 0.9rem; }
.reserve__list li {
  position: relative; padding-left: 1.6rem; font-size: var(--fs-body); color: var(--ink);
}
.reserve__list li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); }

.form { display: grid; gap: 1.4rem; }
.form__row { display: grid; gap: 1.4rem; }
.form__row--2 { grid-template-columns: 1fr 1fr; }
.form__field { display: grid; gap: 0.6rem; }
.form__label { font-size: var(--fs-label); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ice); }
.form__input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 0.8em 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  transition: border-color .4s var(--ease);
}
.form__input::placeholder { color: var(--muted); }
.form__input:focus { outline: none; border-color: var(--gold); }
select.form__input { color: var(--ink); }
select.form__input option { background: var(--space-2); color: var(--ink); }
.form__status { font-size: var(--fs-label); letter-spacing: 0.12em; color: var(--gold-soft); min-height: 1.2em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1.1em 2.4em;
  border-radius: 100px;
  border: 1px solid var(--gold);
  font-size: var(--fs-label); letter-spacing: 0.22em; text-transform: uppercase;
  background: transparent; color: var(--gold-soft);
  position: relative; overflow: hidden;
  transition: color .4s var(--ease);
  justify-self: start;
  will-change: transform;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease); z-index: -1;
}
.btn:hover { color: var(--space); }
.btn:hover::before { transform: scaleX(1); }
.btn__label { position: relative; z-index: 1; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  position: relative; z-index: 10;
  background: linear-gradient(180deg, transparent, rgba(5,7,13,0.85) 30%);
  padding: clamp(4rem, 9vw, 8rem) var(--gutter) clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  max-width: 1500px; margin: 0 auto;
}
.footer__top { display: grid; gap: 1rem; margin-bottom: clamp(3rem, 7vw, 5rem); }
.footer__brand {
  font-family: var(--serif); font-size: clamp(2.6rem, 8vw, 6rem);
  letter-spacing: 0.18em; text-indent: 0.18em; color: var(--ink);
}
.footer__line { font-family: var(--serif); font-style: italic; font-size: var(--fs-lede); color: var(--ice); }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.footer__col h4 { font-size: var(--fs-label); letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.2rem; }
.footer__col a { display: block; color: var(--muted); padding: 0.4em 0; transition: color .3s var(--ease); }
.footer__col a:hover { color: var(--ink); }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 2rem; border-top: 1px solid var(--line);
  font-size: var(--fs-label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}

/* =========================================================
   IMAGE FAILURE FALLBACK
   ========================================================= */
.img-fail {
  background: linear-gradient(135deg, #0a1020, #141d33 50%, #0a1020) !important;
  position: relative;
}
.img-fail::after {
  content: "CELESTIA";
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); letter-spacing: 0.3em; color: rgba(156,198,230,0.25);
  font-size: clamp(1rem, 3vw, 2rem);
}

/* =========================================================
   REVEAL ANIMATION DEFAULTS (GSAP enhances; this is base)
   ========================================================= */
[data-reveal] { will-change: transform, opacity; }
.split-line { display: block; overflow: hidden; }
.split-line__inner { display: block; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .vision__body { margin-left: 0; }
  .reserve__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__cols { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }
}
@media (max-width: 560px) {
  .form__row--2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
  .hero__meta { font-size: 0.58rem; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero__scroll-line::after { display: none; }
  .space-fallback::after { animation: none; opacity: 0.5; }
}
