/* Safe Haven Central Valley (CTV). Plain CSS, no build step.
   Rules from CLAUDE.md: spaces inside every calc(); no View Transitions;
   keep the bottom-right corner of the viewport free of controls. */

:root {
  --oat: #f6f1e7;
  --paper: #fcf9f3;
  --blossom: #f4e1dd;
  --rose: #b77785;
  --rose-ink: #8a4e5f;
  --sage: #dfe6d5;
  --sage-deep: #5f6d4d;
  --olive: #3c4426;
  --olive-deep: #2b301e;
  --ink: #262b19;
  --muted: #595e49;
  --line: rgba(38, 43, 25, 0.16);
  --on-dark: #f3eee2;
  --on-dark-muted: #cfcdb9;
  --blossom-ink: #4d4340;
  --sage-ink: #37402b;
  --error: #8a2c1f;
  --error-bg: #f6dfd9;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --nav-h: 72px;
  --wrap: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --section: clamp(4rem, 9vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--oat);
  accent-color: var(--olive);
  caret-color: var(--rose-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--rose-ink); color: #fff; }
html { scrollbar-color: var(--sage-deep) var(--oat); }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; }
p { text-wrap: pretty; }

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

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) + var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--olive); color: var(--oat); padding: 0.6rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { top: 0.75rem; }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0.7rem 1.5rem;
  background: var(--olive); color: var(--oat);
  border: 1.5px solid var(--olive); border-radius: 999px;
  font-weight: 500; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.btn:hover { background: var(--olive-deep); border-color: var(--olive-deep); }
.btn:active { transform: translateY(1px); }
.btn-outline { background: transparent; color: var(--olive); }
.btn-outline:hover { background: var(--olive); color: var(--oat); }
.btn-small { min-height: 44px; padding: 0.5rem 1.15rem; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.text-link { font-weight: 500; color: var(--olive); }
.text-link:hover { color: var(--rose-ink); }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.link-btn:hover { color: var(--rose-ink); }
/* Tap areas: links and buttons that sit in running text get at least 24px of height.
   Vertical padding on an inline link does not move anything; the inline-block buttons
   in the consent label cancel theirs with an equal negative margin. */
p a, li a.text-link { padding-block: 0.25rem; }
.field-check .link-btn { padding-block: 0.25rem; margin-block: -0.25rem; }

.to-confirm { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.5rem; border: 1px dashed currentColor; border-radius: 999px; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.02em; vertical-align: 0.1em; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: var(--oat); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rose-ink); }
.brand-place { margin-top: 0.3rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--rose-ink); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav-links a:not(.btn) { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0.6rem 0; font-size: 0.98rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.35rem; height: 1.5px; background: var(--rose); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.menu-toggle { display: none; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0.4rem 0.9rem; background: none; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 500; cursor: pointer; }
.menu-toggle-bars { position: relative; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 5vw, 4rem) var(--section); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.lede { margin-top: 1.5rem; font-size: 1.2rem; line-height: 1.6; color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-note { margin-top: 1.5rem; font-size: 0.95rem; color: var(--muted); }
.hero-photo { border-radius: var(--radius); overflow: hidden; background: var(--sage); }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Section heads ---------- */
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head p, .story-head p { margin-top: 1rem; color: var(--muted); }

/* ---------- A day in the home ---------- */
.story {
  --story-bg: var(--paper);
  --story-ink: var(--ink);
  --story-muted: var(--muted);
  --story-line: var(--line);
  padding-block: var(--section);
  background: var(--story-bg);
  color: var(--story-ink);
}
.story-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.story-head p { color: var(--story-muted); }

/* Default (phones, reduced motion, no JS): a plain stacked sequence. */
.story-stage { display: none; }
.story-chapters { display: grid; gap: clamp(2.5rem, 7vw, 4rem); }
.chapter-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.25rem; background: var(--sage); }
.chapter h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.chapter p { margin-top: 0.6rem; max-width: 34rem; color: var(--story-muted); font-size: 1.1rem; }

/* Pinned version: script.js adds .story--pinned on wide screens when motion is allowed. */
.story--pinned { transition: background-color 0.9s ease, color 0.9s ease; }
.story--pinned[data-tone="arriving"] { --story-bg: var(--paper); }
.story--pinned[data-tone="morning"] { --story-bg: var(--blossom); }
.story--pinned[data-tone="midday"] { --story-bg: var(--oat); }
.story--pinned[data-tone="afternoon"] { --story-bg: var(--sage); }
.story--pinned[data-tone="evening"] { --story-bg: var(--olive-deep); --story-ink: var(--on-dark); --story-muted: var(--on-dark-muted); --story-line: color-mix(in srgb, var(--on-dark) 25%, transparent); }
.story--pinned[data-tone="evening"] :focus-visible { outline-color: var(--on-dark); }
.story--pinned .story-head p, .story--pinned .chapter p { transition: color 0.9s ease; }

.story--pinned .story-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.story--pinned .story-stage { display: flex; flex-direction: column; justify-content: center; position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); }
.story--pinned .story-frames { position: relative; aspect-ratio: 3 / 2; max-height: calc(100vh - var(--nav-h) - 7.5rem); width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--sage); }
.story--pinned .story-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity 0.8s ease, transform 1.4s var(--ease); }
.story--pinned .story-frame.is-active { opacity: 1; transform: scale(1); }
.story--pinned .chapter-photo { display: none; }
.story--pinned .story-chapters { display: block; }
.story--pinned .chapter { min-height: calc(100vh - var(--nav-h)); display: flex; flex-direction: column; justify-content: center; }

/* Pinned version on phones: script.js adds .story--mobile next to .story--pinned below the
   desktop breakpoint. The photo sticks under the header and the captions scroll beneath it.
   Crossfade is opacity only. Without the class the stacked default above applies. */
.story-count { display: none; }
.story--mobile .story-grid { display: block; }
.story--mobile .story-stage { display: block; top: var(--nav-h); z-index: 2; height: auto; padding-block: 0.75rem 0.5rem; background: var(--story-bg); transition: background-color 0.9s ease; }
.story--mobile .story-frames { aspect-ratio: auto; height: 46vh; height: 46svh; max-height: none; }
.story--mobile .story-frame, .story--mobile .story-frame.is-active { transform: none; transition: opacity 0.6s ease; }
.story--mobile .story-nav { display: none; }
.story--mobile .story-count { position: absolute; left: 0.6rem; bottom: 0.6rem; z-index: 1; display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0.75rem; border-radius: 999px; background: rgba(27, 30, 18, 0.78); color: var(--on-dark); font-size: 0.85rem; font-weight: 600; line-height: 1.4; }
.story-count-dots { display: inline-flex; gap: 5px; }
.story-count-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.4; transition: opacity 0.3s ease; }
.story-count-dots i.is-on { opacity: 1; }
.story--mobile .chapter { min-height: 62vh; min-height: 62svh; justify-content: flex-start; padding-top: 2rem; }
.story--mobile .chapter:last-child { min-height: 44vh; min-height: 44svh; }

.story-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin-top: 1rem; }
.story-nav button { position: relative; min-height: 44px; padding: 0.5rem 0; background: none; border: 0; cursor: pointer; font-size: 0.95rem; font-weight: 500; color: var(--story-muted); transition: color 0.3s; }
.story-nav button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.45rem; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.story-nav button:hover, .story-nav button[aria-current="true"] { color: var(--story-ink); }
.story-nav button[aria-current="true"]::after { transform: scaleX(1); }

/* ---------- Room guide ---------- */
.rooms { padding-block: var(--section); }
.room-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.room-group h3 { padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.room-list li { border-bottom: 1px solid var(--line); }
.room-item { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 1rem; align-items: center; width: 100%; padding: 0.9rem 0; background: none; border: 0; text-align: left; cursor: zoom-in; }
.room-item img { width: 104px; height: 104px; object-fit: cover; border-radius: var(--radius-sm); transition: transform 0.5s var(--ease); background: var(--sage); }
.room-item:hover img { transform: scale(1.04); }
.room-text { display: flex; flex-direction: column; gap: 0.2rem; }
.room-title { font-weight: 600; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; transition: text-decoration-color 0.3s; }
.room-item:hover .room-title { text-decoration-color: var(--rose); }
.room-desc { font-size: 0.95rem; line-height: 1.5; color: var(--muted); }

/* ---------- Care ---------- */
.care { padding-block: var(--section); background: var(--blossom); }
.care-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.care-intro p { margin-top: 1.25rem; max-width: 32rem; }
.care-disclosure { font-size: 0.95rem; color: var(--blossom-ink); }
.care-list > div { padding: 1.15rem 0; border-top: 1px solid var(--line); }
.care-list > div:last-child { border-bottom: 1px solid var(--line); }
.care-list dt { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }
.care-list dd { margin-top: 0.25rem; color: var(--blossom-ink); }

/* ---------- License ---------- */
.license { padding-block: var(--section); }
.license-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.license-photo { display: block; padding: 0; border-radius: var(--radius); overflow: hidden; }
.room-item.license-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; }
.facts { margin-block: 1.75rem; }
.facts > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Events and updates ---------- */
.events { padding-block: var(--section); background: var(--paper); }
.post-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.post img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--sage); }
.post-tag { display: inline-block; margin-top: 1.1rem; padding: 0.1rem 0.6rem; border: 1px dashed var(--rose-ink); border-radius: 999px; font-size: 0.8rem; font-weight: 500; color: var(--rose-ink); }
.post h3 { margin-top: 0.75rem; font-size: 1.5rem; }
.post-tag + h3 { margin-top: 0.6rem; }
.post img + h3 { margin-top: 1.1rem; }
.post h3 + p { margin-top: 0.5rem; color: var(--muted); }

/* ---------- Careers band ---------- */
.careers { padding-block: var(--section); background: var(--sage); }
.careers-inner { max-width: calc(46rem + var(--gutter) + var(--gutter)); }
.careers-inner p { margin-block: 1.25rem 2rem; font-size: 1.15rem; color: var(--sage-ink); }

/* ---------- Visit ---------- */
.visit { padding-block: var(--section); }
.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.visit-info > p { margin-top: 1.25rem; max-width: 30rem; }
.visit-address { margin-top: 2rem; font-style: normal; font-size: 1.15rem; line-height: 1.5; }
.contact-list { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.contact-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; padding: 0.3rem 0; border-bottom: 1px solid var(--line); }
.contact-list span { color: var(--muted); }
.contact-list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-variant-numeric: tabular-nums; }
.contact-list a:hover { color: var(--rose-ink); }
.map { margin-block: 2rem 1rem; border-radius: var(--radius); overflow: hidden; background: var(--sage); }
.map iframe { display: block; width: 100%; height: 280px; border: 0; }

/* ---------- Forms ---------- */
.form { padding: clamp(1.5rem, 3.5vw, 2.5rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.form h3 { font-size: 1.7rem; margin-bottom: 1.5rem; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; margin-bottom: 0.35rem; font-weight: 500; font-size: 0.98rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="date"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 0.65rem 0.85rem;
  font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid rgba(38, 43, 25, 0.35); border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--olive); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgba(60, 68, 38, 0.22); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-hint { margin-top: 0.35rem; font-size: 0.9rem; color: var(--muted); }
.field-error { margin-top: 0.35rem; font-size: 0.92rem; font-weight: 500; color: var(--error); }
.field-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.25rem 0.75rem; align-items: start; }
.field-check input { width: 22px; height: 22px; margin-top: 0.2rem; }
.field-check label { margin: 0; font-weight: 400; font-size: 0.95rem; line-height: 1.5; }
.field-check .field-error { grid-column: 2; }
.checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.checks label { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; margin: 0; font-weight: 400; }
.checks input { width: 20px; height: 20px; flex: none; }
/* One option per line, for the groups with longer wording. */
.checks-stack { flex-direction: column; gap: 0; }
.checks-stack label { padding-block: 0.3rem; line-height: 1.4; }
fieldset.field { min-width: 0; }
fieldset.field { border: 0; padding: 0; }
fieldset.field legend { margin-bottom: 0.35rem; font-weight: 500; font-size: 0.98rem; padding: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { margin-top: 1rem; font-size: 0.95rem; color: var(--muted); }
.form-note:empty { display: none; }
.form-note.is-ok { padding: 0.85rem 1rem; background: var(--sage); color: var(--sage-ink); border-radius: var(--radius-sm); }
.form-note.is-error { padding: 0.85rem 1rem; background: var(--error-bg); color: var(--error); border-radius: var(--radius-sm); }

/* ---------- Our homes ---------- */
.homes { padding-block: var(--section); background: var(--paper); }
.homes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); max-width: 60rem; }
.home-card { display: flex; flex-direction: column; background: var(--oat); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.home-card.is-current { border-color: var(--rose); }
.home-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--sage); }
.home-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; flex: 1; padding: clamp(1.15rem, 2.5vw, 1.6rem); }
.home-here { margin-bottom: 0.5rem; padding: 0.1rem 0.7rem; background: var(--blossom); color: var(--rose-ink); border-radius: 999px; font-size: 0.82rem; font-weight: 600; }
.home-card h3 { font-size: 1.5rem; }
.home-city { font-weight: 500; }
.home-fact { font-size: 0.95rem; color: var(--muted); }
.home-link { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; margin-top: auto; padding-top: 0.5rem; }

/* ---------- Footer ---------- */
.footer { padding-block: clamp(3rem, 6vw, 5rem) 2.5rem; background: var(--olive-deep); color: var(--on-dark); }
.footer :focus-visible { outline-color: var(--on-dark); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; }
.brand-footer .brand-name, .brand-footer .brand-place { color: var(--on-dark); }
.footer-brand p { margin-top: 1.25rem; font-size: 0.95rem; color: var(--on-dark-muted); }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.footer-links a, .footer-links .link-btn { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; font-size: 0.98rem; text-decoration: none; }
.footer-links a:hover, .footer-links .link-btn:hover { color: var(--blossom); text-decoration: underline; }
.footer-fine { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid color-mix(in srgb, var(--on-dark) 20%, transparent); }
.footer-fine p { max-width: 62rem; font-size: 0.88rem; line-height: 1.6; color: var(--on-dark-muted); }
.footer-fine p + p { margin-top: 0.75rem; }

/* ---------- Mobile call bar ---------- */
.callbar { display: none; }

/* ---------- Lightbox ---------- */
dialog { color: var(--ink); }
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(27, 30, 18, 0.96); overflow: hidden; }
.lightbox[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.lightbox::backdrop { background: rgba(27, 30, 18, 0.96); }
.lb-figure { grid-column: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem; height: 100%; padding: 4.25rem 0.5rem 1.5rem; min-height: 0; }
.lb-figure img { max-width: 100%; max-height: calc(100dvh - 9rem); width: auto; height: auto; object-fit: contain; border-radius: var(--radius-sm); }
.lb-figure figcaption { color: var(--on-dark); font-size: 1rem; text-align: center; }
.lb-btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 0 0.5rem; background: rgba(243, 238, 226, 0.12); color: var(--on-dark); border: 1px solid color-mix(in srgb, var(--on-dark) 35%, transparent); border-radius: 50%; cursor: pointer; font-size: 1.25rem; transition: background-color 0.2s; }
.lb-btn:hover { background: rgba(243, 238, 226, 0.28); }
.lb-btn:focus-visible { outline-color: var(--on-dark); }
.lb-close { position: absolute; top: 0.75rem; left: 0.25rem; z-index: 2; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }

/* ---------- Legal dialogs ---------- */
.legal { width: min(42rem, calc(100vw - 2rem)); max-height: min(44rem, calc(100dvh - 2rem)); margin: auto; padding: 0; border: 0; border-radius: var(--radius); background: var(--paper); box-shadow: 0 24px 60px rgba(27, 30, 18, 0.3); }
.legal[open] { display: flex; flex-direction: column; }
.legal::backdrop { background: rgba(27, 30, 18, 0.55); }
.legal-body { padding: clamp(1.5rem, 4vw, 2.5rem); overflow-y: auto; }
.legal-body h2 { font-size: 1.9rem; margin-bottom: 1rem; }
.legal-body h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0; margin-top: 1.5rem; }
.legal-body p { margin-top: 0.5rem; }
.legal-close { padding: 1rem clamp(1.5rem, 4vw, 2.5rem); border-top: 1px solid var(--line); }

/* ---------- Careers page ---------- */
.page-hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 5rem); }
.page-hero .hero-grid { align-items: center; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; margin-top: 1rem; }
.share-row .link-btn { min-height: 44px; text-align: left; }
.share-status { font-size: 0.95rem; color: var(--muted); }
.job { padding-block: var(--section); background: var(--paper); }
.job-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.job-block + .job-block { margin-top: 2.75rem; }
.job-block p { margin-top: 0.9rem; max-width: 34rem; }
.plain-list { margin-top: 1rem; border-top: 1px solid var(--line); }
.plain-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .room-groups { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* The menu collapses earlier than the page grids so seven links and the button never wrap. */
@media (max-width: 1020px) {
  .menu-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1.25rem; background: var(--oat); border-bottom: 1px solid var(--line); }
  .nav-links.is-open { display: flex; }
  .nav-links a:not(.btn) { justify-content: flex-start; padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-cta { margin-top: 1rem; }
}

@media (max-width: 860px) {
  :root { --nav-h: 64px; }
  .hero-grid, .care-grid, .license-grid, .visit-grid, .job-grid, .post-list { grid-template-columns: minmax(0, 1fr); }
  .post { max-width: 34rem; }
  .hero-photo { order: -1; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }

  /* Call bar: same dock as the SNV site. Its bottom edge sits 72px above the bottom of the
     screen so the Netlify badge in the bottom-right corner never covers it. The footer carries
     the extra space (72px gap + 52px bar + breathing room) so it scrolls fully above the bar. */
  .footer { padding-bottom: calc(148px + env(safe-area-inset-bottom, 0px)); }
  .callbar {
    position: fixed; left: 0.6rem; right: 0.6rem; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); z-index: 30;
    display: flex; align-items: center; gap: 0.35rem; height: 52px; padding: 3px;
    background: rgba(43, 48, 30, 0.94); border: 1px solid rgba(243, 238, 226, 0.16); border-radius: 999px;
    box-shadow: 0 12px 26px -8px rgba(0, 0, 0, 0.5), 0 3px 10px rgba(0, 0, 0, 0.22);
    /* Hidden state: slid fully off-screen and not tappable, however high the bar sits. */
    transform: translateY(calc(100% + 96px + env(safe-area-inset-bottom, 0px)));
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.25s ease, visibility 0s linear 0.4s;
  }
  .callbar.is-shown { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; transition: transform 0.4s var(--ease), opacity 0.25s ease, visibility 0s; }
  /* Slides off while the menu or lightbox is open, and while the pinned day photo is on screen. */
  .menu-open .callbar.is-shown, .lb-open .callbar.is-shown, .day-pinned .callbar.is-shown {
    transform: translateY(calc(100% + 96px + env(safe-area-inset-bottom, 0px)));
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.25s ease, visibility 0s linear 0.4s;
  }
  .callbar a { flex: 1 1 0; min-width: 0; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0 0.85rem; border-radius: 999px; font: 600 15px/1 var(--sans); text-decoration: none; white-space: nowrap; }
  .callbar a:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 999px; }
  .callbar-call { flex: 0 0 auto; padding: 0 1.05rem; color: var(--on-dark); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(243, 238, 226, 0.22); }
  .callbar-call svg { flex: none; }
  .callbar-tour { background: var(--oat); color: var(--olive-deep); font-weight: 700; }
}

@media (max-width: 640px) {
  .room-groups { grid-template-columns: minmax(0, 1fr); }
  .homes-grid { grid-template-columns: minmax(0, 1fr); }
  .room-item { grid-template-columns: 88px minmax(0, 1fr); }
  .room-item img { width: 88px; height: 88px; }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .hero-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .lightbox[open] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .lb-figure { grid-column: 1 / -1; grid-row: 1; padding: 4.25rem 0.75rem 0.5rem; }
  .lb-figure img { max-height: calc(100dvh - 13rem); }
  .lb-prev, .lb-next { grid-row: 2; margin: 0.5rem 0.5rem 1.25rem; }
  .lb-prev { grid-column: 1; justify-self: end; }
  .lb-next { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
