/* ============================================================
   Sally Mao — RE/MAX · Design System
   Editorial · premium · mobile-first · WCAG-aware
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #F7F4EE;
  --surface: #FFFFFF;
  --ink: #1B1917;
  /* PHASE B ITEM 2 — warm charcoal/taupe dark surfaces (hero/footer/cta unified).
     Not pure black, not blue/cold; verified contrast vs #F6F2E9 ≈ 9.7:1 and
     vs #C9C2B4 ≈ 6.2:1 (WCAG AA/AAA pass). --ink stays for text/icons. */
  --dark: #3B352E;
  --dark-deep: #322D27;
  --ink-soft: #2E2A25;
  --muted: #6E665C;
  --line: #E4DCCD;
  --line-strong: #D4C9B4;
  --red: #D71920;
  --red-dark: #A81218;
  --bronze: #7A5F31;
  --cream: #F1EBDF;
  --shadow: 0 1px 2px rgba(27, 25, 23, .05), 0 8px 28px rgba(27, 25, 23, .07);
  --radius: 4px;
  --maxw: 1200px;
  --header-h: 76px;
  --font-serif: "Fraunces", "Noto Serif SC", Georgia, "Songti SC", serif;
  --font-sans: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 2px;
}
::selection { background: rgba(215, 25, 32, .14); }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 560; line-height: 1.14; color: var(--ink); margin: 0 0 .45em; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 5.4vw, 3.9rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.55rem); letter-spacing: -.01em; }
h3 { font-size: 1.28rem; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.2em; }
li { margin-bottom: .35em; }
small { font-size: .86em; }

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Footer social icons (PHASE B ITEM 3) ---------- */
.social-icons { display: flex; gap: .6rem; margin-top: 1.1rem; flex-wrap: wrap; }
.social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(201,194,180,.35); color: #E7E0D2;
  background: rgba(255,255,255,.04);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
}
.social-icon:hover, .social-icon:focus-visible {
  background: rgba(255,255,255,.12); border-color: rgba(230,219,199,.6);
  color: #fff; transform: translateY(-1px); outline: none;
}
.social-icon:focus-visible { box-shadow: 0 0 0 3px rgba(217,185,138,.55); }
.social-icon svg { display: block; }
.social-icon-fallback {
  font-family: var(--font-serif); font-size: 1.05rem; font-weight: 650;
  line-height: 1; color: #E7E0D2;
}


.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); }
.section { padding: clamp(3.2rem, 7.5vw, 6.2rem) 0; }
.section--tight { padding: clamp(2.2rem, 5vw, 3.6rem) 0; }
.section--cream { background: var(--cream); }
.section--ink { background: var(--dark); color: #EDE7DC; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #F6F2E9; }
.section--ink .muted, .section--ink figcaption { color: rgba(237, 231, 220, .78); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .78rem; font-weight: 650; letter-spacing: .16em; text-transform: uppercase;
  color: var(--bronze); margin: 0 0 1.1em;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--bronze); opacity: .7; }
.eyebrow--center { justify-content: center; }
.eyebrow--light { color: #C9A87C; }
.eyebrow--light::before { background: #C9A87C; }
.section-head { max-width: 720px; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-head p { color: var(--muted); font-size: 1.04rem; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.12rem; color: var(--muted); }
.red { color: var(--red); }
.hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--font-sans); font-size: .95rem; font-weight: 620; letter-spacing: .01em;
  padding: .82em 1.5em; border-radius: var(--radius); border: 1.5px solid transparent;
  cursor: pointer; transition: transform .18s var(--ease), background .18s, border-color .18s, color .18s, box-shadow .18s;
  text-align: center; line-height: 1.3; white-space: normal;
}
.btn:active { transform: translateY(1px); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); box-shadow: 0 6px 18px rgba(215, 25, 32, .28); }
.btn--ink { background: var(--dark); color: #F6F2E9; }
.btn--ink:hover { background: var(--dark-deep); }
.btn--ink:hover { background: #000; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--outline:hover { border-color: var(--ink); background: var(--surface); }
.btn--outline-light { background: transparent; color: #EDE7DC; border-color: rgba(237, 231, 220, .45); }
.btn--outline-light:hover { border-color: #EDE7DC; color: #fff; }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: var(--cream); }
.btn--sm { padding: .55em 1.05em; font-size: .88rem; }
.btn--block { width: 100%; }
.btn svg { flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(247, 244, 238, .92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: .9rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .65rem; margin-right: auto; min-width: 0; }
.brand-avatar,
.brand-avatar img {
  width: 42px !important; height: 42px !important;
  min-width: 42px !important; max-width: 42px !important;
  min-height: 42px !important; max-height: 42px !important;
}
.brand-avatar {
  flex: 0 0 42px; flex-shrink: 0; display: block; line-height: 0;
  border-radius: 50%; overflow: hidden;
}
.brand-avatar img {
  object-fit: cover; object-position: center; border-radius: 50%; display: block;
  /* PHASE B ITEM 4 — enlarge the photo inside the unchanged 42px circle:
     scale 1.28 (≈54px effective) so the face reads bigger and clearer;
     transform-origin centers on the upper-middle (faces sit slightly above
     center in this headshot). Aspect ratio preserved; no stretching. */
  transform: scale(1.28); transform-origin: 50% 38%;
}
.brand-text { line-height: 1.12; min-width: 0; }
.brand-name { font-family: var(--font-serif); font-size: 1.13rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.brand-sub { font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: clamp(.2rem, .55vw, .65rem); }
.main-nav a.nav-link {
  font-size: .9rem; font-weight: 560; color: var(--ink-soft);
  padding: .42em .22em; border-bottom: 2px solid transparent; position: relative;
  white-space: nowrap; flex-shrink: 0; letter-spacing: 0;
}
.main-nav a.nav-link:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.main-nav a.nav-link[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; white-space: nowrap; flex-wrap: nowrap; flex-shrink: 0; min-width: 96px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: .8rem; font-weight: 650; line-height: 1;
}
.lang-switch a, .lang-switch .lang-sep { white-space: nowrap; display: inline-block; flex-shrink: 0; }
.lang-switch a { padding: .38em .8em; color: var(--muted); }
.lang-switch .lang-sep { color: var(--line-strong); font-size: .9em; }
.lang-switch a[aria-current="true"] { background: var(--dark); color: var(--cream); border-radius: 999px; }
.header-cta { flex: 0 0 auto; white-space: nowrap; padding: .55em .9em; }
.header-actions { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 10px; flex: none; color: var(--ink);
}
.nav-toggle span { display: block; height: 2px; background: currentColor; margin: 5px 0; border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav panel */
.mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 55;
  background: var(--bg); padding: calc(var(--header-h) + 1rem) 1.4rem 2rem;
  overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav nav { display: grid; gap: .2rem; }
.mobile-nav a.mnav-link {
  font-family: var(--font-serif); font-size: 1.65rem; font-weight: 520;
  padding: .5rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline;
}
.mobile-nav a.mnav-link[aria-current="page"] { color: var(--red); }
.mnav-actions { display: grid; gap: .8rem; margin-top: 1.6rem; }
.mnav-contact { margin-top: 1.4rem; font-size: .95rem; color: var(--muted); display: grid; gap: .3rem; }
.mnav-contact a { color: var(--ink); font-weight: 600; }
.mnav-lang { display: flex; gap: .6rem; align-items: center; margin-top: 1.2rem; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--dark);
  color: #F6F2E9;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(59,53,46,.80) 0%, rgba(59,53,46,.46) 46%, rgba(59,53,46,.20) 100%); }
.hero-inner { position: relative; padding: clamp(4.5rem, 11vw, 8.5rem) 0 clamp(4rem, 9vw, 7rem); max-width: 880px; }
.hero h1 { color: #FBF8F1; margin-bottom: .45em; }
.hero h1 .serif-accent { color: #E8C891; font-style: italic; }
.hero-sub { font-size: clamp(1.02rem, 2vw, 1.22rem); color: rgba(246, 242, 233, .88); max-width: 640px; margin-bottom: 1.9rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2rem; }


.hero-kicker {
  display: inline-flex; align-items: center; gap: .7em;
  font-size: .76rem; font-weight: 650; letter-spacing: .18em; text-transform: uppercase; color: #D9B98A;
  margin-bottom: 1.4rem;
}
.hero-kicker::before { content: ""; width: 30px; height: 1px; background: #D9B98A; }

/* ---------- Page hero (interior) ---------- */
.page-hero { background: var(--dark); color: #F6F2E9; position: relative; overflow: hidden; }
.page-hero.has-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.page-hero.has-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(59,53,46,.84), rgba(59,53,46,.42)); }
.page-hero-inner { position: relative; padding: clamp(3.2rem, 7vw, 5.4rem) 0; max-width: 780px; }
.page-hero h1 { color: #FBF8F1; }
.page-hero .lead { color: rgba(246, 242, 233, .85); }
.page-hero .eyebrow { color: #D9B98A; }
.page-hero .eyebrow::before { background: #D9B98A; }

/* ---------- Credibility strip ---------- */
.cred-strip { border-bottom: 1px solid var(--line); background: var(--surface); }
.cred-strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2.4rem; padding: 1.05rem 0; }
.cred-item { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: var(--ink-soft); font-weight: 560; }
.cred-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex: none; }
.cred-item small { color: var(--muted); font-weight: 400; }

/* ---------- Pathway cards ---------- */
.path-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.1rem; }
.path-card {
  grid-column: span 2;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.6rem 1.5rem; display: flex; flex-direction: column; gap: .55rem;
  transition: transform .22s var(--ease), box-shadow .22s, border-color .22s;
  position: relative;
}
.path-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.path-num { font-family: var(--font-serif); font-style: italic; color: var(--bronze); font-size: .95rem; }
.path-card h3 { font-size: 1.28rem; margin-bottom: 0; }
.path-card p { color: var(--muted); font-size: .95rem; margin-bottom: 0; flex: 1; }
.path-card .btn { align-self: flex-start; }
.path-card--red { border-color: rgba(215, 25, 32, .35); background: #FDF9F5; }

/* ---------- Pillars (why Sally) ---------- */
.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.pillar {
  border-top: 2px solid var(--ink); padding-top: 1.1rem;
}
.pillar .p-idx { font-family: var(--font-serif); font-style: italic; color: var(--red-dark); font-size: 1rem; display: block; margin-bottom: .5rem; }
.pillar h3 { font-size: 1.18rem; }
.pillar p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }

/* ---------- Story cards ---------- */
.story-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.story-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s;
}
.story-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.story-media { aspect-ratio: 16/9; overflow: hidden; position: relative; }
.story-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.story-card:hover .story-media img { transform: scale(1.035); }
.story-tag {
  position: absolute; top: 1rem; left: 1rem;
  background: rgba(27, 25, 23, .82); color: #F6F2E9;
  font-size: .72rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  padding: .4em .8em; border-radius: 999px;
}
.story-body { padding: 1.35rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.story-address { font-family: var(--font-serif); font-size: 1.22rem; line-height: 1.25; }
.story-meta { color: var(--muted); font-size: .9rem; }
.story-theme { font-size: .82rem; color: var(--bronze); letter-spacing: .04em; }
.story-link { margin-top: auto; padding-top: .7rem; font-weight: 650; font-size: .93rem; display: inline-flex; align-items: center; gap: .4em; }
.story-link .arr { transition: transform .2s var(--ease); }
.story-card:hover .story-link .arr { transform: translateX(4px); }
.story-card--wide { grid-column: span 2; }

/* ---------- New homes ---------- */
.filters {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; margin-bottom: 2rem;
}
.filters-form { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; align-items: end; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .76rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field select, .field input, .field textarea {
  font-family: var(--font-sans); font-size: .95rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: .6em .75em; width: 100%;
}
.field select:focus, .field input:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(27,25,23,.08); }
.filters-reset { font-size: .84rem; color: var(--muted); text-decoration: underline; background: none; border: 0; cursor: pointer; padding: .4em 0; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.project-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.project-media { aspect-ratio: 4/3; overflow: hidden; position: relative; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.project-card:hover .project-media img { transform: scale(1.04); }
.project-status {
  position: absolute; top: .9rem; right: .9rem;
  background: rgba(215, 25, 32, .92); color: #fff;
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .38em .75em; border-radius: 999px;
}
.project-body { padding: 1.25rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.project-name { font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.2; }
.project-city { color: var(--muted); font-size: .9rem; }
.project-price { font-weight: 650; color: var(--ink); font-size: 1.02rem; }
.project-specs { color: var(--muted); font-size: .88rem; }
.project-actions { margin-top: auto; padding-top: .8rem; display: flex; gap: .6rem; flex-wrap: wrap; }

/* Project detail */
.project-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.2rem; align-items: start; }
/* PHASE B ITEM 10 — enlarged floorplan-friendly gallery:
   bigger main (4/3), object-fit: contain (never crops plans), full-res
   lightbox, thumbs retained. Fixed aspect-ratio box => zero layout shift. */
.project-gallery { display: grid; gap: .8rem; }
.project-gallery .g-main { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); background: var(--cream); }
.project-gallery .g-main-open {
  display: block; width: 100%; height: 100%; padding: 0; border: 0;
  background: none; cursor: zoom-in; position: relative;
}
/* PHASE B2 ITEM 4 — unified ratio system: one fixed 4:3 visual frame for every
   image (no height jumps / no layout shift); photos (exterior/interior) cover
   the frame cleanly; floorplan-kind images always contain (never cropped),
   with a soft paper tone behind the plan. Nothing is ever stretched. */
.project-gallery .g-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-gallery .g-main img[data-kind="floorplan"] { object-fit: contain; background: var(--cream); }
.g-zoom-hint {
  position: absolute; right: .7rem; bottom: .7rem; display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(32,28,24,.78); color: #F6F2E9; border-radius: 999px;
  padding: .3rem .7rem; font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  backdrop-filter: blur(4px); pointer-events: none;
}
.g-zoom-label { line-height: 1; }
.project-gallery .g-main-open:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--bronze); }
.project-gallery .g-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
.project-gallery .g-thumbs button {
  aspect-ratio: 4/3; border: 2px solid transparent; border-radius: var(--radius);
  padding: 0; cursor: pointer; overflow: hidden; background: var(--cream);
}
.project-gallery .g-thumbs button[aria-current="true"] { border-color: var(--red); }
.project-gallery .g-thumbs button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bronze); }
.project-gallery .g-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-gallery .g-thumbs img[data-kind="floorplan"] { object-fit: contain; background: var(--cream); }

/* PHASE B2 — graceful placeholders for communities without shipped media
   (e.g. new Airtable record whose attachments are not yet in staging assets) */
.project-media-placeholder, .gallery-empty {
  aspect-ratio: 4/3; border-radius: var(--radius); background: var(--cream);
  border: 1px dashed rgba(122, 95, 49, .35); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; letter-spacing: .02em; text-align: center; padding: 1rem;
}

/* Lightbox */
.g-lightbox {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  background: rgba(28,24,21,.92); padding: 1rem;
}
.g-lightbox[hidden] { display: none; }
.g-lb-figure { margin: 0; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.g-lb-figure img { max-width: 94vw; max-height: 82vh; width: auto; height: auto; object-fit: contain; border-radius: var(--radius); background: #0000; }
.g-lb-caption { color: #E7E0D2; font-size: .9rem; margin-top: .7rem; }
.g-lb-close {
  position: absolute; top: .9rem; right: 1.1rem; width: 44px; height: 44px; font-size: 1.6rem; line-height: 1;
  border-radius: 50%; border: 1px solid rgba(230,219,199,.4); background: rgba(255,255,255,.06);
  color: #F6F2E9; cursor: pointer;
}
.g-lb-prev, .g-lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; font-size: 1.9rem; line-height: 1;
  border-radius: 50%; border: 1px solid rgba(230,219,199,.4); background: rgba(255,255,255,.06);
  color: #F6F2E9; cursor: pointer;
}
.g-lb-prev { left: 1rem; } .g-lb-next { right: 1rem; }
.g-lb-close:hover, .g-lb-prev:hover, .g-lb-next:hover { background: rgba(255,255,255,.16); }
.g-lb-close:focus-visible, .g-lb-prev:focus-visible, .g-lb-next:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(217,185,138,.6); }
@media (max-width: 720px) {
  .g-lb-prev { left: .4rem; } .g-lb-next { right: .4rem; }
  .g-lb-figure img { max-height: 76vh; }
}
.spec-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec-table th, .spec-table td { text-align: left; padding: .62em .2em; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { font-weight: 650; color: var(--muted); width: 46%; font-size: .88rem; }
.spec-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.spec-list li { padding-left: 1.35em; position: relative; color: var(--ink-soft); }
.spec-list li::before { content: ""; position: absolute; left: .15em; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--red); opacity: .75; }
.side-card {
  position: sticky; top: calc(var(--header-h) + 1.2rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
  display: grid; gap: .8rem;
}
.side-card .price-big { font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.2; }
.fact-chip { font-size: .85rem; color: var(--muted); border-top: 1px dashed var(--line-strong); padding-top: .8rem; }
.verify-note {
  background: #FDF6E9; border: 1px solid #E8D5A8; border-radius: var(--radius);
  padding: .9rem 1rem; font-size: .85rem; color: #6B5420;
}

/* ---------- Step lists (buy/sell) ---------- */
.steps { display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: 64px 1fr; gap: 1.1rem;
  padding: 1.15rem 0; border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-idx { font-family: var(--font-serif); font-style: italic; font-size: 1.5rem; color: var(--red); }
.step h3 { margin-bottom: .25em; font-size: 1.14rem; }
.step p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }

/* ---------- Two-col content ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: start; }
.split--wide { grid-template-columns: 1.2fr 1fr; }
.tick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.tick-list li { padding-left: 1.6em; position: relative; }
.tick-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--red); font-weight: 700; }

/* ---------- Quote ---------- */
.quote { border-left: 3px solid var(--red); padding: .4rem 0 .4rem 1.4rem; margin: 1.6rem 0; }
.quote p { font-family: var(--font-serif); font-style: italic; font-size: 1.18rem; line-height: 1.5; margin-bottom: .35rem; }
.quote cite { font-style: normal; font-size: .88rem; color: var(--muted); }

/* ---------- Forms ---------- */
.lead-form { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .9rem; }
.check-item { display: flex; align-items: flex-start; gap: .55em; font-size: .95rem; cursor: pointer; }
.check-item input { width: 18px; height: 18px; accent-color: var(--red); margin-top: .2em; flex: none; }
.check-item:hover { color: var(--ink); }
/* PHASE B ITEM 9 — Preferred Language: one compact single row.
   English + 中文 always share a line (nowrap), height noticeably reduced,
   lighter weight, optional state stays clear, tap targets >= 40px,
   keyboard/focus intact. Submit logic untouched (same radio names). */
.radio-row { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: nowrap; min-height: 40px; }
.radio-chip {
  display: inline-flex; align-items: center; gap: .4em;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: .28em .95em; min-height: 40px; box-sizing: border-box;
  font-size: .88rem; line-height: 1; white-space: nowrap; cursor: pointer;
  background: var(--bg); transition: border-color .15s, background .15s;
}
.radio-chip:hover { border-color: var(--ink); }
.radio-chip:focus-within { outline: none; box-shadow: 0 0 0 3px rgba(217,185,138,.5); }
.radio-chip input { accent-color: var(--red); margin: 0; width: 15px; height: 15px; flex: none; }
.radio-chip:has(input:checked) { background: var(--dark); color: var(--cream); border-color: var(--dark); }
.form-error-msg { color: var(--red); font-size: .88rem; font-weight: 600; display: none; }
.form-error-msg.visible { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.form-success {
  display: none; background: #F2F7F1; border: 1px solid #C9DFC5; border-radius: var(--radius);
  padding: 1.6rem; text-align: center;
}
.form-success.visible { display: block; }
.form-success h3 { color: #2E5E2A; margin-bottom: .4rem; }
.form-success p { color: #4A5A48; margin-bottom: .4rem; }
.form-note { font-size: .82rem; color: var(--muted); }
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--dark); color: #F6F2E9; text-align: center;
  padding: clamp(2.4rem, 5.4vw, 3.9rem) 0;
}
.cta-band .container { display: flex; flex-direction: column; align-items: center; }
.cta-band h2 { color: #FBF8F1; }
.cta-band p { color: rgba(246, 242, 233, .82); max-width: 560px; margin: 0 auto 1.5rem; }
.cta-band .btn--red { background: var(--red); }
.cta-actions {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: .8rem;
}
.cta-sub { font-size: .86rem; color: rgba(246, 242, 233, .65); }
.cta-sub a { color: #E8C891; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Areas ---------- */
.area-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.area-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.area-card h3 { font-size: 1.1rem; margin-bottom: .15rem; }
.area-card p { color: var(--muted); font-size: .85rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #C9C2B4; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.4rem; padding: clamp(2rem, 4.6vw, 3.1rem) 0 1.9rem; }
.footer-brand .brand-name { color: #F6F2E9; font-size: 1.3rem; }
.footer-brand p { margin-top: .8rem; color: #A89F8F; max-width: 300px; }
.site-footer h3.footer-h { color: #EDE7DC; font-family: var(--font-sans); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.site-footer a { color: #C9C2B4; }
.site-footer a:hover { color: #fff; }
.footer-contact { display: grid; gap: .55rem; }
.footer-contact a { font-weight: 560; color: #E8E1D3; }
.footer-compliance {
  border-top: 1px solid rgba(237, 231, 220, .16);
  padding: 1.5rem 0 1.8rem; font-size: .8rem; color: #AFA697; /* ITEM2: 5.03:1 on --dark */
  display: grid; gap: .8rem;
}
.footer-compliance .eho { display: flex; align-items: center; gap: .7rem; }
.eho-icon { width: 34px; height: 34px; border: 1.5px solid #C9C2B4; border-radius: 50%; display: grid; place-items: center; font-size: .6rem; line-height: 1.05; text-align: center; letter-spacing: .05em; color: #C9C2B4; flex: none; }
.footer-bottom { border-top: 1px solid rgba(237, 231, 220, .16); padding: 1.1rem 0; display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; justify-content: space-between; font-size: .82rem; color: #B7AFA3; /* ITEM2: 5.58:1 on --dark */ }

/* ---------- Mobile sticky bar ---------- */
.mobile-bar { display: none; }
@media (max-width: 767px) {
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr 1.4fr;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
    background: var(--ink); border-top: 1px solid rgba(237,231,220,.2);
  }
  .mobile-bar a {
    color: #F6F2E9; font-size: .88rem; font-weight: 650;
    padding: .85rem .4rem; text-align: center; display: flex; align-items: center; justify-content: center; gap: .45em;
  }
  .mobile-bar a + a { border-left: 1px solid rgba(237, 231, 220, .18); }
  .mobile-bar a.mbar-primary { background: var(--red); color: #fff; }
  body { padding-bottom: 0; }
  body.has-mbar { padding-bottom: 46px; }
}

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .84rem; color: var(--muted); margin-bottom: 1.6rem; display: flex; flex-wrap: wrap; gap: .45em; }
.crumbs a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: clamp(4rem, 12vw, 8rem) 0; }
.notfound .big { font-family: var(--font-serif); font-size: clamp(5rem, 16vw, 9rem); line-height: 1; color: var(--line-strong); }
.notfound h1 { margin-top: -.2em; }

/* ---------- Misc ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .8em 1.4em; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.stat { text-align: center; padding: 1.2rem .6rem; }
.stat .n { font-family: var(--font-serif); font-size: 2.1rem; color: var(--ink); display: block; }
.stat .l { font-size: .86rem; color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.section-subhead { font-size: 1.35rem; margin: 0 0 1.1rem; }
.tag { background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: .35em .95em; font-size: .83rem; color: var(--ink-soft); }

/* ---------- Hero (home) editorial ---------- */
.hero-editorial { background: var(--cream); border-bottom: 1px solid var(--line); }
.hero-split {
  display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center; padding: clamp(3rem, 7vw, 5.6rem) 0;
}
.hero-editorial h1 { color: var(--ink); margin-bottom: .5em; }
.hero-editorial h1 .serif-accent { color: var(--bronze); font-style: italic; }
.hero-editorial .hero-kicker { color: var(--bronze); }
.hero-editorial .hero-kicker::before { background: var(--bronze); }
.hero-editorial .hero-sub { color: var(--muted); font-size: clamp(1.02rem, 1.8vw, 1.16rem); max-width: 620px; margin-bottom: 1.8rem; }
.hero-editorial 
.hero-editorial 

.hero-figure { position: relative; }
.hero-figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: center; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-figure::after {
  content: ""; position: absolute; inset: auto -14px -14px auto; width: 55%; height: 42%;
  border: 1.5px solid var(--bronze); border-radius: var(--radius); z-index: 0; pointer-events: none;
}
.hero-figure img { position: relative; z-index: 1; }

/* ---------- Pathway list (home, editorial) ---------- */
.path-list { display: grid; }
.path-row {
  display: grid; grid-template-columns: 1fr auto; gap: 1.6rem; align-items: center;
  padding: 1.55rem 0; border-top: 1px solid var(--line);
}
.path-row:last-child { border-bottom: 1px solid var(--line); }
.path-row h3 { font-size: clamp(1.35rem, 2.6vw, 1.6rem); margin-bottom: .35rem; }
.path-row p { color: var(--muted); margin: 0; max-width: 660px; }
.secondary-cap { margin-top: 1.6rem; color: var(--muted); font-size: .97rem; }
.secondary-cap a { font-weight: 620; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Why Sally editorial ---------- */
.why-col { display: grid; gap: 1.4rem; align-content: start; }
.why-col p { margin: 0; color: var(--muted); }
.why-col strong { color: var(--ink); font-family: var(--font-serif); font-size: 1.14rem; font-weight: 600; }
.why-col--2col { grid-template-columns: 1fr 1fr; gap: 1.9rem 2.6rem; }

/* ---------- New Homes signature feature ---------- */
.nh-feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.4rem; align-items: stretch; }
.nh-feature-main, .nh-feature-row {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .22s var(--ease), box-shadow .22s, border-color .22s;
  display: block;
}
.nh-feature-main:hover, .nh-feature-row:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.nh-media { aspect-ratio: 4/3; overflow: hidden; }
.nh-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.nh-feature-main:hover .nh-media img, .nh-feature-row:hover .nh-media img { transform: scale(1.03); }
.nh-feature-main { display: grid; grid-template-rows: auto 1fr; }
.nh-feature-main .nh-media { aspect-ratio: 16/10; }
.nh-body { padding: 1.3rem 1.4rem 1.45rem; }
.nh-feature-main .nh-body { display: flex; flex-direction: column; }
.nh-feature-main h3 { font-size: 1.4rem; margin-bottom: .25rem; }
.nh-feature-main .muted { margin-bottom: .6rem; }
.nh-feature-main .price-big { font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.25; margin-bottom: .5rem; }
.nh-link { font-weight: 650; color: var(--red-dark); margin: .3rem 0 0; display: inline-flex; align-items: center; gap: .4em; }
.nh-feature-side { display: grid; gap: 1.4rem; align-content: stretch; }
.nh-feature-row { display: grid; grid-template-columns: 1.15fr 1fr; }
.nh-feature-row .nh-media { aspect-ratio: 4/3; }
.nh-feature-row .nh-body { padding: 1.05rem 1.15rem; display: flex; flex-direction: column; justify-content: center; gap: .2rem; }
.nh-feature-row h3 { font-size: 1.1rem; margin-bottom: 0; }
.nh-feature-row .muted { font-size: .83rem; margin-bottom: 0; }
.nh-feature-row .price-big { font-family: var(--font-serif); font-size: 1.12rem; line-height: 1.3; margin: .15rem 0 0; }

/* ---------- Editorial stories ---------- */
.editorial-stories { display: grid; gap: 2.4rem; }
.editorial-story { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.4rem, 3.5vw, 2.8rem); align-items: center; }
.editorial-story--flip { grid-template-columns: 1fr 1.15fr; }
.editorial-story--flip .es-media { order: 2; }
.es-media { overflow: hidden; border-radius: var(--radius); }
.es-media img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.es-body { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.es-body .story-tag { position: static; display: inline-block; background: var(--ink); margin-bottom: .55rem; }
.es-body h3 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); line-height: 1.25; }
.es-body .story-theme { font-size: .95rem; color: var(--bronze); margin-bottom: .5rem; }
.es-body .story-link { margin-top: .6rem; padding-top: 0; }

/* ---------- Areas band ---------- */
.areas-band { display: grid; grid-template-columns: 1fr 1.25fr; gap: 2rem 3rem; align-items: center; }

/* ---------- Stage lists (buy/sell overview) ---------- */
.stage-list { display: grid; margin-top: .6rem; }
.stage-row { padding: 1.2rem 0; border-top: 1px solid var(--line); }
.stage-row:last-child { border-bottom: 1px solid var(--line); }
.stage-row h3 { font-family: var(--font-serif); font-size: 1.28rem; margin-bottom: .3rem; }
.stage-row p { color: var(--muted); margin: 0; font-size: .97rem; }

/* ---------- Process accordion ---------- */
.proc-accordion { margin-top: 1.7rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.proc-accordion summary {
  cursor: pointer; padding: 1.1rem 1.3rem; font-weight: 650; font-size: .98rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.proc-accordion summary::-webkit-details-marker { display: none; }
.proc-accordion summary::after { content: "+"; font-family: var(--font-serif); font-size: 1.35rem; color: var(--red-dark); line-height: 1; }
.proc-accordion[open] summary::after { content: "–"; }
.proc-detail { padding: 0 1.3rem 1.3rem; }
.proc-group { padding: 1.05rem 0 .3rem; border-top: 1px solid var(--line); }
.proc-group:first-child { border-top: 0; padding-top: .4rem; }
.proc-group h3 { font-family: var(--font-serif); font-size: 1.08rem; margin-bottom: .5rem; }
.proc-group ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.proc-group li { color: var(--muted); font-size: .93rem; padding-left: 1.15em; position: relative; margin: 0; }
.proc-group li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--bronze); opacity: .85; }
.proc-group li strong { color: var(--ink-soft); font-weight: 650; }

/* ---------- Footer additions ---------- */
.footer-role { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #A89F8F !important; margin: .4rem 0 0 !important; }
.footer-dre { font-size: .88rem; margin-top: .9rem !important; }
.footer-nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1.4rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .main-nav, .header-actions .header-cta { display: none; }
  .nav-toggle { display: block; }
  .header-inner { gap: .8rem; }
}
@media (max-width: 1080px) {
  .path-grid { grid-template-columns: repeat(2, 1fr); }
  .path-card { grid-column: span 1; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .split--wide { grid-template-columns: 1fr; }
  .project-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .form-row, .form-row--3 { grid-template-columns: 1fr; }
  .hero-split { grid-template-columns: 1fr; gap: 2.2rem; }
  .hero-figure { max-width: 640px; }
  .nh-feature { grid-template-columns: 1fr; }
  .nh-feature-side { grid-template-columns: 1fr 1fr; }
  .editorial-story, .editorial-story--flip { grid-template-columns: 1fr; }
  .editorial-story--flip .es-media { order: 0; }
  .areas-band { grid-template-columns: 1fr; }
  .why-col--2col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .story-grid { grid-template-columns: 1fr; }
  .story-card--wide { grid-column: span 1; }
  .project-grid { grid-template-columns: 1fr; }
  .path-grid { grid-template-columns: 1fr; }
  .area-grid { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: 1fr; gap: .4rem; }
  .filters-form { grid-template-columns: 1fr 1fr; }
  .hero-ctas .btn { width: 100%; }
  .check-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .path-row { grid-template-columns: 1fr; gap: .9rem; }
  .path-row .btn { align-self: flex-start; }
  .nh-feature-side { grid-template-columns: 1fr; }
  .nh-feature-row { grid-template-columns: 1fr; }
  .nh-feature-row .nh-media { aspect-ratio: 16/10; }
  .es-media img { aspect-ratio: 16/9; }
  .stage-row h3 { font-size: 1.18rem; }
}

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