/* Impacting Health Global: homepage styles */
:root {
  /* Brand palette from the IHH logo (Logo/SVG, 2026-10-28): orange #FF8C00, turquoise #40E0D0.
     Both are light, so they carry ink text; --jade is the same turquoise hue darkened for text and buttons (5:1). */
  --forest: #FF8C00;        /* IHH orange: Advisory band (ink text) */
  --turquoise: #40E0D0;     /* IHG turquoise: How we work and CTA bands (ink text) */
  --jade: #147B71;          /* turquoise text shade: headings, links, primary buttons */
  --green-2: #8DEDE3;       /* cards on the turquoise band */
  --green-line: #1F9D90;
  --lime: #FFC9A8;          /* highlight on dark: numbers, buttons */
  --sage: #FFE8CC;          /* Academy band */
  --lilac: #D9F9F5;         /* About band */
  --sand: #FFFBF6;          /* page background */
  --white: #FFFFFF;
  --ink: #1F120B;
  --muted: #54463D;
  --on-dark: #FFFFFF;
  --on-dark-muted: #FFEDE3;
  --footer-bg: #1F120B;
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --head-weight: 700;
  --head-tracking: -0.03em;
  --head-scale: .94;
  --section-pad: clamp(64px, 9vw, 112px);
  --header-h: 72px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-tracking); text-wrap: balance; line-height: 1.1; }
section[id] { scroll-margin-top: var(--header-h); }

.inner {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

/* Focus */
:focus-visible { outline: 2px solid var(--jade); outline-offset: 3px; }
.site-footer :focus-visible { outline-color: var(--lime); }
.band-green :focus-visible, .cta-band :focus-visible { outline-color: var(--ink); }
.skip-link:focus-visible { outline-color: var(--lime); }

.skip-link {
  position: fixed; left: 16px; top: -100px; z-index: 200;
  background: var(--jade); color: var(--on-dark);
  padding: 12px 20px; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); outline-color: var(--lime); }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  border-radius: 10px; border: 1.5px solid transparent;
  font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-forest { background: var(--jade); color: var(--on-dark); border-color: var(--jade); }
.btn-outline { background: transparent; color: var(--jade); border-color: var(--jade); }
.btn-lime { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.btn-lg { min-height: 56px; padding: 16px 32px; font-size: 17px; }
.arrow { width: 16px; height: 16px; flex: none; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--jade); font-weight: 600; text-decoration: none;
}
.link-arrow:hover, .link-arrow:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.center-row { display: flex; justify-content: center; }

.eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; line-height: 1.3; }
.eyebrow-lime { color: var(--lime); }
.eyebrow-jade { color: var(--jade); }
.eyebrow-sm { font-size: 12px; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 100;
  background: var(--sand);
  border-bottom: 1px solid transparent;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.wordmark { font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; white-space: nowrap; letter-spacing: -0.01em; }
.primary-nav { display: flex; align-items: center; gap: 24px; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative; display: block; padding: 8px 10px;
  font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.nav-link::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px;
  background: var(--jade); transform: scaleX(0); transform-origin: left;
}
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); }
.menu-toggle {
  display: none; width: 48px; height: 48px; padding: 0; border: 0; background: transparent;
  border-radius: 10px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}
.menu-bars { position: relative; width: 24px; height: 18px; display: block; }
.menu-bars span { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 2px; }
.menu-bars span:nth-child(1) { top: 0; }
.menu-bars span:nth-child(2) { top: 8px; }
.menu-bars span:nth-child(3) { top: 16px; }
.nav-check:checked ~ .menu-toggle .menu-bars span:nth-child(1) { top: 8px; transform: rotate(45deg); }
.nav-check:checked ~ .menu-toggle .menu-bars span:nth-child(2) { opacity: 0; }
.nav-check:checked ~ .menu-toggle .menu-bars span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

/* Hero */
.hero { background: var(--sand); padding-block: clamp(40px, 6vw, 80px) var(--section-pad); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.hero h1 { font-size: calc(clamp(40px, 5vw, 60px) * var(--head-scale)); color: var(--jade); }
.hero-sub { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 34em; }
.hero-text .btn-row { margin-top: 8px; }
.hero-photos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; min-width: 0; }
.arch { overflow: hidden; border-radius: 999px 999px 16px 16px; background: var(--sage); min-width: 0; }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.arch-1 { aspect-ratio: 27 / 34; align-self: end; }
.arch-2 { aspect-ratio: 27 / 28; align-self: end; }
.arch-3 { aspect-ratio: 27 / 28; align-self: start; }
.arch-4 { aspect-ratio: 27 / 34; align-self: start; }

/* Bands */
.band { padding-block: var(--section-pad); }
.band-green { background: var(--turquoise); color: var(--ink); }
.band-green .h2.on-dark, .band-green .eyebrow-lime { color: var(--ink); }
.band-sand { background: var(--sand); }
.band-white { background: var(--white); }
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 760px; }
.h2 { font-size: calc(clamp(32px, 4vw, 44px) * var(--head-scale)); color: var(--jade); }
.h2.on-dark { color: var(--on-dark); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.step-card {
  background: var(--green-2); border: 1px solid var(--green-line); border-radius: 12px;
  padding: 32px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.step-num { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 72px; line-height: 1; letter-spacing: -0.02em; color: var(--jade); font-variant-numeric: tabular-nums; }
.step-card h3 { font-family: var(--font-body); font-size: 20px; font-weight: 600; letter-spacing: 0; color: var(--ink); line-height: 1.3; }
.step-card p { font-size: 16px; color: var(--ink); }

/* Cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card {
  background: var(--white); border-radius: 12px; padding: 20px 20px 28px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.card-title { font-size: 24px; color: var(--jade); padding-inline: 8px; }
.card-text { color: var(--muted); font-size: 17px; padding-inline: 8px; }
.card .link-arrow { margin-top: auto; padding: 8px 8px 0; }

/* Expertise */
.expertise { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.expertise-text { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; min-width: 0; }
.topics { display: flex; flex-direction: column; gap: 4px; width: 100%; margin-block: 8px; }
.topic {
  position: relative; padding: 10px 0 10px 20px; font-size: 18px; color: var(--muted);
}
.topic::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px;
  background: var(--jade); border-radius: 2px; opacity: 0;
}
.topic.is-active { color: var(--ink); font-weight: 700; }
.topic.is-active::before, .topic:hover::before { opacity: 1; }
.expertise-media img { width: 100%; height: auto; border-radius: 12px; }

/* Split bands */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 420px; }
.split-sage { background: var(--sage); color: var(--ink); }
.split-forest { background: var(--forest); color: var(--ink); }
.split-sage .split-title, .split-lilac .split-title { color: var(--jade); }
.split-lilac { background: var(--lilac); color: var(--ink); }
.split-text { display: flex; align-items: center; padding: 80px 96px; min-width: 0; }
.split-copy { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; max-width: 520px; }
.split-title { font-size: calc(clamp(32px, 3.4vw, 40px) * var(--head-scale)); }
.split-forest .split-title { color: var(--ink); }
.split-copy p { font-size: 18px; line-height: 1.55; }
.split-forest .split-copy p { color: var(--ink); }
.split-forest .btn-lime { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.split-forest :focus-visible { outline-color: var(--ink); }
.split-copy .btn-row { margin-top: 8px; }
.split-media { position: relative; min-width: 0; min-height: 420px; overflow: hidden; }
.split-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split-reverse .split-media { order: -1; }

/* Insights */
.insights { margin-bottom: clamp(32px, 5vw, 48px); }
.insight { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.insight-img { display: block; overflow: hidden; border-radius: 12px; aspect-ratio: 16 / 10; margin-bottom: 4px; }
.insight-img img { width: 100%; height: 100%; object-fit: cover; }
.insight-title { font-size: 22px; line-height: 1.25; color: var(--jade); }
.insight-title a { text-decoration: none; }
.insight-title a:hover, .insight-title a:focus-visible { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }

/* Final CTA */
.cta-band { background: var(--turquoise); padding-block: 80px; }
.cta-band .btn-lime { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta-title { font-size: calc(clamp(32px, 4vw, 48px) * var(--head-scale)); color: var(--ink); max-width: 18em; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--on-dark); padding-block: clamp(56px, 7vw, 80px) 32px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-wordmark { font-weight: 700; font-size: 22px; color: var(--on-dark); margin-bottom: 12px; }
.footer-strap { color: var(--on-dark-muted); font-size: 16px; max-width: 28em; }
.footer-h { font-family: var(--font-body); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--lime); margin: 0 0 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--on-dark); font-size: 15px; text-decoration: none; }
.footer-col a:hover, .footer-col a:focus-visible, .legal a:hover, .legal a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.footer-rule { border: 0; height: 1px; background: color-mix(in srgb, var(--on-dark) 18%, transparent); margin: 48px 0 24px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; color: var(--on-dark-muted); font-size: 14px; }
.legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.legal a { color: var(--on-dark-muted); text-decoration: none; }

/* Responsive */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-text { padding: 64px 48px; }
}
@media (max-width: 1199px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 16px;
    background: var(--sand); border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
    padding: 16px max(24px, env(safe-area-inset-right, 0px)) 24px max(24px, env(safe-area-inset-left, 0px));
    max-height: calc(100vh - var(--header-h) - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    visibility: hidden; opacity: 0; pointer-events: none;
  }
  .nav-check:checked ~ .primary-nav { visibility: visible; opacity: 1; pointer-events: auto; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { padding: 14px 0; font-size: 17px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
  .nav-link::after { left: 0; right: 0; bottom: 8px; }
  .nav-cta { width: 100%; }
  .footer-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-photos { max-width: 480px; width: 100%; margin-inline: auto; gap: 12px; }
  .cards-3 { grid-template-columns: minmax(0, 1fr); }
  .expertise { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .split-media { order: -1; min-height: 0; aspect-ratio: 4 / 3; }
  .split-text { padding: 48px max(24px, env(safe-area-inset-left, 0px)); }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step-num { font-size: 60px; }
  .hero-sub { font-size: 18px; }
  .btn-row .btn { flex: 1 1 100%; white-space: normal; }
  .cta-band { padding-block: 64px; }
  .cta-inner .btn { width: 100%; }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .wordmark { font-size: 18px; white-space: normal; }
}

/* Motion (only when the visitor has no reduced-motion preference) */
@media (prefers-reduced-motion: no-preference) {
  .site-header { transition: background-color .25s ease, border-color .25s ease; }
  .btn { transition: transform .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease; }
  .btn:hover, .btn:focus-visible { transform: translateY(-1px); }
  .btn-forest:hover { background: var(--green-2); }
  .btn-outline:hover { background: var(--jade); color: var(--on-dark); }
  .btn-lime:hover { background: color-mix(in srgb, var(--lime) 82%, #fff); }
  .arrow { transition: transform .2s ease; }
  .btn:hover .arrow, .btn:focus-visible .arrow, .link-arrow:hover .arrow, .link-arrow:focus-visible .arrow { transform: translateX(3px); }
  .nav-link::after { transition: transform .25s ease; }
  .card { transition: transform .25s ease, box-shadow .25s ease; }
  .card:hover, .card:focus-within { transform: translateY(-4px); box-shadow: 0 12px 30px color-mix(in srgb, var(--ink) 10%, transparent); }
  .step-card { transition: transform .25s ease, box-shadow .25s ease; }
  .step-num { transition: color .25s ease; }
  .step-card:hover .step-num { color: var(--ink); }
  .topic { transition: transform .2s ease, color .2s ease; }
  .topic::before { transition: opacity .2s ease; }
  .topic:hover { transform: translateX(4px); color: var(--ink); }
  .insight-img img { transition: transform .5s ease; }
  .insight:hover .insight-img img, .insight:focus-within .insight-img img { transform: scale(1.04); }
  .primary-nav { transition: opacity .2s ease, visibility .2s ease; }
  .menu-bars span { transition: transform .2s ease, opacity .2s ease, top .2s ease; }
  @media (max-width: 1199px) {
    .primary-nav { transform: translateY(-8px); transition: opacity .2s ease, visibility .2s ease, transform .2s ease; }
    .nav-check:checked ~ .primary-nav { transform: none; }
  }

  /* Hero intro: CSS keyframes from a visible start (no JavaScript needed) */
  @keyframes ihg-rise { from { opacity: .35; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes ihg-settle { from { opacity: .35; transform: scale(.96); } to { opacity: 1; transform: none; } }
  [data-intro] { animation: ihg-rise .55s ease-out backwards; }
  [data-intro]:nth-child(2) { animation-delay: 60ms; }
  [data-intro]:nth-child(3) { animation-delay: 120ms; }
  [data-intro-photo] { animation: ihg-settle .6s ease-out backwards; }
  .arch-1 { animation-delay: 180ms; }
  .arch-2 { animation-delay: 240ms; }
  .arch-3 { animation-delay: 300ms; }
  .arch-4 { animation-delay: 360ms; }

  /* Scroll-driven reveals and header state; browsers without support show everything as-is.
     "backwards" fill means hover transforms still work once a section has revealed. */
  @supports (animation-timeline: view()) {
    [data-reveal] { animation: ihg-rise linear backwards; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    @keyframes ihg-header {
      to {
        background: color-mix(in srgb, var(--sand) 88%, transparent);
        -webkit-backdrop-filter: saturate(1.4) blur(12px);
        backdrop-filter: saturate(1.4) blur(12px);
        border-bottom-color: color-mix(in srgb, var(--ink) 10%, transparent);
      }
    }
    .site-header { animation: ihg-header linear both; animation-timeline: scroll(root); animation-range: 0 24px; }
  }
}

/* CSS-only menu toggle: the checkbox stays focusable but hidden; the label is the visible control */
.nav-check { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.header-inner:has(.nav-check:focus-visible) .menu-toggle { outline: 2px solid var(--jade); outline-offset: 3px; }
