/* ============================================================
   KII Defense Landing Page — styles.css   v2
   Blue-heavy palette (less teal), Inter font, header + 2-col hero
   ============================================================ */

:root {
  /* Blue-heavy palette */
  --navy:        #1F3864;
  --navy-deep:   #14274A;
  --navy-soft:   #2E5496;
  --blue:        #2563EB;   /* primary accent — clear blue, no green tint */
  --blue-bright: #3B82F6;
  --blue-deep:   #1D4ED8;
  --sky:         #60A5FA;
  --charcoal:    #1F2937;
  --grey-800:    #2D3748;
  --grey-700:    #4A5568;
  --grey-500:    #718096;
  --grey-300:    #CBD5E0;
  --grey-200:    #E2E8F0;
  --grey-100:    #EDF2F7;
  --grey-50:     #F7FAFC;
  --white:       #FFFFFF;

  /* Spacing tokens */
  --header-h: 80px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--charcoal);
  line-height: 1.6;
  font-size: 15.5px;
  font-weight: 400;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--header-h);
  letter-spacing: -0.005em;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  color: var(--navy);
  font-weight: 600;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(1.65rem, 3.4vw, 2.45rem);
  line-height: 1.18;
  margin-bottom: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  line-height: 1.22;
  margin-bottom: 16px;
  font-weight: 600;
}

h3 {
  font-size: 1.05rem;
  line-height: 1.4;
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

p { color: var(--grey-700); margin-bottom: 12px; }
p.lead { font-size: 1.1rem; color: var(--grey-700); max-width: 720px; margin-bottom: 36px; }

a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--blue-deep); }

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--grey-200);
  z-index: 100;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo img {
  display: block;
  height: 52px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  color: var(--grey-700);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
}

.main-nav a:hover {
  color: var(--navy);
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: all 0.2s ease;
  transform: translateX(-50%);
}

.main-nav a:hover::after { width: 100%; }

.btn-header {
  background: var(--blue);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 999px;       /* pill */
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-header:hover {
  background: var(--blue-deep);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary, .btn-secondary, .btn-secondary-dark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;       /* pill / capsule */
  font-family: inherit;
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.btn-primary:hover {
  background: var(--blue-deep);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--grey-300);
}
.btn-secondary:hover {
  background: var(--grey-50);
  border-color: var(--navy);
  color: var(--navy);
}

.btn-secondary-dark {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-secondary-dark:hover {
  background: var(--navy);
  color: var(--white);
}

/* ============================================================
   HERO — two-column, light background
   ============================================================ */

.hero {
  background:
    radial-gradient(ellipse at 90% 50%, rgba(37, 99, 235, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #FAFBFD 0%, #F3F6FB 100%);
  padding: 80px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(31, 56, 100, 0.06) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {}

.trust-mini {
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  color: var(--blue);
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero h1 {
  color: var(--navy);
}
.hero h1 .accent {
  color: var(--blue);
}

.hero .sub {
  color: var(--grey-700);
  font-size: 1.15rem;
  max-width: 580px;
  margin-bottom: 36px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

/* Hero visual (right column) */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Wrap that exactly matches the image's bounding box — positioning anchor */
.device-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 700px;
  line-height: 0;   /* remove the inline gap below the image */
}

/* Collimated light beam from the LED — narrow, long, exits the page edge.
   Positioned relative to .device-wrap which exactly fits the image, so
   percentages here map directly to image coordinates.
   LED centroid (measured): x=70.1%, y=46.2% of the image. */
.device-wrap::after {
  content: '';
  position: absolute;
  top: calc(46% - 100px);   /* LED y minus half the beam height (200/2=100) */
  left: 70%;                /* LED x */
  width: 1200px;            /* long enough to clear the viewport — .hero clips overflow */
  height: 200px;            /* gentle thickness vs the long length */
  background:
    radial-gradient(
      ellipse 100% 50% at 0% 50%,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.40) 4%,
      rgba(255, 255, 255, 0.22) 14%,
      rgba(255, 255, 255, 0.12) 30%,
      rgba(255, 255, 255, 0.06) 55%,
      rgba(255, 255, 255, 0.02) 80%,
      transparent 100%
    );
  filter: blur(11px);
  pointer-events: none;
  mix-blend-mode: screen;
  transform-origin: 0% 50%;     /* rotate around the LED end */
  transform: rotate(7deg);      /* gentle downward slope */
  z-index: 1;
}

.device-img {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;                /* sits above the light spot pseudo-element */
  /* Transparent PNG — drop-shadow follows the device silhouette */
  filter:
    drop-shadow(0 22px 28px rgba(15, 23, 42, 0.25))
    drop-shadow(0 8px 12px rgba(15, 23, 42, 0.12));
}

/* ============================================================
   STAKES
   ============================================================ */

.stakes {
  background: var(--white);
  padding: 80px 0;
  border-bottom: 1px solid var(--grey-100);
}

.stakes h2 {
  text-align: center;
  margin-bottom: 48px;
}

.stake-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.stake {
  background: var(--grey-50);
  padding: 28px 24px;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-left: 3px solid var(--blue);
}

.stake-mark {
  color: var(--blue);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.stake p { margin: 0; color: var(--charcoal); font-weight: 500; }

/* ============================================================
   EMPATHY
   ============================================================ */

.empathy {
  background: var(--grey-50);
  padding: 96px 0;
  text-align: center;
}

.empathy .lead { margin: 0 auto 48px; }

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.badge {
  background: var(--white);
  border: 1px solid var(--grey-200);
  padding: 20px 32px;
  border-radius: 8px;
  text-align: left;
  min-width: 200px;
}

.badge strong {
  display: block;
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.025em;
}

.badge span {
  color: var(--grey-500);
  font-size: 0.92rem;
}

/* Clickable badge variant — used by "Proven Methodology" → #process */
a.badge-link {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
a.badge-link:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(37, 99, 235, 0.20),
    0 1px 3px rgba(15, 23, 42, 0.08);
}
a.badge-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ============================================================
   PLAN
   ============================================================ */

.plan {
  background: var(--white);
  padding: 96px 0;
}

.plan h2 { text-align: center; }
.plan .lead { text-align: center; margin: 0 auto 56px; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.step {
  background: var(--grey-50);
  padding: 36px 28px;
  border-radius: 8px;
  border: 1px solid var(--grey-100);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.step:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.10);
  border-color: var(--blue);
}

.step-num {
  font-family: inherit;          /* match the page font (DM Sans) */
  color: var(--blue);
  font-size: 1.35rem;            /* up from 1.05 — clearly reads as a step label */
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  display: inline-block;
}
/* Bright underline accent so the label reads as a step marker */
.step-num::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
  margin-top: 6px;
  opacity: 0.7;
}

.step h3 { font-size: 1.25rem; margin-bottom: 12px; }
.step p { margin: 0; }

/* ============================================================
   CAPABILITIES
   ============================================================ */

.capabilities {
  background: var(--grey-50);
  padding: 96px 0;
}

.capabilities h2 { text-align: center; }
.capabilities .lead { text-align: center; margin: 0 auto 56px; }

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cap-grid { grid-template-columns: 1fr; }
}

.cap {
  background: var(--white);
  padding: 32px 28px;
  border-radius: 8px;
  border: 1px solid var(--grey-200);
  transition: all 0.2s ease;
}

.cap:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.cap-icon {
  width: 36px;
  height: 36px;
  color: var(--blue);
  margin-bottom: 16px;
}

.cap h3 { color: var(--navy); }
.cap p { margin: 0; color: var(--grey-700); font-size: 0.95rem; }

/* Hub card — the visual centre of the 3×3 capabilities grid */
.cap-hub {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.02));
  border-color: rgba(37, 99, 235, 0.30);
}
.cap-hub:hover {
  /* no hover lift — the hub isn't a clickable card */
  border-color: rgba(37, 99, 235, 0.30);
  transform: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
}
.cap-hub-inner {
  position: relative;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
}
.cap-hub-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--blue);
  display: block;
}
.cap-hub-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38%;
  height: auto;
  object-fit: contain;
  display: block;
  /* Flatten the multi-colour logo to a single solid colour.
     On the dark theme this becomes white. Overridden in the light-theme block below. */
  filter: brightness(0) invert(1);
}

/* ============================================================
   WHY US
   ============================================================ */

.why-us {
  background: var(--white);
  padding: 96px 0;
}

.why-us h2 { text-align: center; margin-bottom: 56px; }

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.pillar {
  background: var(--grey-50);
  padding: 32px 28px;
  border-radius: 8px;
  border-top: 3px solid var(--blue);
}

.pillar h3 { color: var(--navy); font-size: 1.15rem; margin-bottom: 12px; }
.pillar p { margin: 0; font-size: 0.95rem; }

/* ============================================================
   PROCESS TIMELINE
   ============================================================ */

.process {
  background: var(--grey-50);
  padding: 96px 0;
}

.process h2 { text-align: center; }
.process .lead { text-align: center; margin: 0 auto 56px; }

.timeline {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  justify-content: center;
}

.phase {
  flex: 1 1 200px;
  min-width: 200px;
  max-width: 240px;
  background: var(--white);
  padding: 28px 20px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--grey-200);
}

.phase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  margin-bottom: 12px;
}

.phase h3 { font-size: 1.05rem; margin-bottom: 8px; }
.phase p { font-size: 0.9rem; margin: 0; color: var(--grey-700); }

.phase-arrow {
  align-self: center;
  color: var(--grey-300);
  font-size: 1.5rem;
}

/* ============================================================
   MID-PAGE CTA BAND
   ============================================================ */

.cta-band {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
}

.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { color: var(--white); margin-bottom: 16px; }
.cta-band p { color: rgba(255,255,255,0.85); font-size: 1.1rem; margin-bottom: 32px; }

/* (Sub-assembly bridge is now a .feature-split — see Feature Split section) */

/* ============================================================
   SUCCESS VISION
   ============================================================ */

.success {
  background: var(--grey-50);
  padding: 96px 0;
  text-align: center;
}

.success h2 {
  color: var(--navy);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  max-width: 800px;
  margin: 0 auto 16px;
}

.success p { font-size: 1.15rem; color: var(--grey-700); }

/* ============================================================
   CONTACT FORM
   ============================================================ */

.contact {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 96px 0;
}

.contact h2 { color: var(--white); text-align: center; }
.contact .lead { color: rgba(255,255,255,0.85); text-align: center; margin: 0 auto 40px; max-width: 640px; }

.ask-form {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  padding: 40px;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.ask-form label {
  display: block;
  color: var(--charcoal);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.ask-form input, .ask-form textarea {
  width: 100%;
  padding: 13px 18px;
  margin-top: 6px;
  border: 1px solid var(--grey-300);
  border-radius: 999px;        /* pill, matching buttons */
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ask-form textarea {
  border-radius: 18px;          /* textarea kept rounded but not pill */
}

.ask-form input:focus, .ask-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ask-form textarea { resize: vertical; min-height: 120px; }

.ask-form button {
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  font-size: 1.05rem;
  justify-content: center;
}

.transitional {
  text-align: center;
  margin-top: 24px;
  color: rgba(255,255,255,0.75);
}
.transitional a {
  color: var(--sky);
  font-weight: 600;
}
.transitional a:hover { color: var(--white); }

/* Direct-contact block under the form — real KII contact info */
.contact-direct {
  max-width: 720px;
  margin: 28px auto 0;
  padding-top: 24px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.contact-direct .cd-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  margin-bottom: 10px;
}
.contact-direct .cd-row {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.6;
}
.contact-direct a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.20);
  transition: border-color 0.2s, color 0.2s;
}
.contact-direct a:hover {
  color: #FFFFFF;
  border-bottom-color: var(--sky);
}
.contact-direct .dot { margin: 0 10px; color: rgba(255, 255, 255, 0.30); }
@media (max-width: 600px) {
  .contact-direct .dot { display: block; visibility: hidden; height: 4px; }
}

/* Footer links — make them tappable */
.footer-contact a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transition: border-color 0.2s, color 0.2s;
}
.footer-contact a:hover {
  color: #FFFFFF;
  border-bottom-color: var(--sky);
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background: #0B1729;
  color: rgba(255,255,255,0.65);
  padding: 36px 0;
  font-size: 0.9rem;
}

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

.brand-mark img {
  height: 40px;
  width: auto;
  display: block;
  /* Footer is dark; invert lifts the dark "Kii" text to white. */
  filter: brightness(0) invert(1) opacity(0.85);
}

.footer-contact .dot { margin: 0 8px; color: rgba(255,255,255,0.35); }

.legal { color: rgba(255,255,255,0.45); font-size: 0.82rem; }

/* ============================================================
   STATS / BY THE NUMBERS
   ============================================================ */

.stats {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(37, 99, 235, 0.16) 0%, transparent 60%),
    linear-gradient(180deg, var(--navy-deep) 0%, #0B1729 100%);
  padding: 88px 0;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.stats::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
}

.stats .container { position: relative; z-index: 1; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat {
  text-align: center;
  padding: 12px 8px;
  border-left: 1px solid rgba(255,255,255,0.08);
}

.stat:first-child { border-left: 0; }

.stat-num {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.stat-num .num { color: var(--white); }
.stat-num .iso-text { color: var(--sky); font-size: 0.85em; }
.stat-plus { color: var(--sky); font-weight: 700; }

.stat-label {
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 220px;
  margin: 0 auto;
}

/* ============================================================
   SCROLL FADE-INS  (used by scripts.js)
   ============================================================ */

.js-fade-enabled .fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.js-fade-enabled .fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .js-fade-enabled .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================
   POLISH — refined typography & card depth
   ============================================================ */

/* Refined hero headline — narrower / lighter (matches Or's "Google Sans" preference) */
.hero h1 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.22;
}

.hero .sub {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--grey-700);
  max-width: 540px;
}

/* Section headers — narrower, lighter, DM-Sans-friendly */
section h2 {
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* Subtle decorative accent under centered section headers */
.empathy h2::after,
.plan h2::after,
.capabilities h2::after,
.why-us h2::after,
.process h2::after,
.subassembly h2::after,
.contact h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
  margin: 18px auto 0;
}

.stakes h2 { text-align: center; }
.stakes h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
  margin: 18px auto 0;
}

/* Refined card depth — softer, more "elevated" feel on hover */
.step, .cap, .pillar, .phase, .badge, .stake {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 1px 3px rgba(15, 23, 42, 0.06);
}

.step:hover, .cap:hover {
  box-shadow:
    0 4px 10px rgba(37, 99, 235, 0.08),
    0 12px 28px rgba(37, 99, 235, 0.14);
}

/* ============================================================
   FEATURE SPLIT  —  image / text two-column blocks
   ============================================================ */

.feature-split {
  background: linear-gradient(180deg, #FAFBFD 0%, #EDF2F9 100%);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.feature-split::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(31, 56, 100, 0.04) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
}

.feature-split + .feature-split {
  /* When two feature-splits would touch, give the second a slightly
     different tint so they read as distinct blocks */
  background: linear-gradient(180deg, #F4F7FC 0%, #E6ECF6 100%);
}

.fs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.fs-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.fs-image:hover img {
  transform: translateY(-3px);
}

/* Three image treatments — chosen per image in the HTML */

/* 1. .cutout — transparent PNG, drop-shadow follows the silhouette */
.fs-image img.cutout {
  filter:
    drop-shadow(0 22px 28px rgba(15, 23, 42, 0.22))
    drop-shadow(0 8px 12px rgba(15, 23, 42, 0.10));
}

/* 2. .photo-blend — JPG with a clean light background; multiply blends
   the white into the page bg so the rectangle edge disappears */
.fs-image img.photo-blend {
  mix-blend-mode: multiply;
  filter: drop-shadow(0 18px 30px rgba(15, 23, 42, 0.18));
  border-radius: 12px;
}

/* 3. .photo-card — JPG presented intentionally as a polished photo card
   (used for images where the background IS the content) */
.fs-image img.photo-card {
  border-radius: 14px;
  box-shadow:
    0 24px 40px -10px rgba(15, 23, 42, 0.20),
    0 8px 16px -8px rgba(15, 23, 42, 0.10);
}

.feature-split-reverse .fs-image { order: 2; }

.fs-text {
  padding: 8px 0;
}

.fs-text .kicker {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--blue);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.fs-text h2 {
  text-align: left;
  margin-bottom: 18px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.fs-text h2::after {
  margin: 16px 0 0;
}

.fs-text p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--grey-700);
  margin-bottom: 8px;
}

.fs-bullets {
  list-style: none;
  margin-top: 22px;
  padding: 0;
}

.fs-bullets li {
  padding: 10px 0 10px 32px;
  position: relative;
  color: var(--grey-700);
  font-size: 0.98rem;
  line-height: 1.5;
}

.fs-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22px;
  width: 18px;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
}

/* The subassembly section uses feature-split layout but its own bg tint */
.feature-split.subassembly {
  background: var(--white);
}

.feature-split.subassembly::before { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .device-img { max-width: 460px; margin: 0 auto; }
  .fs-grid { grid-template-columns: 1fr; gap: 36px; }
  .feature-split-reverse .fs-image { order: -1; }
  .feature-split { padding: 64px 0; }
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  body.nav-open .main-nav {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 16px 24px;
    border-bottom: 1px solid var(--grey-200);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  }
  body.nav-open .main-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--grey-100);
  }
  body.nav-open .main-nav a:last-of-type { border-bottom: 0; }
}

@media (max-width: 700px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stat { border-left: 0; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; }
  .stat:first-child, .stat:nth-child(2) { border-top: 0; padding-top: 12px; }
}

@media (max-width: 600px) {
  .hero { padding: 56px 0; }
  .logo img { height: 32px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn-primary, .hero-ctas .btn-secondary { justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .ask-form { padding: 28px 20px; }
  .timeline { flex-direction: column; }
  .phase-arrow { transform: rotate(90deg); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .btn-header { padding: 8px 16px; font-size: 0.85rem; }
  .header-inner { gap: 12px; }
}

/* ============================================================
   DARK THEME OVERLAY
   Applied on top of the existing light theme.
   The whole page sits over a fixed, blurred, dark-tinted backdrop.
   ============================================================ */

body {
  /*
    Atmospheric flow — defense-blue at top, transitions through teal,
    settles into Kii.am manufacturing-green at bottom. Six layered
    radial gradients distributed along the page's vertical axis.
   */
  background:
    /* Top: defense-blue atmosphere — restrained, subtle */
    radial-gradient(ellipse 100% 25% at 50% 3%,  rgba(28, 60, 110, 0.36), transparent 70%),
    radial-gradient(ellipse 70%  20% at 82% 14%, rgba(22, 55, 100, 0.22), transparent 65%),
    /* Upper-mid: blue→teal bridge */
    radial-gradient(ellipse 85%  22% at 22% 36%, rgba(25, 70, 90, 0.22), transparent 65%),
    /* Lower-mid: emerging tactical green */
    radial-gradient(ellipse 90%  26% at 75% 62%, rgba(42, 85, 60, 0.30), transparent 68%),
    /* Bottom: manufacturing heritage green */
    radial-gradient(ellipse 100% 30% at 50% 92%, rgba(35, 80, 55, 0.42), transparent 70%),
    radial-gradient(ellipse 65%  22% at 18% 82%, rgba(28, 65, 45, 0.26), transparent 65%),
    /* Smooth linear floor: cool-black at top → warm-black at bottom */
    linear-gradient(180deg,
      #04060C 0%,
      #050707 50%,
      #050905 100%
    );
  background-color: #040608;
  color: rgba(255, 255, 255, 0.84);
  position: relative;
}

/* Technical-sketch overlay — scrolls with the page (absolute, repeats down) */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('bg-sketch.svg');
  background-position: top center;
  background-size: 100% auto;     /* width = viewport, height keeps aspect ratio */
  background-repeat: repeat-y;    /* tile vertically as the page extends */
  opacity: 0.24;
  pointer-events: none;
  z-index: -1;
}

/* All previously-light sections become transparent so the body bg shows through */
.stakes, .stats, .empathy, .plan, .capabilities,
.why-us, .process, .success,
.feature-split, .feature-split + .feature-split,
.subassembly, .feature-split.subassembly {
  background: transparent !important;
}
.feature-split::before { display: none; }

/* Hero — drop its light gradient, let the dark backdrop show */
.hero {
  background: transparent !important;
}
.hero::before { display: none; }

/* Mid-CTA band — transparent so the body's atmospheric gradient flows through */
.cta-band {
  background: transparent !important;
}
.cta-band::before { display: none; }

/* Stats band — transparent for smooth scroll-colour flow */
.stats {
  background: transparent !important;
}

/* Contact section — transparent, atmosphere flows through */
.contact {
  background: transparent !important;
}

/* Footer — opaque deep black for grounded feel, fades in from above */
footer {
  background: linear-gradient(
    to bottom,
    rgba(2, 2, 4, 0) 0%,
    rgba(2, 2, 4, 0.85) 35%,
    rgba(2, 2, 4, 0.95) 100%
  ) !important;
}

/* Header — semi-transparent black glass */
.site-header {
  background: rgba(8, 8, 10, 0.82) !important;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
.site-header .logo img {
  filter: brightness(0) invert(1) opacity(0.95);
}
.main-nav a { color: rgba(255, 255, 255, 0.78) !important; }
.main-nav a:hover { color: #FFFFFF !important; }

/* Mobile menu */
@media (max-width: 900px) {
  body.nav-open .main-nav {
    background: rgba(6, 6, 8, 0.96) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  }
  body.nav-open .main-nav a {
    color: rgba(255, 255, 255, 0.85) !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
  }
}

/* ---------- Headings → white ---------- */
h1, h2, h3 { color: #FFFFFF !important; }
section h2,
.hero h1,
.fs-text h2,
.success h2 { color: #FFFFFF !important; }

/* ---------- Body text → light ---------- */
p, p.lead, .lead { color: rgba(255, 255, 255, 0.72) !important; }
.fs-text p { color: rgba(255, 255, 255, 0.78) !important; }
.hero .sub { color: rgba(255, 255, 255, 0.80) !important; }
.success p { color: rgba(255, 255, 255, 0.75) !important; }

/* ---------- Cards: frosted glass ---------- */
.step, .cap, .pillar, .phase, .badge, .stake {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.20) !important;
}

.step:hover, .cap:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(59, 130, 246, 0.40) !important;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.22) !important;
}

/* Card text colours */
.step h3, .cap h3, .pillar h3, .phase h3,
.badge strong { color: #FFFFFF !important; }
.step p, .cap p, .pillar p, .phase p,
.badge span { color: rgba(255, 255, 255, 0.72) !important; }
.stake p { color: rgba(255, 255, 255, 0.92) !important; }

/* Capability icons — switch to sky/blue for contrast */
.cap-icon { color: var(--blue) !important; }

/* Hub card on dark theme — slightly tinted to stand out as the centre */
.cap-hub {
  background: rgba(37, 99, 235, 0.10) !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
}
.cap-hub:hover {
  background: rgba(37, 99, 235, 0.10) !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.20) !important;
}
.cap-hub-svg { color: var(--blue) !important; }

/* Pillar top accent — keep blue */
.pillar { border-top: 3px solid var(--blue) !important; }

/* Stake left accent */
.stake { border-left: 3px solid var(--blue) !important; }

/* Stat numbers */
.stat-num .num { color: #FFFFFF !important; }
.stat-num .iso-text { color: var(--sky) !important; }
.stat-plus { color: var(--sky) !important; }
.stat-label { color: rgba(255, 255, 255, 0.65) !important; }

/* Section H2 underline bars stay blue */
.empathy h2::after, .plan h2::after, .capabilities h2::after,
.why-us h2::after, .process h2::after, .subassembly h2::after,
.contact h2::after, .stakes h2::after {
  background: var(--blue) !important;
}

/* Trust mini label — blue accent stays */
.trust-mini { color: var(--sky) !important; }

/* ---------- Hero device shadow — stronger on dark bg ---------- */
.device-img {
  filter:
    drop-shadow(0 28px 38px rgba(0, 0, 0, 0.55))
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.30)) !important;
}

/* ---------- Feature-split image treatments — adjusted for dark bg ---------- */

/* Cutouts (transparent PNGs) — stronger drop shadow against dark */
.fs-image img.cutout {
  filter:
    drop-shadow(0 24px 30px rgba(0, 0, 0, 0.55))
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.32)) !important;
}

/* photo-blend doesn't make sense on a dark backdrop — treat as a photo card */
.fs-image img.photo-blend {
  mix-blend-mode: normal !important;
  border-radius: 14px !important;
  filter: none !important;
  box-shadow:
    0 24px 40px -10px rgba(0, 0, 0, 0.50),
    0 8px 16px -8px rgba(0, 0, 0, 0.30) !important;
}

/* Photo cards — keep but darken shadow for dark bg */
.fs-image img.photo-card {
  box-shadow:
    0 24px 40px -10px rgba(0, 0, 0, 0.50),
    0 8px 16px -8px rgba(0, 0, 0, 0.30) !important;
}

/* ---------- Form card stays white for the CTA emphasis ---------- */
.ask-form {
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) !important;
}

/* ---------- Buttons — keep blue primary; secondary needs a tweak ---------- */
.btn-secondary {
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.20) !important;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.10) !important;
  border-color: rgba(255, 255, 255, 0.40) !important;
  color: #FFFFFF !important;
}
.btn-secondary-dark {
  background: transparent !important;
  color: rgba(255, 255, 255, 0.92) !important;
  border: 2px solid rgba(255, 255, 255, 0.30) !important;
}
.btn-secondary-dark:hover {
  background: rgba(255, 255, 255, 0.10) !important;
  border-color: #FFFFFF !important;
  color: #FFFFFF !important;
}

/* ============================================================
   ASK-A-QUESTION MODAL
   Opens when any "Ask a question" / sub-asm CTA is clicked.
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.28s ease, visibility 0s linear 0s;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 22, 0.65);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  cursor: pointer;
}

.modal-card {
  position: relative;
  background: #FFFFFF;
  border-radius: 20px;
  max-width: 580px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 40px 36px 32px;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--grey-100);
  color: var(--grey-700);
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover {
  background: var(--navy);
  color: #FFFFFF;
}

.modal-card h2 {
  color: var(--navy) !important;
  text-align: left;
  margin-bottom: 10px;
  font-size: 1.5rem;
}
.modal-card h2::after { display: none; }

.modal-sub {
  color: var(--grey-700) !important;
  font-size: 0.96rem;
  line-height: 1.55;
  margin-bottom: 22px;
}

.modal-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.modal-form label {
  display: block;
  color: var(--charcoal);
  font-weight: 500;
  font-size: 0.86rem;
  margin-bottom: 14px;
}

.modal-form input,
.modal-form textarea {
  width: 100%;
  padding: 11px 18px;
  margin-top: 6px;
  border: 1px solid var(--grey-300);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-form textarea {
  border-radius: 16px;
  resize: vertical;
  min-height: 110px;
}
.modal-form input:focus,
.modal-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.modal-form button {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  font-size: 1rem;
  justify-content: center;
}

.modal-direct {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--grey-200);
  text-align: center;
  font-size: 0.9rem;
  color: var(--grey-700);
}
.modal-direct a {
  color: var(--blue);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.25);
}
.modal-direct a:hover {
  color: var(--blue-deep);
  border-bottom-color: var(--blue);
}

/* Body scroll lock when modal is open */
body.modal-open { overflow: hidden; }

/* ============================================================
   GET-IN-TOUCH (compact section replacing the old long contact form)
   ============================================================ */

.get-in-touch {
  padding: 80px 0 96px;
  text-align: center;
  background: transparent !important;
}
.get-in-touch h2 {
  color: #FFFFFF !important;
  margin-bottom: 14px;
}
.get-in-touch .lead {
  color: rgba(255, 255, 255, 0.78) !important;
  max-width: 560px;
  margin: 0 auto 32px;
  text-align: center;
}
.git-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.get-in-touch .contact-direct {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.get-in-touch .cd-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.50);
  font-weight: 500;
  margin-bottom: 10px;
}
.get-in-touch .cd-row {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}
.get-in-touch .cd-row a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.20);
}
.get-in-touch .cd-row a:hover {
  color: #FFFFFF;
  border-bottom-color: var(--sky);
}
.get-in-touch .cd-row .dot { margin: 0 10px; color: rgba(255, 255, 255, 0.30); }
@media (max-width: 600px) {
  .get-in-touch .cd-row .dot { display: block; visibility: hidden; height: 4px; }
  .git-actions { flex-direction: column; }
  .git-actions .btn-primary, .git-actions .btn-secondary-dark { justify-content: center; }
}

/* Modal responsive */
@media (max-width: 600px) {
  .modal-card { padding: 32px 22px 24px; border-radius: 16px; }
  .modal-form .form-row { grid-template-columns: 1fr; }
}
