/* =========================================================================
   Shared components: header, mobile nav, footer, page hero, lists, tables,
   tabs, forms, CTA band, org chart.
   ========================================================================= */

/* ---------- Header (transparent over hero, becomes solid when scrolled) ---------- */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 50; }
.site-header__bar {
  max-width: 1240px; margin: 0 auto; padding: 22px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { height: 54px; width: auto; transition: height .3s var(--ease); }
.site-nav { display: flex; align-items: center; gap: 30px; font-size: 14px; letter-spacing: .02em; }
.site-nav a { color: rgba(255, 255, 255, .86); text-decoration: none; padding: 6px 0 4px; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.site-nav a:hover { color: #FFFFFF; }
.site-nav a[aria-current="page"] { color: #FFFFFF; border-bottom-color: var(--brass-300); }
.site-header__actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 3px; }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 32px;
  border-radius: 999px; color: #FFFFFF; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-decoration: none;
}
.lang-switch a[aria-current="true"] { background: #FFFFFF; color: var(--forest-800); font-weight: 600; }
.lang-switch a:not([aria-current="true"]):hover { background: rgba(255, 255, 255, .12); }
.header-cta {
  display: inline-flex; align-items: center; height: 44px; padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px; color: #FFFFFF;
  text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: .04em;
  transition: background-color .25s, color .25s;
}
.header-cta:hover { background: #FFFFFF; color: var(--forest-800); }
.burger {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; background: transparent; color: #FFFFFF; cursor: pointer;
}
.burger .icon-close { display: none; }
.burger[aria-expanded="true"] .icon-open { display: none; }
.burger[aria-expanded="true"] .icon-close { display: block; }
.mobile-nav {
  margin: 0 16px; padding: 12px 24px; background: var(--forest-800);
  border: 1px solid rgba(255, 255, 255, .14); display: flex; flex-direction: column;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a { color: #FFFFFF; text-decoration: none; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a[aria-current="page"] { color: var(--brass-300); }

.site-header.is-stuck {
  position: fixed; background: rgba(12, 51, 36, .94); backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .5);
  animation: header-in .35s var(--ease);
}
.site-header.is-stuck .site-header__bar { padding-top: 12px; padding-bottom: 12px; }
.site-header.is-stuck .site-header__logo img { height: 42px; }
.site-header.is-medical.is-stuck { background: rgba(7, 28, 42, .94); }
@keyframes header-in { from { transform: translateY(-100%); } to { transform: none; } }

@media (max-width: 960px) {
  .site-nav, .header-cta { display: none; }
  .burger { display: flex; }
}
@media (max-width: 420px) {
  .site-header__logo img { height: 44px; }
}

/* ---------- Page hero ---------- */
.hero { position: relative; display: flex; align-items: flex-end; min-height: var(--hero-h, 640px); background: var(--forest-800); color: #FFFFFF; }
.hero.navy { background: var(--navy-900); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; pointer-events: none; }
.hero__inner { position: relative; width: 100%; padding-top: 180px; padding-bottom: var(--hero-pb, 70px); }
.hero__sub { max-width: 560px; font-size: 17px; line-height: 1.7; font-weight: 300; color: rgba(255, 255, 255, .86); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .7); }
.breadcrumb a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.breadcrumb a:hover { color: #FFFFFF; }
.breadcrumb [aria-current] { color: var(--brass-300); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 640px) {
  .hero { min-height: auto; }
  .hero__inner { padding-top: 140px; }
}

/* ---------- Numbered lists ---------- */
.numlist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.numlist > li { display: flex; gap: 18px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink); }
.numlist__n { flex: none; min-width: 26px; font-family: var(--serif); font-size: 20px; color: var(--brass-500); }
.dark .numlist, .numlist--light { border-top-color: rgba(255, 255, 255, .18); }
.dark .numlist > li, .numlist--light > li { border-bottom-color: rgba(255, 255, 255, .18); }
.numlist--light .numlist__n, .dark .numlist__n { color: var(--brass-300); }

/* ---------- Stats grid with hairlines ---------- */
.hairline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 200px), 100%), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.hairline-grid > * { background: #FFFFFF; }
.hairline-grid--sand > * { background: var(--sand); }
.hairline-grid--paper { background: var(--line-3); border-color: var(--line-3); }
.hairline-grid--paper > * { background: var(--paper); }
.stat { display: flex; flex-direction: column; gap: 8px; padding: 24px 22px; }
.stat__n { font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--green-600); }
.stat__l { font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* ---------- Definition rows ---------- */
.def-rows { border-top: 1px solid var(--line); }
.def-rows > div { display: grid; grid-template-columns: var(--dt, 150px) minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.def-rows dt { color: var(--muted-2); }
.def-rows dd { color: var(--ink); }
@media (max-width: 420px) { .def-rows > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Data table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: #FFFFFF; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; min-width: var(--table-min, 760px); border-collapse: collapse; font-size: 14.5px; }
.data-table thead tr { background: var(--forest-800); color: #FFFFFF; text-align: left; }
.data-table th { padding: 16px 20px; font-weight: 500; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.data-table td { padding: 14px 20px; color: var(--muted); }
.data-table tbody tr { border-bottom: 1px solid var(--line-2); transition: background-color .2s; }
.data-table tbody tr:hover { background: #FAF8F2; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .strong { color: var(--ink); font-weight: 500; }
.data-table .ink { color: var(--ink-2); }
.cat-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--mint-50); border: 1px solid var(--mint-200); color: var(--green-600); font-size: 12px; white-space: nowrap; }

/* ---------- Pill tabs / filters ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  min-height: 44px; padding: 0 18px; border: 1px solid var(--line-3); border-radius: 999px;
  background: #FFFFFF; color: var(--ink); font: 400 13.5px var(--sans); cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.pill:hover { border-color: var(--green-600); color: var(--green-600); }
.pill[aria-selected="true"], .pill[aria-pressed="true"] { border-color: var(--forest-800); background: var(--forest-800); color: #FFFFFF; font-weight: 500; }
.pill--green[aria-pressed="true"] { border-color: var(--green-600); background: var(--green-600); }
.pill--sm { padding: 0 16px; font-size: 13px; }

/* ---------- Forms ---------- */
.form-card { background: var(--paper); color: var(--ink); padding: clamp(28px, 4vw, 48px); }
.form { display: flex; flex-direction: column; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field-legend { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field label .req { color: var(--green-600); }
.input {
  width: 100%; height: 50px; padding: 0 16px; border: 1px solid var(--line-3); border-radius: 2px;
  background: #FFFFFF; font: 400 15px var(--sans); color: var(--ink); transition: border-color .2s;
}
select.input { padding: 0 14px; }
textarea.input { height: auto; padding: 14px 16px; line-height: 1.6; resize: vertical; }
.input:hover { border-color: #C5BEAB; }
.input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.input[aria-invalid="true"] { border-color: #B4442F; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
fieldset.field { margin: 0; padding: 0; border: 0; }
.form-error { padding: 12px 16px; border-left: 3px solid #B4442F; background: #FBEFEB; color: #7A2A1C; font-size: 14px; line-height: 1.5; }
.form-error[hidden] { display: none; }
.form-thanks { min-height: 420px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.form-thanks[hidden], .form[hidden] { display: none; }
.form-thanks h3, .form-thanks h2 { font-family: var(--serif); font-size: 34px; font-weight: 600; color: var(--forest-800); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--green-600); color: #FFFFFF; }
.cta-band .container { padding-top: 80px; padding-bottom: 80px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; }
.cta-band h2 { max-width: 680px; font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.15; }
.cta-band .btn--ghost { border-color: rgba(255, 255, 255, .6); }
.cta-band .btn--ghost.solid-border { border-color: #FFFFFF; }

/* ---------- Org chart ---------- */
.org { display: flex; flex-direction: column; align-items: center; }
.org__node { padding: 20px 40px; min-width: 260px; text-align: center; color: #FFFFFF; background: var(--forest-800); }
.org__node--green { background: var(--green-600); }
.org__node .kicker { color: var(--brass-300); }
.org__node--green .kicker { color: rgba(255, 255, 255, .8); }
.org__title { font-family: var(--serif); font-size: 26px; margin-top: 4px; }
.org__line { width: 1px; height: 36px; background: var(--brass-500); }
.org__line--short { height: 28px; }
.org__branch { width: 100%; padding-top: 28px; border-top: 1px solid var(--brass-500); }
.dept { padding: 18px 16px; background: var(--mint-50); border: 1px solid var(--mint-200); font-size: 14.5px; font-weight: 500; color: var(--forest-800); }
.dept--cream { background: var(--cream); border-color: var(--cream-line); }
@media (max-width: 480px) { .org__node { min-width: 0; width: 100%; padding: 18px 20px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-900); color: rgba(255, 255, 255, .72); }
.site-footer .container { padding-top: 64px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 44px; }
.site-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 36px; }
.site-footer__brand { display: flex; flex-direction: column; gap: 18px; max-width: 360px; font-size: 13.5px; line-height: 1.7; }
.site-footer__brand img { height: 64px; width: auto; align-self: flex-start; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 48px; font-size: 14px; }
.site-footer__col { display: flex; flex-direction: column; gap: 12px; }
.site-footer__col .kicker { font-size: 11px; letter-spacing: .2em; color: var(--brass-300); }
.site-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: #FFFFFF; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 12.5px; color: rgba(255, 255, 255, .6); }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 46px; height: 46px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25); background: var(--forest-800); color: #FFFFFF; cursor: pointer;
  display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(10px);
  pointer-events: none; transition: opacity .3s, transform .3s, background-color .2s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--green-600); }
