/* peggydavies.com — homepage rebuild
   Fonts: Montserrat (UI/body), Cormorant Garamond (hero tagline), Parisienne (script accent —
   stand-in for the live site's licensed "AmalfiCoast" font, which cannot be redistributed here).
   Parisienne is the closest free match in character: monoline, casual, lightly slanted. It still
   draws far narrower than AmalfiCoast per em, which is why .hero-name is sized as a logotype. */

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Cormorant+Garamond:wght@300;400;500&family=Parisienne&display=swap");

:root {
  /* TEXT COLOURS — exactly three on light backgrounds. Do not add a fourth.
       --ink    headings, nav, links, button labels
       --muted  body copy and secondary/meta text
       --rose   every script/display accent (hero name, script headings, eyebrows)
     --white is the inverse only: text sitting on a dark surface. */
  --ink: #2d2d2d;
  --muted: #6b5c58;       /* AA-safe taupe for body copy on light backgrounds */
  --rose: #8a6a5c;        /* the single accent — always the script face */
  --white: #ffffff;

  /* Surfaces and borders — never used as a text colour. */
  --line: #e5dcd8;
  --blush: #f3e7e2;
  --testimonial-bg: #e5d2ca;

  /* Montserrat, Cormorant and Parisienne carry no CJK glyphs. Appending a system CJK
     stack lets the browser fall back per glyph, so on zh/ pages the Latin "Peggy Davies"
     still renders in Parisienne while 戴碧芝 comes from the CJK face. No extra download. */
  --font-cjk: "PingFang TC", "Hiragino Sans CNS", "Microsoft JhengHei", "Noto Sans TC";
  --font-cjk-serif: "Songti TC", "Noto Serif TC", "PingFang TC", "Microsoft JhengHei";

  --font-ui: "Montserrat", var(--font-cjk), -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-tagline: "Cormorant Garamond", var(--font-cjk-serif), Georgia, "Times New Roman", serif;
  --font-script: "Parisienne", var(--font-cjk-serif), cursive;

  --h1: 3.5rem;
  --h2: 2.25rem;
  --h3: 1.5rem;
  --h4: 1.125rem;
  --h5: 1rem;

  /* Logotype size — deliberately OUTSIDE the type scale.
     The hero name is a brand wordmark, not running text (same footing as the Sutton
     logo image). The live site sets it in AmalfiCoast, which draws ~497px wide at 56px;
     Parisienne only reaches ~304px at 56px, so it needs ~92px to carry equal presence.
     Used by .hero-name only — do not reuse for text. */
  --display-script: 5.75rem;
}

/* At phone widths a 36px uppercase h2 can exceed the viewport on a single long word
   ("ACHIEVEMENTS" = 314px). Step the token down to the next scale value so h2,
   .script-heading and the page-head h1 all move together and stay above h3 (24px). */
@media (max-width: 560px) {
  :root { --h2: 1.75rem; }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 400 1.125rem/1.7 var(--font-ui);
  color: var(--ink);
  background: var(--white);
  text-wrap: pretty;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); }
h5 { font-size: var(--h5); font-weight: 600; }

p { text-wrap: pretty; }

.heading-caps {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Parisienne draws roughly half the width/height of a normal face at the same
   font-size, so the script accents run a step or two up the scale to stay legible. */
.eyebrow-script {
  display: block;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 2.25rem;
  line-height: 1.3;
  color: var(--rose);   /* script is always rose */
  margin-bottom: 8px;
}
@media (max-width: 560px) {
  .eyebrow-script { font-size: 1.75rem; }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Removed from view, still announced by screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* focus visibility */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: 500 1rem/1.4 var(--font-ui);
  letter-spacing: normal;
  padding: 10px 20px;
  border-radius: 0;
  border: 1px solid var(--ink);
  cursor: pointer;
  text-align: center;
}
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover, .btn-dark:focus-visible { background: #444; }
.btn-outline { background: var(--white); color: var(--ink); }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--blush); }
.btn-rose { background: #e1cec6; color: var(--ink); border-color: #e1cec6; }
.btn-rose:hover, .btn-rose:focus-visible { background: #d6bcb1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  /* Wider than the 1200px body container: the nav needs ~880px next to the logo
     and would otherwise be squeezed until its labels wrapped. */
  max-width: 1400px;
  padding-top: 12px;
  padding-bottom: 12px;
}
/* The logo stays shrinkable so it can give way to the hamburger on a 320px phone. */
.logo img { height: 44px; width: auto; }
/* Never let the flex row steal width from the nav; labels must not wrap. */
.primary-nav { flex: none; }

.nav-toggle {
  display: none;
  font: 500 0.875rem/1 var(--font-ui);
  background: none;
  color: var(--ink);   /* buttons default to black, which is off-palette */
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 10px 14px;
  cursor: pointer;
}

.primary-nav .nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
}
.primary-nav > .nav-list > li { display: flex; align-items: center; }
/* Every top-level item — link, dropdown trigger, or pill — is the same 44px row.
   Without this the plain links are inline boxes (vertical padding does nothing),
   the triggers are flex boxes and the pill is inline-block, which put the four
   kinds of label on four different baselines. 44px also clears the WCAG 2.2
   target-size minimum. */
.primary-nav > .nav-list > li > a,
.primary-nav .submenu-trigger {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0;
  white-space: nowrap;
  font: 500 0.875rem/1 var(--font-ui);
  letter-spacing: 0.08em;   /* matches the submenu links */
  text-transform: uppercase;
  color: var(--ink);
}
.primary-nav > .nav-list > li > a.btn {
  color: var(--white);
  padding: 0 24px;
}
.primary-nav > .nav-list > li > a.btn-outline,
.primary-nav > .nav-list > li > a.btn-rose {
  color: var(--ink);
}
.primary-nav .submenu-trigger {
  cursor: pointer;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
}
.primary-nav .submenu-trigger::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  /* The chevron's ink sits below its layout box's centre, so nudge it up to sit
     optically level with the cap height. Flipping it inverts the correction. */
  margin-top: -2px;
}
.primary-nav .has-submenu.is-open > .submenu-trigger::after { transform: rotate(-135deg); margin-top: 2px; }

.primary-nav .has-submenu { position: relative; }
.primary-nav .submenu {
  list-style: none;
  margin: 8px 0 0;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.primary-nav .has-submenu.is-open .submenu { display: flex; }

@media (min-width: 1200px) {
  /* The caret should agree with the dropdown, which opens on hover as well as click. */
  .primary-nav .has-submenu:hover > .submenu-trigger::after,
  .primary-nav .has-submenu:focus-within > .submenu-trigger::after {
    transform: rotate(-135deg);
    margin-top: 2px;
  }
  /* The dropdown hangs off the 44px item, so it now clears every trigger by the
     same 8px regardless of label. */
  .primary-nav .submenu { margin-top: 8px; }
  /* Invisible bridge across the 8px gap under the trigger. Without it the pointer
     leaves :hover on the way down to the dropdown and the menu snaps shut. */
  .primary-nav .has-submenu > .submenu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;      /* covers the 8px margin, plus a little slack */
    height: 10px;
  }
}

@media (min-width: 1200px) {
  .primary-nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(45, 45, 45, 0.12);
    z-index: 10;
  }
  /* The dropdown is absolutely positioned, so it shrink-to-fits its widest label
     rather than breaking "Vancouver Downtown" over two lines. Desktop only —
     in the stacked mobile menu these sit in normal flow and must still wrap. */
  .primary-nav .submenu a { white-space: nowrap; }
  /* Hover reveals the dropdown on desktop; JS still toggles .is-open for
     click/keyboard use and to flip the caret, but hover works without it. */
  .primary-nav .has-submenu:hover .submenu,
  .primary-nav .has-submenu:focus-within .submenu {
    display: flex;
  }
}
.primary-nav .submenu a {
  display: block;
  padding: 10px 12px;
  font: 500 0.875rem/1.3 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.primary-nav .submenu a:hover,
.primary-nav .submenu a:focus-visible { background: var(--blush); }

.lang-switch .submenu-trigger { text-transform: none; letter-spacing: normal; }
.lang-switch .submenu { min-width: 120px; }
.lang-switch [aria-current="page"] { color: var(--rose); font-weight: 700; }

@media (max-width: 1199.98px) {
  /* The desktop nav needs ~1197px beside the logo before its labels wrap, so the
     hamburger takes over here rather than at some width where it still looked squeezed. */
  .nav-toggle { display: inline-flex; }
  .site-header .container { gap: 16px; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav .nav-list { flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
  .primary-nav .submenu { position: static; box-shadow: none; border: none; padding-left: 12px; }
  .primary-nav > .nav-list > li { width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 760px;
  background: var(--white);
}
.hero-text {
  display: flex;
  align-items: center;
  /* Soft plaster-and-palm-shadow backdrop, matching the live site's left panel.
     It is near-white, not blush — the blush would fight the photo's white tabletop. */
  background: #f6f6f4 url("../images/hero-bg.webp") center/cover no-repeat;
}
.hero-text-inner {
  /* width:100% is load-bearing. container-type makes the inline size independent of the
     contents, so a shrink-to-fit flex item would collapse to zero. */
  width: 100%;
  max-width: 536px;
  margin: 0 40px 0 144px;
  padding: 64px 0;
  container-type: inline-size;   /* the wordmark below is sized against this column */
}

.hero-photo { position: relative; overflow: hidden; background: var(--white); }
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* White fade travelling in from the LEFT, dissolving the seam between the
   backdrop panel and the photo. Never a fade along the bottom edge. */
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0) 60%);
}

.hero-name {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1.2;
  color: var(--rose);
  margin: 0;

  /* Logotype, not h1 scale — see :root. Sized against .hero-text-inner rather than the
     viewport: the two-column hero squeezes this panel between ~800-1280px, where any fixed
     size overflows it. Parisienne draws "Peggy Davies" ~5.43x its font-size, so 17cqw fills
     the column with a little slack. Falls back to the fixed size where cqw is unsupported. */
  font-size: var(--display-script);
  font-size: clamp(2.5rem, 17cqw, var(--display-script));
}
/* zh: the Chinese name sits under the Latin wordmark, as on the live site. */
.hero-name-zh {
  display: block;
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.hero-role {
  display: block;
  margin-top: 18px;
  font: 400 0.875rem/1.6 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-wrap: balance;   /* narrow columns wrap 2+2, never stranding "CORPORATION" */
  color: var(--muted);
}
.hero-tagline {
  margin-top: 32px;
  margin-bottom: 0;
  font-family: var(--font-tagline);
  font-weight: 400;
  /* One line is unreachable: the sentence needs <=22px to fit the 536px column, which is
     smaller than it already is. So it goes bigger and wraps to two balanced lines. */
  font-size: 1.25rem;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--muted);
}

/* Both are sized against the hero column, not the viewport. The two-column hero shrinks
   this panel independently of window width, so viewport breakpoints let the tagline fall
   to three ragged lines around 1000-1280px. Each threshold is the column width that size
   measurably needs to stay on two balanced lines — taken from the rendered line boxes,
   not from the one-line width (text-wrap:balance does not split evenly). */
@container (min-width: 310px) { .hero-tagline { font-size: 1.5rem; } }
@container (min-width: 370px) { .hero-tagline { font-size: 1.75rem; } }
@container (min-width: 480px) { .hero-tagline { font-size: 2.25rem; } }
@container (min-width: 380px) { .hero-role { font-size: 1rem; letter-spacing: 0.1em; } }

/* No size breakpoints for the wordmark, tagline or role — all three track
   .hero-text-inner via cqw / @container above. Only layout changes here. */
@media (max-width: 1200px) {
  .hero-text-inner { margin-left: 64px; margin-right: 32px; }
}
@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo { aspect-ratio: 4 / 3; order: -1; }
  .hero-photo::after { background: none; }
  .hero-text-inner { max-width: none; margin: 0; padding: 48px 24px; }
}

/* ---------- Meet section ---------- */
.section-meet {
  background: var(--blush) url("../images/meet-bg.webp") center/cover no-repeat;
  padding: 96px 0;
}
.meet-grid {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: 64px;
  align-items: center;
}
.meet-portrait img {
  width: 100%;
  height: auto;
}
.script-heading {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 2.5rem;    /* a step above --h2: the script reads small at 36px */
  line-height: 1.25;
  color: var(--rose);   /* script is always rose */
  margin-bottom: 24px;
}
@media (max-width: 560px) {
  .script-heading { font-size: 2.25rem; }
}
.meet-copy p { color: var(--muted); max-width: 58ch; }
.meet-badges {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 32px 0;
  flex-wrap: wrap;
}
.meet-badges img { height: 56px; width: auto; max-width: 100%; object-fit: contain; flex-shrink: 0; }
.meet-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

@media (max-width: 780px) {
  .meet-grid { grid-template-columns: 1fr; gap: 32px; }
  .meet-portrait { max-width: 320px; }
}

/* ---------- Why section ---------- */
.section-why {
  background: var(--white) url("../images/why-bg.webp") center/cover no-repeat;
  padding: 96px 0;
  text-align: center;
}
.section-why .eyebrow-script { display: inline-block; }
.why-cards {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: left;
}
.why-card img { width: auto; height: 56px; margin-bottom: 20px; }
.why-card h3 { margin-bottom: 12px; }
.why-card p { color: var(--muted); }
@media (max-width: 820px) {
  .why-cards { grid-template-columns: 1fr; text-align: center; }
  .why-card img { margin-left: auto; margin-right: auto; }
}

/* ---------- Listings section ---------- */
.section-listings {
  background: var(--blush) url("../images/listings-bg.webp") center/cover no-repeat;
  padding: 96px 0;
  text-align: center;
}
.listing-block + .listing-block { margin-top: 80px; }
.listing-placeholder {
  margin: 40px auto;
  max-width: 640px;
  padding: 48px 32px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

/* ---------- Community section ---------- */
.section-community {
  padding: 96px 0;
  text-align: center;
}
.community-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}
.community-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
}
.community-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.community-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 15, 0.38);
}
.community-card a {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--white);
  width: 100%;
}
.community-card h3 {
  color: var(--white);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.community-card .explore {
  font: 500 0.875rem/1 var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.community-card:focus-within,
.community-card:hover { outline: 3px solid var(--rose); outline-offset: 2px; }
@media (max-width: 820px) {
  .community-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .community-grid { grid-template-columns: 1fr; }
}

/* ---------- Testimonials ---------- */
.section-testimonials {
  background: var(--testimonial-bg);
  padding: 96px 0;
  text-align: center;
}
.carousel {
  position: relative;
  margin-top: 48px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 64px;
}
.carousel-viewport { overflow: hidden; }
.carousel-track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-slide {
  flex: 0 0 100%;
  margin: 0;
  /* Inactive slides stay laid out (the track slides over them) but fade back,
     so only the active quote reads as foreground. */
  opacity: 0.35;
  transition: opacity 0.5s ease;
}
.carousel-slide.is-active { opacity: 1; }

/* Honour the OS "reduce motion" setting: swap the slide for an instant cut. */
@media (prefers-reduced-motion: reduce) {
  .carousel-track, .carousel-slide { transition: none; }
}

.carousel.is-dragging .carousel-track { transition: none; cursor: grabbing; }
.carousel-viewport { touch-action: pan-y; }

.carousel-slide .quote {
  font: 700 1.5rem/1.3 var(--font-ui);
  text-transform: uppercase;
  margin: 0 0 16px;
}
.carousel-slide .quote-body { color: var(--muted); max-width: 60ch; margin: 0 auto; }
.carousel-slide footer { margin-top: 16px; font-weight: 700; }

.carousel-arrow {
  position: absolute;
  top: 40px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 0;
  background: var(--ink);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.carousel-arrow:hover, .carousel-arrow:focus-visible { background: #444; }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-dots { margin-top: 32px; display: flex; justify-content: center; gap: 10px; }
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #c9b8b0;
  cursor: pointer;
}
.carousel-dot.is-active { background: var(--ink); }

@media (max-width: 640px) {
  .carousel { padding: 0 48px; }
  .carousel-arrow { top: 8px; width: 32px; height: 32px; }
}
@media (max-width: 560px) {
  /* At 320px the 24px uppercase quote leaves a 176px column, but "KNOWLEDGEABLE”"
     alone is 249px and spilled under the arrows. Smaller type + tighter gutters fit
     it; hyphens/break-word are the backstop for any longer word in future copy. */
  .carousel { padding: 0 36px; }
  .carousel-slide .quote { font-size: 1.25rem; }
  .carousel-slide .quote,
  .carousel-slide .quote-body { overflow-wrap: break-word; hyphens: auto; }
}

/* ---------- CTA ---------- */
.section-cta {
  background: var(--blush) url("../images/cta-bg.webp") center/cover no-repeat;
  padding: 96px 0;
  text-align: center;
}
.section-cta p { max-width: 52ch; margin: 20px auto 32px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: var(--testimonial-bg) url("../images/footer-bg.webp") center/cover no-repeat;
  color: var(--ink);
  padding: 72px 0 32px;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(243, 231, 226, 0.55);
}
.site-footer .container { position: relative; }
.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 48px;
  align-items: stretch;
}
/* WeChat + WhatsApp QR pair */
.footer-qrs { display: flex; gap: 24px; flex-wrap: wrap; align-self: start; }
.qr-block { font: 500 0.875rem/1 var(--font-ui); }
.qr-block .qr-code {
  width: 140px;
  height: auto;
  border-radius: 4px;
  background: var(--white);
  padding: 8px;
}
.qr-label { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }
.qr-label img { width: 20px; height: 20px; flex: none; }

/* The contact and brokerage columns both open with a 56px logo row — the height
   of the taller Sutton badge — so their first line of text starts on the same
   baseline even though the wordmark is only 40px tall. */
.footer-brand { height: 56px; margin-bottom: 12px; }
.footer-brand img { width: auto; height: 40px; }
.footer-contact { display: flex; flex-direction: column; }
.footer-contact p { margin: 0 0 8px; font-size: 1rem; }
.footer-contact a:hover { color: var(--rose); }
/* Drops the social row to the foot of the grid row, level with the brokerage's
   last line. Scoped to the footer: the About and Contact pages reuse
   .footer-social outside a flex column, where auto would collapse to 0. */
.footer-contact .footer-social { margin-top: auto; }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.footer-social svg { width: 16px; height: 16px; fill: var(--white); }
.social-ig { background: #d6295e; }
.social-fb { background: #1877f2; }
.social-yt { background: #ff0000; }
.footer-social a:hover { opacity: 0.85; }

.footer-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(45, 45, 45, 0.2);
}

/* The footer runs entirely on --ink: no script face, no secondary grey. */
.footer-brokerage { font-size: 0.875rem; color: var(--ink); text-align: right; }
/* 16px, not 12px: the brokerage name is 24px/1.25 while the contact column's first
   line is 16px/1.7, so their half-leading differs by 4px. This lands the two first
   lines of text on the same optical row. */
.footer-brokerage .sutton-badge { height: 56px; width: auto; margin-bottom: 16px; margin-left: auto; }
.footer-brokerage .brokerage-name {
  font-family: var(--font-ui);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.25;
}
.footer-brokerage p { margin: 8px 0; }
/* Trailing margin would leave this column's last line 8px above the social row. */
.footer-brokerage p:last-of-type { margin-bottom: 0; }
.footer-brokerage strong { color: var(--ink); }

.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(45, 45, 45, 0.15);
  font-size: 0.875rem;
  color: var(--ink);
  text-align: left;
}

@media (max-width: 900px) {
  /* Columns stack into rows of two, so there is no shared foot to align to. */
  .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 40px; align-items: start; }
  .footer-contact .footer-social { margin-top: 20px; }
  .footer-divider { display: none; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brokerage { text-align: left; }
  .footer-brokerage .sutton-badge { margin-left: 0; }
}

/* ---------- About page ---------- */
.hero-compact { min-height: 600px; }

.about-grid { align-items: start; }
.about-portrait-col { position: sticky; top: 96px; }
.about-contact-actions { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.about-contact-btn { display: block; width: 100%; }
.about-social { margin-top: 20px; }

.about-copy .script-heading { margin-bottom: 32px; }
.about-block { max-width: 62ch; }
.about-block + .about-block { margin-top: 32px; }
.about-block h3 { font-size: var(--h4); margin-bottom: 8px; }
.about-block p { color: var(--muted); margin: 0; }

@media (max-width: 780px) {
  .about-portrait-col { position: static; }
}

/* ---------- Video section ---------- */
.section-video { background: #dadcd5; padding: 64px 0; }
.video-frame {
  max-width: 1100px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}
.video-play {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  cursor: pointer;
  background: none;
  font-size: 1rem;   /* buttons default to 13.33px, which is off the type scale */
}
.video-play img { width: 100%; height: 100%; object-fit: cover; }
.video-play .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.65);
  color: var(--white);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
}
.video-play:hover .play-icon, .video-play:focus-visible .play-icon { background: var(--rose); }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Achievements ---------- */
.section-achievements { background: var(--ink); color: var(--white); }
.achievements-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}
.achievements-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
}
.achievements-copy h2 {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}
.achievements-copy p { color: var(--white); max-width: 46ch; margin-bottom: 32px; }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-outline-light:hover, .btn-outline-light:focus-visible { background: rgba(255,255,255,0.1); }

.achievements-stats {
  position: relative;
  background: #2a2a2a url("../images/about-achievement-bg.webp") center/cover no-repeat;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.achievements-stats::before { content: ""; position: absolute; inset: 0; background: rgba(20, 20, 20, 0.45); }
.stat-row { position: relative; display: flex; justify-content: space-between; gap: 24px; }
.stat { position: relative; }
.stat-label {
  display: block;
  font: 500 0.875rem/1 var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 8px;
}
.stat-value { font-size: var(--h3); }
.stat-badges { display: flex; gap: 12px; align-items: flex-start; }
.stat-badges img { height: 90px; width: auto; }
.stat-owner { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.stat-owner img { height: 32px; width: auto; }

@media (max-width: 900px) {
  .achievements-grid { grid-template-columns: 1fr; }
  .achievements-copy, .achievements-stats { padding: 48px 24px; }
  .stat-row { flex-direction: column; gap: 24px; }
}
/* Grid items default to min-width:auto, so an unbreakable word can stretch a 1fr
   track wider than the grid itself. "ACHIEVEMENTS" at 36px is 314px and did exactly
   that at 320px wide. The h2 step-down below is the real fix; this is the guard. */
.achievements-grid > * { min-width: 0; }

/* ---------- Contact page ---------- */
.page-head {
  background: var(--blush) url("../images/cta-bg.webp") center/cover no-repeat;
  padding: 88px 0 72px;
  text-align: center;
}
.page-head .eyebrow-script { display: inline-block; }
.page-head-intro {
  max-width: 60ch;
  margin: 24px auto 0;
  color: var(--muted);
}
@media (max-width: 640px) {
  .page-head h1 { font-size: var(--h2); }
}

/* Photo variant of the page head, used by the community pages.
   The 0.6 overlay is the load-bearing bit: composited over a pure-white photo it
   still leaves white text at 4.78:1, so AA holds whatever the photograph is. */
.page-head--photo {
  position: relative;
  background: var(--ink);
  padding: 120px 0 104px;
}
.page-head--photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-head--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 15, 0.6);
}
.page-head--photo .container { position: relative; z-index: 1; }
/* On a dark surface every text colour becomes the inverse, script included. */
.page-head--photo h1,
.page-head--photo .eyebrow-script,
.page-head--photo .page-head-intro { color: var(--white); }

/* ---------- Buyer / seller service lists ---------- */
.section-services { padding: 96px 0; }
.section-services .eyebrow-script { display: inline-block; }
.section-services > .container { text-align: center; }
.service-list {
  margin-top: 56px;
  display: grid;
  gap: 40px;
  text-align: left;
}
.service-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.service-item:last-child { border-bottom: 0; padding-bottom: 0; }
.service-num {
  font-family: var(--font-script);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--rose);
  min-width: 2ch;
}
.service-item h3 { margin-bottom: 12px; }
.service-item p { color: var(--muted); margin: 0; max-width: 68ch; }
@media (max-width: 560px) {
  .service-item { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- Testimonials page ---------- */
.section-testimonial-list { background: var(--blush); padding: 96px 0; }
.testimonial-list {
  display: grid;
  gap: 28px;
  max-width: 860px;
  margin: 0 auto;
}
.testimonial-card {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 32px;
}
.testimonial-card p { color: var(--muted); margin: 0; }
.testimonial-card footer { margin-top: 20px; font-weight: 600; color: var(--ink); }
.testimonial-date {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
}

/* ---------- MLS feed slot ---------- */
.section-feed { padding: 96px 0; text-align: center; }
.feed-slot {
  margin: 0 auto;
  max-width: 720px;
  padding: 56px 32px;
  background: var(--blush);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.feed-slot p { color: var(--muted); margin: 0 0 24px; }
.feed-slot p:last-child { margin-bottom: 0; }

.section-contact { padding: 96px 0; }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  gap: 72px;
  align-items: start;
}

.contact-details .script-heading { margin-bottom: 4px; }
.contact-role {
  margin: 0 0 32px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li + li { margin-top: 24px; }
.contact-label {
  display: block;
  font: 500 0.875rem/1 var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-list a:hover { color: var(--rose); }

.contact-qrs { margin-top: 40px; display: flex; gap: 24px; flex-wrap: wrap; }
.contact-qrs .qr-code { border: 1px solid var(--line); }
.contact-social { margin-top: 24px; }

/* --- Form --- */
.contact-form-wrap h2 { margin-bottom: 8px; }
.form-note { color: var(--muted); font-size: 1rem; margin: 0 0 28px; }
.contact-form .field { margin-bottom: 24px; }
.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 8px;
}
.contact-form .req { color: var(--rose); }
.contact-form .optional { font-weight: 400; color: var(--muted); }

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font: 400 1.125rem/1.7 var(--font-ui);
  color: var(--ink);
  background: var(--white);
  /* 1px of --muted, not --line: field borders are UI components and need 3:1 (WCAG 1.4.11) */
  border: 1px solid var(--muted);
  border-radius: 0;
  padding: 10px 14px;
}
.contact-form textarea { resize: vertical; min-height: 160px; }
.contact-form input:hover,
.contact-form select:hover,
.contact-form textarea:hover { border-color: var(--ink); }

.form-submit { margin-top: 8px; padding: 14px 32px; }

.form-status {
  margin: 24px 0 0;
  padding: 16px 20px;
  border-left: 4px solid;
  font-size: 1rem;
}
/* State is carried by the border + tint, not by the text colour, so the palette stays
   at three. The wording alone already distinguishes success from failure. */
.form-status { color: var(--ink); }
.form-status.is-success { background: #eef3ee; border-color: #2f5d3a; }
.form-status.is-error { background: #f8eeee; border-color: #8a2b2b; }

/* Honeypot: off-screen but not display:none / type=hidden, so bots still fill it. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
}
