/* ==========================================================================
   APHELION — mission-control aesthetic design system
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* palette */
  --void: #050608;
  --panel: #0a0d16;
  --panel-2: #0e1220;
  --panel-3: #12172a;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  --cyan: #3fe4ff;
  --cyan-dim: #1c7d99;
  --cyan-soft: rgba(63, 228, 255, 0.14);
  --violet: #9b6bff;
  --violet-dim: #55408f;
  --violet-soft: rgba(155, 107, 255, 0.14);
  --amber: #ffb454;

  --text-hi: #f2f5fb;
  --text-mid: #a4adc2;
  --text-low: #7c86a0;

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --container: 1240px;
  --edge: clamp(20px, 5vw, 64px);
  --radius: 3px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--void); }

body {
  background: var(--void);
  color: var(--text-hi);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

::selection { background: var(--cyan); color: #04070a; }

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--cyan);
  display: inline-block;
}

/* ---------- layout helpers ---------- */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
  position: relative;
}

section { position: relative; }

.section-pad { padding: clamp(80px, 12vw, 160px) 0; }

.hr-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
  width: 100%;
}

/* ---------- three.js canvas ---------- */
#orbit-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  opacity: 0;
  transition: opacity 1.6s ease;
}

#orbit-canvas.is-ready { opacity: 1; }

.scene-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(5,6,8,0.15) 0%, rgba(5,6,8,0.5) 55%, rgba(5,6,8,0.72) 100%),
    linear-gradient(180deg, rgba(5,6,8,0.35) 0%, rgba(5,6,8,0.6) 55%, var(--void) 100%);
}

/* content sits above the fixed canvas */
.site {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 22px var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.is-scrolled {
  background: rgba(5, 6, 8, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding-top: 16px;
  padding-bottom: 16px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.nav__wordmark {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.04em;
}

.nav__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
  border: 1px solid var(--cyan-dim);
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.1em;
  margin-left: 4px;
  display: none;
}

@media (min-width: 640px) {
  .nav__tag { display: inline-block; }
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav__cta { display: none; }
@media (min-width: 640px) { .nav__cta { display: inline-flex; } }

.nav__toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.02);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav__toggle span {
  width: 15px;
  height: 1px;
  background: var(--text-hi);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 900px) { .nav__toggle { display: none; } }

.nav__links {
  display: none;
  align-items: center;
  gap: 36px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
}

@media (max-width: 899px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: rgba(6, 7, 11, 0.97);
    backdrop-filter: blur(16px);
    border-left: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 40px var(--edge);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
    z-index: 60;
    font-size: 15px;
  }
  .nav__links.is-open {
    display: flex;
    transform: translateX(0);
  }
}

.nav__links a { transition: color 0.25s ease; position: relative; }
.nav__links a:hover { color: var(--text-hi); }
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav__links a:hover::after { transform: scaleX(1); }

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__links-cta { display: none; }
}

.nav__links-cta {
  color: var(--cyan);
  font-weight: 600;
}

.btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 20px;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.2s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--cyan);
  color: #03181f;
  border-color: var(--cyan);
  font-weight: 600;
}
.btn--primary:hover { background: #6eeeff; transform: translateY(-1px); }

.btn--ghost {
  color: var(--text-hi);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn--sm { padding: 9px 14px; font-size: 11px; }

/* ==========================================================================
   HUD bits
   ========================================================================== */

.hud-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
}
.hud-corner svg { width: 100%; height: 100%; display: block; }
.hud-corner.tl { top: 0; left: 0; }
.hud-corner.tr { top: 0; right: 0; transform: scaleX(-1); }
.hud-corner.bl { bottom: 0; left: 0; transform: scaleY(-1); }
.hud-corner.br { bottom: 0; right: 0; transform: scale(-1, -1); }

.hud-frame {
  position: relative;
  border: 1px solid var(--line);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  display: inline-block;
  box-shadow: 0 0 8px var(--amber);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 120px;
  padding-bottom: 60px;
}

.hero__inner {
  max-width: 900px;
}

.hero__eyebrow-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.hero h1 {
  font-size: clamp(38px, 6.4vw, 84px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 26px;
}

.hero h1 .accent { color: var(--cyan); }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line span { display: inline-block; will-change: transform; }

.hero__sub {
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--text-mid);
  max-width: 560px;
  margin-bottom: 40px;
  font-weight: 400;
}

.hero__cta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero__readouts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 620px;
}

@media (min-width: 640px) {
  .hero__readouts { grid-template-columns: repeat(4, 1fr); }
}

.readout {
  background: rgba(10, 13, 22, 0.6);
  padding: 12px 16px;
}

.readout__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-low);
  margin-bottom: 6px;
}

.readout__value {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.hero__status {
  font-size: 11px;
  color: var(--text-low);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-low);
}

.scroll-cue__line {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-cue__line::after {
  content: '';
  position: absolute;
  top: -34px;
  left: 0;
  width: 100%;
  height: 34px;
  background: linear-gradient(180deg, transparent, var(--text-hi));
  animation: scroll-drip 2.2s linear infinite;
}

@keyframes scroll-drip {
  to { top: 34px; }
}

/* ==========================================================================
   Section headers
   ========================================================================== */

.section-head {
  max-width: 680px;
  margin-bottom: 64px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.section-head p {
  color: var(--text-mid);
  font-size: 16px;
  max-width: 540px;
}

/* ==========================================================================
   Platform / stats
   ========================================================================== */

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 80px;
}

@media (min-width: 760px) {
  .stat-row { grid-template-columns: repeat(4, 1fr); }
}

.stat-cell {
  padding: 26px 24px;
  background: var(--panel);
}

.stat-cell__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-low);
  margin-bottom: 10px;
}

.stat-cell__value {
  font-family: var(--font-mono);
  font-size: clamp(26px, 3.4vw, 38px);
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
}

.stat-row--compact { margin-top: 36px; margin-bottom: 0; }
.stat-row--compact .stat-cell__value { font-size: 24px; }

.stat-cell__value .unit {
  font-size: 0.45em;
  color: var(--cyan);
  margin-left: 4px;
  letter-spacing: 0.06em;
}

.cap-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (min-width: 640px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
}

.cap-card {
  background: var(--panel);
  padding: 34px 30px;
  position: relative;
  overflow: hidden;
  transition: background 0.35s ease;
}

.cap-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(320px 220px at 20% 0%, var(--cyan-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cap-card:hover::before { opacity: 1; }
.cap-card:hover { background: var(--panel-2); }

.cap-card__index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  margin-bottom: 22px;
  position: relative;
}

.cap-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  position: relative;
}

.cap-card p {
  color: var(--text-mid);
  font-size: 14.5px;
  line-height: 1.6;
  position: relative;
  max-width: 38ch;
}

/* ==========================================================================
   Use cases
   ========================================================================== */

.usecase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  padding: 56px 0;
}

@media (min-width: 860px) {
  .usecase { grid-template-columns: 1.05fr 0.95fr; gap: 60px; }
  .usecase--reverse .usecase__media { order: 2; }
  .usecase--reverse .usecase__body { order: 1; }
}

.usecase__media {
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.usecase__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.15s cubic-bezier(.16,1,.3,1) 0.12s, transform 1.6s cubic-bezier(.16,1,.3,1) 0.12s;
}

/* the media "acquires lock" — a scan wipe rather than a plain fade,
   echoing the FEED tag/coords readout that lands just after it */
.reveal:not(.is-in) .usecase__media img {
  clip-path: inset(0 0 0 100%);
  transform: scale(1.1);
}

.usecase__feed-tag,
.usecase__coords {
  transition: opacity 0.6s ease 0.7s, transform 0.6s ease 0.7s;
}

.reveal:not(.is-in) .usecase__feed-tag,
.reveal:not(.is-in) .usecase__coords {
  opacity: 0;
  transform: translateY(6px);
}

.usecase__feed-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-hi);
  background: rgba(5, 6, 8, 0.55);
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(6px);
}

.usecase__coords {
  position: absolute;
  bottom: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
  background: rgba(5, 6, 8, 0.55);
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(6px);
}

.usecase__index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--violet);
  margin-bottom: 16px;
}

.usecase__body h3 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  margin-bottom: 16px;
  max-width: 16ch;
}

.usecase__body p {
  color: var(--text-mid);
  margin-bottom: 22px;
  max-width: 46ch;
}

.usecase__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.usecase__list li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 10px;
}

.usecase__list li::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--cyan);
}

/* ==========================================================================
   Company
   ========================================================================== */

.company-banner {
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 70px;
}

.company-banner img {
  width: 100%;
  height: clamp(280px, 42vw, 460px);
  object-fit: cover;
  filter: saturate(1.05);
}

.company-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5,6,8,0.92) 0%, rgba(5,6,8,0.1) 55%, rgba(5,6,8,0.35) 100%);
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

.company-banner__strip {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mid);
}

.company-banner__strip strong {
  color: var(--cyan);
  font-weight: 500;
}

.company-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
}

@media (min-width: 860px) {
  .company-grid { grid-template-columns: 1.2fr 0.8fr; }
}

.company-copy p {
  color: var(--text-mid);
  margin-bottom: 18px;
  max-width: 58ch;
  font-size: 16px;
}

.locations {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.location {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.location__name { color: var(--text-hi); }
.location__coords { color: var(--text-low); }

.ground-segment .eyebrow { margin-bottom: 16px; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
}

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 0.85fr 1.15fr; }
}

.contact-copy__title {
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 600;
  margin-bottom: 18px;
}

.contact-copy p { color: var(--text-mid); margin-bottom: 26px; max-width: 46ch; }

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.contact-detail div {
  font-family: var(--font-mono);
  font-size: 13px;
}

.contact-detail span {
  display: block;
  color: var(--text-low);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.form-panel {
  border: 1px solid var(--line);
  background: rgba(10, 13, 22, 0.5);
  padding: clamp(24px, 4vw, 40px);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (min-width: 560px) {
  .form-row--2 { grid-template-columns: 1fr 1fr; }
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-low);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line-strong);
  color: var(--text-hi);
  padding: 12px 14px;
  font-family: var(--font-display);
  font-size: 14px;
  border-radius: 2px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  background: rgba(63, 228, 255, 0.04);
}

.field textarea { resize: vertical; min-height: 100px; }

.form-panel .btn { width: 100%; justify-content: center; margin-top: 6px; }

.form-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-low);
  margin-top: 14px;
}

.investor-strip {
  margin-top: 90px;
  border: 1px solid var(--line-strong);
  padding: clamp(28px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
  justify-content: space-between;
  background: linear-gradient(120deg, var(--cyan-soft), var(--violet-soft));
  position: relative;
  overflow: hidden;
}

@media (min-width: 760px) {
  .investor-strip { flex-direction: row; align-items: center; }
}

.investor-strip h3 {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 600;
  max-width: 26ch;
}

.investor-strip p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-mid);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--line);
  padding: 70px 0 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

@media (min-width: 760px) {
  .footer-top { grid-template-columns: 1.4fr repeat(3, 0.8fr); }
}

.footer-brand p {
  color: var(--text-mid);
  font-size: 14px;
  max-width: 32ch;
  margin-top: 14px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-low);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--text-mid);
  font-size: 14px;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--cyan); }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-low);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

@media (min-width: 700px) {
  .footer-bottom { flex-direction: row; align-items: center; }
}

.footer-credit { color: var(--text-low); }
.footer-credit a { color: var(--text-mid); border-bottom: 1px dotted var(--text-low); }
.footer-credit a:hover { color: var(--cyan); }

/* ==========================================================================
   Reveal animation base states (GSAP toggles .is-in)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.05s cubic-bezier(.16,1,.3,1), transform 1.05s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
