/* ============================================================
   Midnight Strategies SG — production stylesheet
   Brand foundation v1: light canvas, midnight signature.
   Lunar White ~70% of every surface · Royal Plum primary ·
   Midnight reserved for gravity moments · Champagne with restraint.
   ============================================================ */

/* ---------- Self-hosted webfonts ----------
   Was Fontshare + Google Fonts CDNs; self-hosted 2026-07-13 after the
   perf audit measured ~1s render-blocking TTFB on api.fontshare.com.
   Same-origin serving also removes a third-party cookie (PDPA-friendly). */
@font-face { font-family: "Clash Display"; src: url("../fonts/clash-display-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url("../fonts/clash-display-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url("../fonts/clash-display-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/space-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/space-mono-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --lunar: #f5f3f8;
  --paper: #ffffff;
  --midnight: #150b1d;
  --midnight-2: #1f1029;
  --plum: #3c0b57;
  --plum-deep: #2a0a3c;
  --orchid: #7a4e9e;
  --mist: #e5dcee;
  --champagne: #c8a968;
  --ink-soft: #5b4c66;
  --line: #e4dcec;
  --line-strong: #d3c7e0;
  --dark-line: rgba(229, 220, 238, 0.14);
  --dark-line-strong: rgba(122, 78, 158, 0.38);
  --error: #a23a3a;
  --radius: 14px;
  --display: "Clash Display", "Segoe UI", sans-serif;
  --body: "Hanken Grotesk", "Segoe UI", sans-serif;
  --mono: "Space Mono", Consolas, monospace;
  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  background: var(--lunar);
  color: var(--midnight);
  font-family: var(--body);
  font-size: 1.0625rem; /* brand body 17 */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
::selection { background: var(--plum); color: var(--lunar); }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; border-radius: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  background: var(--plum); color: var(--paper);
  padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

/* ---------- Layout ---------- */
.container { max-width: 1140px; margin-inline: auto; padding-inline: 24px; }
.container-narrow { max-width: 800px; }
.section { padding: clamp(72px, 9vw, 116px) 0; position: relative; }
.section-alt { background: rgba(229, 220, 238, 0.42); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Midnight moments — dark sections that earn the name */
.section-dark { background: var(--midnight); color: var(--lunar); }
.section-dark .section-lead { color: rgba(229, 220, 238, 0.78); }
.section-dark .eyebrow { color: var(--champagne); }

/* ---------- Type ---------- */
.eyebrow {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.75rem;        /* brand eyebrow 12 */
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orchid);
  margin-bottom: 18px;
}
.hero-h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.2vw, 4.6rem); /* brand H1 76/700 */
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero-h1 .eyebrow { margin-bottom: 22px; }
.hero-h1 em { font-style: normal; color: var(--plum); }
.section-h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.85rem, 3.4vw, 2.85rem); /* brand H2 46/600 */
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 26ch;
  text-wrap: balance;
}
.lead {
  margin-top: 24px;
  font-size: clamp(1.1rem, 1.6vw, 1.2rem); /* brand lead 18 */
  color: var(--ink-soft);
  max-width: 56ch;
}
.section-lead { margin-top: 18px; color: var(--ink-soft); max-width: 62ch; }
h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.005em; }

.tagline {
  margin-top: 26px;
  font-family: var(--mono); font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--orchid);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.btn-primary {
  background: var(--plum);
  color: var(--paper);
  box-shadow: 0 10px 26px -12px rgba(60, 11, 87, 0.55);
}
.btn-primary:hover { background: var(--plum-deep); transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(42, 10, 60, 0.6); }
.btn-ghost { border-color: var(--line-strong); color: var(--midnight); background: transparent; }
.btn-ghost:hover { border-color: var(--plum); color: var(--plum); }
.btn-sm { padding: 10px 18px; font-size: 0.88rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.cta-row.center { justify-content: center; }

/* Champagne — the one premium button, reserved for midnight moments */
.section-dark .btn-primary, .cta-band .btn-primary {
  background: linear-gradient(180deg, #dcc389, var(--champagne) 55%, #a9894c);
  color: var(--midnight);
  box-shadow: 0 12px 30px -12px rgba(200, 169, 104, 0.55);
}
.section-dark .btn-primary:hover, .cta-band .btn-primary:hover { background: linear-gradient(180deg, #e4cf9c, #d0b273 55%, #b2934f); }
.section-dark .btn-ghost, .cta-band .btn-ghost { border-color: rgba(229, 220, 238, 0.38); color: var(--lunar); }
.section-dark .btn-ghost:hover, .cta-band .btn-ghost:hover { border-color: var(--champagne); color: var(--champagne); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: var(--paper); /* horizontal lockup carries light surfaces */
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 30px -22px rgba(21, 11, 29, 0.35); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-lockup { height: 40px; width: auto; }

.site-nav { display: flex; align-items: center; }
.nav-menu {
  display: flex; align-items: center; gap: 30px;
  list-style: none; padding: 0;
}
.nav-menu a:not(.btn) {
  font-size: 0.92rem; font-weight: 500; color: var(--ink-soft);
  text-decoration: none; transition: color 0.16s;
}
.nav-menu a:not(.btn):hover, .nav-menu a:not(.btn)[aria-current="page"] { color: var(--plum); }
.nav-cta { margin-left: 6px; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line-strong); border-radius: 8px;
  width: 48px; height: 48px; cursor: pointer; position: relative; /* ≥48px tap target */
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; position: absolute; left: 50%; translate: -50% 0;
  width: 18px; height: 2px; background: var(--plum); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}
.nav-toggle-bar { top: 22px; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: calc(var(--header-h) + clamp(56px, 9vw, 104px)) 0 0; overflow: hidden; }
.hero::before, .page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(60, 11, 87, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 11, 87, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 35% 0%, black 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 70% at 35% 0%, black 0%, transparent 72%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(ellipse 46% 38% at 80% 16%, rgba(122, 78, 158, 0.14), transparent 70%),
    radial-gradient(ellipse 40% 32% at 10% 4%, rgba(200, 169, 104, 0.1), transparent 70%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(40px, 5vw, 72px);
  /* Top-aligned: the console's vertical position is set by .hero-visual's margin-top
     (astronaut height + gap), keeping the astronaut's head level with the eyebrow.
     Centering would let the copy column drift when the visual column is taller. */
  align-items: start;
  padding-bottom: clamp(64px, 8vw, 96px);
}
.hero-grid > * { min-width: 0; }

.hero-visual {
  position: relative;
  /* Desktop 2-col: push the console down by the astronaut's height + gap so the
     astronaut (anchored just above the console) has its head level with the
     "New Launch Lead Generation — Singapore" eyebrow at the top of the copy column. */
  --astro-w: clamp(144px, 18vw, 228px);
  margin-top: calc(var(--astro-w) + 26px);
}
.hero-astro {
  position: absolute; z-index: 1;
  bottom: calc(100% + 26px);
  right: -31px;
  width: var(--astro-w);
  pointer-events: none;
  filter: drop-shadow(0 26px 40px rgba(21, 11, 29, 0.35));
  animation: drift 8s ease-in-out infinite alternate;
}

/* Console card — a midnight moment set on the light canvas */
.console {
  background: linear-gradient(180deg, var(--midnight-2), var(--midnight));
  border: 1px solid var(--dark-line-strong);
  border-radius: 16px;
  box-shadow:
    0 34px 70px -28px rgba(21, 11, 29, 0.5),
    inset 0 1px 0 rgba(229, 220, 238, 0.08);
  overflow: hidden;
}
.console-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--dark-line);
  font-family: var(--mono); font-weight: 700; font-size: 0.69rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(229, 220, 238, 0.6);
}
.console-title { flex: 1; }
.console-tag {
  color: var(--champagne); border: 1px solid rgba(200, 169, 104, 0.45); border-radius: 5px;
  padding: 1px 7px; font-size: 0.6rem;
}
.console-body { padding: 22px 20px 26px; font-family: var(--mono); font-size: 0.85rem; }
.console-body p { padding: 5px 0; color: var(--mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-prompt { color: var(--orchid); margin-right: 8px; }
.c-ok { color: var(--champagne); font-weight: 700; margin-left: 6px; }
.c-warn { color: var(--orchid); font-weight: 700; margin-left: 6px; }
.c-dim { color: rgba(229, 220, 238, 0.45); }
.caret {
  display: inline-block; width: 8px; height: 15px; margin-left: 7px; vertical-align: -2px;
  background: var(--champagne);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-live { background: var(--champagne); box-shadow: 0 0 0 0 rgba(200, 169, 104, 0.5); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(200, 169, 104, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(200, 169, 104, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 169, 104, 0); }
}

/* ---------- Trust strip (accreditations) — light surfaces only, never midnight ---------- */
.trust-strip {
  padding: clamp(40px, 5vw, 64px) 0;
  text-align: center;
}
.trust-strip .eyebrow { margin-bottom: 30px; }
.badge-row {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 28px 48px;
}
.badge-row img {
  height: 60px; width: auto;   /* uniform rendered height; files are 2x for retina */
  opacity: 0.85;
  transition: opacity 0.16s ease;
}
.badge-row li:hover img { opacity: 1; }
.trust-copy {
  margin: 28px auto 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 58ch;
}

/* ---------- Project marquee — midnight band fused under the hero ----------
   Project marks are silver-grey on transparent and render on midnight ONLY. */
.project-marquee {
  position: relative;
  background:
    radial-gradient(ellipse 52% 70% at 50% -25%, rgba(60, 11, 87, 0.6), transparent 72%),
    radial-gradient(ellipse 30% 45% at 88% 110%, rgba(122, 78, 158, 0.18), transparent 70%),
    var(--midnight);
  color: var(--lunar);
  padding: clamp(44px, 5.5vw, 64px) 0 clamp(32px, 4vw, 46px);
  overflow: hidden;
  text-align: center;
}
.project-marquee .eyebrow { color: var(--champagne); margin-bottom: clamp(28px, 4vw, 40px); }

.pm-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
}
.pm-track {
  --pm-gap: clamp(48px, 6vw, 84px);
  display: flex;
  width: max-content;
  animation: pm-scroll 60s linear infinite;
}
.pm-viewport:hover .pm-track { animation-play-state: paused; }
@keyframes pm-scroll { to { transform: translateX(-50%); } }

.pm-row {
  display: flex; align-items: center; flex: none;
  gap: var(--pm-gap);
  padding: 0 var(--pm-gap) 0 0;
  margin: 0; list-style: none;
}
/* Optical sizing: balance perceived weight, not pixel height.
   Wide wordmarks run shorter; stacked/tall marks run taller. */
.pm-row li { display: flex; align-items: center; --pm-h: 70px; }
.pm-row li.pm-wide { --pm-h: 64px; }
.pm-row li.pm-tall { --pm-h: 80px; }
.pm-row img {
  height: var(--pm-h); width: auto;
  opacity: 0.7;
  transition: opacity 0.16s ease;
}
.pm-row li:hover img { opacity: 1; }

.pm-disclaimer {
  margin-top: clamp(24px, 3vw, 34px);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  color: rgba(229, 220, 238, 0.42);
}

/* Reduced motion: static, centred, wrapped grid — no scroll, no edge mask */
@media (prefers-reduced-motion: reduce) {
  .pm-track { animation: none !important; width: auto; display: block; }
  .pm-row { flex-wrap: wrap; justify-content: center; row-gap: 26px; padding: 0; }
  .pm-row[aria-hidden="true"] { display: none; }
  .pm-viewport { -webkit-mask-image: none; mask-image: none; }
}

/* ---------- Orbit arc — signature section divider ---------- */
.orbit-divider { overflow: hidden; line-height: 0; padding: clamp(10px, 2vw, 22px) 0; }
.orbit-divider svg { width: min(920px, 92%); margin-inline: auto; height: auto; }
.orbit-arc { fill: none; stroke: var(--orchid); stroke-width: 1.4; opacity: 0.45; }
.orbit-craft { fill: var(--champagne); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(56px, 8vw, 92px)) 0 clamp(48px, 6vw, 72px);
  overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 46% 42% at 82% 10%, rgba(122, 78, 158, 0.12), transparent 70%);
}
.page-hero.notfound { min-height: 100vh; display: flex; align-items: center; padding-top: 0; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 20px; margin-top: 48px; }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: 0 14px 34px -24px rgba(60, 11, 87, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--orchid); box-shadow: 0 20px 40px -24px rgba(60, 11, 87, 0.32); }
.card-index { font-family: var(--mono); font-weight: 700; font-size: 0.72rem; color: var(--orchid); letter-spacing: 0.16em; margin-bottom: 14px; }
.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p:not(.card-index) { color: var(--ink-soft); font-size: 0.96rem; }

.pivot {
  margin-top: clamp(48px, 6vw, 72px);
  text-align: center;
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 500;
}
.pivot strong { color: var(--plum); font-weight: 700; }

/* ---------- Modules ---------- */
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.module {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: 0 14px 34px -24px rgba(60, 11, 87, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.module:hover { transform: translateY(-3px); border-color: var(--orchid); }
.module-code {
  font-family: var(--mono); font-weight: 700; font-size: 0.69rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--orchid); margin-bottom: 16px;
}
.module h3 { font-size: 1.22rem; margin-bottom: 10px; }
.module p:not(.module-code) { color: var(--ink-soft); font-size: 0.96rem; }
.module-link { text-decoration: none; border-style: dashed; border-color: var(--line-strong); background: transparent; box-shadow: none; }
.module-link:hover { background: var(--paper); border-color: var(--plum); }
.module-link h3 { color: var(--plum); }

/* ---------- Mission cards (live inside midnight moments) ---------- */
.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.mission {
  background: var(--midnight-2);
  border: 1px solid var(--dark-line-strong);
  border-radius: var(--radius);
  padding: 24px 24px 20px;
  display: flex; flex-direction: column;
}
.mission-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mission-id {
  font-family: var(--mono); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--champagne);
}
.mission-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-weight: 700; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(229, 220, 238, 0.55);
}
.mission-status.pending .dot { background: var(--orchid); animation: blink 1.6s steps(1) infinite; }
.mission-status.verified { color: var(--champagne); }
.mission-status.verified .dot { background: var(--champagne); }
.mission-segment { font-family: var(--display); font-size: 1.08rem; font-weight: 500; margin: 18px 0 16px; color: var(--lunar); }
.mission-metrics { display: grid; gap: 10px; border-top: 1px solid var(--dark-line); padding-top: 16px; }
.mission-metrics > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mission-metrics dt { font-size: 0.82rem; color: rgba(229, 220, 238, 0.6); }
.mission-metrics dd { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: var(--champagne); }
.mission-channels {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--dark-line);
  font-family: var(--mono); font-weight: 700; font-size: 0.62rem; letter-spacing: 0.2em; color: rgba(229, 220, 238, 0.5);
}
/* Champagne = key figures. Placeholder tokens hold the metric slots. */
.ph { color: var(--champagne); border-bottom: 1px dashed rgba(200, 169, 104, 0.55); font-family: var(--mono); font-size: 0.92em; }

.section-foot { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footnote { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-soft); }
.section-dark .footnote { color: rgba(229, 220, 238, 0.55); }

/* ---------- Fit ---------- */
.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }
.fit-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 14px 34px -24px rgba(60, 11, 87, 0.22);
  padding: 32px 30px;
}
.fit-panel h3 { display: flex; align-items: center; gap: 12px; font-size: 1.18rem; margin-bottom: 20px; }
.fit-mark {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-family: var(--mono); font-weight: 700;
}
.fit-yes .fit-mark { color: var(--plum); border: 1px solid var(--orchid); background: rgba(122, 78, 158, 0.1); }
.fit-no .fit-mark { color: var(--ink-soft); border: 1px solid var(--line-strong); background: var(--lunar); }
.fit-panel ul { list-style: none; padding: 0; display: grid; gap: 13px; }
.fit-panel li { color: var(--ink-soft); padding-left: 18px; position: relative; font-size: 0.97rem; }
.fit-panel li::before { content: "—"; position: absolute; left: 0; color: var(--orchid); }
.fit-no li::before { color: var(--line-strong); }

/* ---------- Steps ---------- */
.steps {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px;
}
.step {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 14px 34px -24px rgba(60, 11, 87, 0.22);
  padding: 26px 24px; position: relative;
}
.step-num {
  font-family: var(--mono); font-weight: 700; font-size: 0.75rem; color: var(--orchid);
  letter-spacing: 0.16em; margin-bottom: 42px;
}
.step-num::after {
  content: ""; position: absolute; top: 58px; left: 24px; right: 24px;
  height: 1px; background: linear-gradient(90deg, var(--orchid), transparent);
}
.step h3 { font-size: 1.15rem; margin-bottom: 9px; }
.step p:not(.step-num) { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 40px; border-top: 1px solid var(--line-strong); }
.faq-list details { border-bottom: 1px solid var(--line-strong); }
.faq-list summary {
  list-style: none; cursor: pointer;
  padding: 22px 44px 22px 2px;
  font-family: var(--display); font-weight: 500; font-size: 1.13rem;
  position: relative;
  transition: color 0.16s;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--plum); }
.faq-list summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; translate: 0 -50%;
  font-family: var(--mono); font-size: 1.3rem; color: var(--plum);
  transition: rotate 0.2s ease;
}
.faq-list details[open] summary::after { rotate: 45deg; }
.faq-list details p { padding: 0 2px 24px; color: var(--ink-soft); max-width: 64ch; }

/* ---------- CTA band — the closing midnight moment ---------- */
.cta-band {
  background: var(--midnight);
  color: var(--lunar);
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(229, 220, 238, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229, 220, 238, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 75% 90% at 50% 100%, black 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 90% at 50% 100%, black 0%, transparent 72%);
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 65% at 50% 115%, rgba(60, 11, 87, 0.75), transparent 74%),
    radial-gradient(ellipse 30% 40% at 85% 80%, rgba(122, 78, 158, 0.22), transparent 70%);
}
.cta-band .section-lead { color: rgba(229, 220, 238, 0.78); }
.cta-band .eyebrow { color: var(--champagne); }
.cta-inner { text-align: center; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
.cta-inner .section-h2 { max-width: 24ch; }
.cta-inner .eyebrow { margin-bottom: 14px; }

@keyframes drift {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(-16px) rotate(2.5deg); }
}

/* ---------- System page ---------- */
.flow-section { padding-top: 0; padding-bottom: clamp(40px, 5vw, 64px); }
.flow-diagram { width: 100%; height: auto; }
.flow-node rect { fill: var(--paper); stroke: var(--line-strong); stroke-width: 1; }
.flow-node text {
  fill: var(--ink-soft); font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: 0.12em;
  text-anchor: middle;
}
.flow-node-end rect { fill: var(--plum); stroke: var(--plum); }
.flow-node-end text { fill: var(--lunar); }
.flow-line { stroke: var(--orchid); stroke-width: 1.6; }

.module-detail { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(36px, 5vw, 72px); align-items: start; }
.module-detail-head h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.7rem, 2.9vw, 2.3rem); letter-spacing: -0.01em; margin-bottom: 4px;
}
.module-detail-head .module-code { margin-bottom: 14px; }
.module-detail-head .section-lead { margin-top: 14px; }
.pull-quote {
  margin-top: 18px;
  border-left: 3px solid var(--champagne);
  padding-left: 22px;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.3vw, 1.7rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--plum);
}
.feature-list { list-style: none; padding: 0; display: grid; gap: 20px; }
.feature-list li { color: var(--ink-soft); padding-left: 26px; position: relative; }
.feature-list li::before {
  content: "▸"; position: absolute; left: 2px; top: 0;
  color: var(--orchid); font-family: var(--mono);
}
.feature-list strong { color: var(--midnight); font-weight: 600; }
.feature-list a { color: var(--plum); }
.io-strip {
  margin-top: 30px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper);
  padding: 13px 16px;
}
.io-label {
  color: var(--plum); border: 1px solid var(--orchid); border-radius: 6px;
  padding: 1px 8px; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.14em;
}

/* ---------- Results page ---------- */
.seal-stamp { width: 128px; height: 128px; flex-shrink: 0; }
.methodology-head { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.method-note { margin-top: 44px; max-width: 68ch; }
.method-note h3 { font-size: 1.3rem; margin-bottom: 12px; }
.method-note p:not(.footnote) { color: var(--ink-soft); }
.method-note .footnote { margin-top: 10px; display: block; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(36px, 5vw, 64px); align-items: start; }
.contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 50px -30px rgba(60, 11, 87, 0.3);
  padding: clamp(26px, 4vw, 40px);
  display: grid; gap: 22px;
}
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-field { display: grid; gap: 8px; }
.form-field label { font-size: 0.87rem; font-weight: 600; color: var(--midnight); }
.req { color: var(--plum); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  background: var(--lunar);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--midnight);
  font: inherit; font-size: 0.95rem;
  padding: 12px 14px;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(91, 76, 102, 0.5); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--plum); background: var(--paper);
  box-shadow: 0 0 0 3px rgba(60, 11, 87, 0.14);
}
.form-field select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%233c0b57' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px;
}
.form-field textarea { resize: vertical; min-height: 96px; }
.checkbox { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.checkbox input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--plum); flex-shrink: 0; }
.checkbox span { font-size: 0.85rem; color: var(--ink-soft); font-weight: 400; }
.checkbox a { color: var(--plum); }
.form-actions { display: grid; gap: 14px; }
.form-status { font-family: var(--mono); font-size: 0.8rem; min-height: 1.2em; }
.form-status.ok { color: var(--plum); font-weight: 700; }
.form-status.error { color: var(--error); }

.contact-aside { display: grid; gap: 20px; }
.aside-block {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 14px 34px -24px rgba(60, 11, 87, 0.22);
  padding: 26px 24px;
}
.aside-title { font-size: 1.12rem; margin-bottom: 16px; }
.aside-steps { padding-left: 0; list-style: none; counter-reset: astep; display: grid; gap: 14px; }
.aside-steps li { color: var(--ink-soft); font-size: 0.93rem; padding-left: 34px; position: relative; counter-increment: astep; }
.aside-steps li::before {
  content: "0" counter(astep);
  position: absolute; left: 0; top: 2px;
  font-family: var(--mono); font-weight: 700; font-size: 0.7rem; color: var(--orchid);
}
.aside-steps strong { color: var(--midnight); }
.aside-links { list-style: none; padding: 0; display: grid; gap: 10px; }
.aside-links a { color: var(--midnight); font-size: 0.94rem; text-decoration: none; border-bottom: 1px solid var(--orchid); padding-bottom: 1px; }
.aside-links a:hover { color: var(--plum); }
.aside-note { border-style: dashed; border-color: var(--line-strong); background: transparent; box-shadow: none; }
.aside-note p { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- Prose (privacy) ---------- */
.prose h2 { font-size: 1.35rem; margin: 44px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 22px; display: grid; gap: 8px; margin: 14px 0; }
.prose p + p { margin-top: 12px; }
.prose a { color: var(--plum); }

/* ---------- Footer — midnight signature ---------- */
.site-footer { background: var(--midnight); color: var(--lunar); padding: clamp(48px, 6vw, 72px) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 0.8fr; gap: 40px; padding-bottom: 48px; }
.footer-lockup { display: flex; align-items: center; gap: 14px; }
.footer-mark { width: 46px; height: 46px; }
.footer-word {
  font-family: var(--display); font-weight: 600; font-size: 1.06rem; letter-spacing: 0.01em;
  color: var(--lunar);
}
.footer-word b { color: var(--champagne); font-weight: 600; }
.footer-tagline {
  margin-top: 18px;
  font-family: var(--mono); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--champagne);
}
.footer-tag { margin-top: 10px; color: rgba(229, 220, 238, 0.65); font-size: 0.92rem; max-width: 34ch; }
.footer-col h3 {
  font-family: var(--mono); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(229, 220, 238, 0.55); margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: rgba(229, 220, 238, 0.75); text-decoration: none; font-size: 0.93rem; transition: color 0.16s; }
.footer-col a:hover { color: var(--lunar); }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  border-top: 1px solid var(--dark-line);
  padding-top: 22px; padding-bottom: 26px;
  font-size: 0.8rem; color: rgba(229, 220, 238, 0.55);
}
.footer-note { font-family: var(--mono); font-size: 0.7rem; }

/* ---------- WhatsApp floating button ---------- */
.wa-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #25d366; /* WhatsApp brand green — third-party mark, keep original colour */
  box-shadow: 0 10px 28px -8px rgba(21, 11, 29, 0.45);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.wa-fab svg { width: 30px; height: 30px; fill: #fff; }
.wa-fab:hover {
  background: #20bd5a;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 34px -8px rgba(21, 11, 29, 0.55);
}

/* ---------- Reveal on scroll (JS enhancement) ---------- */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; margin-top: 0; }
  /* Stacked layout: hero-copy sits directly above the console with little room to
     spare, so there's no safe gap to float above. Dock at the console's bottom-right
     corner instead, inside the guaranteed-blank strip below the last terminal line. */
  .hero-astro {
    top: auto;
    bottom: -86px;
    right: -12px;
    width: 88px;
  }
  .card-grid.three, .module-grid, .mission-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .module-detail { grid-template-columns: 1fr; gap: 30px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -28px rgba(21, 11, 29, 0.35);
    padding: 10px 24px 22px;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { border-bottom: 1px solid var(--line); }
  .nav-menu li:last-child { border-bottom: 0; }
  .nav-menu a:not(.btn) { display: block; padding: 15px 2px; font-size: 1rem; }
  .nav-cta { margin: 16px 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; padding: 14px 26px; font-size: 0.95rem; } /* full-size tap target in mobile menu */
}

@media (max-width: 640px) {
  .container { padding-inline: 18px; }
  .card-grid.three, .module-grid, .mission-grid, .fit-grid, .steps, .form-row.two { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .cta-row .btn { flex: 1; justify-content: center; min-width: 200px; }
  .badge-row { gap: 22px 32px; }
  .wa-fab { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .wa-fab svg { width: 28px; height: 28px; }
  .pm-row li { --pm-h: 47px; }
  .pm-row li.pm-wide { --pm-h: 44px; }
  .pm-row li.pm-tall { --pm-h: 52px; }
  .console-body { font-size: 0.78rem; }
  .brand-lockup { height: 30px; }
  .methodology-head { flex-direction: column; align-items: flex-start; }
  .seal-stamp { width: 104px; height: 104px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
