/* =============================================================================
   Wesley Home & Care — site stylesheet
   -----------------------------------------------------------------------------
   One hand-written file, no build step. Shared by index.html (en-NZ) and
   zh.html (zh-Hans). Full rationale: docs/design-guidelines.md.

   Look & feel: a printed brochure from a small family business — warm paper
   with a faint grain, ruled lines instead of cards, small "photo print"
   corners, plain specific headings, facts (address, hours, phone) up front.
   Navy carries the UI; gold from the logo is used sparingly (top strip phone,
   footer). No icon decoration, no pills, no dark feature bands.

   Architecture (order matters — later sections rely on the cascade):
     1. Fonts            @font-face declarations (self-hosted woff2)
     2. Tokens           palette primitives → semantic roles → type, layout, shape
     3. Language tokens  zh-Hans overrides of type tokens
     4. Base             reset + element defaults (html, headings, p, img…)
     5. Layout           .wrap container
     6. Components       reusable pieces: icon, btn, text-link, brand, skip
     7. Sections         top strip → header → hero → facts → life → care → visit → footer → about → 404
     8. Preferences      prefers-reduced-motion

   Rules of the road
     - Components and sections use SEMANTIC tokens (--color-*), never hex.
       New colours go into the palette first, then get a semantic role.
     - One grey family only: warm (cream/stone). Navy is the brand, not a grey.
     - Media queries live next to the rules they modify (per section), not in
       one block at the end. Breakpoints (CSS vars can't be used in queries):
         xs ≤ 24rem (384px)   tiny phones: stacked list rows
         sm ≤ 35rem (560px)   phones: no top strip, icon-only header tools
         md ≤ 48rem (768px)   single-column layout   |  ≥ 48.01rem two columns
         nav ≤ 70rem (1120px) desktop nav collapses into the menu button
         lg ≥ 62.01rem (992px) facts strap and footer go to one row
     - Class names are short and section-scoped; the HTML is the source of
       truth for structure. Keep both language pages' markup identical.
     - Renaming this file is how caches are busted: after editing, rename to
       layout-<first 12 hex of sha256>.css and update both HTML <link>s.
   ========================================================================== */


/* 1. Fonts ================================================================= */

/* Spectral (serif) — headings + wordmark. DM Sans (variable 100–900) — body/UI.
   sans.woff2 and serif.woff2 are <link rel="preload">ed in each page head. */
@font-face {
  font-family: Spectral;
  src: url(assets/serif.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: Spectral;
  src: url(assets/italic.woff2) format("woff2");
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url(assets/sans.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}


/* 2. Tokens ================================================================ */

:root {
  /* --- 2a. Palette primitives (raw values; only referenced by 2b) -------- */
  /* Brand colours are sampled from the logo: navy #0f2d5f + gold #e7b13c. */
  --navy-900: #0a1f43;   /* pressed / hover on brand */
  --navy-800: #0f2d5f;   /* BRAND navy (logo circle) */
  --navy-600: #2c4a7d;   /* hairline on navy */
  --navy-200: #c9d3e6;   /* secondary text on navy */
  --navy-100: #e6eaf2;   /* body text on navy */
  --gold-500: #e7b13c;   /* BRAND gold (logo lettering) — on navy only */
  --cream-50:  #fcfaf5;  /* page background ("paper") */
  --cream-100: #f4efe4;  /* alternate section background, hover wash */
  --cream-200: #ece6da;  /* image placeholder */
  --cream-300: #e3ddd0;  /* default hairline */
  --cream-400: #d6cfbf;  /* strong hairline (FAQ rows) */
  --stone-500: #a99f8c;  /* control outlines (buttons, email box) */
  --ink-900:   #1b2436;  /* body text, 14.9:1 on paper */
  --slate-600: #566074;  /* secondary text, ≥5.5:1 on every light surface */
  --blue-600:  #1f5fbf;  /* focus ring only */
  --white:     #fff;

  /* --- 2b. Semantic roles (what components use) ------------------------- */
  --color-bg:              var(--cream-50);
  --color-bg-alt:          var(--cream-100);
  --color-bg-hover:        var(--cream-100);
  --color-bg-raised:       var(--white);
  --color-placeholder:     var(--cream-200);
  --color-text:            var(--ink-900);
  --color-text-muted:      var(--slate-600);
  --color-brand:           var(--navy-800);
  --color-brand-hover:     var(--navy-900);
  --color-accent:          var(--gold-500);
  --color-line:            var(--cream-300);
  --color-line-strong:     var(--cream-400);
  --color-line-control:    var(--stone-500);
  --color-focus:           var(--blue-600);
  /* "on-brand" = content placed on a navy surface */
  --color-on-brand:        var(--white);
  --color-on-brand-soft:   var(--navy-100);
  --color-on-brand-muted:  var(--navy-200);
  --color-on-brand-line:   var(--navy-600);
  --shadow-dropdown: 0 .6rem 1rem #0f2d5f16;  /* brand navy at ~9% alpha */
  /* Paper grain: tiny SVG noise tile, ~3% warm-brown alpha. Layer it UNDER a
     background colour: `background: var(--grain), var(--color-bg);` */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .38 0 0 0 0 .32 0 0 0 0 .22 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* --- 2c. Typography ---------------------------------------------------- */
  --font-serif: Spectral, Georgia, serif;           /* headings (zh swaps it) */
  --font-sans: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-wordmark: Spectral, Georgia, serif;        /* Latin logo text, never swapped */

  /* Headings: size · leading · tracking per level. Fluid via clamp().
     Headings are plain, specific sentences — no decorative accent phrase. */
  --heading-weight: 400;
  --h1-size: clamp(2.35rem, 4.3vw, 3.9rem);   --h1-leading: 1.06;  --h1-tracking: -.035em;
  --h2-size: clamp(1.95rem, 3.3vw, 3rem);     --h2-leading: 1.12;  --h2-tracking: -.03em;
  --h3-size: clamp(1.35rem, 1.9vw, 1.7rem);   --h3-leading: 1.2;   --h3-tracking: -.02em;

  --body-size: 1.0625rem;      /* bumps to 1.125rem ≥ md (see below) */
  --body-leading: 1.65;
  --hero-measure: 36ch;        /* max line length of hero intro */

  /* --- 2d. Layout, shape, motion ----------------------------------------- */
  --container: 78rem;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section-space: clamp(3.25rem, 6.3vw, 6.25rem);
  --tap: 2.75rem;              /* minimum touch target (44px) */
  --topline-h: 2.25rem;        /* letterhead strip; scrolls away above the sticky header */
  --head-h: 5.6rem;            /* sticky nav row height (shrinks at lg / sm) */
  --radius-photo: 3px;         /* printed-photo corner */
  --radius-control: 6px;       /* buttons, small boxes */
  --ease: cubic-bezier(.2, .7, .3, 1);
}

@media (min-width: 48.01rem) {
  :root { --body-size: 1.125rem; }
}
@media (max-width: 70rem) {
  :root { --head-h: 4.5rem; }
}
@media (max-width: 35rem) {
  :root { --head-h: 4rem; --topline-h: 0rem; }  /* top strip hidden on phones */
}
@media (max-width: 48rem) {
  :root {
    --gutter: clamp(1.1rem, 4.8vw, 2rem);
    --section-space: clamp(2.7rem, 6vw, 3.6rem);
  }
}


/* 3. Language tokens ======================================================= */

/* Chinese: CJK serif stack, heavier weight, positive tracking, looser leading,
   smaller display sizes (CJK glyphs are visually larger). */
html:lang(zh-Hans) {
  --font-serif: "Songti SC", STSong, "Noto Serif CJK SC", "Noto Serif SC", SimSun, serif;
  --heading-weight: 550;
  --h1-size: clamp(2.2rem, 4vw, 3.6rem);     --h1-leading: 1.25;  --h1-tracking: .015em;
  --h2-size: clamp(1.8rem, 3vw, 2.7rem);     --h2-leading: 1.35;  --h2-tracking: .015em;
  --h3-size: clamp(1.3rem, 1.9vw, 1.65rem);  --h3-leading: 1.4;   --h3-tracking: .015em;
  --body-leading: 1.75;
  --hero-measure: 23em;
}


/* 4. Base ================================================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 1rem);  /* #anchors land below the sticky header */
  color: var(--color-text);
  background: var(--grain), var(--color-bg);
  font: 100%/1.6 var(--font-sans);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }  /* JS toggles `hidden`; must beat component display rules */

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: var(--heading-weight);
  text-wrap: balance;
}
h1 { margin: .5rem 0 1rem;   font-size: var(--h1-size); line-height: var(--h1-leading); letter-spacing: var(--h1-tracking); }
h2 { margin: 0 0 1.35rem;    font-size: var(--h2-size); line-height: var(--h2-leading); letter-spacing: var(--h2-tracking); }
h3 { margin: 0 0 .45rem;     font-size: var(--h3-size); line-height: var(--h3-leading); letter-spacing: var(--h3-tracking); }

p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  text-wrap: pretty;
}

/* Chinese typesetting: strict line breaking (no orphaned punctuation). */
html:lang(zh-Hans) :is(h1, h2, h3, p, li) { line-break: strict; }


/* 5. Layout ================================================================ */

/* Centered content column. .hero shares it because it is its own grid. */
.wrap, .hero {
  width: min(var(--container), calc(100% - var(--gutter) - var(--gutter)));
  margin-inline: auto;
}


/* 6. Components ============================================================ */

/* Inline SVG icons (functional only: call, language, menu, arrows).
   24×24 viewBox, stroke = currentColor. Size via width. */
.icon { width: 1.2rem; height: 1.2rem; flex-shrink: 0; }

/* Skip link: off-screen until focused. */
.skip { position: fixed; left: 1rem; top: -8rem; z-index: 10; padding: .75rem; background: var(--color-bg-raised); }
.skip:focus { top: 1rem; }

/* Button — solid navy with a small corner. Primary CTAs only (visit, call). */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  width: fit-content;
  min-height: 3rem;
  padding: .8rem 1.35rem;
  border-radius: var(--radius-control);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-on-brand);
  background: var(--color-brand);
  transition: background-color .2s var(--ease), transform .12s var(--ease);
}
.btn:hover { background: var(--color-brand-hover); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 1rem; }
@media (max-width: 35rem) {
  .btn { padding-inline: 1.1rem; }
}

/* Text link — underlined secondary action (.under, .maplink, .emaillink).
   The underline thickens on hover rather than changing colour. */
.under, .maplink, .emaillink {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--color-brand);
  font-weight: 550;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .26em;
  transition: text-decoration-thickness .15s var(--ease);
}
.under:hover, .maplink:hover, .emaillink:hover { text-decoration-thickness: 2px; }

/* Brand lockup — round logo (.mark) + "Wesley / HOME & CARE" wordmark.
   Used in header and footer. */
.brand { display: flex; align-items: center; gap: .55rem; width: fit-content; }
.brand .mark { width: 3rem; height: 3rem; border-radius: 50%; }
.brand span { font: 2.4rem/.92 var(--font-wordmark); letter-spacing: -.055em; color: var(--color-brand); }
.brand small { display: block; margin: .25rem 0 0 .14rem; font: 650 .57rem/1.3 var(--font-sans); letter-spacing: .25em; }
@media (max-width: 35rem) {
  .brand { gap: .36rem; }
  .brand span { font-size: 2rem; }
  .brand .mark { width: 2.4rem; height: 2.4rem; }
}


/* 7. Sections ============================================================== */

/* --- 7a. Top strip: address · reception hours · phone, like a letterhead -- */
.topline { font-size: .85rem; color: var(--color-on-brand-soft); background: var(--color-brand); }
.topline .wrap { display: flex; align-items: center; justify-content: flex-end; gap: 1.75rem; height: var(--topline-h); white-space: nowrap; }
.topline a { display: inline-flex; align-items: center; height: var(--topline-h); font-weight: 600; color: var(--color-accent); }
.topline a:hover { text-decoration: underline; text-underline-offset: .2em; }
.topline span:first-child { margin-right: auto; }
@media (max-width: 48rem) {
  .topline span:first-child { display: none; }
  .topline .wrap { justify-content: space-between; }
}
@media (max-width: 35rem) {
  .topline { display: none; }  /* phones get the call icon in the header instead */
}

/* --- 7b. Header: brand · desktop nav · tools (call, language, CTA, menu) -- */
/* Sticky. The negative top lets the .topline strip scroll out of view while
   the nav row stays pinned. site.js adds .is-stuck once the page has scrolled
   past the strip, which fades in a soft shadow to separate it from content. */
header {
  position: sticky;
  top: calc(-1 * var(--topline-h));
  z-index: 5;
  border-bottom: 1px solid var(--color-line);
  background: var(--grain), var(--color-bg);
  transition: box-shadow .2s var(--ease);
}
header.is-stuck { box-shadow: var(--shadow-dropdown); }
.head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--head-h); }
.desktop { display: flex; align-items: center; gap: clamp(1.1rem, 2.3vw, 2.4rem); }
.tools { display: flex; align-items: center; gap: 1.25rem; }
.desktop a, .tools a { font-size: 1rem; font-weight: 550; white-space: nowrap; }
.desktop a:hover, .lang:hover { text-decoration: underline; text-underline-offset: .25em; }
.lang { display: flex; align-items: center; gap: .4rem; min-height: var(--tap); }
.lang .icon { width: 1rem; }
.menubtn, .mobile-call { display: none; }  /* revealed by breakpoints below */

/* Mobile dropdown nav (#mobile) — toggled by site.js via [hidden]. */
#mobile { position: absolute; top: 100%; width: 100%; padding: .25rem var(--gutter) 1rem; background: var(--color-bg); box-shadow: var(--shadow-dropdown); }
#mobile a { display: block; padding: .85rem; border-top: 1px solid var(--color-line); }

@media (max-width: 70rem) {
  .desktop { display: none; }
  .menubtn { display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 1px solid var(--color-line-strong); border-radius: var(--radius-control); background: transparent; }
  .menubtn:hover { background: var(--color-bg-hover); }
}
@media (max-width: 35rem) {
  .head { gap: .25rem; }
  .tools { gap: .15rem; }
  .header-visit { display: none; }  /* CTA lives in the hero on phones */
  .mobile-call, .lang { justify-content: center; min-width: var(--tap); min-height: var(--tap); }
  .mobile-call { display: grid; place-items: center; color: var(--color-brand); }
}

/* --- 7c. Hero: plain statement + photo carousel -------------------------- */
/* The active photo stays in normal flow so its width and height resolve in WebKit. */
.hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.35rem;
  padding-block: 1rem 2.25rem;
}
.hero-inner { min-width: 0; }
.hero-inner p { max-width: var(--hero-measure); }
/* Location line above the h1: plain text, no icon, no rule. */
.place { font-size: .95rem; font-weight: 600; color: var(--color-brand); }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 1.25rem; margin-top: 1.4rem; }

/* Carousel: .scene images, one visible at a time (site.js flips [hidden]).
   Caption sits under the photo like a printed caption. */
.home-photo { width: 100%; min-width: 0; margin: 0; }
.pictures { width: 100%; overflow: hidden; border-radius: var(--radius-photo); background: var(--color-placeholder); }
.scene { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; }
.gallery { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 3.15rem; }
.caption { font: italic 1rem/1.35 var(--font-serif); color: var(--color-text-muted); }
/* Slider controls: compact borderless arrows + small counter. The visible
   button is 2rem, but ::before extends the tap area to 44px (--tap). */
.controls { display: flex; align-items: center; gap: .15rem; flex: none; color: var(--color-brand); }
.controls button { position: relative; display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: var(--radius-control); background: transparent; color: inherit; transition: background-color .2s var(--ease), transform .12s var(--ease); }
.controls button::before { content: ""; position: absolute; inset: calc((2rem - var(--tap)) / 2); }
.controls button:hover { background: var(--color-bg-hover); }
.controls button:active { transform: translateY(1px); }
.controls .icon { width: .9rem; height: .9rem; stroke-width: 2; }
.controls span { min-width: 3.4em; padding-inline: .2rem; text-align: center; font-size: .78rem; letter-spacing: .04em; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }

@media (min-width: 48.01rem) {
  .hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(2rem, 4.5vw, 5.5rem); padding-block: clamp(2.4rem, 4.1vw, 4.75rem); }
  .scene { aspect-ratio: 1.42; }
}
@media (max-width: 48rem) {
  /* Photo first, copy below. */
  .hero { display: grid; grid-template-columns: minmax(0, 1fr); }
  .home-photo { grid-row: 1; }
  .hero-inner { max-width: 35rem; }
  .hero h1 { text-wrap: wrap; }
}
@media (max-width: 35rem) {
  .hero-actions, .contact-actions { gap: .45rem .95rem; }
}
html:lang(zh-Hans) .caption { font-style: normal; }  /* no italics in CJK */

/* --- 7d. Facts: three plain statements between two rules ----------------- */
/* Deliberately not cards/icons: a ruled strap of text, widths set by content. */
.facts { border-block: 1px solid var(--color-line); }
.facts-list { display: grid; gap: .55rem; margin-block: 0; padding: 1.25rem 0; list-style: none; }
.facts-list li { font-size: 1rem; line-height: 1.55; color: var(--color-text-muted); }
.facts-list strong { font: var(--heading-weight) 1.12rem/1.3 var(--font-serif); color: var(--color-brand); }

@media (min-width: 62.01rem) {
  .facts-list { display: flex; gap: 0; padding-block: 1.4rem; }
  .facts-list li { flex: 1 1 auto; padding-inline: 1.75rem; }
  .facts-list li:first-child { padding-left: 0; }
  .facts-list li:last-child { padding-right: 0; }
  .facts-list li + li { border-left: 1px solid var(--color-line); }
}

/* Shared vertical rhythm for the content sections. */
.life, .activities-grid, .care-grid, .visit { padding-block: var(--section-space); }

/* --- 7e. A day at Wesley: one large story + two list rows ---------------- */
.cards { display: grid; gap: 1.35rem; }
.cards article { min-width: 0; }
.cards article img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-photo); }
/* First card = large lead story. */
.cards article:first-child img { aspect-ratio: 1.9; }
.cards article:first-child .story-copy { padding-top: 1rem; }
/* Other cards = thumbnail + text rows separated by hairlines;
   thumbnail and text are vertically centred on each other. */
.cards article:not(:first-child) {
  display: grid;
  grid-template-columns: minmax(0, .58fr) minmax(0, 1.42fr);
  align-items: center;
  gap: .9rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--color-line);
}
.cards article:not(:first-child) img { aspect-ratio: 1; }

@media (min-width: 48.01rem) {
  .cards { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.6rem clamp(2rem, 4vw, 4rem); }
  .cards article:first-child { grid-row: span 2; }
  .cards article:first-child img { aspect-ratio: 1.85; }
  .cards article:not(:first-child) { grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); gap: 1.1rem; }
  .cards article:nth-child(2) { border: 0; padding-top: 0; }
}
@media (max-width: 48rem) {
  .cards article:first-child { padding-bottom: .35rem; }
}
@media (max-width: 24rem) {
  /* Tiny screens: title beside thumbnail, paragraph full width below. */
  .cards article:not(:first-child) { grid-template-columns: 4.75rem minmax(0, 1fr); }
  .cards article:not(:first-child) .story-copy { display: contents; }
  .story-copy h3 { align-self: center; }
  .story-copy p { grid-column: 1 / -1; }
}

/* --- 7e2. Activities: real photo + ruled list of what residents join in -- */
/* Ruled off from "A day" above (same paper background), like a page break
   in a brochure. Only list activities the home actually offers.
   Owner's photos are always shown uncropped, at their natural ratio. */
.activities-grid { display: grid; gap: 1.5rem; border-top: 1px solid var(--color-line); }
.activities-photo { min-width: 0; margin: 0; }
/* Slideshow (site.js, figure[data-carousel]). Reuses .pictures/.gallery/.controls
   from the hero; slides share a 3:4 ratio and are shown uncropped. No caption,
   so the controls sit on the right. */
/* Fixed 3:4 frame so switching slides never changes the height. Portrait
   3:4 photos fill it exactly; any other ratio (e.g. the landscape cake) is
   fitted whole with `contain` — never cropped — on a band matching its backdrop. */
.activities-photo .pictures { aspect-ratio: 3 / 4; background: #e4e5e7; }  /* = the cake photo's grey backdrop, so the band reads as one surface */
.activities-photo img { width: 100%; height: 100%; object-fit: contain; }
.activities-photo .gallery { justify-content: flex-end; }
.activities-copy { min-width: 0; }
.activities-copy h2 { margin-bottom: .75rem; }
.activity-list { display: grid; margin: 1.5rem 0 1.25rem; padding: 0; list-style: none; border-bottom: 1px solid var(--color-line); }
.activity-list li { padding: .8rem 0; border-top: 1px solid var(--color-line); font: var(--heading-weight) 1.25rem/1.3 var(--font-serif); color: var(--color-text); }
.activities-note { font-size: 1rem; }
.activities-note .under { min-height: 0; }  /* inline in a sentence: keep line height normal */

@media (min-width: 35.01rem) {
  .activity-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.75rem; }
}
@media (min-width: 48.01rem) {
  .activities-grid { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); }
}

/* --- 7f. Questions families ask: intro + FAQ accordion (<details>) ------- */
.care { background: var(--grain), var(--color-bg-alt); }
.care-grid { display: grid; gap: 1.35rem; }
.care-grid h2 { margin-bottom: .75rem; }
.care-grid > div > p { max-width: 40ch; }
/* Small photo under the intro: fills the empty left column on desktop. */
/* Shown uncropped at its natural ratio (owner's request): no aspect-ratio/object-fit. */
.care-photo { max-width: 22rem; margin: 2rem 0 0; }
.care-photo img { width: 100%; height: auto; border-radius: var(--radius-photo); background: var(--color-placeholder); }
@media (max-width: 48rem) {
  .care-photo { margin-top: 1.5rem; }
}
.faqs { border-top: 1px solid var(--color-line-strong); }
.faqs details { border-bottom: 1px solid var(--color-line-strong); }
.faqs summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.6rem;
  padding: .95rem 0;
  list-style: none;
  cursor: pointer;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.45;
}
.faqs summary:hover { color: var(--color-brand); }
.faqs summary::-webkit-details-marker { display: none; }
/* <b> = plus/minus drawn with two pseudo-element bars (no circle). */
.faqs b { position: relative; flex: none; width: 1.25rem; height: 1.25rem; }
.faqs b::before, .faqs b::after { content: ""; position: absolute; top: calc(50% - 1px); left: calc(50% - .4rem); width: .8rem; height: 2px; background: var(--color-brand); transition: transform .2s var(--ease); }
.faqs b::after { transform: rotate(90deg); }
.faqs details[open] b::after { transform: rotate(0deg); }
.faqs p { max-width: 58ch; padding: 0 1.5rem 1.25rem 0; }

@media (min-width: 48.01rem) {
  .care-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 7vw, 7rem); }
}

/* --- 7g. Visit: contact CTAs + practical details under a photo ----------- */
.visit { display: grid; align-items: start; gap: 1.6rem; }
.visit-copy h2 { margin-bottom: .7rem; }
.visit-copy p { max-width: 39ch; }
.contact-actions .emaillink { overflow-wrap: anywhere; }
.visit-info { min-width: 0; }
.visit-info img { width: 100%; height: auto; aspect-ratio: 2.6; object-fit: cover; border-radius: var(--radius-photo); }
.practical { padding-top: 1.25rem; }
.practical dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem 1.5rem; margin: 0 0 1rem; padding: 0 0 1rem; border-bottom: 1px solid var(--color-line); }
.practical dt { font-weight: 600; }
.practical dd { margin: 0; font-variant-numeric: tabular-nums; }
.practical address { font-style: normal; }

@media (min-width: 48.01rem) {
  .visit { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: clamp(2rem, 7vw, 7rem); }
}
@media (max-width: 35rem) {
  /* Stack phone + email as full-width boxes. */
  .contact-actions a { justify-content: center; width: 100%; }
  .contact-actions .emaillink { min-height: 3rem; border: 1px solid var(--color-line-control); border-radius: var(--radius-control); text-decoration: none; }
}
@media (max-width: 24rem) {
  .practical dl { grid-template-columns: 1fr; gap: .12rem; }
  .practical dd + dt { margin-top: .4rem; }
}

/* --- 7h. Footer: brand · visit · contact · hours, then © + language ---- */
/* Repeats name/address/phone (consistent NAP helps local search) and gives
   phones a last chance to call. Gold is allowed here because it sits on navy. */
footer { color: var(--color-on-brand-soft); background: var(--color-brand); font-size: .95rem; }
.foot { display: grid; gap: 1.75rem; padding-block: clamp(2.5rem, 5vw, 3.75rem) 2rem; }
.foot p { color: inherit; font-size: inherit; }
.foot-brand p { max-width: 26ch; margin-top: .9rem; line-height: 1.55; }
.foot-title { margin-bottom: .45rem; font: italic 1.05rem/1.3 var(--font-serif); color: var(--color-accent); }
html:lang(zh-Hans) .foot-title { font-style: normal; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; }
.foot address { font-style: normal; line-height: 1.55; }
.foot-col a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--color-on-brand); text-decoration: underline; text-decoration-color: var(--color-on-brand-line); text-underline-offset: .25em; }
.foot-col a:hover { text-decoration-color: currentColor; }
.foot dl { display: grid; gap: .1rem; margin: 0; }
.foot dt { font-weight: 600; color: var(--color-on-brand); }
.foot dd { margin: 0 0 .5rem; font-variant-numeric: tabular-nums; }
.foot-base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1.5rem; padding-block: .5rem; border-top: 1px solid var(--color-on-brand-line); font-size: .85rem; color: var(--color-on-brand-muted); }
.foot-base a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; color: var(--color-on-brand); }
.foot-base a:hover { text-decoration: underline; text-underline-offset: .25em; }
footer .brand span { font-size: 2rem; color: var(--color-on-brand); }
footer .brand small { color: var(--color-accent); }
/* The navy badge vanishes on the navy footer: a gold ring restores its edge. */
footer .brand .mark { box-shadow: 0 0 0 1.5px var(--color-accent); }

@media (min-width: 40rem) {
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 62.01rem) {
  /* Uneven columns: brand widest, hours wider than contact. */
  .foot { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1.1fr); gap: 2.5rem; }
}


/* --- 7h2. About page (about.html, about-zh.html) ----------------------- */
/* Intro (h1 + lead beside an uncropped photo), then ruled rows: a side
   heading on the left, the copy on the right — like a brochure spread.
   Ends with a short visit CTA (#visit) reusing .contact-actions. */
.about-intro { display: grid; gap: 1.5rem; padding-block: clamp(2rem, 4vw, 4rem) var(--section-space); }
.about-intro p { max-width: 40ch; }
.about-photo { min-width: 0; margin: 0; }
.about-photo img { width: 100%; height: auto; border-radius: var(--radius-photo); background: var(--color-placeholder); }  /* natural ratio, never cropped */
.about-part { display: grid; gap: .6rem; padding-block: clamp(1.75rem, 3.5vw, 2.75rem); border-top: 1px solid var(--color-line); }
.about-part h2 { margin: 0; font-size: var(--h3-size); line-height: var(--h3-leading); letter-spacing: var(--h3-tracking); color: var(--color-brand); }
.about-part p { max-width: 60ch; }
.about-part p + p { margin-top: 1rem; }
.about-visit { padding-block: var(--section-space); border-top: 1px solid var(--color-line); }
.about-visit h2 { margin-bottom: .7rem; }
.about-visit p { max-width: 46ch; }

@media (min-width: 48.01rem) {
  .about-intro { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(2rem, 4.5vw, 5.5rem); }
  .about-part { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 7vw, 7rem); }
}
@media (max-width: 48rem) {
  .about-photo { grid-row: 1; }  /* photo first on phones, like the hero */
}

/* Current page in the nav (About): underlined like the hover state. */
.desktop a[aria-current="page"] { text-decoration: underline; text-underline-offset: .25em; }
#mobile a[aria-current="page"] { color: var(--color-brand); font-weight: 600; }

/* --- 7i. Not-found page (404.html) --------------------------------------- */
.notfound { padding-block: var(--section-space); }
.notfound p { max-width: 46ch; margin-top: .75rem; }
.notfound .under { min-height: 0; }  /* inline in a sentence */


/* 8. Preferences =========================================================== */

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