/* =====================================================================
   HMC — Health Management Consulting, SRL
   Site CSS — design tokens + components + layout
   Built on the official HMC brand system.
   ===================================================================== */

/* ---------- Fonts: Montserrat (titles/UI) + Lato (body) ---------- */

/* =====================================================================
   TOKENS
   ===================================================================== */
:root {
  /* Palette — official HMC values */
  --hmc-prussian:        #00273D;
  --hmc-prussian-deep:   #00141F;
  --hmc-prussian-raised: #003855;
  --hmc-lapis:           #1D5FA4;
  --hmc-lapis-mid:       #2E63A0;
  --hmc-cyan:            #00B8EC;
  --hmc-cyan-700:        #0090BD;
  /* Same hue as --hmc-cyan-700 at 78% lightness. Used ONLY for small text
     (11px eyebrows/roles) on light backgrounds, where #0090BD lands at
     3.0-3.5:1 and misses the 4.5:1 WCAG AA minimum. Fills, bullets, buttons
     and large text keep --hmc-cyan-700. */
  --hmc-cyan-text:       #007093;
  --hmc-yellow:          #FFB400;
  --hmc-scarlet:         #FF1100;

  /* Neutrals */
  --hmc-paper:           #F6F4EF;   /* warm off-white, default light bg */
  --hmc-paper-2:         #ECE8DE;   /* slightly deeper, for cards on paper */
  --hmc-bone:            #FBFAF6;
  --hmc-ink:             #0E1B26;
  --hmc-ink-2:           #2A3A47;
  --hmc-mute:            #5C6B78;

  /* Lines */
  --line-on-dark:        rgba(255, 255, 255, 0.14);
  --line-on-dark-soft:   rgba(255, 255, 255, 0.08);
  --line-on-paper:       rgba(14, 27, 38, 0.12);
  --line-on-paper-soft:  rgba(14, 27, 38, 0.06);

  /* Fonts */
  --font-display: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Lato", "Helvetica Neue", system-ui, -apple-system, sans-serif;

  /* Spacing (8-px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(0, 22, 40, 0.10);
  --shadow-2: 0 4px 16px rgba(0, 22, 40, 0.10), 0 1px 3px rgba(0, 22, 40, 0.06);
  --shadow-3: 0 18px 48px rgba(0, 22, 40, 0.18), 0 4px 12px rgba(0, 22, 40, 0.08);

  /* Easing / motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);

  /* Layout */
  --site-max: 1240px;
  --pad-x: clamp(20px, 4vw, 56px);
}

/* =====================================================================
   RESET + BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: #fff;
  background: var(--hmc-prussian);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.drawer-open { overflow: hidden; }
section[id], header[id] { scroll-margin-top: 72px; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* Global reduced-motion guard: kill all animation/transition for users who ask */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--hmc-cyan); color: var(--hmc-prussian); }

/* Focus */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--hmc-cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =====================================================================
   TYPOGRAPHY
   ===================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hmc-cyan);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px; height: 1.5px;
  background: var(--hmc-cyan);
}
.on-paper .eyebrow { color: var(--hmc-cyan-text); }
.on-paper .eyebrow::before { background: var(--hmc-cyan-700); }

.h1, h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0;
  color: inherit;
}
.h2, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  color: inherit;
}
.h3, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 0;
}
.h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}
p { margin: 0; font-family: var(--font-body); line-height: 1.65; }

.lede {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  max-width: 60ch;
}
.on-paper .lede { color: var(--hmc-ink-2); }

.body-copy { font-size: 16px; line-height: 1.7; color: rgba(255, 255, 255, 0.78); }
.on-paper .body-copy { color: var(--hmc-ink-2); }

.muted { color: rgba(255, 255, 255, 0.56); }
.on-paper .muted { color: var(--hmc-mute); }

/* =====================================================================
   LAYOUT PRIMITIVES
   ===================================================================== */
.section {
  padding: clamp(64px, 8vw, 96px) var(--pad-x);
  position: relative;
}
.section--tight { padding-block: clamp(48px, 6vw, 72px); }
.section--xl    { padding-block: clamp(80px, 10vw, 120px); }

.wrap { max-width: var(--site-max); margin: 0 auto; }
.wrap--narrow { max-width: 880px; }
.wrap--prose  { max-width: 720px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }

.split-60-40 {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

/* Section surfaces */
.surface-dark   { background: var(--hmc-prussian); color: #fff; }
.surface-deep   { background: var(--hmc-prussian-deep); color: #fff; }
.surface-paper  { background: var(--hmc-paper); color: var(--hmc-ink); }
.surface-paper-2{ background: var(--hmc-paper-2); color: var(--hmc-ink); }
.surface-paper, .surface-paper-2 { /* helper class */ }
.on-paper { color: var(--hmc-ink); }
.on-paper h1, .on-paper h2, .on-paper h3 { color: var(--hmc-prussian); }
.on-paper p { color: var(--hmc-ink-2); }

/* Section divider hairline */
.hairline-top    { border-top: 1px solid var(--line-on-dark); }
.hairline-bottom { border-bottom: 1px solid var(--line-on-dark); }
.on-paper .hairline-top    { border-top-color: var(--line-on-paper); }
.on-paper .hairline-bottom { border-bottom-color: var(--line-on-paper); }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: transform 180ms var(--ease),
              filter   180ms var(--ease),
              background 180ms var(--ease),
              border-color 180ms var(--ease),
              color    180ms var(--ease);
  white-space: nowrap;
}
.btn::after {
  content: "→";
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  transition: transform 220ms var(--ease);
}
.btn:hover { filter: brightness(1.06); }
.btn:hover::after { transform: translateX(3px); }
.btn:active { transform: translateY(1px); filter: brightness(0.96); }

.btn--primary  { background: var(--hmc-cyan);    color: var(--hmc-prussian); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--accent   { background: var(--hmc-yellow);  color: var(--hmc-prussian); }
.btn--on-dark  { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.28); }
.btn--on-dark:hover { border-color: #fff; }
.btn--on-light { background: var(--hmc-prussian); color: #fff; }
.btn--on-light:hover { background: var(--hmc-prussian-raised); }
.btn--ghost-dark { background: transparent; color: var(--hmc-cyan); padding: 8px 0; border-radius: 0; }
.btn--ghost-dark::after { font-size: 14px; }
.btn--ghost-light { background: transparent; color: var(--hmc-cyan-700); padding: 8px 0; border-radius: 0; }
.btn--ghost-light::after { font-size: 14px; }

.btn--full { width: 100%; justify-content: center; }
.btn--lg { padding: 18px 30px; font-size: 14px; }

/* No-arrow variants */
.btn--no-arrow::after { content: ""; display: none; }

/* =====================================================================
   TAGS / BADGES
   ===================================================================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 11px 5px;
  border-radius: var(--radius-pill);
  background: rgba(0, 184, 236, 0.14);
  color: var(--hmc-cyan);
  border: 1px solid rgba(0, 184, 236, 0.34);
}
.tag--cyan    { background: rgba(0, 184, 236, 0.14);  color: var(--hmc-cyan);  border-color: rgba(0, 184, 236, 0.34); }
.tag--yellow  { background: rgba(255, 180, 0, 0.16);  color: var(--hmc-yellow);border-color: rgba(255, 180, 0, 0.42); }
.tag--scarlet { background: rgba(255, 17, 0, 0.14);   color: var(--hmc-scarlet);border-color: rgba(255, 17, 0, 0.36); }
.tag--lapis   { background: rgba(29, 95, 164, 0.18);  color: #90B4DE;          border-color: rgba(29, 95, 164, 0.45); }
.tag--paper   { background: var(--hmc-paper-2);       color: var(--hmc-ink-2); border-color: var(--line-on-paper); }

/* Status badge — bolder for initiatives */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  line-height: 1;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}
.badge--active   { background: var(--hmc-cyan);   color: var(--hmc-prussian); }
.badge--upcoming { background: var(--hmc-yellow); color: var(--hmc-prussian); }

/* =====================================================================
   TOP NAV
   ===================================================================== */
.nav {
  --nav-logo-h: 40px;          /* logo height, shrinks on scroll */
  --nav-pad-y: 16px;           /* vertical padding, shrinks on scroll */
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--nav-pad-y) var(--pad-x);
  background: rgba(0, 20, 31, 0);
  backdrop-filter: blur(0px);
  transition: background 240ms var(--ease),
              backdrop-filter 240ms var(--ease),
              border-color 240ms var(--ease),
              padding 280ms var(--ease),
              gap 280ms var(--ease);
  border-bottom: 1px solid transparent;
}
.nav--scrolled {
  --nav-logo-h: 32px;          /* subtle shrink */
  --nav-pad-y: 9px;
  background: rgba(0, 20, 31, 0.70);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.nav__logo {
  display: flex; align-items: center;
  flex-shrink: 0;
}
.nav__logo img {
  height: var(--nav-logo-h);
  width: auto;
  transition: height 280ms var(--ease);
}
.nav__links {
  display: flex;
  gap: var(--space-6);
  align-items: center;
  transition: gap 280ms var(--ease);
}
.nav__link {
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
  transition: color 180ms var(--ease), border-color 180ms var(--ease), font-size 280ms var(--ease);
}
.nav__link:hover { color: var(--hmc-cyan); }
.nav__link.is-active { color: var(--hmc-cyan); border-bottom-color: var(--hmc-cyan); }
/* desktop: links shrink subtly on scroll */
.nav--scrolled .nav__links { gap: var(--space-5); }
.nav--scrolled .nav__link { font-size: 12.5px; }

.nav__cta {
  display: inline-flex;
  flex-shrink: 0;
  transition: padding 280ms var(--ease), font-size 280ms var(--ease);
}
/* CTA shrinks subtly on scroll (desktop + mobile) */
.nav--scrolled .nav__cta { padding: 11px 20px; font-size: 12px; }

/* Hamburger */
.nav__burger {
  display: none;
  flex-shrink: 0;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  transition: width 280ms var(--ease), height 280ms var(--ease), border-color 180ms var(--ease);
}
.nav__burger span {
  display: block;
  width: 16px; height: 1.5px;
  background: #fff;
  position: relative;
}
.nav__burger span::before,
.nav__burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px; height: 1.5px;
  background: #fff;
  transition: transform 200ms var(--ease), top 200ms var(--ease);
}
.nav__burger span::before { top: -5px; }
.nav__burger span::after  { top:  5px; }
.nav__burger[aria-expanded="true"] span { background: transparent; }
.nav__burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* Mobile drawer */
.nav__drawer {
  display: none;
}

/* =====================================================================
   HERO (Section 01)
   ===================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10vw, 128px) var(--pad-x) clamp(64px, 8vw, 96px);
  background: var(--hmc-prussian);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("../pattern/Back.png");
  background-size: 560px auto;
  background-repeat: repeat;
  opacity: 0.18;
  -webkit-mask-image: radial-gradient(120% 100% at 30% 30%, #000 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
          mask-image: radial-gradient(120% 100% at 30% 30%, #000 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 600px at 85% 20%, rgba(0,184,236,0.10), transparent 60%),
    radial-gradient(800px 400px at 10% 90%, rgba(29,95,164,0.18), transparent 60%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  max-width: var(--site-max);
  margin: 0 auto;
}
.hero__copy { position: relative; }
.hero__eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hmc-cyan);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero__eyebrow::before {
  content: "";
  width: 28px; height: 1.5px;
  background: var(--hmc-cyan);
  flex-shrink: 0;
}
.hero__h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 5.8vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  color: #fff;
  margin: 0 0 24px 0;
  max-width: 16ch;
}
.hero__sub {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.74);
  max-width: 52ch;
  margin: 0 0 36px 0;
}
.hero__ctas { display: flex; gap: var(--space-4); flex-wrap: wrap; align-items: center; }

/* ---- Animated Interoperable Reporting Pipeline ---- */
.hero__visual { position: relative; }
.pipeline {
  position: relative;
  background: linear-gradient(160deg, rgba(0,56,85,0.55) 0%, rgba(0,20,31,0.65) 100%);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-lg);
  padding: 20px 22px 18px;
  box-shadow: 0 24px 60px rgba(0, 12, 20, 0.4);
}
.pipeline__cols {
  display: flex;
  justify-content: space-between;
  padding: 0 6px 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.pipeline__svg { width: 100%; height: auto; display: block; overflow: visible; }
.pipeline__label {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
@media (prefers-reduced-motion: no-preference) {
  .pipeline__hub-glow { animation: hub-pulse 2.8s var(--ease) infinite; transform-origin: center; }
}
@keyframes hub-pulse {
  0%, 100% { opacity: 0.16; transform: scale(1); }
  50%      { opacity: 0.34; transform: scale(1.12); }
}

/* Hero stat strip */
.hero__stats {
  position: relative;
  max-width: var(--site-max);
  margin: clamp(48px, 6vw, 72px) auto 0;
  padding-top: var(--space-7);
  border-top: 1px solid var(--line-on-dark);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-7);
}
.hero__stat-n {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
  color: var(--hmc-yellow);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}
.hero__stat-l {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 6px;
}
.hero__stat-d {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.6);
  max-width: 28ch;
}

/* =====================================================================
   SECTION HELPERS
   ===================================================================== */
.section-head { margin-bottom: var(--space-7); }
.section-head .h2 { max-width: 22ch; }
.section-head__row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
}

/* Editorial closing accent line (Section 02) */
.accent-line {
  margin-top: var(--space-6);
  padding-left: var(--space-5);
  border-left: 3px solid var(--hmc-scarlet);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--hmc-prussian);
}

/* =====================================================================
   CARDS
   ===================================================================== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 28px 26px 30px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-on-dark);
  transition: transform 240ms var(--ease),
              background 240ms var(--ease),
              border-color 240ms var(--ease),
              box-shadow 240ms var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: rgba(0, 184, 236, 0.45); background: rgba(255, 255, 255, 0.04); }

.card__icon-tile {
  width: 72px; height: 72px;
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}
.card__icon-tile img { width: 60px; height: 60px; object-fit: contain; }
.tile--lapis-mid { background: var(--hmc-lapis-mid); }
.tile--scarlet   { background: var(--hmc-scarlet); }
.tile--yellow    { background: var(--hmc-yellow); }
.tile--lapis     { background: var(--hmc-lapis); }
.tile--cyan      { background: var(--hmc-cyan); }

.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 var(--space-3) 0;
}
.card__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5) 0;
  display: flex; flex-direction: column;
  gap: 10px;
}
.card__list li {
  position: relative;
  padding-left: 18px;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 8px; height: 1.5px;
  background: var(--hmc-cyan);
}
.card__cta {
  margin-top: auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--hmc-cyan);
  display: inline-flex; align-items: center; gap: 8px;
  transition: gap 200ms var(--ease);
}
.card__cta:hover { gap: 14px; }
.card__cta::after { content: "→"; font-family: var(--font-body); font-size: 15px; }

/* Card on paper */
.card--paper {
  background: #fff;
  border: 1px solid var(--line-on-paper);
  box-shadow: var(--shadow-1);
}
.card--paper:hover { box-shadow: var(--shadow-2); border-color: rgba(0, 184, 236, 0.35); }
.card--paper .card__title { color: var(--hmc-prussian); }
.card--paper .card__list li { color: var(--hmc-ink-2); }
.card--paper .card__list li::before { background: var(--hmc-cyan-700); }
.card--paper .card__cta { color: var(--hmc-cyan-700); }

/* =====================================================================
   TEAM CARDS (Section 05) — dark card, square photo
   ===================================================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.team-card {
  background: #fff;
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-1);
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease);
}
.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }

/* square photo — rounded top corners only (sits flush in the card) */
.team-card__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--hmc-prussian-deep);
}
.team-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card__photo--placeholder {
  background:
    radial-gradient(circle at 50% 38%, var(--hmc-prussian-raised) 0%, var(--hmc-prussian-deep) 100%);
}
.team-card__photo--placeholder::before {
  content: "";
  position: absolute;
  top: 26%; left: 50%; transform: translateX(-50%);
  width: 30%; aspect-ratio: 1/1;
  border-radius: 50% 50% 50% 50%;
  background: var(--hmc-cyan);
  opacity: 0.45;
}
.team-card__photo--placeholder::after {
  content: "";
  position: absolute;
  bottom: 14%; left: 50%; transform: translateX(-50%);
  width: 56%; height: 34%;
  border-radius: 46% 46% 0 0;
  background: var(--hmc-lapis);
  opacity: 0.45;
}

.team-card__body { padding: 26px 26px 28px; display: flex; flex-direction: column; }
.team-card__role {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hmc-cyan-text);
  margin-bottom: 8px;
}
.team-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: var(--hmc-prussian);
  line-height: 1.2;
}
.team-card__cred {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hmc-mute);
  margin: 6px 0 16px;
}
.team-card__bio {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--hmc-ink-2);
}
.team-card__tags {
  list-style: none;
  padding: 18px 0 0;
  margin: 18px 0 0;
  border-top: 1px solid var(--line-on-paper);
  display: flex; flex-direction: column; gap: 9px;
}
.team-card__tags li {
  position: relative;
  padding-left: 16px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--hmc-ink-2);
}
.team-card__tags li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--hmc-cyan);
}

/* =====================================================================
   LATENCYVIZ (Section — Operational Reality: reporting-to-decision window)
   Restrained, one-time reveal on scroll. No looping (institutional motion).
   ===================================================================== */
.latencyviz {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--line-on-paper);
  background: #fff;
}
.latencyviz svg { width: 100%; height: auto; display: block; }

@media (prefers-reduced-motion: no-preference) {
  /* the data signal draws left-to-right, once */
  .lv-signal {
    stroke-dasharray: 360;
    stroke-dashoffset: 360;
    transition: stroke-dashoffset 1400ms var(--ease);
  }
  /* stages fade up in sequence as the signal travels */
  .lv-stage { opacity: 0; transform: translateY(4px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
  /* risk line draws in last */
  .lv-risk {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 900ms var(--ease);
  }

  /* triggered when the section reveal fires (parent .reveal.is-visible) */
  .reveal.is-visible .lv-signal { stroke-dashoffset: 0; }
  .reveal.is-visible .lv-stage-1 { opacity: 1; transform: translateY(0); transition-delay: 200ms; }
  .reveal.is-visible .lv-stage-2 { opacity: 1; transform: translateY(0); transition-delay: 800ms; }
  .reveal.is-visible .lv-stage-3 { opacity: 1; transform: translateY(0); transition-delay: 1400ms; }
  .reveal.is-visible .lv-risk { stroke-dashoffset: 0; transition-delay: 1500ms; }
}


/* =====================================================================
   HOW WE WORK — journey rail (engaging, non-interactive)
   ===================================================================== */
.journey { position: relative; overflow: hidden; }
.journey__pattern {
  position: absolute; inset: 0;
  background-image: url("../pattern/Back.png");
  background-size: 540px auto;
  opacity: 0.10;
  -webkit-mask-image: radial-gradient(110% 90% at 50% 0%, #000, transparent 80%);
          mask-image: radial-gradient(110% 90% at 50% 0%, #000, transparent 80%);
  pointer-events: none;
}
.journey__rail { position: relative; margin-top: var(--space-8); }
/* horizontal track with a traveling pulse */
.journey__track {
  position: absolute;
  /* Align the rail to the dots: each dot sits at the left of its grid column
     (center 8px in), so span from dot 1's center to dot 4's center. */
  top: 18px; left: 8px; right: auto;
  width: calc(75% + 0.75 * var(--space-5));
  height: 2px;
  container-type: inline-size;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  overflow: hidden;
}
/* Growing fill: full-width gradient revealed left-to-right via clip-path.
   Brightness steps up by segment so the line visibly gains intensity each
   time its leading edge crosses a dot (dots sit at 0/33/66/100% of the rail):
   segment 1->2 normal, 2->3 moderate, 3->4 brightest (landing on yellow at
   the final dot). The ~3% windows at 33% and 66% make the step noticeable
   without a hard edge. */
.journey__fill {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 2px;
  clip-path: inset(0 100% 0 0);
  background: linear-gradient(90deg,
    rgba(0,184,236,0.45) 0%,
    rgba(0,184,236,0.45) 32%,
    rgba(0,184,236,0.72) 35%,
    rgba(0,184,236,0.72) 65%,
    var(--hmc-cyan) 68%,
    #7fe3c8 86%,
    var(--hmc-yellow) 100%);
}
.journey__pulse {
  position: absolute; top: 0; left: 0;
  width: 64px; height: 2px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  opacity: 0.9;
}
@media (prefers-reduced-motion: no-preference) {
  .journey__fill  { animation: journey-fill 7s linear infinite; }
  .journey__pulse { animation: journey-run 7s linear infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .journey__fill { clip-path: inset(0 0 0 0); }
  .journey__pulse { display: none; }
}
@keyframes journey-fill {
  0%   { clip-path: inset(0 100% 0 0); }
  92%  { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 0); }
}
@keyframes journey-run {
  0%   { transform: translate3d(-64px, 0, 0); opacity: 0; }
  4%   { opacity: 0.9; }
  88%  { opacity: 0.9; }
  100% { transform: translate3d(100cqw, 0, 0); opacity: 0; }
}
.journey__steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.journey__step { position: relative; padding-top: 44px; }
.journey__dot {
  position: absolute;
  top: 11px; left: 0;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--hmc-prussian-deep);
  border: 2px solid var(--hmc-cyan);
  box-shadow: 0 0 0 5px rgba(0,184,236,0.10);
}
/* pulse ring: animates transform+opacity only (compositor, no repaints) */
.journey__dot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(0,184,236,0.35);
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
}
.journey__dot--end {
  background: var(--hmc-yellow);
  border-color: var(--hmc-yellow);
  box-shadow: 0 0 0 5px rgba(255,180,0,0.16);
}
.journey__dot--end::after { border-color: rgba(255,180,0,0.4); }
@media (prefers-reduced-motion: no-preference) {
  .journey__dot::after { animation: journey-ring 7s var(--ease) infinite; }
  .journey__step:nth-child(1) .journey__dot::after { animation-delay: 0.1s; }
  .journey__step:nth-child(2) .journey__dot::after { animation-delay: 1.85s; }
  .journey__step:nth-child(3) .journey__dot::after { animation-delay: 3.6s; }
  .journey__step:nth-child(4) .journey__dot::after { animation-delay: 5.35s; }
}
@keyframes journey-ring {
  0%   { opacity: 0;    transform: scale(0.7); }
  6%   { opacity: 0.85; transform: scale(0.9); }
  20%  { opacity: 0;    transform: scale(1.5); }
  100% { opacity: 0;    transform: scale(1.5); }
}
.journey__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--hmc-cyan);
  margin-bottom: 8px;
}
.journey__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 8px 0;
}
.journey__d {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
}
.journey__cta { text-align: center; margin-top: var(--space-8); }
.journey__teaser {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.45;
  color: rgba(255,255,255,0.82);
  max-width: 44ch;
  margin: 0 auto var(--space-6);
}
.journey__teaser em { color: var(--hmc-cyan); font-style: italic; }
@media (max-width: 768px) {
  .journey__steps { grid-template-columns: 1fr; gap: var(--space-6); }
  .journey__track { display: none; }
  .journey__step { padding-top: 0; padding-left: 30px; }
  .journey__dot { top: 4px; }
}

/* =====================================================================
   LOGO MARQUEE (Section — Institutional Experience)
   ===================================================================== */
.logos { overflow: hidden; }
.logos__eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hmc-mute);
  margin-bottom: var(--space-6);
}
.marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* fade the edges so logos appear/disappear softly */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0,0,0);
}
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: marquee-scroll 48s linear infinite; }
  .marquee:hover .marquee__track,
  .marquee:focus-within .marquee__track { animation-play-state: paused; }
}
/* Track holds two identical sets; shifting by -50% loops seamlessly */
@keyframes marquee-scroll {
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(-50%,0,0); }
}
.marquee__logo {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: 0.02em;
  color: var(--hmc-ink-2);
  opacity: 0.85;
  padding: 0 clamp(28px, 4vw, 56px);
  white-space: nowrap;
  transition: opacity 220ms var(--ease), color 220ms var(--ease);
}
.marquee__logo:hover { opacity: 1; color: var(--hmc-prussian); }
.marquee__sep {
  flex: 0 0 auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--hmc-cyan);
  opacity: 0.5;
}

/* =====================================================================
   APPROACH PILLARS (Section 08)
   ===================================================================== */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-7);
}
.pillar {
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--line-on-paper);
  border-radius: var(--radius-md);
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-1);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}
.pillar:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.pillar__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  line-height: 1;
  color: var(--hmc-cyan-700);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.pillar__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: var(--hmc-prussian);
  letter-spacing: -0.01em;
}
.pillar__d {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--hmc-ink-2);
}

/* Governance strip */
.governance {
  margin-top: var(--space-7);
  padding: 22px 28px;
  background: var(--hmc-paper-2);
  border-radius: var(--radius-md);
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  border: 1px solid var(--line-on-paper-soft);
}
.governance__icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--hmc-prussian);
  display: flex; align-items: center; justify-content: center;
  color: var(--hmc-cyan);
}
.governance__text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--hmc-ink-2);
}
.governance__text strong { color: var(--hmc-prussian); font-weight: 700; }

/* =====================================================================
   INITIATIVES (Section 09)
   ===================================================================== */
.initiatives {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}
.initiative {
  background: #fff;
  border: 1px solid var(--line-on-paper);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: var(--space-4);
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease);
  position: relative;
  overflow: hidden;
}
.initiative::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: var(--hmc-cyan);
}
.initiative--upcoming::before { background: var(--hmc-yellow); }
.initiative:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.initiative__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--hmc-prussian);
  margin: 6px 0 0 0;
}
.initiative__body {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--hmc-ink-2);
}
.initiative__meta {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hmc-lapis);
}

/* =====================================================================
   CTA INTERMEDIO (Section 07)
   ===================================================================== */
.cta-mid {
  background: var(--hmc-prussian);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-mid::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("../pattern/Back.png");
  background-size: 560px auto;
  background-position: center;
  opacity: 0.10;
  pointer-events: none;
}
.cta-mid__inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) var(--pad-x);
}
.cta-mid__h {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 0 0 var(--space-6) 0;
}
.cta-mid__sub {
  display: inline-block;
  margin-top: var(--space-5);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding-bottom: 3px;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
.cta-mid__sub:hover { color: var(--hmc-cyan); border-color: var(--hmc-cyan); }

/* =====================================================================
   CONTACT (Section 10)
   ===================================================================== */
.contact-block {
  background: var(--hmc-prussian);
  border-top: 1px solid var(--line-on-dark);
  position: relative;
  overflow: hidden;
}
.contact-block::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("../pattern/Back.png");
  background-size: 720px auto;
  opacity: 0.10;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 60%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 60%);
}
.contact-block__inner {
  position: relative;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 96px) var(--pad-x);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.contact-block__copy h2 { color: #fff; margin-bottom: var(--space-5); max-width: 18ch; }
.contact-block__copy p {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.74);
  max-width: 42ch;
  margin: 0;
}
.contact-meta {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-on-dark);
  display: flex; flex-direction: column; gap: var(--space-3);
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.contact-meta__row { display: flex; align-items: center; gap: 12px; }
/* 24px minimum hit area (WCAG 2.5.8) for the mailto:/tel: links. */
.contact-meta__row a { display: inline-flex; align-items: center; min-height: 24px; }
.contact-meta__icon {
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(0, 184, 236, 0.12);
  color: var(--hmc-cyan);
  display: flex; align-items: center; justify-content: center;
}

/* Form */
.form-card {
  background: var(--hmc-paper);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 3vw, 36px);
  box-shadow: var(--shadow-3);
  color: var(--hmc-ink);
}
.form-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--hmc-prussian);
  margin-bottom: 22px;
  line-height: 1.25;
}
.form__field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--hmc-ink-2);
}
.form__input, .form__textarea {
  font-family: var(--font-body);
  /* 16px minimum: iOS Safari auto-zooms the page when a focused field is
     smaller, which strands the user mid-form at a zoomed viewport. */
  font-size: 16px;
  padding: 13px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line-on-paper);
  color: var(--hmc-ink);
  outline: none;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
  width: 100%;
}
.form__textarea { resize: vertical; min-height: 100px; }
.form__input:focus, .form__textarea:focus {
  border-color: var(--hmc-cyan);
  box-shadow: 0 0 0 3px rgba(0, 184, 236, 0.18);
}
.form__submit { margin-top: 6px; }

.form-thanks {
  text-align: center;
  padding: 24px 8px;
}
.form-thanks h3 { margin-bottom: 10px; }
.form-thanks p { color: var(--hmc-ink-2); }
.form-thanks .check {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--hmc-cyan);
  color: var(--hmc-prussian);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  font-family: var(--font-display);
  font-size: 28px;
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer {
  background: var(--hmc-prussian-deep);
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--font-body);
  font-size: 14px;
  border-top: 1px solid var(--line-on-dark);
  padding: 48px var(--pad-x) 32px;
}
.footer__top {
  max-width: var(--site-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-7);
  margin-bottom: 36px;
}
.footer__logo img { height: 36px; width: auto; margin-bottom: 16px; }
.footer__about { max-width: 38ch; line-height: 1.65; color: rgba(255, 255, 255, 0.6); }
.footer__col h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
/* inline-flex + min-height gives these links a 24px hit area (WCAG 2.5.8)
   without changing how the column reads: the gap above was reduced to keep
   the visual rhythm identical. */
.footer__col li { display: flex; }
.footer__col a {
  color: rgba(255, 255, 255, 0.66);
  transition: color 180ms var(--ease);
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.footer__col a:hover { color: var(--hmc-cyan); }
.footer__col li:not(:has(a)) { min-height: 24px; display: flex; align-items: center; }
.footer__bottom {
  max-width: var(--site-max);
  margin: 0 auto;
  border-top: 1px solid var(--line-on-dark-soft);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.4);
  flex-wrap: wrap;
}
/* 24px minimum hit area (WCAG 2.5.8) for the privacy-policy link. */
.footer__bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

/* =====================================================================
   INTERNAL PAGE HEADER (used on /contact, /team, /services/*, /initiatives/*)
   ===================================================================== */
.page-header {
  position: relative;
  background: var(--hmc-prussian);
  padding: clamp(72px, 9vw, 120px) var(--pad-x) clamp(48px, 6vw, 72px);
  overflow: hidden;
  border-bottom: 1px solid var(--line-on-dark);
}
.page-header::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("../../assets/pattern/Back.png");
  background-size: 720px auto;
  opacity: 0.10;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  pointer-events: none;
}
/* When page header is one level deep (e.g., /contact/) pattern path differs — overridden inline if needed */
.page-header__inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}
.page-header h1 {
  color: #fff;
  margin-bottom: 18px;
  max-width: 22ch;
}
.page-header p {
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.65;
  max-width: 58ch;
}
.page-header .badge { margin-bottom: 18px; }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--hmc-cyan-700);
  margin-bottom: 18px;
  transition: gap 200ms var(--ease);
}
.back-link:hover { gap: 14px; }
.back-link::before { content: "←"; font-family: var(--font-body); }

.surface-dark .back-link { color: var(--hmc-cyan); }

/* Prose blocks on paper pages */
.prose {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--hmc-ink-2);
}
.prose h2 { margin-top: var(--space-7); margin-bottom: var(--space-4); }
.prose h3 { margin-top: var(--space-6); margin-bottom: var(--space-3); color: var(--hmc-prussian); }
.prose p { margin-bottom: var(--space-4); }
.prose p:last-child { margin-bottom: 0; }
.prose ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5) 0;
  display: flex; flex-direction: column;
  gap: 10px;
}
.prose ul li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.65;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 10px; height: 1.5px;
  background: var(--hmc-cyan-700);
}
.prose strong { color: var(--hmc-prussian); font-weight: 700; }
.prose a { color: var(--hmc-cyan-700); border-bottom: 1px solid rgba(0, 144, 189, 0.3); transition: border-color 180ms var(--ease); }
.prose a:hover { border-color: var(--hmc-cyan-700); }

/* Sidebar / related */
.related {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line-on-paper);
}
.related__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hmc-mute);
  margin-bottom: var(--space-4);
}
.related__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.related__item {
  background: #fff;
  border: 1px solid var(--line-on-paper);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.related__item:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.related__item h4 { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--hmc-prussian); margin-bottom: 6px; }
.related__item span { font-family: var(--font-body); font-size: 14px; color: var(--hmc-mute); }

/* End-of-page CTA */
.end-cta {
  margin-top: var(--space-8);
  padding: 36px 32px;
  background: var(--hmc-prussian);
  border-radius: var(--radius-lg);
  color: #fff;
  text-align: center;
}
.end-cta h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2vw, 24px);
  color: #fff;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

/* =====================================================================
   REVEAL ANIMATION (subtle, brand-restrained)
   ===================================================================== */
/* Reveal hiding only applies when JS is present (html.js), so content is
   visible by default if JS is disabled or fails. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
    transition: opacity 560ms var(--ease), transform 560ms var(--ease);
    will-change: opacity, transform;
  }
  .js .reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    will-change: auto;
  }
  .js .reveal-stagger > * {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
    transition: opacity 560ms var(--ease), transform 560ms var(--ease);
  }
  /* All children become visible once the parent reveals; the nth-child rules
     only add the staggered delay (any item past the 6th simply has no extra
     delay, but is never left hidden). */
  .js .reveal-stagger.is-visible > * { opacity: 1; transform: translate3d(0, 0, 0); }
  .js .reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
  .js .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 60ms; }
  .js .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 120ms; }
  .js .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 180ms; }
  .js .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 240ms; }
  .js .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 300ms; }
}

/* =====================================================================
   RESPONSIVE — breakpoint 768px per spec
   ===================================================================== */
@media (max-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr 1fr; }
  .footer__logo { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  /* nav layout: logo left, CTA near right, hamburger far right */
  .nav {
    --nav-logo-h: 34px;   /* readable on mobile, doesn't shrink too much */
    gap: var(--space-3);
  }
  .nav--scrolled { --nav-logo-h: 29px; }   /* subtle shrink only */
  .nav__logo { margin-right: auto; }        /* pushes CTA + burger to the right */
  .nav__links { display: none; }
  .nav__cta {
    order: 2;
    padding: 9px 16px;
    font-size: 11px;
  }
  .nav--scrolled .nav__cta { padding: 8px 14px; font-size: 10.5px; }
  .nav__cta::after { font-size: 13px; }     /* smaller arrow */
  .nav__burger {
    display: inline-flex;
    order: 3;                                /* far right, after CTA */
    width: 40px; height: 40px;
  }
  .nav--scrolled .nav__burger { width: 36px; height: 36px; }

  .nav__drawer.is-open {
    display: block;
    position: fixed;
    top: var(--nav-drawer-top, 64px);
    left: 0; right: 0;
    background: rgba(0, 20, 31, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-on-dark);
    padding: 20px var(--pad-x);
    z-index: 55;
  }
  .nav__drawer ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 0;
  }
  .nav__drawer li {
    border-bottom: 1px solid var(--line-on-dark-soft);
  }
  .nav__drawer li:last-child { border: 0; }
  .nav__drawer a {
    display: block;
    padding: 14px 0;
    font-family: var(--font-display);
    font-size: 15px;
    color: #fff;
  }

  /* hero */
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-7); }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .hero__ctas .btn { justify-content: center; }
  .hero__stats { grid-template-columns: 1fr; gap: var(--space-5); }
  .pipeline { padding: 16px 16px 14px; }

  /* sections */
  .split-60-40 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .initiatives { grid-template-columns: 1fr; }
  .related__list { grid-template-columns: 1fr; }

  /* contact */
  .contact-block__inner { grid-template-columns: 1fr; }

  /* footer */
  .footer__top { grid-template-columns: 1fr; gap: var(--space-5); }
  .footer__bottom { flex-direction: column; align-items: flex-start; }

  /* CTA layout */
  .section-head__row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .nav { --nav-logo-h: 28px; gap: 8px; padding-inline: 16px; }
  .nav--scrolled { --nav-logo-h: 25px; }
  .btn { padding: 14px 22px; font-size: 12px; }
  .nav__cta { padding: 8px 12px; font-size: 10.5px; gap: 6px; }
  .nav__cta::after { font-size: 12px; }
  .nav--scrolled .nav__cta { padding: 7px 11px; font-size: 10px; }
  .nav__burger { width: 38px; height: 38px; }
}

/* =====================================================================
   MICRO-INTERACTIONS (transform/opacity only, design-system restrained)
   ===================================================================== */
.btn::after { transition: transform 200ms var(--ease); }
.btn:hover::after { transform: translateX(3px); }
.btn:active::after { transform: translateX(1px); }

.card { transition: transform 240ms var(--ease), box-shadow 240ms var(--ease); }
.card:hover { transform: translateY(-2px); }
.card__icon-tile { transition: transform 240ms var(--ease); }
.card:hover .card__icon-tile { transform: translateY(-2px) scale(1.03); }

.team-card__photo img { transition: transform 600ms var(--ease); }
.team-card:hover .team-card__photo img { transform: scale(1.025); }

.nav__link { position: relative; }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -1px;
  height: 1.5px;
  background: var(--hmc-cyan);
  transition: right 240ms var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after { right: 0; }
.nav__link.is-active { border-bottom-color: transparent; color: var(--hmc-cyan); }

/* =====================================================================
   GRAPH HOVER INTERACTIONS (SVG; transform-box keeps attr positions safe)
   ===================================================================== */
.pipeline__svg g { pointer-events: bounding-box; }
.pipeline__node g rect,
.pipeline__hub > circle:nth-of-type(2) {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 220ms var(--ease);
}
.pipeline__node g:hover rect { transform: scale(1.12); }
.pipeline__hub:hover > circle:nth-of-type(2) { transform: scale(1.08); }
.pipeline__node g, .pipeline__hub { cursor: help; }

.latencyviz .lv-stage { pointer-events: bounding-box; cursor: help; }
.latencyviz .lv-stage circle {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 220ms var(--ease);
}
.latencyviz .lv-stage:hover circle { transform: scale(1.35); }
.latencyviz .lv-window {
  transition: opacity 220ms var(--ease);
  cursor: help;
}
.latencyviz .lv-window:hover { opacity: 0.22; }
.latencyviz .lv-risk {
  pointer-events: visibleStroke;
  cursor: help;
  transition: stroke-width 200ms var(--ease);
}
.latencyviz .lv-risk:hover { stroke-width: 3.4; }
