/* ============================================================
   SAINT MAI INDUSTRIES — Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Michroma&family=Inter:wght@300;400;500;600&family=IBM+Plex+Mono:wght@300;400;500&display=swap');

@font-face {
  font-family: 'TT Autonomous Trial';
  src: url('../assets/fonts/tt-autonomous-trial-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Core palette */
  --space-black: #000000;
  --navy: #050505;
  --navy-2: #090909;
  --navy-3: #101010;
  --titanium: #F8F9FA;
  --titanium-dim: #A7A7A7;
  --white: #F8F9FA;
  --electric: #89adf9;
  --plasma: #89adf9;

  /* Derived */
  --hairline: rgba(248, 249, 250, 0.10);
  --hairline-strong: rgba(248, 249, 250, 0.20);
  --glass: rgba(8, 8, 8, 0.62);
  --glass-light: rgba(248, 249, 250, 0.04);
  --electric-glow: rgba(137,173,249,0.42);

  /* Type */
  --font-head: 'Michroma', 'Eurostile Extended', 'Microgramma', system-ui, sans-serif;
  --font-brand: 'Michroma', 'Eurostile Extended', 'Microgramma', system-ui, sans-serif;
  --font-autonomous: 'TT Autonomous Trial', 'TT Autonomous Regular', 'TT Autonomous', 'Michroma', 'Eurostile Extended', 'Microgramma', system-ui, sans-serif;
  --font-body: 'Inter', 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Layout */
  --gutter: clamp(24px, 5vw, 88px);
  --maxw: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: none;
  scroll-padding-top: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--space-black);
  color: var(--titanium);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  letter-spacing: 0.005em;
}

body.is-loading {
  overflow: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background: #000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.42s var(--ease-out), visibility 0.42s var(--ease-out);
}

.page-loader img {
  width: clamp(190px, 24vw, 360px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(137,173,249,0.32));
  animation: loaderPulse 1.8s var(--ease-out) infinite;
}

@media (min-width: 721px) {
  .page-loader img {
    width: clamp(150px, 16vw, 260px);
  }
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes loaderPulse {
  0%, 100% {
    opacity: 0.56;
    transform: scale(0.96);
  }
  45% {
    opacity: 1;
    transform: scale(1);
  }
}

body.is-loading .hero .eyebrow,
body.is-loading .hero .display,
body.is-loading .hero .lede,
body.is-loading .hero .hero-cta {
  opacity: 0 !important;
  transform: translateY(18px);
}

body.hero-ready .hero .eyebrow,
body.hero-ready .hero .display,
body.hero-ready .hero .lede,
body.hero-ready .hero .hero-cta {
  animation: heroLetterFade 1.25s var(--ease-out) both;
}

body.hero-ready .hero .display {
  animation-delay: 0.14s;
}

body.hero-ready .hero .lede {
  animation-delay: 0.3s;
}

body.hero-ready .hero .hero-cta {
  animation-delay: 0.46s;
}

@keyframes heroLetterFade {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

::selection { background: rgba(137,173,249,0.25); color: var(--white); }

/* Film grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  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='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--white);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0;
}

.eyebrow {
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--titanium-dim);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, var(--titanium-dim), transparent);
}

.display {
  font-size: clamp(44px, 7vw, 108px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.0;
}

.section-title {
  font-size: clamp(34px, 5vw, 70px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.04;
}

.lede {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.7;
  color: var(--titanium);
  font-weight: 300;
  max-width: 58ch;
  letter-spacing: 0.005em;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--titanium-dim);
}

/* ---------- Layout helpers ---------- */
.section {
  position: relative;
  min-height: 100svh;
  padding: clamp(72px, 9vh, 104px) var(--gutter) clamp(44px, 6vh, 72px);
  display: flex;
  align-items: center;
}
.wrap { max-width: var(--maxw); margin: 0 auto; width: 100%; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: clamp(28px, 4vh, 48px);
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-brand);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 16px 30px;
  border: 1px solid var(--hairline-strong);
  background: var(--glass-light);
  color: var(--white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: all 0.5s var(--ease);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(137,173,249,0.12), transparent);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { border-color: rgba(137,173,249,0.5); color: var(--white); }
.btn .arrow { transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--primary {
  background: linear-gradient(180deg, rgba(137,173,249,0.16), rgba(137,173,249,0.06));
  border-color: rgba(137,173,249,0.45);
  box-shadow: 0 0 0 1px rgba(137,173,249,0.05), 0 8px 40px rgba(137,173,249,0.10);
}
.btn--primary:hover { box-shadow: 0 0 0 1px rgba(137,173,249,0.2), 0 10px 50px rgba(137,173,249,0.22); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

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

/* Static motion (via Tweaks) */
body.reduce-motion .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ---------- Drop-zone placeholder ---------- */
.dropzone {
  position: relative;
  border: 1px dashed var(--hairline-strong);
  background:
    repeating-linear-gradient(135deg, rgba(248,249,250,0.025) 0 10px, transparent 10px 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--titanium-dim);
}
.dropzone .dz-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  background: rgba(5,7,10,0.6);
}

/* ============================================================
   Reference Direction — orbital command landing page
   ============================================================ */

:root {
  --gutter: clamp(22px, 4.3vw, 64px);
  --maxw: 1540px;
  --hairline: rgba(248,249,250,0.13);
  --hairline-strong: rgba(248,249,250,0.24);
}

body {
  background: #000;
  font-size: 14px;
  line-height: 1.6;
}

body::after {
  opacity: 0.018;
}

h1, h2, h3, h4,
.brand-word,
.footer-name {
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

.eyebrow {
  color: #89adf9;
  font-size: 10px;
  letter-spacing: 0.34em;
}

.eyebrow::before {
  display: none;
}

.display {
  font-size: clamp(32px, 3.6vw, 58px);
  line-height: 1.35;
  letter-spacing: 0.30em;
}

.section-title {
  font-size: clamp(22px, 2.35vw, 36px);
  line-height: 1.25;
  letter-spacing: 0.22em;
}

.lede {
  font-size: clamp(13px, 1.05vw, 16px);
  line-height: 1.85;
  color: rgba(248,249,250,0.78);
}

.section {
  min-height: auto;
  padding: clamp(54px, 6vw, 82px) var(--gutter);
  border-top: 1px solid var(--hairline);
}

.section-head {
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  border-radius: 0;
  padding: 13px 24px;
  font-size: 10px;
  letter-spacing: 0.16em;
  background: rgba(255,255,255,0.02);
}

.btn--primary {
  background: #f8f9fa;
  color: #000;
  border-color: #f8f9fa;
  box-shadow: none;
}

.btn--primary:hover {
  color: #000;
  border-color: #fff;
  box-shadow: none;
}

.trajectory {
  display: none;
}
