/* ==========================================================================
   XLLENT Family Home — styles
   Colour tokens are unchanged from the brand guideline (v2.0): the logo's
   green (129°) and navy (220°) hues plus Paper. No third hue, no gradients.

   Motion: calm and unhurried. Things settle into place; nothing loops on its
   own. Patterns borrowed from the Calmlyss reference (line-by-line heading
   rises, staggered fade-ups, rolling button labels, tabs, accordion) and
   re-skinned in this brand. Every effect is opt-in under html.js, and each
   has its own reduced-motion handling (see "Motion" at the end).
   ========================================================================== */

/* Figtree, self-hosted (SIL OFL 1.1 — assets/fonts/OFL.txt). One variable
   file per subset covers weights 400–700; no request goes to Google. */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Colour — green ramp (same hue, lightness only) */
  --green-800: #324836; /* Green Shadow — footer, dark bands */
  --green-700: #3F5A43; /* Green Forest — h3, CTA band */
  --green-600: #507255; /* Green Deep — buttons, links */
  --green-500: #5C8462; /* Logo Green — decorative, large-format */
  --green-200: #D5E2D7; /* Green Tint — callouts, highlights */
  --green-100: #EDF2EE; /* Green Wash — alternating sections */

  /* Colour — navy ramp */
  --navy-900: #292C32; /* Navy Ink — body text */
  --navy-700: #454A54; /* Navy — headings */
  --navy-600: #585E6A; /* Navy Muted — captions */
  --navy-200: #D8DADF; /* Navy Tint — dividers, borders */

  --paper: #FAF9F6;
  --white: #FFFFFF;

  /* Text on dark green */
  --on-dark: #FFFFFF;
  --on-dark-soft: rgba(255, 255, 255, 0.86);
  --on-dark-muted: rgba(255, 255, 255, 0.74);
  --line-dark: rgba(255, 255, 255, 0.18);

  --font: "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --tracking-eyebrow: 0.16em;

  /* Spacing — 8px scale from the guideline */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;
  --space-9: 128px;

  --radius-control: 6px;
  --radius-card: 12px;
  --shadow-card: 0 4px 16px rgba(41, 44, 50, 0.10);
  --shadow-lift: 0 18px 40px -18px rgba(41, 44, 50, 0.28);
  --focus-ring: 3px solid var(--navy-700);
  --tap-target: 48px;
  --header-height: 76px;
  --measure: 68ch;

  /* Motion — one family of curves, all decelerating ("settling") */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1); /* presses, toggles — a quick, weighted settle */

  /* Depth — long, low-opacity navy shadows (no harsh drop shadows) */
  --shadow-ambient: 0 1px 2px rgba(41, 44, 50, 0.04), 0 12px 24px -12px rgba(41, 44, 50, 0.12), 0 40px 64px -32px rgba(41, 44, 50, 0.20);
  --hairline: inset 0 0 0 1px rgba(41, 44, 50, 0.08);

  interpolate-size: allow-keywords; /* lets the FAQ animate to height: auto */
}
@media (min-width: 960px) {
  :root { --header-height: 96px; }
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-anchor: none; /* smooth scroll + in-place highlighting shouldn't jump */
  /* Keeps anchor targets AND keyboard focus clear of the sticky header
     (WCAG 2.4.11) — scroll-margin on [id] only covered anchors. */
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy-900);
  font-family: var(--font);
  font-size: 1.125rem;      /* 18px — body text floor */
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-size-adjust: from-font;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }

a {
  color: var(--green-600);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-thickness 0.2s var(--ease-out);
}
a:hover { text-decoration-thickness: 2px; }

/* Arthritis/tremor audience: no double-tap-zoom delay */
a, button, summary, input, textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(80, 114, 85, 0.15);
}

::selection { background: var(--green-200); color: var(--navy-900); }

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.on-dark :focus-visible { outline-color: var(--white); }

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  background: var(--navy-700);
  color: var(--white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-control);
  z-index: 300;
  translate: 0 -200%;
  transition: translate 0.25s var(--ease-out);
}
.skip-link:focus { translate: 0 0; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Lenis (smooth wheel scrolling on desktop) — its required base rules */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ==========================================================================
   Typography — sizes from the guideline; the home hero gets a display size
   ========================================================================== */

h1, .h1 {
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.15;
  color: var(--navy-700);
  text-wrap: balance;
}
h2, .h2 {
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--navy-700);
  text-wrap: balance;
}
h3, .h3 {
  font-weight: 600;
  font-size: 1.3125rem;
  line-height: 1.3;
  color: var(--green-700);
  text-wrap: balance;
}
.lead {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--navy-900);
}
.caption, small {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--navy-600);
}
@media (min-width: 768px) {
  h1, .h1 { font-size: 2.75rem; }
  h2, .h2 { font-size: 2.25rem; }
  h3, .h3 { font-size: 1.5rem; }
  .lead { font-size: 1.3125rem; }
}

p, .measure { max-width: var(--measure); }
p { text-wrap: pretty; }

/* Accent phrase in a heading — the Calmlyss "second voice", done with colour
   (the guideline allows one typeface and reserves italics for quotes). */
.hl { color: var(--green-600); }
.on-dark .hl { color: var(--green-200); }

/* Eyebrow tag — dot + tracked caps, echoing the logo's FAMILY HOME */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-control);
  background: var(--white);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--green-600);
  width: fit-content;
  max-width: 100%;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--green-500);
  flex-shrink: 0;
}
.on-dark .eyebrow {
  background: transparent;
  border-color: var(--line-dark);
  color: var(--green-200);
}
.on-dark .eyebrow::before { background: var(--green-200); }
/* Home hero: under 480px the full tag wraps with a stray "·", and the logo
   already names the home, so the brand half drops */
@media (max-width: 479px) { .eyebrow__brand { display: none; } }

.section-head { display: grid; gap: var(--space-3); justify-items: start; }
.section-head > p { color: var(--navy-600); }
.section-head--center { justify-items: center; text-align: center; margin-inline: auto; }
.section-head--center > p { margin-inline: auto; }
.on-dark .section-head > p { color: var(--on-dark-soft); }

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-3);
}
@media (min-width: 600px) { .container { padding-inline: var(--space-4); } }

.section { padding-block: var(--space-7); }
@media (min-width: 768px) { .section { padding-block: var(--space-8); } }
/* Wide screens get the top step of the 8px scale — room to breathe */
@media (min-width: 1200px) { .section { padding-block: var(--space-9); } }
.section--tight-top { padding-top: 0; }
.section--tight-bottom { padding-bottom: 0; }
.section--wash { background: var(--green-100); }

.on-dark { background: var(--green-800); color: var(--on-dark); }
.on-dark h2, .on-dark h3 { color: var(--on-dark); }
.on-dark p { color: var(--on-dark-soft); }

.grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.grid--align-start { align-items: start; }
.grid--align-center { align-items: center; }
.grid > * { min-width: 0; }

.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.stack--lg { gap: var(--space-5); }

/* ==========================================================================
   Buttons — the label rolls up and the arrow swaps on hover (Calmlyss),
   with the guideline's 6px corners and Green Deep → Green Forest states.
   main.js clones each label (aria-hidden) to make the roll; without JS the
   button is simply a plain button.
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: var(--tap-target);
  padding: 7px 7px 7px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-control);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    color 0.35s var(--ease-out),
    scale 0.25s var(--ease-spring);
}
.btn:active { scale: 0.97; }
.btn--icon-first { padding: 7px 22px 7px 7px; }
.btn--plain { padding: 12px 28px; }
.btn--block { width: 100%; }

.btn__text {
  display: inline-grid;
  overflow: hidden;
  padding-block: 0.12em;
  margin-block: -0.12em;
}
.btn__text > span {
  grid-area: 1 / 1;
  transition: translate 0.5s var(--ease-out);
}
.btn__text > span + span { translate: 0 110%; }

.btn__icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), scale 0.5s var(--ease-spring);
}
.btn__icon svg {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  transition: translate 0.5s var(--ease-out);
}
.btn__icon svg + svg { translate: -170% 0; }

@media (hover: hover) {
  /* The icon's own little box swells as the arrow passes through it */
  .btn:hover .btn__icon { scale: 1.08; }
  .btn:hover .btn__text > span:first-child { translate: 0 -110%; }
  .btn:hover .btn__text > span + span { translate: 0 0; }
  .btn:hover .btn__icon svg:first-child:not(:only-child) { translate: 170% 0; }
  .btn:hover .btn__icon svg + svg { translate: 0 0; }
  .btn:hover .btn__icon--ring svg { animation: ring 0.9s var(--ease-out) 1; }
}
.btn:focus-visible .btn__text > span:first-child { translate: 0 -110%; }
.btn:focus-visible .btn__text > span + span { translate: 0 0; }

@keyframes ring {
  15% { rotate: -14deg; }
  30% { rotate: 12deg; }
  45% { rotate: -9deg; }
  60% { rotate: 6deg; }
  75% { rotate: -3deg; }
}

.btn--primary { background: var(--green-600); color: var(--white); }
.btn--primary .btn__icon { background: var(--white); color: var(--green-600); }
.btn--primary:hover { background: var(--green-700); }

.btn--secondary { background: transparent; border-color: var(--green-600); color: var(--green-600); }
.btn--secondary .btn__icon { background: var(--green-600); color: var(--white); }
.btn--secondary:hover { background: var(--green-200); }

.btn--on-dark { background: var(--paper); color: var(--green-700); }
.btn--on-dark .btn__icon { background: var(--green-700); color: var(--white); }
.btn--on-dark:hover { background: var(--white); }

.btn--outline-on-dark { background: transparent; border-color: var(--white); color: var(--white); }
.btn--outline-on-dark .btn__icon { background: var(--white); color: var(--green-700); }
.btn--outline-on-dark:hover { background: rgba(255, 255, 255, 0.12); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Underlined text link with an arrow that slides */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap-target);
  font-weight: 600;
  color: var(--green-600);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.link-arrow svg { width: 18px; height: 18px; transition: translate 0.4s var(--ease-out); }
.link-arrow:hover svg { translate: 4px 0; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--navy-200);
  transition: box-shadow 0.4s var(--ease-out), background-color 0.4s var(--ease-out);
  view-transition-name: site-header; /* stays put while pages cross-fade */
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(41, 44, 50, 0.35); }
/* Once the page moves, the header becomes frosted Paper: still reads as Paper
   (88%), but photos passing underneath soften instead of showing through.
   Blur only on this one sticky element, never on scrolling content. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header.is-scrolled {
    background: rgba(250, 249, 246, 0.88);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: auto;
  border-radius: var(--radius-control);
}
.brand img {
  height: 54px;
  width: auto;
  transition: scale 0.4s var(--ease-out);
  transform-origin: left center;
}
@media (min-width: 960px) {
  .brand img { height: 74px; }
  .site-header.is-scrolled .brand img { scale: 0.9; }
}

.primary-nav { display: none; }
.primary-nav__list { display: flex; align-items: center; gap: var(--space-5); }
.primary-nav__list a {
  position: relative;
  display: inline-block;
  padding-block: 12px;
  color: var(--navy-700);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}
.primary-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 3px;
  background: var(--green-600);
  scale: 0 1;
  transform-origin: right center;
  transition: scale 0.45s var(--ease-out);
}
.primary-nav__list a:hover { color: var(--green-600); }
.primary-nav__list a:hover::after { scale: 1 1; transform-origin: left center; }
.primary-nav__list a[aria-current="page"] { color: var(--green-600); }
.primary-nav__list a[aria-current="page"]::after { scale: 1 1; }

.header-actions { display: flex; align-items: center; gap: var(--space-2); }

/* The phone number is in the header at every width (guideline §6) */
.btn--call { font-size: 1rem; padding: 5px 14px 5px 5px; gap: 10px; }
.btn--call .btn__icon { width: 34px; height: 34px; }
@media (min-width: 960px) {
  .btn--call { font-size: 1.125rem; padding: 7px 20px 7px 7px; }
}
@media (max-width: 359px) {
  .btn--call { font-size: 0.9375rem; padding-right: 10px; }
  .btn--call .btn__icon { width: 30px; height: 30px; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-target);
  height: var(--tap-target);
  background: transparent;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-control);
  color: var(--navy-700);
  transition: border-color 0.35s var(--ease-out), background-color 0.35s var(--ease-out), scale 0.25s var(--ease-spring);
}
.nav-toggle:active { scale: 0.94; }
.nav-toggle[aria-expanded="true"] { border-color: var(--green-600); background: var(--green-100); }

/* Three lines that fold into an × — the middle one shrinks away while the
   outer two meet in the middle and turn. Transforms only. */
.nav-toggle__lines { position: relative; width: 22px; height: 16px; }
.nav-toggle__lines > span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: translate 0.45s var(--ease-spring), rotate 0.45s var(--ease-spring), scale 0.3s var(--ease-out), opacity 0.2s var(--ease-out);
}
.nav-toggle__lines > span:nth-child(1) { top: 0; }
.nav-toggle__lines > span:nth-child(2) { top: 7px; }
.nav-toggle__lines > span:nth-child(3) { top: 14px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__lines > span:nth-child(1) { translate: 0 7px; rotate: 45deg; }
.nav-toggle[aria-expanded="true"] .nav-toggle__lines > span:nth-child(2) { scale: 0 1; opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__lines > span:nth-child(3) { translate: 0 -7px; rotate: -45deg; }

@media (min-width: 960px) {
  .primary-nav { display: block; }
  .nav-toggle { display: none; }
}

/* Reading progress — a hairline that fills as you scroll the page */
.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--green-600);
  transform-origin: left center;
  scale: var(--progress, 0) 1;
  pointer-events: none;
}

/* Full-screen menu (phones/tablets) — opaque Paper, not a dropdown. It sits
   just under the header (z-index 90 < 100), so the logo, the phone number and
   the × stay in view, and it unrolls downward from the header's edge. */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: var(--space-3);
  padding-top: calc(var(--header-height) + 1px + var(--space-4));
  padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
  background: var(--paper);
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease-in-out), visibility 0s linear 0.7s;
}
.mobile-menu.is-open {
  visibility: visible;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.7s var(--ease-in-out), visibility 0s;
}
@media (min-width: 600px) { .mobile-menu { padding-inline: var(--space-4); } }
/* While it's open the header is plain Paper, flush with the menu below */
.menu-open .site-header { background: var(--paper); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu-open .header-progress { opacity: 0; }
.mobile-menu__list { border-top: 1px solid var(--navy-200); }
.mobile-menu__list li { border-bottom: 1px solid var(--navy-200); overflow: hidden; }
.mobile-menu__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy-700);
  text-decoration: none;
}
.mobile-menu__list a svg { width: 22px; height: 22px; color: var(--green-600); }
.mobile-menu__list a[aria-current="page"] { color: var(--green-600); }
.mobile-menu__call { margin-top: var(--space-5); align-self: stretch; }
.mobile-menu__meta { margin-top: var(--space-4); color: var(--navy-600); font-size: 1rem; }

@media (prefers-reduced-motion: no-preference) {
  .mobile-menu__list a,
  .mobile-menu__call,
  .mobile-menu__meta {
    translate: 0 100%;
    opacity: 0;
    transition: translate 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
  }
  .mobile-menu.is-open .mobile-menu__list a,
  .mobile-menu.is-open .mobile-menu__call,
  .mobile-menu.is-open .mobile-menu__meta { translate: 0 0; opacity: 1; }
  .mobile-menu.is-open li:nth-child(1) a { transition-delay: 0.20s; }
  .mobile-menu.is-open li:nth-child(2) a { transition-delay: 0.26s; }
  .mobile-menu.is-open li:nth-child(3) a { transition-delay: 0.32s; }
  .mobile-menu.is-open li:nth-child(4) a { transition-delay: 0.38s; }
  .mobile-menu.is-open li:nth-child(5) a { transition-delay: 0.44s; }
  .mobile-menu.is-open .mobile-menu__call { transition-delay: 0.50s; }
  .mobile-menu.is-open .mobile-menu__meta { transition-delay: 0.56s; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu, .mobile-menu.is-open { transition: none; }
}
@media (min-width: 960px) {
  .mobile-menu { display: none; }
}

/* ==========================================================================
   Home hero — split layout; the house photo is shown whole
   ========================================================================== */

.hero { padding-block: var(--space-5) var(--space-7); }
@media (min-width: 860px) { .hero { padding-block: var(--space-7) var(--space-8); } }

.hero__grid { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 860px) {
  .hero__grid { grid-template-columns: 1.08fr 0.92fr; gap: var(--space-7); }
}
.hero__copy { display: grid; gap: var(--space-4); justify-items: start; }
.hero h1 {
  font-size: clamp(2.375rem, 1.5rem + 3.6vw, 4.25rem);
  line-height: 1.06;
}
.hero .lead { color: var(--navy-700); max-width: 36ch; }

.hero__visual { position: relative; }
/* The house photo sits on the page with a long, soft shadow that arrives
   with it (the wipe), so there's never a shadow under an empty frame */
.hero__visual .photo { box-shadow: var(--shadow-ambient); transition: box-shadow 1.3s var(--ease-out) 0.3s; }
.js .hero__visual .photo.wipe:not(.in) { box-shadow: none; }
.hero__place {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  color: var(--navy-600);
  font-size: 1rem;
}
.hero__place svg { width: 20px; height: 20px; color: var(--green-600); flex-shrink: 0; }

/* ==========================================================================
   Photos — frames follow each photo's own aspect ratio (never cropped)
   ========================================================================== */

.photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--green-100);
}
.photo picture { display: block; height: 100%; }
.photo img { width: 100%; height: auto; }
/* A hairline just inside the edge — the frame reads as machined, not pasted */
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--hairline);
  pointer-events: none;
}
.photo--square { aspect-ratio: 2000 / 1989; }
.photo--land { aspect-ratio: 4 / 3; }
.photo--port { aspect-ratio: 3 / 4; }
.photo--square img, .photo--land img, .photo--port img { height: 100%; object-fit: cover; }

/* ==========================================================================
   Facts strip (home)
   ========================================================================== */

.facts {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .facts { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); } }
.fact {
  position: relative;
  padding-top: var(--space-4);
  border-top: 1px solid var(--navy-200);
}
.fact::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 64px;
  height: 3px;
  background: var(--green-600);
  transform-origin: left center;
}
.fact__num {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(2.75rem, 2rem + 2.4vw, 3.75rem);
  font-weight: 700;
  line-height: 1;
  color: var(--navy-700);
  font-variant-numeric: tabular-nums;
}
.fact__num small {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--green-600);
}
.fact__label { margin-top: var(--space-2); color: var(--navy-600); }

/* ==========================================================================
   Statement — a paragraph whose words light up as you read (home, about)
   ========================================================================== */

.statement {
  font-size: clamp(1.5rem, 1.05rem + 1.7vw, 2.375rem);
  line-height: 1.32;
  font-weight: 600;
  color: var(--navy-900);
  max-width: 38ch;
  text-wrap: pretty;
}
.statement .hl { color: var(--green-600); }

/* ==========================================================================
   Offer cards (home) — Our home / Care / Activities
   ========================================================================== */

/* Bento: one large photo card, two lighter cards stacked beside it.
   Phones: one column. Tablets: the photo card spans the row, the other two
   sit side by side. ≥960px: 7 + 5 columns, photo card over two rows. */
.offer-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
@media (min-width: 640px) {
  .offer-grid { grid-template-columns: 1fr 1fr; }
  .offer--feature { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .offer-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .offer--feature { grid-column: 1 / span 7; grid-row: 1 / span 2; }
  .offer--note { grid-column: 8 / span 5; }
  .offer--feature h3 { font-size: 1.75rem; }
}

.offer {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-card);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: translate 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.4s var(--ease-out);
}
.offer:hover, .offer:focus-visible {
  translate: 0 -6px;
  box-shadow: var(--shadow-lift);
  border-color: var(--green-600);
}
.offer .photo { border-radius: 0; }
.offer .photo::after { content: none; } /* the card's own border frames it */
.offer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.offer__icon { display: inline-flex; color: var(--green-600); }
.offer__icon svg { width: 40px; height: 40px; }

/* Care support on the reversed surface (Green Forest) — the weight in the bento */
.offer--dark { background: var(--green-700); border-color: var(--green-700); color: var(--on-dark); }
.offer--dark h3 { color: var(--on-dark); }
.offer--dark .offer__body p { color: var(--on-dark-soft); }
.offer--dark .offer__index,
.offer--dark .offer__icon { color: var(--green-200); }
.offer--dark .tag { background: rgba(255, 255, 255, 0.1); color: var(--on-dark); }
.offer--dark .offer__more { color: var(--on-dark); border-top-color: var(--line-dark); }
.offer--dark .offer__more .btn__icon { background: rgba(255, 255, 255, 0.12); color: var(--on-dark); }
.offer.offer--dark:hover .offer__more .btn__icon { background: var(--paper); color: var(--green-700); }
.offer--dark:hover, .offer--dark:focus-visible { border-color: var(--green-800); }
.offer__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
  padding: var(--space-4);
}
@media (min-width: 768px) { .offer__body { padding: var(--space-5); } }
.offer__index {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--green-600);
}
.offer__body p { color: var(--navy-600); font-size: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tag {
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 1rem;
  line-height: 1.5;
}
.offer__more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--navy-200);
  font-weight: 600;
  color: var(--green-600);
}
.offer__more .btn__icon { background: var(--green-100); color: var(--green-600); }
.offer:hover .offer__more .btn__icon { background: var(--green-600); color: var(--white); }
@media (hover: hover) {
  .offer:hover .offer__more .btn__icon { scale: 1.08; }
  .offer:hover .btn__icon svg:first-child:not(:only-child) { translate: 170% 0; }
  .offer:hover .btn__icon svg + svg { translate: 0 0; }
}

/* ==========================================================================
   A day in the house — tabs; a sun travels an arc to the chosen time
   ========================================================================== */

.day__grid { display: grid; gap: var(--space-6); margin-top: var(--space-6); }
@media (min-width: 900px) {
  .day__grid { grid-template-columns: 0.95fr 1.05fr; gap: var(--space-7); align-items: center; }
}

.day__dial { width: 100%; max-width: 360px; color: var(--green-200); }
.day__dial .track { stroke: var(--line-dark); }
.day__dial .horizon { stroke: var(--line-dark); }
.day__dial .trail {
  stroke: var(--green-200);
  stroke-dasharray: 100 100;
  stroke-dashoffset: calc(100 - var(--p, 0.22) * 100);
  transition: stroke-dashoffset 1.2s var(--ease-out);
}
.day__orb {
  transform-box: view-box;
  transform-origin: 180px 170px;
  rotate: calc(var(--p, 0.22) * 180deg);
  transition: rotate 1.2s var(--ease-out);
}
.day__orb-icon {
  transform-box: view-box;
  transform-origin: 24px 170px;
  rotate: calc(var(--p, 0.22) * -180deg);
  transition: rotate 1.2s var(--ease-out);
}
.day__sun, .day__moon { transition: opacity 0.6s var(--ease-out); }
.day__moon { opacity: 0; }
.day[data-time="overnight"] .day__sun { opacity: 0; }
.day[data-time="overnight"] .day__moon { opacity: 1; }

.day__tabs {
  display: none;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.js .day__tabs { display: flex; }
.day__tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap-target);
  padding: 10px 16px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--on-dark);
  font-weight: 600;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.day__tab svg { width: 20px; height: 20px; }
.day__tab:hover { border-color: rgba(255, 255, 255, 0.5); }
.day__tab[aria-selected="true"] { background: var(--paper); color: var(--green-800); border-color: var(--paper); }

.day__panels { display: grid; margin-top: var(--space-4); }
.day__panel { display: grid; gap: var(--space-2); }
.day__panel + .day__panel { margin-top: var(--space-5); }
.day__time {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--on-dark);
  font-variant-numeric: tabular-nums;
}
.day__panel h3 { color: var(--green-200); }

/* With JS the panels share one grid cell and cross-fade */
.js .day__panel { grid-area: 1 / 1; }
.js .day__panel + .day__panel { margin-top: 0; }
.js .day__panel[hidden] { display: grid; visibility: hidden; opacity: 0; translate: 0 16px; }
.js .day__panel {
  transition: opacity 0.6s var(--ease-out), translate 0.7s var(--ease-out), visibility 0s;
}
.js .day__panel[hidden] {
  transition: opacity 0.3s var(--ease-out), translate 0.3s var(--ease-out), visibility 0s linear 0.3s;
}

.day__photos {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--green-700);
}
.day__photo { position: absolute; inset: 0; margin: 0; }
.day__photo img { width: 100%; height: 100%; object-fit: cover; }
.day__photo:not(:first-child) { opacity: 0; }
.js .day__photo { opacity: 0; transition: opacity 0.9s var(--ease-out); }
.js .day__photo.is-active { opacity: 1; }
.day__caption {
  margin-top: var(--space-2);
  font-size: 1rem;
  color: var(--on-dark-muted);
}

/* ==========================================================================
   Owner card
   ========================================================================== */

.widget-card {
  background: var(--white);
  border-radius: var(--radius-card);
  border: 1px solid var(--navy-200);
  padding: var(--space-4);
  transition: box-shadow 0.5s var(--ease-out), translate 0.5s var(--ease-out);
}
@media (min-width: 768px) { .widget-card { padding: var(--space-5); } }
.widget-card:hover { box-shadow: var(--shadow-lift); translate: 0 -4px; }
.widget-card__person {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--navy-200);
}
.widget-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-card);
  background: var(--green-200);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--green-600);
}
.widget-card__avatar svg { width: 30px; height: 30px; }
.widget-card__person h3 { color: var(--navy-700); }
.widget-card__person p { color: var(--navy-600); font-size: 1rem; }
.widget-card__body { display: grid; gap: var(--space-3); padding-top: var(--space-4); }
.widget-card__row { display: flex; align-items: center; gap: var(--space-3); }
.widget-card__row svg { width: 22px; height: 22px; color: var(--green-600); flex-shrink: 0; }

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-4);
  border-radius: var(--radius-card);
  background: var(--green-700);
  color: var(--on-dark);
}
@media (min-width: 768px) {
  .cta-band {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: var(--space-7) var(--space-6);
  }
}
.cta-band h2 { color: var(--on-dark); }
.cta-band p { color: var(--on-dark-soft); margin-top: var(--space-2); }
.cta-band__roof {
  position: absolute;
  right: -2%;
  bottom: -1px;
  width: min(520px, 70%);
  color: var(--green-600);
  pointer-events: none;
}
.cta-band > :not(.cta-band__roof) { position: relative; }

/* ==========================================================================
   Page intro (inner pages)
   ========================================================================== */

.page-intro { display: grid; gap: var(--space-4); justify-items: start; max-width: 820px; }
.page-intro .lead { color: var(--navy-700); }
.page-intro > p:not(.lead) { color: var(--navy-900); }

/* Editorial split (About): the heading holds the left, the story reads on the
   right, with a hairline between them. Stacks on phones and tablets. */
.split { display: grid; gap: var(--space-5); }
.split__aside, .split__main { display: grid; gap: var(--space-4); justify-items: start; align-content: start; }
.split__main .lead { color: var(--navy-700); }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-7); }
  .split__main { padding-left: var(--space-7); border-left: 1px solid var(--navy-200); padding-top: var(--space-6); }
}

/* ==========================================================================
   Dark band with rows (How we work, Credentials, Tour covers)
   ========================================================================== */

.band-rows { margin-top: var(--space-6); border-top: 1px solid var(--line-dark); }
.band-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--space-4);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--line-dark);
  align-items: start;
}
@media (min-width: 760px) {
  .band-row { grid-template-columns: 48px 1fr 1.4fr; align-items: center; }
  .band-row p { margin-top: 0 !important; }
}
.band-row svg { width: 32px; height: 32px; color: var(--green-200); }
.band-row h3 { color: var(--on-dark); }
.band-row p { margin-top: var(--space-1); color: var(--on-dark-soft); grid-column: 2; }
@media (min-width: 760px) { .band-row p { grid-column: auto; } }

/* ==========================================================================
   Care finder (Our care)
   ========================================================================== */

.finder {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--white);
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-card);
}
@media (min-width: 768px) { .finder { padding: var(--space-5); } }
.finder[hidden] { display: none; }
.finder__field { position: relative; }
.finder__field label { display: block; font-weight: 600; font-size: 1rem; margin-bottom: var(--space-2); }
.finder__input-wrap { position: relative; }
.finder__input-wrap > svg {
  position: absolute;
  left: 16px;
  top: 50%;
  translate: 0 -50%;
  width: 22px;
  height: 22px;
  color: var(--green-600);
  pointer-events: none;
}
.finder input {
  width: 100%;
  min-height: 56px;
  padding: 12px 56px 12px 50px;
  border: 1px solid var(--navy-600); /* 6.5:1 — a field's edge needs 3:1 */
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--navy-900);
  font: inherit;
  font-size: 1.125rem;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.finder input:focus-visible {
  border-color: var(--green-600);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(80, 114, 85, 0.15);
}
.finder input::-webkit-search-cancel-button { display: none; }
.finder__clear {
  position: absolute;
  right: 4px;
  top: 50%;
  translate: 0 -50%;
  width: var(--tap-target);
  height: var(--tap-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--navy-600);
}
.finder__clear svg { width: 20px; height: 20px; }
.finder__clear[hidden] { display: none; }

.finder__suggest { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.finder__suggest > span { color: var(--navy-600); font-size: 1rem; margin-right: var(--space-1); }
.chip {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--navy-700);
  font-weight: 600;
  font-size: 1rem;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out), color 0.3s var(--ease-out), translate 0.3s var(--ease-out);
}
.chip:hover { border-color: var(--green-600); color: var(--green-600); translate: 0 -2px; }
.chip[aria-pressed="true"] { background: var(--green-600); border-color: var(--green-600); color: var(--white); }

.finder__answer {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  min-height: 3.5em;
  padding: var(--space-3);
  border-radius: var(--radius-control);
  background: var(--green-100);
  color: var(--navy-900);
}
.finder__answer svg { width: 24px; height: 24px; flex-shrink: 0; margin-top: 3px; color: var(--green-700); }
.finder__answer p { max-width: none; }
.finder__answer.is-yes { background: var(--green-200); }

.care-cats { display: grid; gap: var(--space-4); margin-top: var(--space-5); }
@media (min-width: 900px) { .care-cats { grid-template-columns: repeat(3, 1fr); } }
.care-cat {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--white);
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-card);
  transition: opacity 0.5s var(--ease-out), border-color 0.4s var(--ease-out);
}
@media (min-width: 768px) { .care-cat { padding: var(--space-5); } }
.care-cat__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.care-cat__icon { width: 40px; height: 40px; color: var(--green-600); }
.care-cat__index { font-weight: 700; font-size: 0.875rem; letter-spacing: 0.1em; color: var(--green-600); }
.care-cat.has-match { border-color: var(--green-600); }
/* .in is in the selector so this outranks the reveal's opacity: 1.
   60% keeps dimmed text near AA (3.9:1) for older eyes. */
.js .care-cat.is-dim.in { opacity: 0.6; }

.care-list { display: flex; flex-direction: column; }
.care-list li {
  position: relative;
  isolation: isolate;
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: 10px 8px;
  margin-inline: -8px;
  border-radius: var(--radius-control);
  transition: opacity 0.45s var(--ease-out);
}
.care-list li + li { border-top: 1px solid var(--navy-200); }
.care-list li::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--green-200);
  scale: 0 1;
  transform-origin: left center;
  transition: scale 0.6s var(--ease-out);
}
.care-list li.is-match::before { scale: 1 1; }
.care-list li.is-match { font-weight: 600; }
.care-list li.is-dim { opacity: 0.6; }
.care-list svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 3px; color: var(--green-600); }
.care-list__new { /* items added from the brochure — no visual difference */ }

/* ==========================================================================
   Our home — walk-through tour with a progress rail, and a photo viewer
   ========================================================================== */

.tour { position: relative; margin-top: var(--space-6); padding-left: 52px; }
@media (min-width: 900px) { .tour { padding-left: 80px; } }
.tour__list { display: grid; gap: var(--space-7); }
@media (min-width: 900px) { .tour__list { gap: var(--space-8); } }
.tour__rail {
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--navy-200);
}
@media (min-width: 900px) { .tour__rail { left: 23px; } }
.tour__rail-fill {
  position: absolute;
  inset: 0;
  background: var(--green-600);
  transform-origin: top center;
  scale: 1 var(--tour, 0);
}
.stop { position: relative; display: grid; gap: var(--space-4); }
@media (min-width: 900px) {
  .stop { grid-template-columns: 0.8fr 1.2fr; gap: var(--space-6); align-items: start; }
  .stop__text { padding-top: 6px; } /* title lines up with the stop number */
  .stop--port { grid-template-columns: 1.1fr 0.9fr; }
}
.stop__marker {
  position: absolute;
  left: -52px;
  top: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--navy-200);
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--navy-600);
  font-weight: 700;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
@media (min-width: 900px) { .stop__marker { left: -80px; width: 48px; height: 48px; font-size: 1rem; } }
.stop.is-active .stop__marker,
html:not(.js) .stop__marker { background: var(--green-600); border-color: var(--green-600); color: var(--white); }
.stop__text { display: grid; gap: var(--space-2); align-content: start; }
.stop__text p { color: var(--navy-600); }
.stop__media { max-width: 720px; }
.stop--port .stop__media { max-width: 440px; }

.photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  border-radius: var(--radius-card);
  cursor: zoom-in;
  text-align: left;
}
.photo-btn .photo { display: block; }
.photo-btn__hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-control);
  background: var(--white);
  color: var(--green-700);
  font-weight: 600;
  font-size: 1rem;
  opacity: 0;
  translate: 0 8px;
  transition: opacity 0.35s var(--ease-out), translate 0.35s var(--ease-out);
}
.photo-btn__hint svg { width: 18px; height: 18px; }
.photo-btn:hover .photo-btn__hint,
.photo-btn:focus-visible .photo-btn__hint { opacity: 1; translate: 0 0; }
@media (hover: none) { .photo-btn__hint { opacity: 1; translate: 0 0; } }

.viewer {
  width: min(1180px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--green-800);
  color: var(--on-dark);
  overflow: hidden;
  opacity: 0;
  translate: 0 16px;
  transition-property: opacity, translate, display, overlay;
  transition-duration: 0.35s;
  transition-timing-function: var(--ease-out);
  transition-behavior: allow-discrete;
}
.viewer[open]:not([data-closing]) {
  opacity: 1;
  translate: 0 0;
  @starting-style { opacity: 0; translate: 0 16px; }
}
.viewer::backdrop {
  background-color: rgba(41, 44, 50, 0);
  transition-property: background-color, display, overlay;
  transition-duration: 0.35s;
  transition-behavior: allow-discrete;
}
.viewer[open]:not([data-closing])::backdrop {
  background-color: rgba(41, 44, 50, 0.78);
  @starting-style { background-color: rgba(41, 44, 50, 0); }
}
.viewer__inner { display: grid; grid-template-rows: 1fr auto; max-height: calc(100dvh - 24px); }
.viewer__figure { display: grid; place-items: center; min-height: 0; background: var(--navy-900); }
.viewer__figure img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 120px);
  object-fit: contain;
}
.viewer__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
}
.viewer__caption { flex: 1; font-weight: 600; color: var(--on-dark); min-width: 0; }
.viewer__count { color: var(--on-dark-muted); font-size: 1rem; font-variant-numeric: tabular-nums; }
.viewer__btn {
  width: var(--tap-target);
  height: var(--tap-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--on-dark);
  flex-shrink: 0;
}
.viewer__btn:hover { background: rgba(255, 255, 255, 0.1); }
.viewer__btn svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) {
  .viewer { translate: none; transition-duration: 0.1s; }
  .viewer[open]:not([data-closing]) { @starting-style { translate: none; } }
}

/* Home facts + activities (brochure) */
.fact-tiles {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  margin-top: var(--space-5);
}
.fact-tile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-card);
  font-weight: 600;
  color: var(--navy-700);
  transition: border-color 0.4s var(--ease-out), translate 0.4s var(--ease-out);
}
.fact-tile:hover { border-color: var(--green-600); translate: 0 -3px; }
.fact-tile__icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-control);
  background: var(--green-100);
  color: var(--green-600);
  flex-shrink: 0;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
.fact-tile__icon svg { width: 24px; height: 24px; }
.fact-tile:hover .fact-tile__icon { background: var(--green-600); color: var(--white); }

/* ==========================================================================
   About — quote, numbered duty rows
   ========================================================================== */

.quote { display: grid; gap: var(--space-4); max-width: 900px; }
.quote footer { color: var(--navy-600); font-size: 1rem; font-weight: 600; }

.feature-list { margin-top: var(--space-5); border-top: 1px solid var(--navy-200); }
.feature-list li { border-bottom: 1px solid var(--navy-200); }
.feature-list a {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-3);
  margin-inline: calc(var(--space-3) * -1);
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-control);
}
.feature-list a::before {
  content: "";
  position: absolute;
  inset: 4px 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--green-100);
  scale: 0 1;
  transform-origin: left center;
  transition: scale 0.6s var(--ease-out);
}
.feature-list a:hover::before, .feature-list a:focus-visible::before { scale: 1 1; }
.feature-list__index { font-weight: 700; color: var(--green-600); font-size: 1rem; width: 2ch; flex-shrink: 0; }
.feature-list__body { flex: 1; }
.feature-list__body p { margin-top: 2px; color: var(--navy-600); font-size: 1rem; }
.feature-list .btn__icon { background: var(--green-100); color: var(--green-600); }
.feature-list a:hover .btn__icon, .feature-list a:focus-visible .btn__icon { background: var(--green-600); color: var(--white); }
@media (hover: hover) {
  .feature-list a:hover .btn__icon svg:first-child:not(:only-child) { translate: 170% 0; }
  .feature-list a:hover .btn__icon svg + svg { translate: 0 0; }
  .feature-list a:hover .btn__icon--ring svg { animation: ring 0.9s var(--ease-out) 1; }
}

/* ==========================================================================
   Visit — form, steps, FAQ, map
   ========================================================================== */

.card {
  background: var(--white);
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-card);
  padding: var(--space-4);
}
@media (min-width: 768px) { .card { padding: var(--space-5); } }
.card > * + * { margin-top: var(--space-3); }
.card--tint { background: var(--green-200); border-color: var(--green-200); }

.form-field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.form-field label { font-weight: 600; font-size: 1rem; color: var(--navy-900); }
.form-field .req { font-weight: 400; color: var(--navy-600); }
.form-field input,
.form-field textarea {
  min-height: var(--tap-target);
  padding: 12px var(--space-3);
  font: inherit;
  font-size: 1.125rem;
  border: 1px solid var(--navy-600); /* 6.5:1 — a field's edge needs 3:1 */
  border-radius: var(--radius-control);
  background: var(--white);
  color: var(--navy-900);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:hover, .form-field textarea:hover { border-color: var(--navy-900); }
.form-field input:focus-visible,
.form-field textarea:focus-visible {
  border: 2px solid var(--green-600);
  padding: 11px 15px;
  outline: var(--focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(80, 114, 85, 0.15);
}
/* Errors stay in the palette (no third hue) but never look like focus
   (2px green) or a valid field (1px navy): a heavy Navy Ink edge, plus the
   alert icon and a bold message. Focus on an error field adds the ring. */
.form-field.has-error input,
.form-field.has-error textarea { border: 3px solid var(--navy-900); padding: 10px 14px; }
.form-error {
  display: none;
  align-items: center;
  gap: var(--space-2);
  color: var(--navy-900);
  font-size: 1rem;
  font-weight: 700;
}
.form-error svg { width: 20px; height: 20px; color: var(--navy-900); flex-shrink: 0; }
.form-field.has-error .form-error { display: flex; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-success,
.form-notice {
  display: none;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  background: var(--green-200);
  border-radius: var(--radius-card);
}
.form-success.is-visible,
.form-success:target,
.form-notice.is-visible,
.form-notice:target { display: flex; }
.form-success svg, .form-notice svg { width: 32px; height: 32px; color: var(--green-700); flex-shrink: 0; }
.form-success .check-draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.form-success.is-visible .check-draw,
.form-success:target .check-draw { animation: draw 0.9s var(--ease-out) 0.15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .form-success .check-draw { stroke-dashoffset: 0; animation: none !important; }
}

.steps { position: relative; display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.steps::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: var(--green-600);
  transform-origin: top center;
  opacity: 0.35;
}
.steps li { position: relative; display: flex; gap: var(--space-3); align-items: flex-start; }
.steps__num {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-control);
  background: var(--green-600);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.steps h3 { font-size: 1.1875rem; }
.steps p { margin-top: 2px; color: var(--navy-700); }

.icon-row-list { display: grid; gap: var(--space-3); }
.icon-row { display: flex; gap: var(--space-3); align-items: center; }
.icon-row a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.icon-row svg { width: 26px; height: 26px; flex-shrink: 0; color: var(--green-600); }

.map-embed { display: block; width: 100%; border: 0; border-radius: var(--radius-card); background: var(--green-100); }

/* Click-to-load map — Google is contacted only when the visitor asks */
.map-facade {
  display: grid;
  min-height: 320px;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-card);
  background: var(--green-100);
  overflow: hidden;
}
.map-facade__body {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: var(--space-3);
  padding: var(--space-5);
}
.map-facade__pin { width: 36px; height: 36px; color: var(--green-600); }
.map-facade__address { font-size: 1.1875rem; color: var(--navy-900); }
.map-facade .caption { color: var(--navy-600); }
.map-facade .btn[hidden] { display: none; }
.map-facade.is-loaded { border-color: transparent; background: none; }
.map-facade.is-loaded .map-embed { height: 320px; }

/* FAQ — native <details>, + turns into × (Calmlyss), height animates where supported */
.faq { margin-top: var(--space-5); border-top: 1px solid var(--navy-200); }
.faq details { border-bottom: 1px solid var(--navy-200); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--tap-target);
  padding: var(--space-4) 0;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.4;
  color: var(--navy-700);
  transition: color 0.3s var(--ease-out);
}
@media (min-width: 768px) { .faq summary { font-size: 1.3125rem; } }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--green-600); }
.faq__icon {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-control);
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  border-radius: 1px;
  background: var(--green-600);
  rotate: 0deg;
  transition: background-color 0.3s var(--ease-out), rotate 0.45s var(--ease-out);
}
.faq__icon::after { rotate: 90deg; }
.faq details[open] .faq__icon { background: var(--green-600); border-color: var(--green-600); }
.faq details[open] .faq__icon::before { rotate: 135deg; }
.faq details[open] .faq__icon::after { rotate: 225deg; }
.faq details[open] .faq__icon::before,
.faq details[open] .faq__icon::after { background: var(--white); }
.faq__answer { padding: 0 0 var(--space-4); color: var(--navy-900); }
.faq__answer > * + * { margin-top: var(--space-2); }
.faq details::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 0.5s var(--ease-out), content-visibility 0.5s allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) {
  .faq details::details-content { transition: none; }
  .faq__icon, .faq__icon::before, .faq__icon::after { transition: none; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--green-800);
  color: var(--on-dark);
  padding-block: var(--space-7) var(--space-4);
}
.site-footer a { color: var(--on-dark); }

.footer-contact-cards { display: grid; gap: var(--space-3); margin-bottom: var(--space-7); }
@media (min-width: 760px) { .footer-contact-cards { grid-template-columns: repeat(3, 1fr); } }
.footer-contact-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
  transition: translate 0.45s var(--ease-out), background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.footer-contact-card:hover,
.footer-contact-card:focus-visible {
  translate: 0 -6px;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.36);
}
.footer-contact-card__icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  background: var(--green-600);
  color: var(--white);
  flex-shrink: 0;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
.footer-contact-card:hover .footer-contact-card__icon { background: var(--paper); color: var(--green-700); }
.footer-contact-card__icon svg { width: 22px; height: 22px; }
.footer-contact-card__label { display: block; font-size: 1rem; color: var(--on-dark-muted); }
.footer-contact-card__value { display: block; font-weight: 700; color: var(--on-dark); overflow-wrap: anywhere; }

.site-footer__grid { display: grid; gap: var(--space-6); }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h2 { color: var(--on-dark); font-size: 1.125rem; margin-bottom: var(--space-3); }
.site-footer p, .site-footer li { color: var(--on-dark-soft); }
/* Links get a 44px tap height (arthritis/tremor audience); that height now
   does the spacing, so the list has no gap of its own */
.site-footer__list { display: grid; }
.site-footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}
.site-footer__list a:hover { text-decoration-color: var(--white); }

/* Big closing line under a drawn roofline — decorative (aria-hidden) */
.footer-sign { position: relative; margin-top: var(--space-7); }
.footer-sign__roof { width: 100%; height: auto; color: var(--green-500); }
.site-footer .footer-sign__line {
  margin-top: var(--space-2);
  font-size: clamp(2.25rem, 1rem + 5.4vw, 5.75rem);
  line-height: 1.02;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.44); /* 3.3:1 on Green Shadow — the least that passes for large text */
  text-align: center;
  text-wrap: balance;
  max-width: none;
}
.site-footer__bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-dark);
  font-size: 1rem;
  color: var(--on-dark-muted);
}

/* ==========================================================================
   Motion
   Hidden-until-revealed states exist only under html.js (set in <head>);
   a 4-second failsafe removes .js if main.js never finishes, so content
   can never stay invisible. Reduced motion: every state below is shown
   immediately and nothing moves.
   ========================================================================== */

/* Fade-up reveal; --d staggers siblings in 90ms steps */
.js .reveal {
  opacity: 0;
  translate: 0 32px;
  transition: opacity 0.9s var(--ease-out), translate 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.in { opacity: 1; translate: 0 0; }

/* Photo wipe — the photo rises into its frame like a blind lifting; it ends
   showing the whole photo. The clip sits on the picture, not the observed
   frame: Chrome won't report a fully clipped element as intersecting. */
.js .wipe { background: transparent; }
.js .wipe > picture {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.3s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .wipe.in > picture { clip-path: inset(0 0 0 0); }

/* Headings split into lines (SplitText) — hidden only until split.
   The mask gets a little bottom room so descenders aren't clipped. */
.js [data-split] { visibility: hidden; }
.split-line-mask { padding-bottom: 0.1em; margin-bottom: -0.1em; }

/* Line icons that draw themselves. Each sprite shape has pathLength="1". */
.js .draw svg:not(.no-draw),
.js svg.draw {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s var(--ease-out);
  transition-delay: calc(0.2s + var(--d, 0) * 90ms);
}
.js .draw.in svg:not(.no-draw),
.js svg.draw.in { stroke-dashoffset: 0; }

/* Short accent rules that grow on reveal */
.js .fact::before { scale: 0 1; transition: scale 1.1s var(--ease-out) 0.25s; }
.js .fact.in::before { scale: 1 1; }
.js .steps::before { scale: 1 0; transition: scale 1.4s var(--ease-out) 0.3s; }
.js .steps.in::before { scale: 1 1; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal.in { opacity: 1; translate: none; transition: none; }
  .js .wipe > picture, .js .wipe.in > picture { clip-path: none; transition: none; }
  .js [data-split] { visibility: visible; }
  .js .draw svg:not(.no-draw), .js svg.draw { stroke-dashoffset: 0; transition: none; }
  .js .fact::before, .js .steps::before { scale: 1 1; transition: none; }
  .day__dial .trail, .day__orb, .day__orb-icon, .js .day__photo, .js .day__panel, .js .day__panel[hidden] { transition: none; }
  .btn__text > span, .btn__icon svg { transition: none; }
  .btn:hover .btn__icon--ring svg, .feature-list a:hover .btn__icon--ring svg { animation: none; }
  .care-list li::before, .feature-list a::before, .primary-nav__list a::after { transition: none; }
  .offer, .widget-card, .footer-contact-card, .fact-tile, .chip { transition: none; }
  .offer:hover, .widget-card:hover, .footer-contact-card:hover, .fact-tile:hover, .chip:hover { translate: none; }
  /* The toggle still becomes an ×, the header still frosts — just instantly */
  .nav-toggle, .nav-toggle__lines > span, .site-header, .hero__visual .photo { transition: none; }
  .btn__icon { transition: none; }
  .btn:hover .btn__icon, .offer:hover .offer__more .btn__icon, .btn:active, .nav-toggle:active { scale: none; }
}

/* Cross-document page transitions: a soft cross-fade; the header holds still */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 0.28s var(--ease-in-out) both vt-out; }
  ::view-transition-new(root) { animation: 0.55s var(--ease-out) both vt-in; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; translate: 0 10px; } }
