/* ============================================================
   Canopy Aerospace — Concept "PAYLOAD" (variant-1)
   Matte, dark, editorial. Vanilla CSS.
   ============================================================ */

:root {
  /* Backgrounds */
  --bg-0: #000000;
  --bg-1: #111111;
  --bg-2: #191b1b;
  --bg-3: #1c1e1f;
  --bg-4: #252829;

  /* Accents */
  --coral: #e24a38;
  --coral-hi: #ff604e;
  --coral-deep: #8f2b1e;
  --teal: #4faec4;

  /* Text */
  --head: #cdd7da;
  --text: #d0dbdf;
  --text-2: #c4d0d3;
  --muted: #9ca9ad;

  /* Lines */
  --line: rgba(205, 215, 218, 0.08);
  --line-coral: rgba(226, 74, 56, 0.55);
  --surface-l: #f0f0f0;

  /* Fonts */
  --font-head: 'Archivo', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Type scale */
  --fs-display: clamp(2.75rem, 7vw, 6.5rem);
  --fs-h2: clamp(2rem, 4.5vw, 3.75rem);
  --fs-h3: clamp(1.25rem, 1.8vw, 1.6rem);
  --fs-lead: clamp(1.05rem, 1.6vw, 1.35rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.75rem;

  /* Spacing (8px base) */
  --s1: 8px;  --s2: 16px;  --s3: 24px;  --s4: 32px;  --s5: 48px;
  --s6: 64px; --s7: 96px;  --s8: 128px; --s9: 160px; --s10: 200px;

  --gutter: clamp(20px, 6vw, 120px);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--s9); }
.section-bg2 { background: var(--bg-2); }
.section-bg3 { background: var(--bg-3); }
.section-center { text-align: center; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s3);
}

/* ---------- Signature coral hairline rule ---------- */
.rule {
  display: block;
  width: 64px;
  height: 1px;
  background: var(--line-coral);
  margin-bottom: var(--s3);
}
.rule-center { margin-inline: auto; }

/* ---------- Typography primitives ---------- */
.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-label);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-display);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--head);
}

.h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-h2);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--head);
}

.accent {
  color: var(--coral);
  display: inline-block;
  border-bottom: 4px solid var(--coral);
  line-height: 0.9;
}

.lead-p, .mfg-body, .ind-body, .backed-lead {
  font-family: var(--font-body);
  color: var(--text-2);
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 28px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn-primary {
  background: var(--coral);
  color: #111111;
}
.btn-primary:hover { background: var(--coral-hi); }
.btn-primary:active { background: var(--coral-deep); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--head);
}
.btn-ghost:hover { border-color: var(--coral); color: var(--head); }

.btn-invert {
  background: #111111;
  color: var(--head);
  padding: 16px 32px;
}
.btn-invert:hover { background: #000000; }
.btn .arrow { transition: transform 140ms ease; }
.btn-invert:hover .arrow { transform: translateX(4px); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  transition: background-color 200ms ease, border-color 200ms ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(17, 17, 17, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--s4);
}

.logo img { height: 26px; width: auto; }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin-left: auto;
}
.nav-desktop a {
  position: relative;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  padding-bottom: 4px;
  transition: color 180ms ease;
}
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.nav-desktop a:hover { color: var(--head); }
.nav-desktop a:hover::after { transform: scaleX(1); }

.header-cta { font-size: 13px; padding: 11px 20px; }

/* Hamburger */
.hamburger {
  display: none;
  margin-left: auto;
  width: 28px; height: 22px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  position: absolute;
  left: 0;
  width: 100%; height: 2px;
  background: var(--head);
  transition: transform 200ms ease, opacity 200ms ease, top 200ms ease;
}
.hamburger span:nth-child(1) { top: 2px; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { top: 18px; }
.hamburger.open span:nth-child(1) { top: 10px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  padding: var(--gutter);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 300ms ease, opacity 300ms ease, visibility 300ms ease;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.mobile-menu .rule { margin-bottom: 0; }
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
}
.mobile-nav a {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--head);
}
.mobile-nav a:hover { color: var(--coral); }
.mobile-cta { width: 100%; max-width: 320px; margin-top: var(--s3); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--bg-0);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.55) 100%),
    rgba(17, 19, 19, 0.62);
}
/* Static poster fallback (set by JS on small / reduced-motion) */
.hero.poster-mode .hero-video { display: none; }
.hero.poster-mode {
  background-image: url("assets/video-poster.jpg");
  background-size: cover;
  background-position: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: var(--header-h);
}
.hero-inner {
  max-width: 75%;        /* ~cols 1-9 */
  margin-top: 4vh;
}
.hero-sub {
  font-size: var(--fs-lead);
  color: var(--text);
  max-width: 56ch;
  margin-top: 28px;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.chip {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 8px 16px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  z-index: 2;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-line {
  width: 1px; height: 40px;
  background: var(--line-coral);
  animation: scrollbob 1.8s ease-in-out infinite;
}
@keyframes scrollbob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============================================================
   SECTION HEAD (editorial offset)
   ============================================================ */
.section-head { align-items: end; }
.head-left { grid-column: 1 / 8; }
.head-lead { grid-column: 8 / 13; padding-bottom: 6px; }
.h2 + * { margin-top: 0; }
.head-left .h2 { margin-top: var(--s2); }

/* ============================================================
   TECHNOLOGY CARDS
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s3);
  margin-top: 80px;
}
.card {
  position: relative;
  background: var(--bg-4);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: var(--s4);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  transition: border-color 180ms ease, transform 180ms ease;
}
.card-index {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--coral);
  transition: color 180ms ease;
}
.card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-h3);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--head);
  margin-top: 16px;
  line-height: 1.1;
}
.card-body {
  font-size: var(--fs-small);
  color: var(--text-2);
  line-height: 1.6;
  margin-top: 12px;
}
.card-rule {
  display: block;
  width: 32px; height: 1px;
  background: var(--coral);
  margin-top: auto;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.card:hover {
  border-color: var(--line-coral);
  transform: translateY(-4px);
}
.card:hover .card-index { color: var(--coral-hi); }
.card:hover .card-rule { transform: scaleX(1); }

/* ============================================================
   INDUSTRIES
   ============================================================ */
.industries { margin-top: 80px; }
.ind-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  align-items: center;
}
.ind-row-rev .ind-figure { order: 2; }
.ind-row-rev .ind-text { order: 1; }

.ind-figure {
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.ind-figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) brightness(0.85);
  transition: filter 500ms ease, transform 500ms ease;
}
.ind-figure:hover img {
  filter: grayscale(0) brightness(1);
  transform: scale(1.03);
}

.ind-index {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--coral);
}
.ind-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--head);
  margin: 12px 0 16px;
}
.ind-body { font-size: var(--fs-body); max-width: 50ch; }
.text-link {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--head);
  margin-top: var(--s3);
}
.text-link .arrow {
  color: var(--coral);
  display: inline-block;
  transition: transform 160ms ease;
}
.text-link:hover .arrow { transform: translateX(4px); }

.row-rule {
  display: block;
  width: 100%; height: 1px;
  background: var(--line-coral);
  margin-block: var(--s7);
}

/* ============================================================
   MANUFACTURING
   ============================================================ */
.mfg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: stretch;
}
.mfg-figure {
  position: relative;
  border-radius: 3px;
  border: 1px solid var(--line);
  overflow: hidden;
  min-height: 420px;
}
.mfg-figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.1) brightness(0.9);
}
.mfg-chip {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(17, 19, 19, 0.7);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 2px;
}
.mfg-narrative { display: flex; flex-direction: column; justify-content: center; }
.mfg-narrative .h2 { margin: var(--s2) 0; }
.mfg-body { font-size: var(--fs-body); max-width: 54ch; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
  margin-top: var(--s5);
}
.stat { padding-left: var(--s4); border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; border-left: none; }
.stat-fig {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1;
  color: var(--head);
}
.stat-fig .unit { color: var(--coral); }
.stat-label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}

.mfg-strip {
  margin-top: var(--s5);
  border-radius: 3px;
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 21 / 9;
}
.mfg-strip img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.1) brightness(0.9);
}

/* ============================================================
   INVESTORS / BACKED BY
   ============================================================ */
.backed {
  max-width: 720px;
  margin-inline: auto;
}
.backed .eyebrow { text-align: center; }
.backed .h2 { margin-top: var(--s2); }
.backed-lead {
  font-size: var(--fs-lead);
  margin: 20px auto 0;
}
.investor { margin-top: 56px; }
.investor-chip {
  display: inline-block;
  background: var(--bg-4);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 24px 40px;
}
.investor-logo {
  height: 40px; width: auto;
  opacity: 0.85;
  transition: opacity 200ms ease;
}
.investor-chip:hover .investor-logo { opacity: 1; }
.investor-caption {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 16px;
}

/* ============================================================
   CONTACT / CTA BAND
   ============================================================ */
.cta-band {
  background: var(--coral);
  padding-block: var(--s8);
  text-align: center;
  border-top: 1px solid var(--coral-deep);
  border-bottom: 1px solid var(--coral-deep);
}
.cta-inner { max-width: 860px; margin-inline: auto; }
.cta-eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--coral-deep);
}
.cta-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-h2);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #111111;
  margin-top: var(--s2);
}
.cta-p {
  font-size: var(--fs-lead);
  color: rgba(17, 17, 17, 0.8);
  max-width: 52ch;
  margin: 20px auto 0;
}
.cta-band .btn-invert { margin-top: 36px; }
.cta-mail {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111111;
  margin-top: 24px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-1);
  padding-top: 80px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s5);
}
.footer-brand .logo img { height: 24px; }
.footer-tag {
  font-size: var(--fs-small);
  color: var(--muted);
  max-width: 38ch;
  margin-top: 16px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.footer-nav a {
  position: relative;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  padding-bottom: 3px;
  transition: color 180ms ease;
}
.footer-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.footer-nav a:hover { color: var(--head); }
.footer-nav a:hover::after { transform: scaleX(1); }

.footer-divider {
  width: 100%; height: 1px;
  background: var(--line);
  margin: 48px 0 24px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
}
.footer-copy {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-lockup {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger via inline transition-delay set in JS for grouped children */

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .section { padding-block: var(--s7); }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-desktop, .header-cta { display: none; }
  .hamburger { display: block; }

  .hero-inner { max-width: 100%; }

  .section-head { display: block; }
  .head-left, .head-lead { grid-column: auto; }
  .head-lead { margin-top: var(--s3); }

  .ind-row, .ind-row-rev {
    grid-template-columns: 1fr;
    gap: var(--s3);
  }
  .ind-row-rev .ind-figure { order: 0; }
  .ind-row-rev .ind-text { order: 0; }
  .row-rule { margin-block: var(--s6); }

  .mfg-grid { grid-template-columns: 1fr; gap: var(--s5); }
  .mfg-figure { min-height: 0; aspect-ratio: 16 / 10; }
  .stats { grid-template-columns: 1fr; gap: 0; }
  .stat {
    padding-left: 0; border-left: none;
    padding-block: var(--s3);
    border-top: 1px solid var(--line);
  }
  .stat:first-child { border-top: none; }

  .footer-top { grid-template-columns: 1fr; gap: var(--s5); }
}

@media (max-width: 640px) {
  .section { padding-block: var(--s6); }
  .display { line-height: 0.95; }
  .hero-sub { font-size: 16px; }
  .card { min-height: auto; padding: var(--s3); }
  .mfg-strip { display: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .hero-ctas .btn, .cta-band .btn-invert { width: 100%; }
  .investor-logo { height: 32px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .scroll-line { animation: none; }
  * { transition-duration: 0.001ms !important; }
}
