/* ─────────────────────────────────────────────────────────────────────────────
   district.css — the five /elder-care-<district> pages.

   One stylesheet for all of them, loaded alongside header.css. Tokens mirror
   index.html and faq.html; don't invent new colours or radii here.
   ───────────────────────────────────────────────────────────────────────────── */

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

:root {
    --bg: #f6f1eb;
    --bg-warm: #ede6db;
    --surface: #fff;
    --sage: #5a7a62;
    --sage-deep: #3d5a44;
    --teal: #2a8a7a;
    /* The wordmark tint needs 4.5:1 on --bg-warm; --teal misses it. Same rule
       as /caremate (see CLAUDE.md, Site Header). */
    --teal-deep: #216d61;
    --brown: #2c2214;
    --text: #2c2a25;
    --text-mid: #6b655b;
    --text-light: #9e968a;
    --border: rgba(90, 122, 98, 0.12);
    --r-xs: 6px;
    --r-sm: 10px;
    --r-md: 16px;
    --r-pill: 999px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--site-header-h) + 16px); }

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

::selection { background: rgba(90, 122, 98, .18); }

/* ── HERO ── */
.dhero {
    padding: 150px 48px 64px;
    background: linear-gradient(160deg, #f0f7f4 0%, #e8f4f1 30%, #f6f1eb 70%, #f3ede5 100%);
    border-bottom: 1px solid var(--border);
}
.dhero__inner {
    max-width: 1100px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 440px;
    gap: 56px; align-items: center;
}
.dhero__text { min-width: 0; }
.dhero__eyebrow {
    font-size: .7rem; font-weight: 700; letter-spacing: 3px;
    text-transform: uppercase; color: var(--sage); margin-bottom: 18px;
}
.dhero__title {
    font-family: 'Cormorant Garamond', serif; font-weight: 500;
    font-size: clamp(2.4rem, 5.6vw, 3.7rem); line-height: 1.06;
    letter-spacing: -1px; color: var(--brown);
}
.dhero__title em { font-style: italic; color: var(--teal-deep); }
.dhero__lede {
    margin-top: 20px; max-width: 56ch;
    font-size: 1.04rem; color: var(--text-mid);
}
.dhero__row { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.dhero__btn, .dcta__btn {
    display: inline-block; padding: 14px 28px; border-radius: var(--r-pill);
    background: var(--sage-deep); color: #fff; text-decoration: none;
    font-size: .9rem; font-weight: 700; letter-spacing: .2px;
    border: 1px solid var(--sage-deep);
    transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.dhero__btn:hover, .dcta__btn:hover { background: var(--brown); border-color: var(--brown); transform: translateY(-1px); }
.dhero__btn--ghost, .dcta__btn--ghost {
    background: transparent; color: var(--sage-deep); border-color: var(--sage);
}
.dhero__btn--ghost:hover, .dcta__btn--ghost:hover {
    background: rgba(90, 122, 98, .09); color: var(--sage-deep); border-color: var(--sage-deep);
}
.dhero__meta { margin-top: 22px; font-size: .8rem; color: var(--text-mid); }

/* ── PHOTOGRAPHY ──
   The frame is set here, not by the source file. Every photo fills a fixed
   aspect-ratio box with object-fit: cover, so swapping in a differently
   proportioned image never changes the layout. object-position is tuned per
   frame to keep faces inside the crop. */
.dphoto { position: relative; margin: 0; }
.dphoto__img {
    display: block; width: 100%; height: 100%;
    object-fit: cover; border-radius: var(--r-md);
    background: var(--bg-warm);
}
.dphoto--portrait .dphoto__img { aspect-ratio: 4 / 5; object-position: center 22%; }

/* A soft edge so the photo sits on the page rather than being pasted onto it. */
.dphoto__img { box-shadow: 0 18px 44px -22px rgba(44, 34, 20, .38); }

/* ── TEXT + PHOTO SPLIT ──
   Used once per page (the appointments section). The hero has its own grid. */
.dsplit {
    display: grid; grid-template-columns: 1fr 440px;
    gap: 52px; align-items: center;
}
.dsplit__text { min-width: 0; }
.dsplit .dbody { max-width: none; }

/* ── SECTIONS ── */
.dsection { padding: 66px 48px; }
.dsection--warm { background: var(--bg-warm); }
.dsection--tight { padding: 46px 48px; }
/* One container width for every section, so section headings share a left edge
   all the way down the page. Prose is kept to a readable measure by capping the
   text elements instead of narrowing (and re-centring) the container. */
.dsection__inner { max-width: 1000px; margin: 0 auto; }
.dsection__lead, .dbody, .dnote { max-width: 68ch; }
.dsection__inner--narrow .dfaq { max-width: 800px; }
.dsection__title {
    font-family: 'Cormorant Garamond', serif; font-weight: 500;
    font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.15;
    letter-spacing: -.5px; color: var(--brown);
}
.dsection__title--sm { font-size: clamp(1.4rem, 3vw, 1.7rem); }
.dsection__lead { margin-top: 12px; font-size: .98rem; color: var(--text-mid); }

.dbody { font-size: 1rem; color: var(--text-mid); }
.dbody + .dbody { margin-top: 16px; }
.dsection__title + .dbody { margin-top: 16px; }

/* --text-mid, not --text-light: --text-light is ~2.4:1 on --bg-warm, which
   fails for body copy. Same reason the disclaimer and hero meta below use it. */
.dnote { margin-top: 22px; font-size: .88rem; color: var(--text-mid); }
.dnote a { color: var(--teal-deep); font-weight: 600; }

/* ── VISIT CARDS ── */
.dgrid {
    margin-top: 30px; display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
}
.dcard {
    padding: 26px 24px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--r-md);
    display: grid; grid-template-columns: 44px 1fr;
    column-gap: 14px; align-items: center;
}
/* Same iconography as the landing page service hub. */
.dcard__icon { grid-row: 1; grid-column: 1; width: 44px; height: 44px; }
.dcard__icon svg { width: 44px; height: 44px; display: block; }
.dcard__title {
    grid-row: 1; grid-column: 2;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.18rem; font-weight: 600; line-height: 1.3; color: var(--brown);
}
.dcard__body {
    grid-row: 2; grid-column: 1 / -1; margin-top: 12px;
    font-size: .88rem; color: var(--text-mid); line-height: 1.7;
}

/* ── FAQ ── */
.dfaq { margin-top: 26px; border-top: 1px solid var(--border); }
.dfaq__item { padding: 22px 0; border-bottom: 1px solid var(--border); }
.dfaq__q { font-size: .97rem; font-weight: 700; color: var(--brown); }
.dfaq__a { margin-top: 8px; font-size: .93rem; color: var(--text-mid); }

/* ── OTHER DISTRICTS ── */
.dlinks {
    margin-top: 18px; list-style: none;
    display: flex; flex-wrap: wrap; gap: 10px 14px;
}
.dlinks a {
    display: inline-block; padding: 9px 20px; border-radius: var(--r-pill);
    border: 1px solid var(--border); background: var(--surface);
    font-size: .86rem; font-weight: 600; color: var(--sage-deep);
    text-decoration: none; transition: border-color .2s, color .2s;
}
.dlinks a:hover { border-color: var(--sage); color: var(--brown); }

/* ── CTA ── */
.dcta { padding: 0 48px 72px; }
.dcta__inner {
    max-width: 760px; margin: 0 auto; padding: 52px 44px;
    text-align: center; border-radius: var(--r-md);
    background: linear-gradient(160deg, #f0f7f4 0%, #e8f4f1 40%, #f3ede5 100%);
    border: 1px solid var(--border);
}
.dcta__eyebrow {
    font-size: .68rem; font-weight: 700; letter-spacing: 2.5px;
    text-transform: uppercase; color: var(--sage); margin-bottom: 14px;
}
.dcta__title {
    font-family: 'Cormorant Garamond', serif; font-weight: 500;
    font-size: clamp(1.7rem, 3.6vw, 2.2rem); line-height: 1.15; color: var(--brown);
}
.dcta__body { margin: 14px auto 0; max-width: 500px; font-size: .96rem; color: var(--text-mid); }
.dcta__row { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.dcta__note { margin-top: 26px; font-size: .8rem; color: var(--text-mid); line-height: 1.6; }

/* ── FOOTER (same lockup as /faq and /caremate) ── */
.cm-footer { padding: 32px 48px; border-top: 1px solid var(--border); }
.cm-footer__inner {
    max-width: 1200px; margin: 0 auto; display: flex;
    align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cm-footer__logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--brown); }
.cm-footer__logo img { width: 28px; height: 32px; object-fit: contain; }
.cm-footer__logo-text { font-size: .9rem; font-weight: 700; }
.cm-footer__links { display: flex; gap: 10px 24px; list-style: none; flex-wrap: wrap; }
.cm-footer__links a { font-size: .82rem; color: var(--text-mid); text-decoration: none; transition: color .2s; }
.cm-footer__links a:hover { color: var(--teal-deep); }
.cm-footer__copy { font-size: .78rem; color: var(--text-light); }

/* Tight-desktop band: the hero photo column would squeeze the headline before
   the layout actually needs to stack. */
@media (max-width: 1080px) {
    .dhero__inner { grid-template-columns: 1fr 360px; gap: 40px; }
    .dsplit { grid-template-columns: 1fr 340px; gap: 36px; }
}

@media (max-width: 900px) {
    /* Photo above the text on phones, matching /caremate's hero convention. */
    .dhero__inner { grid-template-columns: 1fr; gap: 32px; text-align: center; }
    .dhero__photo { order: -1; max-width: 420px; margin: 0 auto; width: 100%; }
    .dhero__lede { margin-left: auto; margin-right: auto; }
    .dhero__row { justify-content: center; }
    .dphoto--portrait .dphoto__img { aspect-ratio: 5 / 4; object-position: center 20%; }
}

@media (max-width: 860px) {
    .dsplit { grid-template-columns: 1fr; gap: 30px; }
    .dsplit .dphoto { max-width: 460px; }
    .dhero { padding: 120px 24px 52px; }
    .dsection { padding: 52px 24px; }
    .dsection--tight { padding: 38px 24px; }
    .dcta { padding: 0 24px 56px; }
    .dcta__inner { padding: 40px 24px; }
    .cm-footer { padding: 28px 24px; }
    .cm-footer__inner { flex-direction: column; text-align: center; }
    .cm-footer__links { justify-content: center; }
}

@media (max-width: 560px) {
    .dhero__row, .dcta__row { flex-direction: column; }
    .dhero__btn, .dcta__btn { width: 100%; }
    .dgrid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .dhero__btn, .dcta__btn { transition: none; }
    .dhero__btn:hover, .dcta__btn:hover { transform: none; }
}
