/* The Udofia Clinic — shared stylesheet.
   Minimalist, high-legibility system: near-white or near-black ground,
   hairline borders, no shadows, no gradients. Atkinson Hyperlegible is the
   body face specifically because this site's readers are older adults and
   caregivers, many with low vision — it is not interchangeable with a
   generic sans. */

/* ---------- Tokens ---------------------------------------------------- */

:root {
  --bg: #FFFFFF;
  --surface: #FAFAFA;
  --line: #E4E6E8;
  --fg: #111214;
  --muted: #5B6068;
  --accent: #0E7C73;
  --accent-fg: #FFFFFF;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, sans-serif;

  --radius: 20px;
  --pad-x: 6%;
  --maxw: 1160px;
}

/* The OS preference applies only until the visitor picks a theme; the
   toggle writes data-theme on <html>, and the :not() guard keeps an
   explicit "light" choice from being overridden by a dark OS. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0C0D;
    --surface: #141618;
    --line: #282B2F;
    --fg: #F3F4F5;
    --muted: #A3A9B2;
    --accent: #3CC9B8;
    --accent-fg: #06211E;
  }
}

:root[data-theme="dark"] {
  --bg: #0B0C0D;
  --surface: #141618;
  --line: #282B2F;
  --fg: #F3F4F5;
  --muted: #A3A9B2;
  --accent: #3CC9B8;
  --accent-fg: #06211E;
}

/* ---------- Base ------------------------------------------------------ */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-fg);
  padding: 12px 20px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------------------------------------------------- */

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }
section { padding-top: 84px; padding-bottom: 84px; }
@media (max-width: 900px) { section { padding-top: 60px; padding-bottom: 60px; } }

.eyebrow {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 18px;
  font-weight: 700;
}

.lede { font-size: 1.22rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.center { text-align: center; }
.narrow { max-width: 72ch; }

hr.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

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

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner {
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap;
  padding-top: 16px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { height: 44px; width: auto; display: block; }
/* The mark is no longer a single-colour silhouette, so the old
   filter: invert(1) trick can't be used for dark mode -- inverting would turn
   the teal symbol salmon pink. Two files are shipped instead and swapped
   here, matching the same three theme states the rest of the page uses:
   unstamped + OS light, unstamped + OS dark, and an explicit data-theme. */
.brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand .logo-dark { display: block; }
}
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }
:root[data-theme="light"] .brand .logo-light { display: block; }
:root[data-theme="light"] .brand .logo-dark { display: none; }
.brand span { font-family: var(--font-display); font-size: 1.45rem; }

.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--fg);
  padding: 12px 14px; border-radius: 10px;
  min-height: 48px; display: inline-flex; align-items: center;
  font-size: 1rem;
}
.nav a:hover { background: var(--surface); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }

.icon-btn {
  min-width: 48px; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  color: var(--fg); cursor: pointer;
}
.icon-btn:hover { background: var(--surface); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { opacity: .9; }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface); }

/* ---------- Cards and grids ------------------------------------------- */

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
}
a.card { text-decoration: none; display: block; }
a.card:hover { border-color: var(--accent); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card h3 { margin-bottom: 8px; }
.card p { font-size: 1rem; color: var(--muted); }
.card .icon { color: var(--accent); margin-bottom: 14px; display: block; }

/* Numbered step cards: the rule on top carries the sequence, so the
   numeral doesn't need a filled badge fighting the minimal palette. */
.step { border-top: 3px solid var(--accent); padding-top: 22px; }
.step .num { font-family: var(--font-display); font-size: 2.4rem; color: var(--accent); line-height: 1; }
.step h3 { margin: 10px 0 8px; }
.step p { font-size: 1rem; color: var(--muted); }

/* ---------- Path chooser (home) --------------------------------------- */

.paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 900px) { .paths { grid-template-columns: 1fr; } }
.path {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); padding: 34px;
  text-decoration: none; display: block; min-height: 48px;
}
.path:hover { border-color: var(--accent); }
.path h3 { font-size: 1.75rem; margin-bottom: 10px; }
.path p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.path .go { color: var(--accent); font-weight: 700; margin-top: 16px; display: inline-block; }

/* ---------- Back link / what next ------------------------------------- */

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; text-decoration: none; color: var(--muted); font-weight: 700;
}
.back-link:hover { color: var(--accent); }

/* ---------- Tables / lists -------------------------------------------- */

.zips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.zips li {
  border: 1px solid var(--accent); color: var(--accent);
  border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 1rem;
}

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist svg { color: var(--accent); flex-shrink: 0; margin-top: 4px; }

/* ---------- Compliance pages ------------------------------------------ */

.legal { max-width: 74ch; }
.legal h2 { margin: 44px 0 14px; font-size: 1.9rem; }
.legal h3 { margin: 28px 0 10px; }
.legal p, .legal li { font-size: 1.05rem; }
.legal ul, .legal ol { padding-left: 24px; }
.legal li { margin-bottom: 10px; }

/* The consent paragraph must read identically wherever it appears, so it
   gets one shared treatment rather than per-page styling. */
.consent-panel {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); padding: 26px; margin: 24px 0;
}
.consent-panel p { font-size: 1.05rem; margin: 0; }

.placeholder {
  border: 1px dashed var(--line); border-radius: 12px;
  padding: 18px; color: var(--muted); font-style: italic;
}

/* ---------- Printable consent form ------------------------------------ */

.form-field { border-bottom: 1px solid var(--fg); min-height: 42px; margin: 6px 0 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 900px) { .form-row { grid-template-columns: 1fr; } }
.form-label { font-weight: 700; font-size: 1rem; }
.consent-box { display: flex; gap: 14px; align-items: flex-start; }
.consent-box .box {
  width: 26px; height: 26px; border: 2px solid var(--fg);
  flex-shrink: 0; margin-top: 4px; border-radius: 4px;
}

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { font-size: 11pt; background: #fff; color: #000; }
  section { padding: 0 0 12pt; }
  .wrap { padding: 0; max-width: 100%; }
  .card, .consent-panel { border: 1pt solid #000; background: #fff; break-inside: avoid; }
  h1 { font-size: 20pt; }
  h2 { font-size: 14pt; }
  .legal p, .legal li, .consent-panel p { font-size: 10pt; }
  @page { margin: 0.5in; }
}

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

.site-footer { border-top: 1px solid var(--line); padding: 40px 0; background: var(--bg); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-links a {
  color: var(--muted); text-decoration: none;
  min-height: 48px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px;
  font-size: 1rem;
}
.footer-links a:hover { color: var(--accent); }
.footer-note { color: var(--muted); font-size: 1rem; }
