/* ILPI — institutional editorial system
   Palette: deep navy, warm ivory, restrained gold. */

:root {
  color-scheme: light;

  --navy-900: #0b1626;
  --navy-800: #122237;
  --navy-700: #1b3150;
  --navy-600: #284a73;
  --navy-500: #3a5f8f;

  --ivory-50:  #fdfaf4;
  --ivory-100: #f8f2e7;
  --ivory-200: #eee5d4;
  --ivory-300: #ddd0b9;

  --gold-600: #9a6f24;
  --gold-500: #b5883a;
  --gold-400: #cdab63;

  --ink:      #16202e;
  --ink-soft: #46556a;
  --rule:     rgba(18, 34, 55, .14);

  --shell: 1180px;
  --gut: clamp(1.25rem, 4vw, 3rem);

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(.82rem, .79rem + .15vw, .9rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.09rem);
  --step-1:  clamp(1.18rem, 1.1rem + .4vw, 1.4rem);
  --step-2:  clamp(1.45rem, 1.3rem + .75vw, 1.95rem);
  --step-3:  clamp(1.8rem, 1.5rem + 1.5vw, 2.8rem);
  --step-4:  clamp(2.2rem, 1.6rem + 2.8vw, 4.1rem);

  --shadow-s: 0 1px 2px rgba(11, 22, 38, .06), 0 4px 14px rgba(11, 22, 38, .05);
  --shadow-m: 0 2px 6px rgba(11, 22, 38, .07), 0 18px 44px rgba(11, 22, 38, .09);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory-50);
  color: var(--ink);
  font: 400 var(--step-0)/1.68 var(--sans);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto is load-bearing: the width/height attributes on <img> act as a
   presentational hint for CSS height, so without this any rule that sets only
   width (or aspect-ratio) leaves the old pixel height and distorts the image. */
img { max-width: 100%; display: block; height: auto; }

a { color: var(--navy-700); text-decoration-color: var(--gold-400); text-underline-offset: .18em; }
a:hover { color: var(--gold-600); }

:where(a, button, [tabindex]):focus-visible {
  outline: 2.5px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--navy-800); color: var(--ivory-50);
  padding: .7rem 1.1rem; font-size: var(--step--1); text-decoration: none;
}
.skip:focus { left: .5rem; top: .5rem; color: var(--ivory-50); }

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

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.012em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -.005em; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
}

.prose { max-width: 68ch; }
.prose p + p { margin-top: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font: 500 var(--step--1)/1 var(--sans);
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold-600);
  margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: ""; width: 2.2rem; height: 1px; background: var(--gold-500); flex: none;
}
.eyebrow.on-dark { color: var(--gold-400); }
.eyebrow.on-dark::before { background: var(--gold-400); }

/* ---------- Header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ivory-50) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow .3s ease;
}
.site-head[data-stuck] { box-shadow: 0 1px 18px rgba(11, 22, 38, .08); }

.head-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.6rem;
}

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.brand img { width: 2.9rem; height: auto; }
.brand-txt { display: flex; flex-direction: column; }
.brand-txt strong {
  font: 700 1.12rem/1 var(--serif);
  letter-spacing: .07em; color: var(--navy-800);
}
.brand-txt small {
  font-size: .64rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: .22rem; max-width: 22ch; line-height: 1.3;
}

.nav ul { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: .55rem .78rem;
  font-size: .92rem; font-weight: 500;
  color: var(--navy-800); text-decoration: none;
  border-radius: 4px; position: relative;
}
.nav a:hover { background: var(--ivory-200); color: var(--navy-900); }
.nav a[aria-current="page"] { color: var(--gold-600); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .78rem; right: .78rem; bottom: .22rem;
  height: 2px; background: var(--gold-500);
}

.burger {
  display: none; width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--rule); border-radius: 5px;
  background: transparent; cursor: pointer;
  padding: 0; place-content: center; gap: 5px;
}
.burger span { display: block; width: 1.15rem; height: 1.6px; background: var(--navy-800); margin-inline: auto; transition: transform .25s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: grid; }
  .nav {
    position: absolute; inset: 100% 0 auto; display: none;
    background: var(--ivory-50); border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-m);
  }
  .nav[data-open] { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: .5rem var(--gut) 1.1rem; }
  .nav a { padding: .85rem .2rem; border-bottom: 1px solid var(--rule); border-radius: 0; font-size: 1rem; }
  .nav a[aria-current="page"]::after { left: .2rem; right: auto; width: 1.8rem; bottom: .5rem; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.75rem, 5vw, 4.5rem); }
.section--ivory { background: var(--ivory-100); }
.section--navy { background: var(--navy-800); color: var(--ivory-100); }
.section--navy h2, .section--navy h3 { color: var(--ivory-50); }
.section--navy a { color: var(--gold-400); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head .lede { margin-top: 1rem; }
.section--navy .section-head .lede { color: color-mix(in srgb, var(--ivory-100) 78%, transparent); }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--navy-900);
  color: var(--ivory-100);
  overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 7.5rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70rem 40rem at 82% 12%, rgba(205, 171, 99, .14), transparent 62%),
    radial-gradient(48rem 34rem at 6% 94%, rgba(58, 95, 143, .3), transparent 65%);
  pointer-events: none;
}
.hero .shell { position: relative; }

.hero-grid {
  display: grid; gap: clamp(2.25rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
}
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { color: var(--ivory-50); font-weight: 400; }
.hero h1 em { font-style: italic; color: var(--gold-400); font-weight: 400; }
.hero .lede { color: color-mix(in srgb, var(--ivory-100) 82%, transparent); margin-top: 1.5rem; max-width: 46ch; }

.hero-motto {
  margin-top: 2.1rem; padding-left: 1.1rem;
  border-left: 2px solid var(--gold-500);
  font: italic 400 var(--step-1)/1.45 var(--serif);
  color: var(--ivory-100); max-width: 40ch;
}

.hero-crest {
  display: grid; place-items: center;
  aspect-ratio: 1; width: min(100%, 32rem); margin-inline: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(253, 250, 244, .1), rgba(253, 250, 244, .02) 62%, transparent 70%);
  border: 1px solid rgba(205, 171, 99, .26);
}
.hero-crest img {
  width: 82%;
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, .45));
  animation: crest-spin 16s linear infinite;
  transform-origin: 50% 50%;
  will-change: transform;
}
.hero-crest:hover img { animation-play-state: paused; }

@keyframes crest-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero-facts {
  display: flex; flex-wrap: wrap; gap: .5rem 2.5rem;
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  padding-top: 1.75rem;
  border-top: 1px solid rgba(205, 171, 99, .22);
  list-style: none; padding-left: 0; margin-bottom: 0;
}
.hero-facts li { display: flex; flex-direction: column; gap: .3rem; }
.hero-facts dt, .hero-facts b {
  font: 600 var(--step-1)/1 var(--serif); color: var(--gold-400);
}
.hero-facts span {
  font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase;
  color: color-mix(in srgb, var(--ivory-100) 64%, transparent);
}

/* ---------- Buttons ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.1rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .82rem 1.4rem; border-radius: 3px;
  font: 500 .95rem/1 var(--sans); letter-spacing: .01em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold-500); color: var(--navy-900); }
.btn--gold:hover { background: var(--gold-400); color: var(--navy-900); }
.btn--ghost { border-color: rgba(205, 171, 99, .5); color: var(--ivory-100); }
.btn--ghost:hover { border-color: var(--gold-400); color: var(--gold-400); background: rgba(205, 171, 99, .08); }
.btn--navy { background: var(--navy-800); color: var(--ivory-50); }
.btn--navy:hover { background: var(--navy-700); color: var(--ivory-50); }
.btn--line { border-color: var(--navy-700); color: var(--navy-800); }
.btn--line:hover { background: var(--navy-800); color: var(--ivory-50); }

/* ---------- Grids ---------- */

.grid { display: grid; gap: clamp(1.1rem, 2.4vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }

/* Service / value cards */
.card {
  background: var(--ivory-50);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--gold-500);
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
  display: flex; flex-direction: column; gap: .7rem;
  box-shadow: var(--shadow-s);
}
.section--ivory .card { background: #fff; }
.card .num {
  font: 600 .78rem/1 var(--sans); letter-spacing: .16em;
  color: var(--gold-600);
}
.card h3 { color: var(--navy-800); }
.card p { color: var(--ink-soft); font-size: .97rem; margin: 0; }

/* Numbered list (objectives) */
.ol-editorial { counter-reset: n; list-style: none; margin: 0; padding: 0; }
.ol-editorial li {
  counter-increment: n; position: relative;
  padding: 1.15rem 0 1.15rem 3.4rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
}
.ol-editorial li:first-child { padding-top: 0; }
.ol-editorial li:last-child { border-bottom: 0; padding-bottom: 0; }
.ol-editorial li::before {
  content: counter(n, decimal-leading-zero);
  position: absolute; left: 0; top: 1.15rem;
  font: 600 .95rem/1.6 var(--serif); color: var(--gold-600);
}
.ol-editorial li:first-child::before { top: 0; }

/* Definition pairs (vision / mission / mandate / motto) */
.pillars { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.pillar { padding-top: 1.3rem; border-top: 2px solid var(--gold-500); }
.pillar h3 { color: var(--navy-800); margin-bottom: .6rem; }
.section--navy .pillar h3 { color: var(--ivory-50); }
.pillar p { color: var(--ink-soft); }
.section--navy .pillar p { color: color-mix(in srgb, var(--ivory-100) 80%, transparent); }

/* ---------- Process steps ---------- */

.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 1.32rem; top: .9rem; bottom: .9rem;
  width: 1px; background: rgba(205, 171, 99, .35);
}
.step {
  position: relative; padding: 0 0 2.1rem 4.2rem;
}
.step:last-child { padding-bottom: 0; }
.step-dot {
  position: absolute; left: 0; top: 0;
  width: 2.7rem; height: 2.7rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy-800); color: var(--gold-400);
  font: 600 .95rem/1 var(--serif);
  border: 1px solid rgba(205, 171, 99, .45);
}
.section--navy .step-dot { background: var(--navy-900); }
.step h3 { color: var(--navy-800); margin-bottom: .45rem; padding-top: .35rem; }
.section--navy .step h3 { color: var(--ivory-50); }
.step p { color: var(--ink-soft); margin: 0; }
.section--navy .step p { color: color-mix(in srgb, var(--ivory-100) 78%, transparent); }

/* ---------- People ---------- */

.people { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }

.person {
  background: #fff; border: 1px solid var(--rule);
  box-shadow: var(--shadow-s);
  display: flex; flex-direction: column;
}
.person figure { margin: 0; background: var(--ivory-200); }
.person img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 22%;
}
.person-body { padding: 1.15rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.person h3 { font-size: 1.1rem; color: var(--navy-800); }
.person .role {
  font: 500 .76rem/1.3 var(--sans); letter-spacing: .11em; text-transform: uppercase;
  color: var(--gold-600); margin: 0;
}
.person .quals { font-size: .83rem; line-height: 1.55; color: var(--ink-soft); margin: 0; }
.person .bio { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* Compact roster (medical team) */
.roster { display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr)); }
.roster .person-body { padding: .95rem 1rem 1.15rem; gap: .3rem; }
.roster h3 { font-size: .98rem; }
.roster .quals { font-size: .78rem; letter-spacing: .02em; }
.roster .lead-tag {
  align-self: flex-start; margin-top: .15rem;
  background: var(--navy-800); color: var(--gold-400);
  font: 500 .66rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  padding: .33rem .55rem; border-radius: 2px;
}

/* ---------- Activity gallery ---------- */

.gallery { display: grid; gap: clamp(1.1rem, 2.4vw, 1.75rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.shot {
  margin: 0; background: #fff;
  border: 1px solid var(--rule); box-shadow: var(--shadow-s);
  display: flex; flex-direction: column;
}
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ivory-200); }
.shot figcaption {
  padding: .95rem 1.15rem 1.15rem;
  font-size: .87rem; line-height: 1.6; color: var(--ink-soft);
  border-top: 2px solid var(--gold-500);
}
.shot--wide { grid-column: 1 / -1; }
.shot--wide img { aspect-ratio: 16 / 9; }
@media (min-width: 60rem) {
  .shot--wide { display: grid; grid-template-columns: 1.55fr 1fr; align-items: stretch; }
  .shot--wide img { height: 100%; aspect-ratio: auto; min-height: 20rem; }
  .shot--wide figcaption { border-top: 0; border-left: 2px solid var(--gold-500); display: grid; align-content: center; padding: 1.75rem; font-size: .95rem; }
}
.shot--contain img { object-fit: contain; background: #fff; }

/* ---------- Feature split ---------- */

.split {
  display: grid; gap: clamp(2rem, 4.5vw, 3.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  align-items: center;
}
.split-media { margin: 0; }
.split-media img {
  width: 100%; border: 1px solid var(--rule); box-shadow: var(--shadow-m);
}
.split-media figcaption {
  margin-top: .8rem; font-size: .83rem; line-height: 1.6; color: var(--ink-soft);
}

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: clamp(1.75rem, 4vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.contact-block { padding-top: 1.3rem; border-top: 2px solid var(--gold-500); }
.contact-block h3 { color: var(--navy-800); margin-bottom: .7rem; font-size: 1.05rem; }
.contact-block address { font-style: normal; color: var(--ink-soft); line-height: 1.75; }
.contact-block p { color: var(--ink-soft); margin-bottom: .35rem; }
.contact-block a { font-weight: 500; }

/* ---------- Footer ---------- */

.site-foot { background: var(--navy-900); color: color-mix(in srgb, var(--ivory-100) 76%, transparent); padding-top: clamp(2.75rem, 6vw, 4.5rem); }
.foot-grid {
  display: grid; gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr) minmax(0, 1.1fr);
  padding-bottom: clamp(2.25rem, 5vw, 3.5rem);
}
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; } }

.foot-brand img { width: 3.4rem; height: auto; margin-bottom: 1rem; }
.foot-name { font: 600 var(--step-1)/1.25 var(--serif); color: var(--ivory-50); margin-bottom: .7rem; max-width: 24ch; }
.foot-motto { font: italic 400 .92rem/1.6 var(--serif); color: var(--gold-400); max-width: 38ch; margin-bottom: .7rem; }
.foot-rc { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }

.site-foot h2 {
  font: 500 .76rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-400); margin-bottom: 1.1rem;
}
.foot-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.foot-nav a, .foot-contact a { color: color-mix(in srgb, var(--ivory-100) 82%, transparent); text-decoration: none; font-size: .93rem; }
.foot-nav a:hover, .foot-contact a:hover { color: var(--gold-400); text-decoration: underline; }
.foot-contact address { font-style: normal; font-size: .9rem; line-height: 1.8; margin-bottom: .9rem; }
.foot-contact p { font-size: .9rem; margin-bottom: .3rem; }

.foot-base {
  border-top: 1px solid rgba(205, 171, 99, .2);
  padding-block: 1.4rem;
}
.foot-base p { font-size: .78rem; line-height: 1.7; margin: 0; color: color-mix(in srgb, var(--ivory-100) 58%, transparent); }

/* ---------- Motion ---------- */

[data-reveal] { opacity: 0; }
.js-off [data-reveal] { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .btn:hover { transform: none; }
  .hero-crest img { animation: none !important; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
