/* =============================================================
   PRECISIAN MEDICAL INSTRUMENTS — style.css
   Brand palette extracted from logo assets:
     Red   #E8000D  — asterisk mark, P icon
     Black #0D0D0D  — logo text, spaceman silhouette
     White #FFFFFF
   =========================================================== */

/* ── Custom Properties ──────────────────────────────────── */
:root {
  /* Brand */
  --red:          #E8000D;
  --red-glow:     rgba(232, 0, 13, 0.35);
  --black:        #0D0D0D;
  --black-mid:    #111111;
  --black-card:   #161616;
  --border:       #242424;
  --white:        #FFFFFF;
  --off-white:    #F5F5F5;
  --grey-light:   #E0E0E0;
  --grey:         #888888;
  --text-muted:   rgba(255, 255, 255, 0.60);
  --text-dim:     rgba(255, 255, 255, 0.35);

  /* Typography */
  --font:       'Inter', system-ui, -apple-system, sans-serif;
  --fw-light:   300;
  --fw-reg:     400;
  --fw-semi:    600;
  --fw-bold:    700;
  --fw-black:   900;

  /* Layout */
  --container:    min(90vw, 1200px);
  --section-pad:  clamp(5rem, 10vw, 9rem);
  --gap:          clamp(1.5rem, 3vw, 2.5rem);

  /* Motion */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --tr:         0.25s var(--ease-out);
}

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

html {
  font-size: 16px;
  /* Lenis handles scroll behaviour — keep native at auto */
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-weight: var(--fw-reg);
  background-color: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol { list-style: none; }

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, button { font-family: inherit; }

/* ── Shared Utilities ───────────────────────────────────── */
.container {
  width: var(--container);
  margin-inline: auto;
}

.text--red { color: var(--red); }

.section {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-pad);
}

.section--dark  { background-color: var(--black);     color: var(--white);   }
.section--mid   { background-color: var(--black-mid); color: var(--white);   }
.section--light { background-color: var(--off-white); color: var(--black);   }

/* ── Section Typography ─────────────────────────────────── */
.section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.9rem;
}

.section-label--on-light { color: var(--red); }

.section-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--fw-black);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 2.5rem;
}

.section-headline--on-light { color: var(--black); }

.section-mark {
  width: clamp(2.5rem, 5vw, 4rem);
  opacity: 0.12;
  margin-bottom: 1.25rem;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.9rem;
  font-size: 0.9rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.03em;
  border-radius: 3px;
  transition: transform var(--tr), box-shadow var(--tr), background-color var(--tr);
}

.btn--primary {
  background-color: var(--red);
  color: var(--white);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--red-glow);
}

.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

/* ── NAVBAR ─────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem clamp(1.25rem, 5vw, 3rem);
  transition: background-color 0.4s var(--ease-out),
              box-shadow 0.4s var(--ease-out);
}

#navbar.nav--scrolled {
  background-color: rgba(13, 13, 13, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Light nav state for #who (off-white section) */
#navbar.nav--light {
  background-color: rgba(245, 245, 245, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Disable backdrop-filter while mobile menu is open so iOS Safari
   doesn't treat #navbar as the containing block for the fixed overlay */
#navbar.nav--menu-open {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Logo swap */
.nav-logo {
  position: relative;
  display: flex;
  align-items: center;
  height: 1.75rem;
  flex-shrink: 0;
}

.nav-logo .logo-white,
.nav-logo .logo-dark {
  height: 100%;
  width: auto;
  transition: opacity 0.3s ease;
}

.nav-logo .logo-dark {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

#navbar.nav--light .logo-white { opacity: 0; }
#navbar.nav--light .logo-dark  { opacity: 1; }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.04em;
  color: var(--white);
  transition: color var(--tr);
}

.nav-links a:hover,
.nav-links a:focus-visible { color: var(--red); }

#navbar.nav--light .nav-links a { color: var(--black); }
#navbar.nav--light .nav-links a:hover { color: var(--red); }

.nav-cta {
  background-color: var(--red);
  color: var(--white) !important;
  padding: 0.45rem 1.1rem;
  border-radius: 3px;
  transition: box-shadow var(--tr), transform var(--tr) !important;
}

.nav-cta:hover {
  box-shadow: 0 4px 18px var(--red-glow);
  transform: translateY(-1px);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.4rem;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ═══════════════════════════════════════════════════════════
   SECTION 1 — HERO
   ========================================================= */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 0;
}

.hero-inner {
  width: var(--container);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--gap);
  min-height: 100svh;
  padding-block: 7rem 4rem;
}

/* GSAP sets these initial states at runtime — no FOUC */
.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 1.4rem;
}

/* Stacked Reduce / Elevate rows */
.hero-verb-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  margin-bottom: 1.8rem;
}

.hero-verb-row {
  display: flex;
  align-items: baseline;
  font-size: clamp(2rem, 4.4vw, 3.8rem);
  font-weight: var(--fw-black);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-verb {
  color: var(--white);
  white-space: nowrap;
}

.hero-verb-sep {
  color: var(--grey);
  font-weight: var(--fw-light);
}

/* Cycling word — crossfades between values */
.hero-cycle {
  color: var(--red);
  position: relative;
  display: inline-block;
  /* Reserve minimum width so row doesn't jump during transitions */
  min-width: 6ch;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-cycle.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.hero-cycle.is-entering {
  opacity: 0;
  transform: translateY(10px);
}

.hero-headline {
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  font-weight: var(--fw-black);
  line-height: 1.03;
  letter-spacing: -0.03em;
  margin-bottom: 1.6rem;
}

/* Clip + inner wrapper for word-slide-up effect */
.word-clip {
  display: block;
  overflow: hidden;
  padding-bottom: 0.05em; /* prevents clipping descenders */
}

.word-clip--red .word-inner { color: var(--red); }

.word-inner {
  display: block;
  /* GSAP will set transform: translateY(110%) initially and animate to 0 */
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: var(--fw-light);
  color: var(--text-muted);
  max-width: 46ch;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

#spaceman-hero {
  width: clamp(260px, 38vw, 500px);
  /* Transparent bg + white figure — no blend mode needed,
     white reads clearly against the dark hero section */
  filter: drop-shadow(0 0 80px rgba(232, 0, 13, 0.18));
  will-change: transform;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hero-scroll-hint span {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-line {
  width: 1px;
  height: 38px;
  background: linear-gradient(to bottom, var(--grey), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.7); }
  50%       { opacity: 0.9;  transform: scaleY(1);   }
}


/* ═══════════════════════════════════════════════════════════
   SECTION 2 — THE PROBLEM
   ========================================================= */
#problem {
  background-color: var(--black-mid);
  border-top: 1px solid var(--border);
}

.problem-header {
  margin-bottom: 3rem;
}

.problem-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.problem-item {
  padding: 2.25rem 3rem 2.25rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.25rem;
  align-items: start;
}

.problem-item:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.problem-item:nth-child(even) {
  padding-left: 3rem;
  padding-right: 0;
}

.problem-item:nth-last-child(-n+2) {
  border-bottom: none;
  padding-bottom: 0;
}

.problem-number {
  font-size: 0.7rem;
  font-weight: var(--fw-black);
  letter-spacing: 0.08em;
  color: var(--red);
  padding-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.problem-item p {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--text-muted);
  line-height: 1.7;
}


/* ═══════════════════════════════════════════════════════════
   SECTION 3 — THE SYSTEM
   ========================================================= */
#system {
  border-top: 1px solid var(--border);
}

/* Section header sits above the grid — reduce its bottom margin
   so the gap to the grid is tight and intentional */
#system .section-headline {
  margin-bottom: 1.5rem;
}

.system-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: stretch;
}

/* ── 3D Model Viewer ───────────────────────────────────── */
.system-figure {
  margin-top: 0;
  /* Explicit height container — aspect-ratio doesn't reliably
     control <model-viewer> as a web component */
  width: 100%;
  height: clamp(500px, 65vw, 700px);
  position: relative;
}

#vactor-model {
  width: 100%;
  height: 100%;
  background-color: var(--black-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: block;
  /* Subtle red rim-light matches brand */
  filter: drop-shadow(0 20px 48px rgba(232, 0, 13, 0.14));
}

/* Custom loading progress bar */
.model-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  overflow: hidden;
  border-radius: 0 0 8px 8px;
  transition: opacity 0.4s ease;
}

.model-progress-fill {
  height: 100%;
  background: var(--red);
  width: 0%;
  transition: width 0.3s ease;
}

/* AR launch button (appears on supported mobile devices only) */
.model-ar-btn {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background-color: var(--red);
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.04em;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--font);
  transition: box-shadow var(--tr), transform var(--tr);
}

.model-ar-btn:hover {
  box-shadow: 0 4px 16px var(--red-glow);
  transform: translateY(-1px);
}

/* Product photo strip below the 3D viewer */
.product-photo-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.product-photo {
  background-color: var(--black-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.product-photo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 200px;
  transition: transform 0.3s var(--ease-out);
}

/* Clickable lightbox trigger button inside each photo */
.lightbox-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: zoom-in;
}

.lightbox-trigger:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}

.photo-zoom-hint {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  font-size: 1rem;
  color: var(--red);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  line-height: 1;
}

.lightbox-trigger:hover .photo-zoom-hint,
.lightbox-trigger:focus-visible .photo-zoom-hint { opacity: 1; }

.lightbox-trigger:hover img { transform: scale(1.04); }

/* ── Lightbox Overlay ────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox-figure {
  position: relative;
  max-width: min(90vw, 1000px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  cursor: default;
}

#lightboxImg {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-size: 1.1rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--tr), border-color var(--tr);
  z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background-color: var(--red);
  border-color: var(--red);
  outline: none;
}
.system-annotations-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 0;
  justify-content: space-between;
}

.annotation-card {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  background-color: var(--black-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color var(--tr), box-shadow var(--tr);
}

.annotation-card:hover {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), 0 4px 24px rgba(232, 0, 13, 0.12);
}

.annotation-num {
  font-size: 1.4rem;
  color: var(--red);
  line-height: 1;
  padding-top: 0.05rem;
}

.annotation-card h3 {
  font-size: 0.95rem;
  font-weight: var(--fw-bold);
  margin-bottom: 0.4rem;
}

.annotation-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Survivability spec card */
.annotation-card--specs {
  border-color: rgba(232, 0, 13, 0.3);
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

.spec-list li {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.spec-badge {
  flex-shrink: 0;
  display: inline-block;
  background-color: var(--red);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: var(--fw-black);
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  text-transform: uppercase;
}
#how-it-works {
  border-top: 1px solid var(--border);
}

.steps-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 0.5rem;
}

.step {
  padding: 2.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.step:nth-child(even)        { border-right: none; }
.step:nth-last-child(-n+2)   { border-bottom: none; }

.step-number {
  display: block;
  font-size: 2.75rem;
  font-weight: var(--fw-black);
  color: var(--red);
  opacity: 0.22;
  line-height: 1;
  margin-bottom: 1rem;
  font-variant-numeric: tabular-nums;
}

.step-content h3 {
  font-size: 1.15rem;
  font-weight: var(--fw-bold);
  margin-bottom: 0.5rem;
}

.step-content p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.72;
}


/* ═══════════════════════════════════════════════════════════
   SECTION 5 — WHO IT'S FOR
   ========================================================= */
#who {
  border-top: 4px solid var(--black);
}

.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: 0.5rem;
}

.who-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.09);
  transition: box-shadow var(--tr), transform var(--tr);
}

.who-card:hover {
  box-shadow: 0 10px 44px rgba(0, 0, 0, 0.16);
  transform: translateY(-4px);
}

.who-card-img {
  aspect-ratio: 1;
  background-color: var(--off-white);
  border-bottom: 1px solid var(--grey-light);
  overflow: hidden;
  position: relative;
}

.card-mark {
  width: 36px;
  opacity: 0.18;
}

/* Slideshow: all images stacked, only .is-active one visible */
.who-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.who-card-img img.is-active {
  opacity: 1;
}

.who-card-body { padding: 1.4rem 1.5rem 1.6rem; }

.who-card-body h3 {
  font-size: 1rem;
  font-weight: var(--fw-bold);
  color: var(--black);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.who-card-body p {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.68;
}


/* ═══════════════════════════════════════════════════════════
   SECTION 6 — ABOUT PMI
   ========================================================= */
#about {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}

.about-body {
  font-size: clamp(0.97rem, 1.5vw, 1.08rem);
  color: var(--text-muted);
  line-height: 1.78;
  max-width: 50ch;
  margin-bottom: 1.25rem;
}

.about-body:last-of-type { margin-bottom: 2rem; }

.about-cta { margin-top: 0.5rem; }

.about-visual {
  display: flex;
  justify-content: center;
}

.about-spaceman {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(0 30px 60px rgba(232, 0, 13, 0.14));
  will-change: transform;
}


/* ═══════════════════════════════════════════════════════════
   SECTION 7 — CONTACT / CTA
   ========================================================= */
#contact {
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.contact-mark {
  width: 2.75rem;
  margin-bottom: 1.25rem;
  opacity: 0.18;
}

.contact-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.72;
  max-width: 34ch;
}

/* Form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group--full { margin-bottom: 1.25rem; }

.form-group label {
  font-size: 0.76rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.required { color: var(--red); }

.form-group input,
.form-group textarea {
  background-color: var(--black-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  color: var(--white);
  font-size: 0.93rem;
  outline: none;
  resize: vertical;
  transition: border-color var(--tr), box-shadow var(--tr);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232, 0, 13, 0.14);
}

.btn--submit { margin-top: 0.25rem; }


/* ═══════════════════════════════════════════════════════════
   FOOTER
   ========================================================= */
#footer {
  background-color: #080808;
  border-top: 1px solid var(--border);
  padding-block: 2.25rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-logo {
  height: 1.4rem;
  width: auto;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  transition: color var(--tr);
}

.footer-links a:hover { color: var(--white); }


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  (≤ 960px)
   ========================================================= */
@media (max-width: 960px) {

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 8rem;
    align-items: start;
    min-height: unset;
    padding-bottom: 5rem;
  }

  .hero-visual {
    order: -1;
  }

  #spaceman-hero {
    width: clamp(180px, 55vw, 300px);
  }

  .hero-sub { margin-inline: auto; }

  .hero-actions { justify-content: center; }

  .problem-list,
  .steps-list {
    grid-template-columns: 1fr;
  }

  .problem-item,
  .problem-item:nth-child(odd),
  .problem-item:nth-child(even) {
    padding-inline: 0;
    border-right: none;
  }

  .problem-item:nth-last-child(-n+2),
  .problem-item {
    border-bottom: 1px solid var(--border);
    padding-bottom: 2rem;
  }

  .problem-item:last-child { border-bottom: none; }

  .step { border-right: none; }

  .step:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }

  .step:last-child { border-bottom: none; }

  .system-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .system-figure {
    height: clamp(400px, 80vw, 560px);
  }

  .system-annotations-col { padding-top: 0; }

  .who-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-visual { display: none; }
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE  (≤ 600px)
   ========================================================= */
@media (max-width: 600px) {

  :root { --section-pad: clamp(3.5rem, 9vw, 5rem); }

  .who-grid { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Mobile navigation overlay */
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(13, 13, 13, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 999;
  }

  .nav-links.is-open { display: flex; }

  .nav-links a {
    font-size: 1.4rem;
    letter-spacing: 0.06em;
  }

  .nav-cta {
    padding: 0.65rem 1.75rem;
    border-radius: 3px;
  }

  .nav-toggle { display: flex; }
}


/* =============================================================
   REDACTED SECTION — teaser static/interference for #system
   Title stays visible; only the system-grid body is obscured.
   =========================================================== */

.system-redact-body {
  position: relative;
  overflow: hidden;
}

/* Blur + near-black the actual content so shapes bleed through */
.system-redact-body > .container {
  filter: blur(10px) brightness(0.08) saturate(0);
  pointer-events: none;
  user-select: none;
}

/* Canvas is drawn by JS with per-pixel random noise */
.static-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 5;
  pointer-events: none;
}

/* Scanline grid on top of the canvas */
.system-redact-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent      0px,
    transparent      3px,
    rgba(0,0,0,0.30) 3px,
    rgba(0,0,0,0.30) 4px
  );
  z-index: 6;
  pointer-events: none;
}


/* Countdown overlay — sits above canvas (z:5) and scanlines (z:6) */
.system-countdown {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  pointer-events: none;
}

.system-countdown-label {
  font-size: 0.72rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
}

.system-countdown-digits {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.system-countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.system-countdown-num {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: var(--fw-black);
  font-variant-numeric: tabular-nums;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 0 24px rgba(0,0,0,0.9), 0 0 48px rgba(0,0,0,0.7);
}

.system-countdown-name {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
}

.system-countdown-sep {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: var(--fw-black);
  color: var(--grey);
  line-height: 1;
  align-self: flex-start;
  padding-top: 0.05em;
}

.system-countdown-sub {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
}

/* =============================================================
   THREE-SECOND SWAP — scoped styles (#three-second-swap)
   All selectors are prefixed with .swap- to avoid conflicts.
   =========================================================== */

#three-second-swap {
  background-color: var(--black);
  padding: var(--section-pad) 0;
  overflow: hidden;
}

.swap-container {
  width: min(90vw, 680px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 4vw, 3rem);
}

/* Header */
.swap-header {
  text-align: center;
}
.swap-eyebrow {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}
.swap-headline {
  font-family: var(--font);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: var(--fw-black);
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.swap-subhead {
  font-family: var(--font);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: var(--fw-light);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Progress rail */
.swap-rail {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.swap-rail__track {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.swap-rail__fill {
  height: 100%;
  width: 0%;
  background: var(--red);
  border-radius: 2px;
  transition: width 0.4s var(--ease-out);
}
.swap-rail__count {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.1em;
  color: var(--grey);
  white-space: nowrap;
  min-width: 3.5ch;
  text-align: right;
}

/* Stage */
.swap-stage {
  width: 100%;
  position: relative;
  min-height: 380px;
  display: grid;
}

/* Cards */
.swap-card {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  opacity: 0;
  transform: translateX(48px);
  pointer-events: none;
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.4s var(--ease-out);
  will-change: opacity, transform;
}
.swap-card.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.swap-card.is-leaving {
  opacity: 0;
  transform: translateX(-48px);
  pointer-events: none;
}

/* Icon area (kept for backwards compat, not used in new cards) */
.swap-icon-wrap {
  width: clamp(100px, 20vw, 140px);
  height: clamp(100px, 20vw, 140px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG — larger in new drag cards */
.swap-svg {
  width: min(82%, 260px);
  height: auto;
  aspect-ratio: 1;
  overflow: visible;
  touch-action: none;
  user-select: none;
}

/* Hint text above each SVG */
.swap-hint {
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  opacity: 0.65;
}

/* SVG colour tokens — static/background elements */
.si-base   { fill: none; stroke: #444; stroke-width: 2; }
.si-accent { fill: none; stroke: var(--red); stroke-width: 2; }
.si-detail { stroke: var(--grey); }
.si-white  { stroke: #555; fill: none; }
.si-border { stroke: #333; fill: none; }
.si-old    { fill: none; stroke: #333; stroke-width: 2; stroke-dasharray: 5 3; }
.si-socket { fill: #222; stroke: #444; stroke-width: 1.5; }
.si-black  { fill: #111; stroke: none; }
.si-snap   { fill: var(--red); stroke: none; opacity: 0.7; }
.si-paste  { fill: var(--white); opacity: 0.85; stroke: none; }
.si-liquid { fill: rgba(232,0,13,0.15); stroke: none; }
.si-sip    { stroke: var(--grey); }
.si-click  { stroke: var(--red); fill: none; opacity: 0.6; }
.si-zip-done { stroke: #333; fill: none; stroke-width: 3; }
.si-sock-rib { stroke: rgba(232,0,13,0.4); stroke-width: 1.5; }

/* Emoji background objects in drag cards */
.si-emoji {
  font-size: 64px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  pointer-events: none;
  user-select: none;
}

/* Small label under draggable icon */
.si-label {
  font-family: var(--font);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: var(--grey);
  pointer-events: none;
  user-select: none;
}

/* Draggable group */
.si-drag {
  cursor: grab;
  will-change: transform;
  transition: filter 0.2s ease;
}
.si-drag.si-drag--dragging {
  cursor: grabbing;
  filter: drop-shadow(0 0 10px rgba(232, 0, 13, 0.45));
}
.si-drag.si-drag--snapped {
  cursor: default;
  filter: drop-shadow(0 0 14px rgba(232, 0, 13, 0.7));
}

/* Target ring — pulsing indicator of where to drag */
.si-target-ring {
  fill: none;
  stroke: rgba(232, 0, 13, 0.28);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: swapTargetPulse 1.8s ease-in-out infinite;
  transition: opacity 0.3s ease;
}
.swap-card--complete .si-target-ring {
  opacity: 0;
  animation: none;
}

@keyframes swapTargetPulse {
  0%, 100% { transform: scale(1);   opacity: 0.55; }
  50%       { transform: scale(1.5); opacity: 0.1;  }
}

/* Completion state */
.swap-card--complete {
  border-color: rgba(232, 0, 13, 0.25);
}

/* Card label */
.swap-card__label {
  font-family: var(--font);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: var(--fw-semi);
  color: var(--white);
  letter-spacing: -0.01em;
  text-align: center;
}

/* Button (kept for final card reset button) */
.swap-card__btn {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  background: transparent;
  border: 1px solid var(--red);
  border-radius: 4px;
  padding: 0.65rem 1.75rem;
  cursor: pointer;
  transition: background var(--tr), color var(--tr);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.swap-card__btn:hover,
.swap-card__btn:focus-visible {
  background: var(--red);
  color: var(--white);
  outline: none;
}
.swap-card__btn--reset {
  color: var(--grey);
  border-color: var(--border);
}
.swap-card__btn--reset:hover,
.swap-card__btn--reset:focus-visible {
  background: var(--border);
  color: var(--white);
}

/* Final card */
.swap-card--final {
  border-color: var(--border);
  background: var(--black);
}
.swap-final-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}
.swap-final-overline {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}
.swap-final-headline {
  font-family: var(--font);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: var(--fw-black);
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1;
}
.swap-final-body {
  font-family: var(--font);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: var(--fw-light);
  color: var(--text-muted);
  line-height: 1.7;
}

/* Mobile */
@media (max-width: 600px) {
  .swap-stage { min-height: 340px; }
  .swap-card { gap: 1rem; }
  .swap-svg  { width: min(90%, 220px); }
}
