/* ==========================================================================
   Meliora Solutions — Design System
   Style: Swiss Modernism 2.0 + editorial serif ("The Ledger")
   Palette: Navy / White / Black, silver hairlines from the brand mark.
   Heritage accents (scarlet + gold) are used only in the heritage section.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand — navy ramp */
  --navy-950: #050f26;
  --navy-900: #071831;
  --navy-800: #0a1f44; /* primary */
  --navy-700: #102d5e;
  --navy-600: #17407f;
  --navy-500: #235ba8;
  --navy-400: #4a80cc;

  /* Neutrals */
  --ink: #0b0d10;
  --ink-700: #262b33;
  --slate-600: #4b5563;
  --slate-500: #6b7480;
  --slate-400: #98a1ad;
  --line: #e4e8ef;
  --line-strong: #cfd6e0;
  --paper: #f6f8fb;
  --white: #ffffff;

  /* Metallics from the brand mark */
  --silver: #a7b0ba;
  --platinum: #d8dee6;

  /* Heritage — Peru / USMC. Used sparingly. */
  --scarlet: #9e1b32;
  --gold: #b4924e;

  /* Semantic */
  --color-bg: var(--white);
  --color-surface: var(--paper);
  --color-text: var(--ink);
  --color-text-muted: var(--slate-600);
  --color-border: var(--line);
  --color-primary: var(--navy-800);
  --color-on-primary: var(--white);
  --color-ring: var(--navy-500);
  --color-danger: #b4232f;
  --color-success: #10693f;

  /* Type */
  --font-display: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --fs-display: clamp(2.75rem, 1.15rem + 6.5vw, 6rem);
  --fs-h1: clamp(2.25rem, 1.3rem + 3.9vw, 4rem);
  --fs-h2: clamp(1.875rem, 1.2rem + 2.7vw, 3rem);
  --fs-h3: clamp(1.375rem, 1.1rem + 1.15vw, 1.875rem);
  --fs-h4: clamp(1.125rem, 1.03rem + 0.4vw, 1.3125rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.42vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-label: 0.75rem;

  /* Space — 4 / 8 rhythm */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --space-9: 4rem;
  --space-10: 5rem;
  --space-11: 6rem;

  --section-y: clamp(4.5rem, 2.8rem + 7vw, 8.5rem);
  --gutter: clamp(1.25rem, 0.6rem + 2.6vw, 3rem);
  --container: 1240px;
  --container-narrow: 760px;

  /* Radii + elevation */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-1: 0 1px 2px rgba(10, 31, 68, 0.06),
    0 2px 8px rgba(10, 31, 68, 0.05);
  --shadow-2: 0 4px 12px rgba(10, 31, 68, 0.07),
    0 16px 40px rgba(10, 31, 68, 0.08);
  --shadow-3: 0 8px 24px rgba(10, 31, 68, 0.1),
    0 32px 72px rgba(10, 31, 68, 0.12);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 0.68, 0.28, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur: 260ms;
  --dur-slow: 420ms;

  /* Layers */
  --z-base: 0;
  --z-raised: 10;
  --z-sticky: 40;
  --z-header: 100;
  --z-overlay: 500;
  --z-modal: 900;
}

/* --------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Offset for the fixed header when jumping to an #anchor */
  scroll-padding-top: 6rem;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-feature-settings: "cv05" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

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

:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--navy-800);
  color: var(--white);
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.021em;
  text-wrap: balance;
  color: var(--color-text);
}

h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
  line-height: 1.18;
}
h4 {
  font-size: var(--fs-h4);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.011em;
  line-height: 1.35;
}

p {
  text-wrap: pretty;
}

.display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.028em;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 62ch;
}

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

/* Body copy sitting on a navy field */
.on-dark {
  color: #c3cddb;
}

.italic-accent {
  font-style: italic;
  color: var(--navy-600);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Small tracked label with a leading hairline */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-600);
  line-height: 1;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--tight {
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
}

.section-head {
  display: grid;
  gap: var(--space-5);
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.section-head--wide {
  max-width: none;
}

.stack {
  display: grid;
  gap: var(--space-5);
}

.grid {
  display: grid;
  gap: var(--space-6);
}

.split {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split--wide-left {
    grid-template-columns: 1.15fr 0.85fr;
  }
  .split--wide-right {
    grid-template-columns: 0.85fr 1.15fr;
  }
}

.hairline {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* Dark navy surfaces.
   Every navy-backed section re-points the semantic tokens, so generic
   elements (h2, .lead, .eyebrow, .muted) inherit legible colours instead of
   the light-mode defaults. The background itself is set per-surface below. */
.band-dark,
.hero,
.page-hero,
.cta-band {
  --color-bg: var(--navy-900);
  --color-text: var(--white);
  --color-text-muted: #b9c4d4;
  --color-border: rgba(255, 255, 255, 0.14);
  --color-ring: var(--navy-400);
  color: var(--white);
}

.band-dark h1,
.band-dark h2,
.band-dark h3,
.band-dark h4,
.hero h1,
.hero h2,
.hero h3,
.hero h4,
.page-hero h1,
.page-hero h2,
.page-hero h3,
.page-hero h4,
.cta-band h1,
.cta-band h2,
.cta-band h3,
.cta-band h4 {
  color: var(--white);
}

.band-dark .eyebrow,
.hero .eyebrow,
.page-hero .eyebrow,
.cta-band .eyebrow {
  color: var(--platinum);
}

.band-dark .lead,
.band-dark .muted,
.hero .lead,
.hero .muted,
.page-hero .lead,
.page-hero .muted,
.cta-band .lead,
.cta-band .muted {
  color: #c3cddb;
}

.band-dark {
  background: var(--navy-900);
}

.band-soft {
  background: var(--paper);
}

/* Repeating ledger hairlines used as a section texture */
.ledger-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    to right,
    currentColor 0 1px,
    transparent 1px 100%
  );
  background-size: calc(100% / 6) 100%;
  opacity: 0.07;
  color: var(--navy-800);
}

.band-dark .ledger-lines {
  color: var(--platinum);
  opacity: 0.09;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--navy-800);
  --btn-fg: var(--white);
  --btn-border: var(--navy-800);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 52px;
  padding: 0.875rem 1.75rem;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  touch-action: manipulation;
}

/* Fill sweep on hover */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-hover-bg, var(--navy-600));
  transform: scaleY(0);
  transform-origin: bottom center;
  transition: transform var(--dur) var(--ease-out);
}

.btn:hover::after,
.btn:focus-visible::after {
  transform: scaleY(1);
}

.btn:hover {
  box-shadow: var(--shadow-2);
}

.btn:active {
  transform: translateY(1px);
}

.btn__icon {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform var(--dur) var(--ease-out);
}

.btn:hover .btn__icon {
  transform: translateX(3px);
}

.btn--light {
  --btn-bg: var(--white);
  --btn-fg: var(--navy-900);
  --btn-border: var(--white);
  --btn-hover-bg: var(--platinum);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--navy-800);
  --btn-border: var(--line-strong);
  --btn-hover-bg: var(--paper);
}

/* Ghost buttons default to navy text, which disappears on a navy field —
   every dark surface has to re-point them. */
.band-dark .btn--ghost,
.hero .btn--ghost,
.page-hero .btn--ghost,
.cta-band .btn--ghost {
  --btn-fg: var(--white);
  --btn-border: rgba(255, 255, 255, 0.3);
  --btn-hover-bg: rgba(255, 255, 255, 0.12);
}

.btn--lg {
  min-height: 58px;
  padding: 1rem 2.25rem;
  font-size: var(--fs-body);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* Underlined text link with an animated rule */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--navy-700);
  /* Padded to a 44px touch target rather than the ~33px the text alone gives */
  min-height: 44px;
  padding-block: 0.6rem;
  position: relative;
}

.link-arrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.45rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}

.link-arrow:hover::after,
.link-arrow:focus-visible::after {
  transform: scaleX(1);
}

.link-arrow svg {
  width: 15px;
  height: 15px;
  transition: transform var(--dur) var(--ease-out);
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

.band-dark .link-arrow,
.hero .link-arrow,
.page-hero .link-arrow,
.cta-band .link-arrow {
  color: var(--white);
}

/* --------------------------------------------------------------------------
   6. Header / navigation
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: var(--z-modal);
  background: var(--navy-800);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: transform var(--dur) var(--ease-out);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  padding-block: var(--space-4);
  background: transparent;
  transition: background var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out), padding var(--dur) var(--ease-out);
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}

.header.is-stuck {
  padding-block: var(--space-3);
}

.header.is-stuck::before {
  opacity: 1;
}

.header.is-hidden {
  transform: translateY(-100%);
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
}

.brand__mark {
  width: 38px;
  height: 38px;
  flex: none;
  transition: transform var(--dur-slow) var(--ease-out);
}

.brand:hover .brand__mark {
  transform: rotate(-4deg) scale(1.05);
}

.brand__text {
  display: grid;
  line-height: 1.05;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

.brand__sub {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--slate-500);
}

/* Header on dark hero pages before scroll */
.header--over-dark:not(.is-stuck) .brand__name {
  color: var(--white);
}
.header--over-dark:not(.is-stuck) .brand__sub {
  color: rgba(255, 255, 255, 0.72);
}
.header--over-dark:not(.is-stuck) .nav__link {
  color: rgba(255, 255, 255, 0.86);
}
.header--over-dark:not(.is-stuck) .nav__link:hover,
.header--over-dark:not(.is-stuck) .nav__link[aria-current="page"] {
  color: var(--white);
}
.header--over-dark:not(.is-stuck) .lang-toggle {
  color: rgba(255, 255, 255, 0.86);
  border-color: rgba(255, 255, 255, 0.28);
}
.header--over-dark:not(.is-stuck) .lang-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}
.header--over-dark:not(.is-stuck) .nav-toggle__bar {
  background: var(--white);
}
.header--over-dark:not(.is-stuck) .header__cta {
  --btn-bg: var(--white);
  --btn-fg: var(--navy-900);
  --btn-border: var(--white);
  --btn-hover-bg: var(--platinum);
}

.nav {
  display: none;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.3rem + 1.6vw, 2.25rem);
}

.nav__link {
  position: relative;
  display: inline-block;
  padding-block: 0.5rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--slate-600);
  transition: color var(--dur) var(--ease-out);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--navy-700);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--navy-900);
}

.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header__cta {
  display: none;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--slate-600);
  background: transparent;
  transition: background var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}

.lang-toggle:hover {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--white);
}

.lang-toggle__globe {
  width: 15px;
  height: 15px;
  flex: none;
}

/* Mobile menu button */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  align-items: center;
  border-radius: var(--radius);
  flex: none;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--navy-900);
  color: var(--white);
  padding: 6.5rem var(--gutter) 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform var(--dur-slow) var(--ease-in-out),
    visibility 0s linear var(--dur-slow);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-nav.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform var(--dur-slow) var(--ease-in-out), visibility 0s;
}

.mobile-nav__list {
  display: grid;
  gap: 0;
}

.mobile-nav__item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.mobile-nav__link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1.05rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
  transition: color var(--dur) var(--ease-out),
    padding-left var(--dur) var(--ease-out);
}

.mobile-nav__link:hover,
.mobile-nav__link[aria-current="page"] {
  color: var(--platinum);
  padding-left: 0.5rem;
}

.mobile-nav__num {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--silver); /* navy-400 fell below 4.5:1 on the navy drawer */
  flex: none;
}

.mobile-nav__foot {
  display: grid;
  gap: var(--space-4);
  font-size: var(--fs-sm);
  color: #b9c4d4;
}

body.is-locked {
  overflow: hidden;
}

@media (min-width: 1024px) {
  .nav {
    display: block;
  }
  .header__cta {
    display: inline-flex;
  }
  .nav-toggle {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--navy-900);
  color: var(--white);
  padding-top: clamp(8rem, 5rem + 12vw, 11.5rem);
  padding-bottom: clamp(4rem, 2rem + 8vw, 7rem);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  /* Soft navy light source, drifts slowly */
  content: "";
  position: absolute;
  z-index: -2;
  width: min(120vw, 1200px);
  aspect-ratio: 1;
  top: -35%;
  right: -18%;
  background: radial-gradient(
    circle at center,
    rgba(35, 91, 168, 0.5) 0%,
    rgba(16, 45, 94, 0.28) 38%,
    transparent 68%
  );
  animation: drift 22s var(--ease-in-out) infinite alternate;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: auto -10% -40% -10%;
  height: 70%;
  background: radial-gradient(
    ellipse at 30% 100%,
    rgba(10, 31, 68, 0.85) 0%,
    transparent 65%
  );
  pointer-events: none;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-6%, 5%, 0) scale(1.12);
  }
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: clamp(48px, 8vw, 96px) clamp(48px, 8vw, 96px);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(
    ellipse 90% 70% at 50% 40%,
    #000 30%,
    transparent 78%
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 1rem + 5vw, 4.5rem);
}

@media (min-width: 1000px) {
  .hero__inner {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
  }
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 400;
  line-height: 0.99;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-block: var(--space-5) var(--space-5);
}

.hero__title em {
  font-style: italic;
  color: var(--platinum);
}

.hero__lead {
  font-size: var(--fs-lead);
  color: #c3cddb;
  max-width: 48ch;
  margin-bottom: var(--space-7);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem 0.45rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.05);
  transition: background var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}

.badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.34);
}

/* Peruvian flag, and a scarlet/gold service bar in place of the USMC seal
   (the official seal is a protected mark — see README). */
.badge__flag,
.badge__bar {
  width: 24px;
  height: 16px;
  flex: none;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.badge__flag {
  object-fit: cover;
}

.badge__bar {
  background: linear-gradient(
    to bottom,
    var(--scarlet) 0 50%,
    var(--gold) 50% 100%
  );
}

.badge__dot {
  width: 8px;
  height: 8px;
  flex: none;
  margin-left: 0.5rem;
  border-radius: 50%;
  background: var(--platinum);
}

/* Hero visual — a live "statement" card */
.hero__visual {
  position: relative;
}

.statement {
  position: relative;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 0.9rem + 1.4vw, 2rem);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px rgba(2, 8, 22, 0.45);
}

.statement__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.statement__title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--white);
}

.statement__period {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.statement__chart {
  width: 100%;
  height: auto;
  margin-block: var(--space-5) var(--space-4);
}

.statement__chart .chart-line {
  fill: none;
  stroke: var(--platinum);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.statement__chart .chart-area {
  fill: url(#meliora-area);
}

.statement__chart .chart-grid {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.statement__chart .chart-dot {
  fill: var(--white);
}

.statement__rows {
  display: grid;
  gap: 0;
}

.statement__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--fs-sm);
}

.statement__row span:first-child {
  color: rgba(255, 255, 255, 0.72);
}

.statement__row span:last-child {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--white);
}

.statement__row--total span:last-child {
  color: #7fe0b0;
}

/* --------------------------------------------------------------------------
   8. Client logo marquee
   -------------------------------------------------------------------------- */

.marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 7%,
    #000 93%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 7%,
    #000 93%,
    transparent
  );
}

.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: clamp(3rem, 1.5rem + 5vw, 6rem);
  animation: marquee 46s linear infinite;
}

/* Pause for mouse users on hover, and whenever anything inside takes focus */
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track,
.marquee.is-paused .marquee__track {
  animation-play-state: paused;
}

@keyframes marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.marquee__item {
  flex: none;
  display: grid;
  place-items: center;
  height: clamp(88px, 8vw, 112px);
}

/* px caps, not percentages: a percentage max-height against a flex track
   resolves to none and the logos render at full intrinsic size. */
.marquee__item img {
  width: auto;
  height: auto;
  max-height: clamp(52px, 4.8vw, 68px);
  max-width: clamp(180px, 18vw, 256px);
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.65;
  transition: filter var(--dur-slow) var(--ease-out),
    opacity var(--dur-slow) var(--ease-out);
}

.marquee__item:hover img {
  filter: grayscale(0);
  opacity: 1;
}

/* WCAG 2.2.2 still requires a real pause mechanism for motion that starts on
   its own. Hover covers mouse users; this control stays out of the visual
   design entirely until it is focused, the same pattern as the skip link. */
.marquee-control {
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  transform: translate(-50%, 150%);
  z-index: var(--z-raised);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--navy-800);
  border-radius: 999px;
  background: var(--navy-800);
  color: var(--white);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: transform var(--dur) var(--ease-out),
    opacity var(--dur) var(--ease-out);
}

/* :focus, not :focus-visible — the latter is heuristic and can leave this
   control invisible *and* pointer-events:none, i.e. impossible to operate.
   `.is-focused` is set by a focus listener as a second, non-pseudo path, so
   the control can never end up focused but unusable. */
.marquee-control:focus,
.marquee-control.is-focused {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
  outline: 3px solid var(--navy-400);
  outline-offset: 3px;
}

.marquee-control svg {
  width: 12px;
  height: 12px;
  flex: none;
}

.marquee-control .icon-play {
  display: none;
}

.marquee-control[aria-pressed="true"] .icon-play {
  display: block;
}

.marquee-control[aria-pressed="true"] .icon-pause {
  display: none;
}

/* --------------------------------------------------------------------------
   9. Service cards
   -------------------------------------------------------------------------- */

.services-grid {
  display: grid;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 700px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: clamp(1.75rem, 1.2rem + 1.6vw, 2.75rem);
  background: var(--white);
  isolation: isolate;
  transition: color var(--dur-slow) var(--ease-out);
  min-height: 100%;
}

.service::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--navy-900);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--dur-slow) var(--ease-out);
}

.service:hover::before,
.service:focus-within::before {
  transform: scaleY(1);
}

.service:hover,
.service:focus-within {
  color: var(--white);
}

.service:hover .service__title,
.service:focus-within .service__title {
  color: var(--white);
}

.service:hover .service__num,
.service:focus-within .service__num {
  color: var(--navy-400);
}

.service:hover .service__desc,
.service:focus-within .service__desc,
.service:hover .service__list li,
.service:focus-within .service__list li {
  color: #b9c4d4;
}

.service:hover .service__icon,
.service:focus-within .service__icon {
  color: var(--platinum);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

.service__num {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--slate-500); /* slate-400 fell below 4.5:1 on white */
  font-variant-numeric: tabular-nums;
  transition: color var(--dur-slow) var(--ease-out);
}

.service__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--navy-700);
  transition: color var(--dur-slow) var(--ease-out),
    border-color var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.service__icon svg {
  width: 24px;
  height: 24px;
}

.service__title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.02em;
  transition: color var(--dur-slow) var(--ease-out);
}

.service__desc {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  transition: color var(--dur-slow) var(--ease-out);
}

.service__list {
  display: grid;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: var(--space-4);
  font-size: var(--fs-sm);
}

.service__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--color-text-muted);
  transition: color var(--dur-slow) var(--ease-out);
}

.service__list li::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: 0.7em;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   10. Stats / results
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  gap: 1px;
  background: var(--color-border);
  border-block: 1px solid var(--color-border);
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat {
  position: relative;
  background: var(--color-bg);
  padding: clamp(1.75rem, 1.2rem + 1.8vw, 3rem) clamp(1.25rem, 1rem + 1vw, 2rem);
  display: grid;
  gap: var(--space-2);
  align-content: start;
  overflow: hidden;
  isolation: isolate;
}

.band-dark .stat {
  background: var(--navy-900);
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 1.6rem + 4vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  display: flex;
  align-items: baseline;
}

.stat__value .stat__unit {
  font-size: 0.45em;
  letter-spacing: 0;
  margin-left: 0.06em;
  color: var(--navy-400);
  transform-origin: left bottom;
}

/* Hairline that fills as the figure counts up */
.stat__meter {
  display: block;
  height: 2px;
  margin-block: var(--space-3) var(--space-1);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  overflow: hidden;
}

.stat__meter-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--navy-500),
    var(--platinum)
  );
  transform: scaleX(0);
  transform-origin: left center;
}

html:not(.js-motion) .stat__meter-fill {
  transform: scaleX(1);
}

.stat__label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  max-width: 30ch;
}

.stat__source {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   11. Media / figures
   -------------------------------------------------------------------------- */

.figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--navy-900);
}

.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.figure--tall {
  aspect-ratio: 4 / 5;
}

.figure--wide {
  aspect-ratio: 16 / 9;
}

.figure--square {
  aspect-ratio: 1;
}

.figure__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 15, 38, 0.72) 0%,
    rgba(5, 15, 38, 0.12) 45%,
    transparent 75%
  );
  pointer-events: none;
}

.figure__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(1.1rem, 0.9rem + 0.8vw, 1.75rem);
  color: var(--white);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.figure__caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin-bottom: 0.2rem;
}

/* Circular portrait for the founder in the heritage section. The whole block
   is a link through to the About page. */
.portrait-link {
  display: block;
  border-radius: var(--radius);
  text-decoration: none;
}

.portrait-link:focus-visible {
  outline: 3px solid var(--navy-400);
  outline-offset: 14px;
}

.portrait {
  position: relative;
  width: clamp(250px, 22vw, 330px);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  overflow: hidden;
  background: var(--navy-800);
  box-shadow: 0 14px 40px rgba(2, 8, 22, 0.4);
  outline: 1px solid rgba(255, 255, 255, 0.2);
  outline-offset: 6px;
  transition: outline-offset var(--dur-slow) var(--ease-out),
    outline-color var(--dur-slow) var(--ease-out),
    box-shadow var(--dur-slow) var(--ease-out);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.7s var(--ease-out), filter 0.7s var(--ease-out);
}

/* Hover: the ring opens out, the portrait warms and pushes in slightly */
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    to top,
    rgba(10, 31, 68, 0.55),
    transparent 55%
  );
  opacity: 1;
  transition: opacity var(--dur-slow) var(--ease-out);
  pointer-events: none;
}

.portrait-link:hover .portrait,
.portrait-link:focus-visible .portrait,
.portrait-block:hover .portrait {
  outline-offset: 13px;
  outline-color: var(--gold);
  box-shadow: 0 22px 60px rgba(2, 8, 22, 0.55);
}

.portrait-link:hover .portrait img,
.portrait-link:focus-visible .portrait img,
.portrait-block:hover .portrait img {
  transform: scale(1.07);
}

.portrait-link:hover .portrait::after,
.portrait-link:focus-visible .portrait::after,
.portrait-block:hover .portrait::after {
  opacity: 0.35;
}

@media (prefers-reduced-motion: reduce) {
  .portrait-link:hover .portrait img,
  .portrait-block:hover .portrait img {
    transform: none;
  }
}

.portrait-block {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  text-align: center;
}

.portrait-block__name {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  letter-spacing: -0.018em;
  line-height: 1.2;
  transition: color var(--dur) var(--ease-out);
}

.portrait-link:hover .portrait-block__name {
  color: var(--platinum);
}

/* "View profile" cue, revealed on hover/focus of the linked portrait */
.portrait-block__cue {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-400);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.portrait-block__cue svg {
  width: 13px;
  height: 13px;
}

.portrait-link:hover .portrait-block__cue,
.portrait-link:focus-visible .portrait-block__cue {
  opacity: 1;
  transform: translateY(0);
}

.portrait-block__role {
  font-size: var(--fs-xs);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.band-soft .portrait-block__role,
.section:not(.band-dark) .portrait-block__role {
  color: var(--slate-500);
}

/* Floating stat chip layered over an image */
.chip {
  position: absolute;
  display: grid;
  gap: 0.15rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-3);
  z-index: var(--z-raised);
}

.chip__value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
}

.chip__label {
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--slate-500);
}

/* --------------------------------------------------------------------------
   12. Process steps
   -------------------------------------------------------------------------- */

.steps {
  display: grid;
  gap: 0;
  counter-reset: step;
}

.step {
  display: grid;
  gap: var(--space-3);
  padding-block: clamp(1.5rem, 1.1rem + 1.4vw, 2.5rem);
  border-top: 1px solid var(--color-border);
  align-items: start;
}

.step:last-child {
  border-bottom: 1px solid var(--color-border);
}

@media (min-width: 800px) {
  .step {
    grid-template-columns: 6rem 1fr 1.15fr;
    gap: var(--space-6);
    align-items: baseline;
  }
}

.step__num {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--navy-500);
  font-variant-numeric: tabular-nums;
}

.step__title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.step__body {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  max-width: 58ch;
}

/* --------------------------------------------------------------------------
   13. Detailed service rows (services page)
   -------------------------------------------------------------------------- */

.service-detail {
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
  border-top: 1px solid var(--color-border);
}

.service-detail__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.service-detail__num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.8rem + 2.6vw, 4rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--line-strong);
  font-variant-numeric: tabular-nums;
}

.deliverables {
  display: grid;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 560px) {
  .deliverables {
    grid-template-columns: repeat(2, 1fr);
  }
}

.deliverables li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 1rem 1.15rem;
  background: var(--color-bg);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.deliverables svg {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 0.22em;
  color: var(--navy-500);
}

/* --------------------------------------------------------------------------
   14. Heritage — the only place scarlet + gold appear
   -------------------------------------------------------------------------- */

.heritage {
  position: relative;
  overflow: hidden;
}

.heritage__flags {
  display: flex;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.crest {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.crest__bar {
  width: 4px;
  height: 34px;
  border-radius: 2px;
  flex: none;
}

.crest__bar--peru {
  background: linear-gradient(
    to bottom,
    var(--scarlet) 0 33%,
    var(--white) 33% 66%,
    var(--scarlet) 66% 100%
  );
}

.crest__bar--usmc {
  background: linear-gradient(
    to bottom,
    var(--scarlet) 0 50%,
    var(--gold) 50% 100%
  );
}

.crest__text {
  display: grid;
  line-height: 1.25;
}

.crest__label {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-400);
}

.band-dark .crest__label {
  color: rgba(255, 255, 255, 0.55);
}

.crest__name {
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   15. Testimonial
   -------------------------------------------------------------------------- */

.quote {
  display: grid;
  gap: var(--space-6);
  max-width: 900px;
}

.quote__mark {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.6;
  color: var(--navy-500);
  opacity: 0.5;
  height: 2.2rem;
}

.quote__text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.35rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.quote__attr {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--fs-sm);
}

.quote__rule {
  width: 40px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
  flex: none;
}

/* --------------------------------------------------------------------------
   16. Software partners
   -------------------------------------------------------------------------- */

.partners {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.partner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}

.partner:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-2);
}

.partner img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: none;
}

.partner__text {
  display: grid;
  gap: 0.15rem;
}

.partner__name {
  font-weight: 600;
  font-size: var(--fs-sm);
}

.partner__role {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   17. CTA band
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--navy-800);
  color: var(--white);
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse 60% 90% at 85% 10%,
      rgba(35, 91, 168, 0.55),
      transparent 60%
    ),
    radial-gradient(ellipse 70% 100% at 0% 100%, rgba(5, 15, 38, 0.7), transparent 60%);
  pointer-events: none;
}

.cta-band__inner {
  position: relative;
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 900px) {
  .cta-band__inner {
    grid-template-columns: 1.3fr auto;
    gap: var(--space-9);
  }
}

/* --------------------------------------------------------------------------
   18. Forms
   -------------------------------------------------------------------------- */

.form {
  display: grid;
  gap: var(--space-5);
}

.form__grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .form__grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text);
}

.field__req {
  color: var(--color-danger);
  margin-left: 0.15rem;
}

.field__hint {
  font-size: var(--fs-xs);
  color: var(--slate-500);
}

.field__control {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: var(--fs-body);
  color: var(--color-text);
  transition: border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
  appearance: none;
}

textarea.field__control {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

select.field__control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7480' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 18px;
  padding-right: 2.75rem;
  cursor: pointer;
}

.field__control::placeholder {
  color: var(--slate-400);
}

.field__control:hover {
  border-color: var(--slate-400);
}

.field__control:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px rgba(23, 64, 127, 0.14);
}

.field__control[aria-invalid="true"] {
  border-color: var(--color-danger);
  background: #fdf6f6;
}

.field__control[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgba(180, 35, 47, 0.14);
}

.field__error {
  display: none;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--color-danger);
}

.field__error svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.field.has-error .field__error {
  display: flex;
}

.field--hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.form__note {
  font-size: var(--fs-xs);
  color: var(--slate-500);
}

.form__status {
  display: none;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  border: 1px solid;
}

.form__status.is-visible {
  display: block;
}

.form__status[data-state="error"] {
  color: var(--color-danger);
  background: #fdf3f3;
  border-color: #f0cdcd;
}

/* Contact detail cards */
.contact-cards {
  display: grid;
  gap: var(--space-4);
}

.contact-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: border-color var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.contact-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.contact-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--navy-700);
}

.band-dark .contact-card__icon {
  background: rgba(255, 255, 255, 0.08);
  color: var(--platinum);
}

.contact-card__icon svg {
  width: 20px;
  height: 20px;
}

.contact-card__text {
  display: grid;
  gap: 0.15rem;
}

.contact-card__label {
  font-size: var(--fs-xs);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.band-dark .contact-card__label {
  color: rgba(255, 255, 255, 0.55);
}

.contact-card__value {
  font-size: var(--fs-body);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   19. FAQ (details/summary)
   -------------------------------------------------------------------------- */

.faq {
  display: grid;
  border-top: 1px solid var(--color-border);
}

.faq__item {
  border-bottom: 1px solid var(--color-border);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: 1.35rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  letter-spacing: -0.012em;
  line-height: 1.3;
  min-height: 56px;
  transition: color var(--dur) var(--ease-out);
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q:hover {
  color: var(--navy-600);
}

.faq__sign {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
}

.faq__sign::before,
.faq__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease-out);
}

.faq__sign::after {
  transform: rotate(90deg);
}

.faq__item[open] .faq__sign::after {
  transform: rotate(0deg);
}

.faq__a {
  padding-bottom: 1.5rem;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   19b. Long-form prose (privacy, terms, accessibility)
   -------------------------------------------------------------------------- */

.prose {
  max-width: 68ch;
}

.prose > * + * {
  margin-top: var(--space-5);
}

.prose h2 {
  font-size: var(--fs-h3);
  margin-top: var(--space-9);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  font-family: var(--font-sans);
  font-size: var(--fs-h4);
  font-weight: 600;
  letter-spacing: -0.011em;
  margin-top: var(--space-6);
}

.prose p,
.prose li {
  color: var(--color-text-muted);
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.6rem;
  padding-left: 1.35rem;
}

.prose ul li {
  list-style: disc;
}

.prose ol li {
  list-style: decimal;
}

.prose a {
  color: var(--navy-700);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose a:hover {
  color: var(--navy-500);
}

.prose strong {
  color: var(--color-text);
  font-weight: 600;
}

.prose__meta {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
}

/* --------------------------------------------------------------------------
   19c. Back to top
   -------------------------------------------------------------------------- */

.to-top {
  position: fixed;
  right: clamp(1rem, 1.4vw, 1.75rem);
  bottom: clamp(1rem, 1.4vw, 1.75rem);
  z-index: var(--z-sticky);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--white);
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out),
    visibility 0s linear var(--dur);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out), visibility 0s;
}

.to-top:hover {
  background: var(--navy-600);
  transform: translateY(-3px);
}

.to-top:active {
  transform: translateY(0);
}

.to-top svg {
  width: 19px;
  height: 19px;
  transition: transform var(--dur) var(--ease-out);
}

.to-top:hover svg {
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   20. Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--navy-950);
  color: #b9c4d4;
  padding-block: clamp(3rem, 2rem + 4vw, 5rem) var(--space-6);
  font-size: var(--fs-sm);
}

.footer__top {
  display: grid;
  gap: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 640px) {
  .footer__top {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-7);
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .footer__top {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-8);
  }
  .footer__brand {
    grid-column: auto;
  }
}

.footer__brand {
  display: grid;
  gap: var(--space-4);
  max-width: 40ch;
}

.footer__brand .brand__name {
  color: var(--white);
}

.footer__brand .brand__sub {
  color: rgba(255, 255, 255, 0.6);
}

.footer__heading {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: var(--space-4);
}

.footer__list {
  display: grid;
  gap: 0.7rem;
}

.footer__list a {
  position: relative;
  display: inline-block;
  transition: color var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.footer__list a:hover {
  color: var(--white);
  transform: translateX(3px);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-6);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.55);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}

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

/* --------------------------------------------------------------------------
   21. Page hero (interior pages)
   -------------------------------------------------------------------------- */

.page-hero {
  position: relative;
  background: var(--navy-900);
  color: var(--white);
  padding-top: clamp(7.5rem, 5rem + 10vw, 10.5rem);
  padding-bottom: clamp(3rem, 2rem + 5vw, 5.5rem);
  overflow: hidden;
  isolation: isolate;
}

.page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -40% -10% auto auto;
  width: min(90vw, 800px);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at center,
    rgba(35, 91, 168, 0.42),
    transparent 66%
  );
  animation: drift 26s var(--ease-in-out) infinite alternate;
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  display: grid;
  gap: var(--space-5);
  max-width: 900px;
}

.page-hero h1 {
  color: var(--white);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
}

.breadcrumb a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb__sep {
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   22. Utility
   -------------------------------------------------------------------------- */

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

.center {
  text-align: center;
}

.center .lead,
.center .section-head {
  margin-inline: auto;
}

.center .eyebrow {
  justify-content: center;
}

.mt-6 {
  margin-top: var(--space-6);
}
.mt-8 {
  margin-top: var(--space-8);
}

/* --------------------------------------------------------------------------
   23. Motion — initial states applied only when JS is running
   -------------------------------------------------------------------------- */

/* `.js-motion` is set by an inline script in <head>, so content stays visible
   for no-JS users and for anyone whose scripts fail to load. Every hidden
   initial state below is scoped to it — never inline — so that stripping the
   class is enough to restore the full page. */
.js-motion [data-reveal] {
  opacity: 0;
  will-change: transform, opacity;
}

.js-motion [data-hero-fade] {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  will-change: transform, opacity;
}

.js-motion [data-hero-visual] {
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.97);
  will-change: transform, opacity;
}

.js-motion [data-reveal="up"] {
  transform: translate3d(0, 28px, 0);
}

.js-motion [data-reveal="fade"] {
  transform: none;
}

.js-motion [data-reveal="left"] {
  transform: translate3d(-28px, 0, 0);
}

.js-motion [data-reveal="right"] {
  transform: translate3d(28px, 0, 0);
}

.js-motion [data-reveal="scale"] {
  transform: scale(0.94);
}

/* Split-line headline masks */
.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.js-motion .line-mask > span {
  display: block;
  transform: translate3d(0, 110%, 0);
  will-change: transform;
}

/* Word-by-word reveal, used on the pull quote */
.word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.js-motion .word-mask > span {
  display: inline-block;
  transform: translate3d(0, 110%, 0);
  will-change: transform;
}

/* Page-load curtain */
.curtain {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--navy-950);
  display: grid;
  place-items: center;
  pointer-events: none;
}

html:not(.js-motion) .curtain {
  display: none;
}

.curtain__mark {
  width: 64px;
  height: 64px;
  opacity: 0.9;
}

/* --------------------------------------------------------------------------
   24. Reduced motion + coarse pointers
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js-motion [data-reveal],
  .js-motion [data-hero-fade],
  .js-motion [data-hero-visual],
  .js-motion .line-mask > span,
  .js-motion .word-mask > span {
    opacity: 1 !important;
    transform: none !important;
  }

  .stat__meter-fill {
    transform: scaleX(1) !important;
  }

  .marquee__track {
    animation: none;
    transform: none;
  }

  .curtain {
    display: none;
  }

  .hero::before,
  .page-hero::before {
    animation: none;
  }
}

/* Marquee is expensive on small screens — slow it and shrink the mask */
@media (max-width: 640px) {
  .marquee__track {
    animation-duration: 30s;
  }
}

/* --------------------------------------------------------------------------
   25. Print
   -------------------------------------------------------------------------- */

@media print {
  .header,
  .mobile-nav,
  .curtain,
  .cta-band,
  .marquee {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
