/* ============================================================
   ALTERNITY HEALTHCARE — shared design system
   Lifted from the homepage; the single source of truth for the
   inside pages (How We Work, Membership, The Physician).
   ============================================================ */

:root {
  --stone:        #e8eaed;
  --stone-deep:   #e1e4e8;
  --paper:        #eef0f2;
  --ink:          #1d2228;
  --graphite:     #1b1f25;
  --ink-80:       rgba(29,34,40,0.80);
  --ink-68:       rgba(29,34,40,0.68);
  --ink-46:       rgba(29,34,40,0.46);
  --teal:         #006f7f;   /* deep accent */
  --teal-bright:  #00859b;   /* PMS 3145 */
  --slate:        #5f7e92;   /* PMS 7454 */
  --error:        #9a4b3f;
  --line:         rgba(29,34,40,0.16);
  --line-soft:    rgba(29,34,40,0.10);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- shared atoms ---------- */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 56px; }

.kicker {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0;
}
.rule { width: 56px; height: 2px; background: var(--teal); border: 0; margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  padding: 18px 32px;
  background: var(--ink);
  color: #f3f4f6;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.btn .ar { transition: transform .25s ease; color: rgba(243,244,246,0.6); }
.btn:hover { background: var(--teal); border-color: var(--teal); }
.btn:hover .ar { transform: translateX(5px); color: #fff; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  padding: 13px 22px;
  font-size: 12px;
}
.btn--ghost .ar { color: var(--teal); }
.btn--ghost:hover { background: var(--ink); color: #f3f4f6; }
.btn--ghost:hover .ar { color: #fff; }

.btn--light {
  background: #eef0f2;
  color: var(--ink);
  border-color: #eef0f2;
}
.btn--light .ar { color: var(--teal); }
.btn--light:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn--light:hover .ar { color: #fff; }

.wordmark {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

/* ---------- scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }
/* Page header is above the fold: paint immediately, never time-gate it. */
.js .page-head .reveal,
.js .page-head .reveal.in,
.js .hero .reveal,
.js .hero .reveal.in { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===================== NAV ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(232,234,237,0.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
/* brand lockup — seal (teal serif A, hairline ring) + serif wordmark */
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; color: var(--ink); }
.brand-seal { flex: 0 0 auto; display: block; }
.brand-seal svg { display: block; width: 44px; height: 44px; }
.brand-seal circle { stroke: currentColor; }
.brand-seal .seal-a { fill: var(--teal); }
.brand-words { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: "Cinzel", Georgia, serif; font-weight: 600; font-size: 18px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.brand-sub { font-family: var(--sans); font-weight: 600; font-size: 8.5px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--slate); margin-top: 6px; }

.nav-right { display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-68);
  position: relative;
  padding: 6px 0;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--teal); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--teal);
}

/* ===================== MOBILE NAV (hamburger + drawer) ===================== */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  margin: -8px -6px -8px 0;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle-icon { display: block; width: 22px; height: 22px; }
.nav-toggle-icon .l1,
.nav-toggle-icon .l2,
.nav-toggle-icon .l3 { transition: transform .25s ease, opacity .2s ease; transform-origin: center; }
.nav-toggle.is-open .nav-toggle-icon .l1 { transform: translateY(5px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-icon .l2 { opacity: 0; }
.nav-toggle.is-open .nav-toggle-icon .l3 { transform: translateY(-5px) rotate(-45deg); }

.nav-drawer { display: none; }
.nav-drawer nav { display: flex; flex-direction: column; padding: 8px 0 20px; }
.nav-drawer a {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-68);
  padding: 17px 0;
  border-top: 1px solid var(--line-soft);
  transition: color .2s ease;
}
.nav-drawer nav a:first-child { border-top: 0; }
.nav-drawer a:hover { color: var(--ink); }
.nav-drawer a[aria-current="page"] { color: var(--teal); }

/* ===================== PAGE HEADER ===================== */
.page-head { background: var(--stone); padding: clamp(108px, 15vw, 188px) 0 clamp(64px, 8vw, 104px); }
.page-head .wrap { max-width: 1040px; }
.page-head .kicker { margin-bottom: 30px; }
.page-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.014em;
  margin: 0;
  text-wrap: balance;
}
.page-head h1 .muted { color: var(--ink-46); }
.page-head h1 .em { font-style: italic; }
.page-head .rule { margin: 38px 0 32px; }
.page-head .lede { max-width: 760px; }
.page-head .lede p {
  font-size: 20px;
  line-height: 1.62;
  color: var(--ink-68);
  margin: 0 0 1.05em;
  text-wrap: pretty;
}
.page-head .lede p:last-child { margin-bottom: 0; }

/* ===================== SECTION SCAFFOLD ===================== */
.section { padding: clamp(92px, 12vw, 156px) 0; }
.section--stone { background: var(--stone); }
.section--paper { background: var(--paper); }
.section--dark  { background: var(--graphite); color: #eef0f2; }
.section--tight { padding: clamp(72px, 9vw, 116px) 0; }
.measure { max-width: 940px; }
.measure-wide { max-width: 1040px; }

.sec-head { display: flex; flex-direction: column; gap: 22px; margin-bottom: 64px; }
.sec-head .kicker { margin: 0; }
.sec-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.8vw, 48px);
  letter-spacing: -0.012em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}
.sec-head h2 .sep { color: var(--teal); font-style: normal; padding: 0 0.1em; }
.sec-lede {
  font-size: 19px;
  line-height: 1.64;
  color: var(--ink-68);
  margin: 0;
  max-width: 720px;
  text-wrap: pretty;
}

/* large serif statement block (echoes homepage 'problem') */
.statement p {
  font-family: var(--serif);
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.42;
  letter-spacing: -0.008em;
  color: var(--ink-46);
  margin: 0 0 1.1em;
  text-wrap: pretty;
}
.statement p:last-child { margin-bottom: 0; }
.statement strong { color: var(--ink); font-weight: 500; }
.statement em { font-style: italic; color: var(--ink); }

/* body prose */
.prose p {
  font-size: 17px;
  line-height: 1.66;
  color: var(--ink-68);
  margin: 0 0 1.15em;
  max-width: 640px;
  text-wrap: pretty;
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

/* ---------- editorial rows (domains / arc / steps) ---------- */
.row {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  padding: 52px 0;
  border-top: 1px solid var(--line);
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row-idx {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--teal);
  margin: 0 0 16px;
}
.row h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 2.9vw, 38px);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.06;
}
.row-body p {
  font-size: 18px;
  line-height: 1.64;
  color: var(--ink-68);
  margin: 0;
  max-width: 600px;
  text-wrap: pretty;
}
.section--dark .row { border-color: rgba(238,240,242,0.16); }
.section--dark .row h3 { color: #fff; }
.section--dark .row-body p { color: rgba(238,240,242,0.66); }
.section--dark .row-idx { color: var(--teal-bright); }

/* inline arrow link (echoes homepage arc-link) */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--teal);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: border-color .2s ease;
}
.text-link:hover { border-color: var(--teal); }
.text-link .ar { transition: transform .25s ease; }
.text-link:hover .ar { transform: translateX(4px); }

/* ===================== DARK PANEL ===================== */
.section--dark .kicker { color: #7f99a8; }
.section--dark .rule { background: var(--teal-bright); }
.panel-statement p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.28;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: pretty;
  color: rgba(238,240,242,0.62);
}
.panel-statement strong { color: #fff; font-weight: 400; }
.panel-statement em { font-style: italic; color: #fff; }

/* ===================== CTA BAND ===================== */
.cta-band { background: var(--stone); padding: clamp(104px, 14vw, 172px) 0; }
.cta-band .wrap { max-width: 820px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-band .rule { margin: 0 auto 34px; }
.cta-band h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 56px);
  letter-spacing: -0.014em;
  line-height: 1.04;
  margin: 0 0 24px;
}
.cta-sub {
  font-size: 19px;
  line-height: 1.62;
  color: var(--ink-68);
  max-width: 600px;
  margin: 0 0 44px;
  text-wrap: pretty;
}

/* ===================== FOOTER ===================== */
.foot { background: var(--graphite); color: rgba(238,240,242,0.72); padding: 56px 0; }
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.foot .wordmark { color: #eef0f2; }
.foot-brand { color: #eef0f2; }
.foot-brand .brand-name { color: #eef0f2; }
.foot-brand .brand-sub { color: #7fb0c0; }
.foot-brand .brand-seal svg { width: 42px; height: 42px; }
.foot-brand .brand-seal .seal-a { fill: var(--teal-bright); }
.foot-meta {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7f99a8;
}
.foot-copy { font-size: 12px; letter-spacing: 0.04em; color: rgba(238,240,242,0.45); }
.foot-link {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7f99a8;
  text-decoration: none;
  transition: color .2s ease;
}
.foot-link:hover { color: #eef0f2; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
  .wrap { padding: 0 32px; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-drawer:not([hidden]) {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--stone);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 18px 40px rgba(14,20,23,0.14);
  }
  .row { grid-template-columns: 1fr; gap: 16px; padding: 40px 0; }
  .sec-head { margin-bottom: 48px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 22px; }
  .nav-inner { height: 64px; }
  .nav-right { gap: 14px; }
  .page-head { padding-top: 92px; }
  .btn { padding: 16px 24px; font-size: 12px; }
}
