/* Layout and components. Colors come from tokens in themes.css. */

:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --maxw: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --header-h: 68px;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px rgb(0 0 0 / .06);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
abbr[title] { text-decoration: none; }
address { font-style: normal; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

svg { display: block; }
svg[viewBox="0 0 24 24"] {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-width: 820px; }
.muted { color: var(--text-muted); }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 22px;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 88%, var(--text)); }
.btn-ghost { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .95rem; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; padding: 0;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }

.brand { flex: none; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; }
.brand-mark { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; }
.brand-sub { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; white-space: nowrap; }
.site-nav a {
  display: block; padding: 8px 8px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: .95rem; font-weight: 500;
}
.site-nav a:hover { background: var(--surface-2); color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

@media (max-width: 1079px) {
  .header-cta { display: none; }
}

@media (max-width: 959px) {
  .js .nav-toggle { display: inline-grid; }
  /* Without JS the nav stays visible and wraps under the brand. */
  .header-inner { flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; padding-bottom: 8px; }
  .site-nav ul { flex-wrap: wrap; }
  .js .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); padding: 8px var(--gutter) 16px;
  }
  .js .nav-open .site-nav { display: block; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { padding: 12px; font-size: 1.05rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 10vw, 120px) 0 clamp(56px, 9vw, 104px);
  background:
    radial-gradient(60% 70% at 85% 10%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 70%),
    radial-gradient(50% 60% at 5% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.hero-inner { max-width: 860px; }

/* Full-width banner above the hero text. */
.hero-banner { margin-bottom: clamp(32px, 5vw, 56px); }
.hero-banner img { display: block; width: 100%; height: auto; min-height: 150px; max-height: 420px; object-fit: cover; object-position: center; }
.hero:has(.hero-banner) { padding-top: 0; }
.hero .lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--text-muted); max-width: 46ch; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; margin-bottom: 20px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: .9rem; font-weight: 500;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--text-muted); font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

@media (max-width: 479px) {
  .hero-ctas .btn { width: 100%; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p:last-child { color: var(--text-muted); margin-bottom: 0; }
.eyebrow {
  margin: 0 0 8px; color: var(--primary);
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}

.split { display: grid; gap: 24px 64px; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1.4fr; }
}
.prose p { max-width: 62ch; }

.stats { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stats li { padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; }
.stats strong { display: block; font-family: var(--font-serif); font-size: 1.5rem; color: var(--primary); }
.stats span { color: var(--text-muted); font-size: .92rem; }

/* ---------- Service cards ---------- */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card p { color: var(--text-muted); margin: 0; }
.card-icon {
  width: 48px; height: 48px; padding: 11px; margin-bottom: 16px; border-radius: 12px;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent);
}

.conditions { margin-top: 48px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .93rem; }

/* ---------- Team ---------- */
.team { display: grid; gap: 24px; }
@media (min-width: 960px) {
  .team { grid-template-columns: 1fr 1fr; }
}
.profile {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow);
}
.profile-head { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.profile-head h3 { font-size: 1.4rem; margin-bottom: 4px; }
.profile-head p { margin: 0; }
.avatar {
  flex: none; display: grid; place-items: center;
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--on-primary); font-family: var(--font-serif); font-size: 1.8rem; font-weight: 600;
}
.role { color: var(--text-muted); font-size: .95rem; }
.tenure { color: var(--primary); font-weight: 600; font-size: .92rem; }

.facts { margin: 8px 0 24px; display: grid; gap: 14px; }
.facts > div { display: grid; gap: 2px 16px; padding-top: 14px; border-top: 1px solid var(--border); }
@media (min-width: 560px) {
  .facts > div { grid-template-columns: 120px 1fr; }
}
.facts dt { font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); padding-top: 2px; }
.facts dd { margin: 0; }

.contact-list { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 500; }
.contact-list a { overflow-wrap: anywhere; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; counter-reset: step; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.steps li { counter-increment: step; position: relative; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 50%; background: var(--primary); color: var(--on-primary);
  font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem;
}
.steps p { color: var(--text-muted); margin: 0; }

/* ---------- Fees ---------- */
.fees { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.panel p:last-child { margin-bottom: 0; }
.panel .muted { font-size: .95rem; }
.check-list { list-style: none; padding: 0; margin: 0 0 16px; }
.check-list li { position: relative; padding: 6px 0 6px 28px; border-bottom: 1px solid var(--border); }
.check-list li::before {
  content: ""; position: absolute; left: 4px; top: 13px;
  width: 12px; height: 7px; border: solid var(--primary); border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.rates { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.rates th, .rates td { padding: 10px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.rates th { text-align: left; font-weight: 400; padding-right: 12px; }
.rates td { text-align: right; font-weight: 700; white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 18px 56px 18px 22px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 24px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border: solid var(--primary); border-width: 0 2px 2px 0; transform: rotate(45deg);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 22px 20px; margin: 0; color: var(--text-muted); }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .contact { grid-template-columns: 1.2fr 1fr; align-items: start; }
}
.contact-details { display: grid; gap: 28px; }
.contact-block h3 { margin-bottom: 8px; }
.contact-dl { margin: 0; display: grid; gap: 8px; }
.contact-dl > div { display: grid; gap: 0 16px; }
@media (min-width: 560px) {
  .contact-dl > div { grid-template-columns: 170px 1fr; }
}
.contact-dl dt { color: var(--text-muted); }
.contact-dl dd { margin: 0; overflow-wrap: anywhere; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.notice {
  margin: 0; padding: 16px 18px; border-radius: 10px; font-size: .95rem;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
}

.map-link { display: block; align-self: start; }
.map {
  display: block; width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--border);
}
@media (min-width: 900px) {
  .map-link { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- Footer ---------- */
.site-footer { padding: 48px 0 32px; border-top: 1px solid var(--border); background: var(--surface-2); }
.crisis {
  padding: 16px 20px; margin-bottom: 36px; border-radius: 10px;
  background: var(--surface); border-left: 4px solid var(--accent);
}
.crisis a { font-weight: 700; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-brand { font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; margin-bottom: 6px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--text); }
.copyright { margin: 32px 0 0; font-size: .88rem; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .btn:hover { transform: none; }
}
