/* ==========================================================================
   LIFTOFF — Web design studio
   Palette "Stratosphere": pre-dawn indigo → high-altitude paper.
   Type: Archivo (variable width axis; expanded for display) + IBM Plex Mono
   for instrument data only.
   Radius rule (locked): interactive = pill, surfaces = 20px, inputs = 12px.
   Accent rule (locked): one accent, aviation international orange.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Color */
  --night: #0b1026;          /* pre-dawn sky, footer, dark section */
  --ink: #0e1b2c;            /* text on light */
  --ink-soft: #405063;       /* secondary text on light */
  --paper: #eef3f7;          /* page background = final sky tone */
  --paper-raise: #ffffff;    /* raised surfaces */
  --tint: #dfe8f0;           /* tinted section band */
  --line: #c9d5e0;           /* hairlines on light */
  --accent: #d64a0e;         /* international orange */
  --accent-deep: #b23c09;
  --on-ink: #e9eff5;         /* text on dark */
  --on-ink-soft: #9fb0c2;

  /* Plane */
  --plane-body: #f3f6fa;
  --plane-shade: #c4cfdb;
  --plane-wing: #dde5ee;

  /* Type */
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* Motion (Emil-grade curves; never default ease-in) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-tap: 150ms;
  --dur-ui: 220ms;
  --dur-reveal: 640ms;

  /* Layout */
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius-surface: 20px;
  --radius-input: 12px;

  /* Flight scene scroll distance (overridden on mobile) */
  --flight-track: 430vh;

  /* z-scale: 1 content · 5 hud/intro · 10 nav · 20 menu panel */
}

/* ---------- Reset-ish base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* fallback */
  overflow-x: clip;   /* clip creates no scroll container, keeps sticky safe */
}

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

h1, h2, h3, p, ul, ol, figure, blockquote, address { margin: 0; }

ul, ol { padding: 0; list-style: none; }

address { font-style: normal; }

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ---------- Focus visibility (whole site) ---------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.flight :focus-visible,
.section--ink :focus-visible,
.footer :focus-visible {
  outline-color: #ffb38a;
}

/* ---------- Utilities ---------- */
.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 30;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-64px);
  transition: transform var(--dur-ui) var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(0); }

/* Mono micro-label (used twice on the page, deliberately) */
.microlabel {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--dur-tap) var(--ease-out),
              background-color var(--dur-ui) var(--ease-out),
              color var(--dur-ui) var(--ease-out),
              opacity var(--dur-ui) var(--ease-out);
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  padding: 14px 28px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 16px;
}
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--accent); color: #fff; }
}

.btn--nav {
  padding: 9px 18px;
  font-size: 14px;
  background: var(--on-ink);
  color: var(--night);
}
@media (hover: hover) and (pointer: fine) {
  .btn--nav:hover { background: var(--accent); color: #fff; }
}

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  color: var(--on-ink);
  transition: background-color 320ms var(--ease-out),
              color 320ms var(--ease-out),
              box-shadow 320ms var(--ease-out);
}
.nav__inner {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}
.nav__mark { color: var(--accent); flex: none; }
.nav__wordmark {
  font-variation-settings: "wdth" 120;
  letter-spacing: 0.08em;
  font-size: 17px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
}
.nav__links a:not(.btn) {
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  opacity: 0.9;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: opacity var(--dur-ui) var(--ease-out),
              border-color var(--dur-ui) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav__links a:not(.btn):hover { opacity: 1; border-bottom-color: var(--accent); }
}

/* Solid state once the sky brightens / hero releases */
.nav.is-solid {
  background: rgba(238, 243, 247, 0.88); /* fallback */
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-solid .btn--nav { background: var(--ink); color: var(--on-ink); }
@media (hover: hover) and (pointer: fine) {
  .nav.is-solid .btn--nav:hover { background: var(--accent); color: #fff; }
}

/* Hamburger */
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  position: relative;
}
.nav__toggle-bar {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-ui) var(--ease-in-out);
}
.nav__toggle-bar:nth-child(1) { top: 18px; }
.nav__toggle-bar:nth-child(2) { top: 25px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 20;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px var(--gutter) 24px;
    background: var(--night);
    color: var(--on-ink);
    box-shadow: 0 24px 40px rgba(6, 10, 26, 0.35);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--dur-ui) var(--ease-out),
                opacity var(--dur-ui) var(--ease-out),
                visibility 0s linear var(--dur-ui);
  }
  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform var(--dur-ui) var(--ease-out),
                opacity var(--dur-ui) var(--ease-out);
  }
  .nav__links a:not(.btn) {
    padding: 14px 6px;   /* comfortable touch targets */
    font-size: 17px;
    border-bottom: 1px solid rgba(233, 239, 245, 0.12);
  }
  .nav__links .btn--nav {
    margin-top: 14px;
    padding: 14px 22px;
    font-size: 16px;
  }
  /* Panel is always dark; keep its text light even when the bar is solid */
  .nav.is-solid .nav__links { color: var(--on-ink); }
  .nav.is-solid .nav__links .btn--nav { background: var(--on-ink); color: var(--night); }
}

/* ==========================================================================
   FLIGHT SCENE (pinned hero)
   ========================================================================== */
.flight { background: var(--night); }

.flight__track {
  height: var(--flight-track);
  position: relative;
}

.flight__stage {
  position: sticky;
  top: 0;
  height: 100vh;      /* fallback */
  height: 100svh;     /* stable on iOS while the address bar collapses */
  overflow: hidden;
}

/* --- Sky layers (opacity crossfade, GPU friendly) --- */
.sky {
  position: absolute;
  inset: 0;
}
.sky--predawn {
  background: linear-gradient(180deg,
    #0b1026 0%, #141b38 42%, #29244a 68%, #4f3352 84%, #7a4a4b 96%, #8a5648 100%);
}
.sky--sunrise {
  opacity: 0;
  background: linear-gradient(180deg,
    #1d2a4c 0%, #3d4d7d 40%, #8f6a86 66%, #d98a63 84%, #f2b06c 95%, #f7c785 100%);
}
.sky--day {
  opacity: 0;
  background: linear-gradient(180deg,
    #2a64a8 0%, #4d86c4 38%, #86b1dc 70%, #bcd6ec 100%);
}
.sky--strato {
  opacity: 0;
  background: linear-gradient(180deg,
    #7fadd9 0%, #a7c8e6 34%, #d2e2f0 68%, #eef3f7 100%); /* bottom = --paper */
}

/* --- Stars (fade out with the night) --- */
.stars {
  position: absolute;
  inset: 0 0 34% 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1.2px 1.2px at 28% 8%,  rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.6px 1.6px at 44% 30%, rgba(255,255,255,0.85), transparent 60%),
    radial-gradient(1.1px 1.1px at 61% 12%, rgba(255,255,255,0.65), transparent 60%),
    radial-gradient(1.5px 1.5px at 74% 26%, rgba(255,255,255,0.8), transparent 60%),
    radial-gradient(1.2px 1.2px at 86% 6%,  rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.3px 1.3px at 93% 34%, rgba(255,255,255,0.75), transparent 60%),
    radial-gradient(1.2px 1.2px at 6% 44%,  rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.4px 1.4px at 52% 48%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.1px 1.1px at 37% 60%, rgba(255,255,255,0.5), transparent 60%);
}

/* --- Rising sun glow --- */
.sunglow {
  position: absolute;
  left: 50%;
  bottom: -18vh;
  width: 90vmin;
  height: 90vmin;
  margin-left: -45vmin;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 202, 128, 0.85) 0%,
    rgba(255, 160, 92, 0.4) 34%,
    rgba(255, 140, 80, 0) 68%);
  opacity: 0;
  will-change: transform, opacity;
}

/* --- Clouds --- */
.clouds {
  position: absolute;
  inset: -20vh 0;
  pointer-events: none;
  will-change: transform;
}
.puff {
  position: absolute;
  left: var(--px);
  top: var(--py);
  width: var(--pw);
  height: var(--ph);
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(255, 255, 255, 0) 100%);
}
.clouds--far .puff { opacity: 0.5; }
.clouds--mid .puff { opacity: 0.7; }
.clouds--near .puff { opacity: 0.9; }

.clouddeck {
  position: absolute;
  left: -6vw;
  right: -6vw;
  bottom: 0;
  height: 34vh;
  transform: translateY(110%);
  will-change: transform, opacity;
  opacity: 0;
}
.clouddeck .puff { opacity: 0.95; }
.clouddeck__fill {
  position: absolute;
  inset: 55% -2vw -4vh;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(238,243,247,1) 70%);
  border-radius: 40% 60% 0 0 / 30% 30% 0 0;
}

/* --- Runway --- */
.runway {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22vh;
  will-change: transform, opacity;
}
.runway::before {
  /* ground haze behind the asphalt */
  content: "";
  position: absolute;
  inset: -6vh 0 0 0;
  background: linear-gradient(180deg, rgba(11, 16, 38, 0) 0%, rgba(15, 20, 42, 0.85) 60%, #0d1330 100%);
}
.runway__surface {
  position: absolute;
  inset: 34% 0 0 0;
  background: linear-gradient(180deg, #182034 0%, #10182b 100%);
  border-top: 2px solid rgba(233, 239, 245, 0.16);
  overflow: hidden;
}
.runway__centerline {
  position: absolute;
  top: 50%;
  left: -40%;
  width: 220%;
  height: 6px;
  margin-top: -3px;
  background-image: repeating-linear-gradient(90deg,
    rgba(238, 243, 247, 0.85) 0 64px,
    transparent 64px 128px);
  will-change: transform;
}
.runway__lights {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(214, 74, 14, 0.9) 0 5px, transparent 5px 96px),
    repeating-linear-gradient(90deg, rgba(255, 214, 140, 0.9) 0 5px, transparent 5px 96px);
  background-size: 100% 5px, 100% 5px;
  background-position: 0 8%, 48px 92%;
  background-repeat: repeat-x;
  opacity: 0.8;
  will-change: transform;
}

/* --- Plane rig --- */
.plane-rig {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(170px, 30vw, 340px);
  margin-left: calc(clamp(170px, 30vw, 340px) / -2);
  will-change: transform;
  filter: drop-shadow(0 14px 22px rgba(8, 12, 30, 0.35));
  z-index: 2;
}
.plane { width: 100%; height: auto; display: block; }

.contrail {
  position: absolute;
  top: 46%;
  right: 78%;
  width: 68vw;
  height: 12px;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: right center;
  will-change: transform, opacity;
}
.contrail__streak {
  position: absolute;
  right: 0;
  height: 4px;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 55%,
    rgba(255, 255, 255, 0.85) 100%);
}
.contrail__streak--a { top: 0; }
.contrail__streak--b { top: 9px; width: 86%; opacity: 0.8; }

/* --- HUD --- */
.hud {
  position: absolute;
  left: clamp(16px, 4vw, 48px);
  bottom: clamp(16px, 5vh, 44px);
  z-index: 5;
  min-width: 208px;
  padding: 14px 16px 12px;
  border: 1px solid rgba(233, 239, 245, 0.35);
  border-radius: var(--radius-input);
  background: rgba(10, 15, 34, 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--on-ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.hud__row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 3px 0;
}
.hud__label { color: var(--on-ink-soft); font-weight: 500; }
.hud__value { font-weight: 600; }
.hud__phase { color: #ffb38a; }
.hud__bar {
  margin-top: 9px;
  height: 3px;
  border-radius: 2px;
  background: rgba(233, 239, 245, 0.18);
  overflow: hidden;
}
.hud__bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* --- Intro copy --- */
.flight__intro {
  position: absolute;
  inset: 0 0 30% 0;
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  text-align: center;
  padding: 0 var(--gutter);
  color: var(--on-ink);
  will-change: transform, opacity;
}
.flight__headline {
  font-size: clamp(1.7rem, 1rem + 3.2vw, 3.1rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.015em;
  max-width: 18ch;
  text-wrap: balance;
}
.flight__cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-ink-soft);
}
.flight__cue-chev { animation: cue-bob 1.6s var(--ease-in-out) infinite; }
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* --- Payoff wordmark --- */
.flight__payoff {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 var(--gutter) 8vh;
  text-align: center;
  color: var(--ink);
  pointer-events: none; /* enabled by JS when visible */
}
.flight__payoff.is-live { pointer-events: auto; }

.flight__wordmark {
  font-weight: 900;
  font-variation-settings: "wdth" 125;
  font-size: clamp(3.2rem, 13.5vw, 11.5rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ink);
}
.flight__wordmark span {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.28em) scale(0.94);
  filter: blur(10px);
  will-change: transform, opacity, filter;
}
.flight__sub {
  max-width: 46ch;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(14px);
  will-change: transform, opacity;
}
.flight__cta {
  opacity: 0;
  transform: translateY(14px);
  will-change: transform, opacity;
}

/* ==========================================================================
   SHARED SECTION RHYTHM
   ========================================================================== */
.section {
  padding: clamp(84px, 12vh, 150px) 0;
  scroll-margin-top: 72px; /* fixed nav clearance for anchor jumps */
}
.section--tint { background: var(--tint); }
.section--ink { background: var(--night); color: var(--on-ink); }

.section__title {
  font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.3rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-variation-settings: "wdth" 108;
  max-width: 22ch;
  text-wrap: balance;
}
.section__lede {
  margin-top: 18px;
  max-width: 52ch;
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.2rem);
  color: var(--ink-soft);
}
.microlabel + .section__title { margin-top: 14px; }

/* Scroll reveals (IntersectionObserver toggles .in) */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   SERVICES — asymmetric bento (4 cells, mixed surfaces)
   ========================================================================== */
.bento {
  margin-top: clamp(40px, 6vh, 72px);
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 18px;
}
.bento__cell {
  position: relative;
  border-radius: var(--radius-surface);
  padding: clamp(24px, 3vw, 36px);
  background: var(--paper-raise);
  border: 1px solid var(--line);
  overflow: hidden;
}
.bento__cell h3 {
  font-size: 1.4rem;
  font-weight: 800;
  font-variation-settings: "wdth" 110;
  letter-spacing: -0.01em;
  margin-top: 14px;
}
.bento__cell p {
  margin-top: 10px;
  color: var(--ink-soft);
  max-width: 44ch;
}
.bento__glyph {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* Cell 1: Design — spans both rows, carries the photo */
.bento__cell--design {
  grid-row: 1 / 3;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.bento__img {
  width: 100%;
  aspect-ratio: 11 / 7;
  object-fit: cover;
}
.bento__body { padding: clamp(24px, 3vw, 36px); }
.bento__body h3 { margin-top: 14px; }

/* Cell 3: Launch — dark cell with runway dashes */
.bento__cell--launch {
  grid-column: 2 / 4;
  background: var(--night);
  border-color: var(--night);
  color: var(--on-ink);
}
.bento__cell--launch p { color: var(--on-ink-soft); }
.bento__cell--launch .bento__glyph {
  color: #ffb38a;
  background: rgba(214, 74, 14, 0.18);
}
.bento__dashes {
  position: absolute;
  right: 28px;
  top: 24px;
  bottom: 24px;
  width: 5px;
  border-radius: 3px;
  background-image: repeating-linear-gradient(180deg,
    rgba(233, 239, 245, 0.5) 0 18px, transparent 18px 34px);
}

/* Cell 4: Grow — soft sky tint */
.bento__cell--grow { background: var(--tint); border-color: transparent; }

@media (max-width: 980px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento__cell--design { grid-row: auto; grid-column: 1 / 3; }
  .bento__cell--launch { grid-column: 1 / 3; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .bento__cell--design,
  .bento__cell--launch { grid-column: auto; }
}

/* ==========================================================================
   PROCESS — flight-plan route line
   ========================================================================== */
.route {
  position: relative;
  margin-top: clamp(44px, 7vh, 84px);
  padding-left: clamp(44px, 6vw, 84px);
}
.route__line {
  position: absolute;
  left: clamp(10px, 1.6vw, 24px);
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 2px;
  background-image: repeating-linear-gradient(180deg,
    var(--accent) 0 22px, transparent 22px 38px);
  /* Drawn top-to-bottom by scroll via clip-path (see script.js) */
  clip-path: inset(0 0 100% 0);
  will-change: clip-path;
}

.route__steps {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 5vh, 56px);
  counter-reset: leg;
}
.route__step { position: relative; }

.route__marker {
  position: absolute;
  left: calc(-1 * clamp(44px, 6vw, 84px) + clamp(10px, 1.6vw, 24px) + 2px);
  top: 26px;
  width: 0;
  height: 0;
}
.route__diamond {
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  transform: rotate(45deg) scale(0.6);
  border: 3px solid var(--accent);
  background: var(--tint);
  transition: transform 260ms var(--ease-out),
              background-color 260ms var(--ease-out);
}
.route__step.is-passed .route__diamond {
  transform: rotate(45deg) scale(1);
  background: var(--accent);
}

.route__card {
  background: var(--paper-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  padding: clamp(22px, 3vw, 34px);
  max-width: 720px;
}
.route__step:nth-child(even) .route__card { margin-left: clamp(0px, 8vw, 130px); }

.route__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent-deep);
}
.route__card h3 {
  margin-top: 10px;
  font-size: 1.45rem;
  font-weight: 800;
  font-variation-settings: "wdth" 110;
}
.route__card p { margin-top: 10px; color: var(--ink-soft); max-width: 58ch; }

@media (max-width: 640px) {
  .route__step:nth-child(even) .route__card { margin-left: 0; }
}

/* ==========================================================================
   WORK — asymmetric portfolio grid
   ========================================================================== */
.work__grid {
  margin-top: clamp(40px, 6vh, 72px);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-auto-rows: min-content;
  gap: 22px;
}
.work__card--tall { grid-row: 1 / 3; }
.work__grid--pair { grid-template-columns: 1fr 1fr; }
.work__grid--pair .work__card--tall { grid-row: auto; }
.work__grid--pair .work__card--tall .work__media img { aspect-ratio: 7 / 5; }

.work__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  border-radius: var(--radius-surface);
  background: var(--paper-raise);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform var(--dur-ui) var(--ease-out),
              box-shadow var(--dur-ui) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .work__link:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px rgba(20, 34, 56, 0.14);
  }
  .work__link:hover .work__media img { transform: scale(1.035); }
}
.work__link:active { transform: translateY(-1px) scale(0.995); }

.work__media { overflow: hidden; }
.work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 480ms var(--ease-out);
}
.work__card--tall .work__media { flex: 1; min-height: 0; }
.work__card:not(.work__card--tall) .work__media img { aspect-ratio: 7 / 5; }

.work__body { padding: clamp(20px, 2.4vw, 30px); }
.work__body h3 {
  font-size: 1.35rem;
  font-weight: 800;
  font-variation-settings: "wdth" 110;
}
.work__tag {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.work__result {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 860px) {
  .work__grid { grid-template-columns: 1fr; }
  .work__card--tall { grid-row: auto; }
  .work__card--tall .work__media img { aspect-ratio: 7 / 5; }
}

/* ==========================================================================
   REVIEWS
   ========================================================================== */
.reviews__layout {
  margin-top: clamp(32px, 5vh, 56px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.reviews__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.reviews__empty {
  color: var(--on-ink-soft);
  border: 1px dashed rgba(233, 239, 245, 0.3);
  border-radius: var(--radius-surface);
  padding: 28px;
  text-align: center;
}
.review__card {
  border-top: 1px solid rgba(233, 239, 245, 0.16);
  padding-top: 20px;
}
.review__stars {
  color: #ffb38a;
  letter-spacing: 0.1em;
  font-size: 14px;
}
.review__text {
  margin-top: 10px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--on-ink);
}
.review__who {
  margin-top: 12px;
  color: var(--on-ink-soft);
  font-size: 14px;
}
.review__who strong { color: var(--on-ink); font-weight: 700; }

.reviews__form.pass { background: var(--paper-raise); }
.reviews__form .pass__form { padding: clamp(20px, 3vw, 30px); }

@media (max-width: 860px) {
  .reviews__layout { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CONTACT — boarding pass
   ========================================================================== */
.contact__wrap {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}
.contact__facts {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact__facts li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.contact__fact-label {
  flex: none;
  width: 130px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Pass surface */
.pass {
  position: relative;
  background: var(--paper-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  box-shadow: 0 24px 60px rgba(20, 34, 56, 0.12);
  overflow: hidden;
}
.pass__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px clamp(20px, 3vw, 32px);
  background: var(--night);
  color: var(--on-ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
}
.pass__route {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffb38a;
  font-weight: 600;
}
.pass__code { color: var(--on-ink-soft); }

.pass__form {
  padding: clamp(22px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: opacity 260ms var(--ease-out), filter 260ms var(--ease-out);
}
.pass.is-sent .pass__form {
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
}

/* Fields: label above, error below, per skill rules */
.field { display: flex; flex-direction: column; gap: 8px; }
.field[hidden] { display: none; }
.field label { font-weight: 600; font-size: 15px; }
.field__req { color: var(--accent); }

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 16px; /* prevents iOS zoom-on-focus */
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-input);
  padding: 13px 15px;
  width: 100%;
  cursor: text;
  transition: border-color var(--dur-ui) var(--ease-out),
              background-color var(--dur-ui) var(--ease-out),
              box-shadow var(--dur-ui) var(--ease-out);
}
.field select { cursor: pointer; }
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: #7b8ca0; }

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #93a6b8;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
  background: #fff;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--accent-deep);
  background: #fdf1ea;
}

.field__select { position: relative; }
.field__select select { appearance: none; padding-right: 44px; }
.field__chev {
  position: absolute;
  right: 16px;
  top: 50%;
  margin-top: -4px;
  color: var(--ink-soft);
  pointer-events: none;
}

.field__error {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-deep);
}

/* Submit row */
.pass__submit-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.pass__submit-wrap { display: inline-block; border-radius: 999px; }

.btn--submit {
  position: relative;
  min-width: 176px;
  min-height: 51px;
  display: inline-grid;
  place-items: center;
}
.btn--submit:disabled {
  background: #c6d1dc;
  color: #45566a;
  cursor: not-allowed;
  transform: none;
  /* Disabled buttons swallow clicks; letting them pass through means the
     wrapper can catch early submits and surface inline errors. */
  pointer-events: none;
}
.pass__submit-wrap:has(.btn--submit:disabled) { cursor: not-allowed; }
.btn__face {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: opacity 200ms var(--ease-out), filter 200ms var(--ease-out);
}
.btn__face--busy { opacity: 0; filter: blur(4px); }
.btn--submit.is-busy .btn__face--idle { opacity: 0; filter: blur(4px); }
.btn--submit.is-busy .btn__face--busy { opacity: 1; filter: blur(0); }
.btn--submit.is-busy { pointer-events: none; }

.btn__spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 640ms linear infinite; /* brisk spinner = faster perceived load */
}
@keyframes spin { to { transform: rotate(360deg); } }

.pass__hint { font-size: 14px; color: var(--ink-soft); }

/* Early-submit nudge */
@keyframes pass-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
.pass.do-shake { animation: pass-shake 360ms var(--ease-out); }

/* Success state */
.pass__success {
  position: absolute;
  inset: 53px 0 0 0; /* below the dark header */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 30px clamp(22px, 4vw, 44px);
  opacity: 0;
  pointer-events: none; /* invisible panel must never block the form underneath */
  transform: translateY(14px) scale(0.985);
  filter: blur(6px);
  transition: opacity 420ms var(--ease-out) 120ms,
              transform 420ms var(--ease-out) 120ms,
              filter 420ms var(--ease-out) 120ms;
}
.pass.is-sent .pass__success {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.pass__stamp { color: var(--accent); }
.pass__success h3 {
  font-size: 1.6rem;
  font-weight: 800;
  font-variation-settings: "wdth" 112;
}
.pass__success p { color: var(--ink-soft); max-width: 40ch; }
.pass__ref {
  font-family: var(--font-mono);
  color: var(--ink);
  letter-spacing: 0.08em;
}
.pass__again {
  margin-top: 10px;
  font-weight: 600;
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .contact__wrap { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--night);
  color: var(--on-ink);
  padding: clamp(60px, 9vh, 110px) 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(44px, 6vh, 72px);
}
.footer__wordmark {
  font-weight: 900;
  font-variation-settings: "wdth" 125;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
}
.footer__tag { margin-top: 10px; color: var(--on-ink-soft); max-width: 26ch; }
.footer__heading {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--on-ink-soft);
  margin-bottom: 16px;
}
.footer__nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer__nav a,
.footer__info a {
  text-decoration: none;
  color: var(--on-ink);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-ui) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .footer__nav a:hover,
  .footer__info a:hover { border-bottom-color: var(--accent); }
}
.footer__info address,
.footer__hours { color: var(--on-ink-soft); line-height: 1.8; }
.footer__info address a { color: var(--on-ink); }

.footer__legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 0 26px;
  border-top: 1px solid rgba(233, 239, 245, 0.14);
  color: var(--on-ink-soft);
  font-size: 14px;
}
.footer__strip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: rgba(233, 239, 245, 0.4);
}

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   MOBILE FLIGHT ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
  :root { --flight-track: 300vh; }  /* shorter takeoff roll on phones */

  .plane-rig {
    width: clamp(140px, 44vw, 210px);
    margin-left: calc(clamp(140px, 44vw, 210px) / -2);
  }
  .hud {
    left: 14px;
    bottom: 14px;
    min-width: 172px;
    padding: 11px 13px 10px;
    font-size: 12px;
  }
  .flight__intro { inset: 0 0 24% 0; }
  .flight__wordmark { font-size: clamp(2.9rem, 14vw, 5.2rem); }
  .flight__sub { font-size: 0.98rem; max-width: 34ch; }
  .contrail { width: 90vw; }
  .clouddeck { height: 28vh; }
}

/* ==========================================================================
   REDUCED MOTION — static hero, no pin, no scrubbing
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .flight__track { height: auto; }
  .flight__stage { position: relative; height: 100svh; }

  /* Rest at cruising altitude */
  .sky--strato { opacity: 1; }
  .stars, .sunglow, .runway,
  .clouds--far, .clouds--mid, .clouds--near { display: none; }
  .flight__intro { display: none; }

  .clouddeck { transform: none; opacity: 1; }

  .plane-rig {
    top: 24%;
    left: 42%;
    transform: none;
    filter: drop-shadow(0 10px 18px rgba(8, 12, 30, 0.25));
  }
  .contrail { opacity: 0.85; transform: scaleX(0.55); }

  .flight__payoff { pointer-events: auto; }
  .flight__wordmark span {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .flight__sub, .flight__cta { opacity: 1; transform: none; }

  .hud { display: none; }

  .flight__cue-chev { animation: none; }
  .btn__spinner { animation-duration: 1.2s; } /* keep the meaningful spinner, gentler */
  .pass.do-shake { animation: none; }
  .work__link, .work__media img, .btn { transition-duration: 1ms; }
}
