/* Dream Casa Realty — styles
   "Midnight Gold" colour, type and motion tokens. Change colours, fonts, spacing and motion
   curves in :root only.

   Photography: Home hero = assets/img/hero.jpg (hero-mobile.jpg on phones), set as a CSS
   background. Service-page heroes and the About photo are <img> elements in the HTML.

   Motion rules (keep these when editing):
   - Only animate transform and opacity (plus colour on hover). Never `transition: all`.
   - Enter/exit uses --ease-out. Nothing UI-level runs longer than ~380ms; the
     one-off scroll reveals and hero entrance are slower on purpose.
   - Hover effects live in the (hover: hover) block at the end, so touch screens
     never get stuck hover states.
   - prefers-reduced-motion keeps fades and colour changes, and removes movement. */

/* ---------- Fonts: self-hosted, SIL Open Font License (see assets/fonts/LICENSE-*.txt) ----------
   Inter (variable weight) for body and UI; Source Serif 4 (variable weight + optical size) for
   headings, so large headlines get its finer display cut. Latin subset only; any other
   character falls back to the system fonts listed after them in --font-sans / --font-serif.
   No requests to Google Fonts. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Colour */
  --bg: #14100D;
  --surface: #1E1915;
  --gold: #C9A96E;
  --text: #F4EFE6;
  --text-muted: #CCC4B7;
  --light-bg: #F6F1E9;
  --ink: #1B1A17;
  --ink-muted: #47423C;      /* secondary text on light backgrounds */
  --bronze: #7A5C25;         /* gold-toned text on light backgrounds (gold is too pale there) */
  --line: rgba(201, 169, 110, 0.22);
  --focus-dark: #E6CF9F;
  --focus-light: #1B1A17;

  /* Typography: self-hosted web fonts first, then the previous system stacks as fallback.
     To switch back to system fonts, delete the first name in each line. */
  --font-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container: 74rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-space: clamp(5rem, 11vw, 9rem);
  --radius: 4px;
  --header-h: 4.5rem;

  /* Motion: strong custom curves (the built-in ones are too weak) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(201, 169, 110, 0.35); color: inherit; }

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.8rem, 7.5vw, 5.75rem); }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h3 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
p { margin: 0 0 1.1rem; max-width: 60ch; text-wrap: pretty; }
em.accent { font-style: italic; color: var(--gold); }

a { color: inherit; text-underline-offset: 0.2em; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.5rem;
}

.lead { font-size: 1.2rem; color: var(--text-muted); }

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--focus-dark);
  outline-offset: 3px;
  border-radius: 2px;
}
.section--light :focus-visible { outline-color: var(--focus-light); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--gold);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  z-index: 100;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section-space); }
.section--surface { background: var(--surface); }
.section--light { background: var(--light-bg); color: var(--ink); }
.section--light .eyebrow { color: var(--bronze); }
.section--light .lead, .section--light p { color: var(--ink-muted); }
.section--light h2, .section--light h3, .section--light strong { color: var(--ink); }
.section--light em.accent { color: var(--bronze); }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.1rem;
  padding: 0.75rem 1.9rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--bg);
  cursor: pointer;
  transition:
    transform 200ms var(--ease-out),
    background-color 250ms ease,
    border-color 250ms ease,
    color 250ms ease;
}
.btn:active { transform: scale(0.97); }          /* press feedback */
.btn:disabled { cursor: not-allowed; }
.btn:disabled:active { transform: none; }
.section--light .btn { background: var(--ink); border-color: var(--ink); color: var(--light-bg); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 250ms ease, color 250ms ease;
}
.text-link::after { content: "\2192"; transition: transform 300ms var(--ease-out); }
.section--light .text-link { color: var(--bronze); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 16, 13, 0.97);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow 380ms ease;
  view-transition-name: site-header;
}
/* Hairline appears once the page scrolls (class set in main.js) */
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1.5rem;
}
/* Logo: logo-nav.svg in the header, logo-full.svg in the footer.
   Width/height attributes on the <img> reserve space so nothing shifts while it loads. */
.brand { display: inline-flex; align-items: center; flex: none; line-height: 0; }
.brand img { display: block; width: auto; height: 44px; }
.brand--footer img { height: 72px; }
@media (max-width: 40rem) {
  .brand img { height: 36px; }
  .site-header .brand { padding-block: 4px; }   /* 44px tap target around the 36px logo */
  .brand--footer img { height: 56px; }
}

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.nav-list a {
  position: relative;
  display: block;
  padding: 0.75rem 0.9rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 250ms ease;
}
.nav-list a[aria-current="page"] { color: var(--text); }
/* Underline that draws in from the left; stays on for the current page */
.nav-list a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0.9rem; right: 0.9rem; bottom: 0.45rem;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 380ms var(--ease-out);
}
.nav-list a[aria-current="page"]::after { transform: scaleX(1); }
.nav-list .btn { display: flex; justify-content: center; text-align: center; margin-left: 0.5rem; padding: 0.65rem 1.4rem; min-height: 2.75rem; color: var(--bg); }

.nav-toggle {
  display: none;
  width: 3rem; height: 3rem;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: transform 200ms var(--ease-out);
}
.nav-toggle:active { transform: scale(0.95); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block;
  width: 1.25rem; height: 2px;
  background: currentColor;
  transition: transform 300ms var(--ease-out), background-color 200ms ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 62rem) {
  .js .nav-toggle { display: inline-flex; }

  /* Menu panel: fades and drops in (visibility keeps closed links out of the tab order) */
  .js .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    padding: 0.5rem var(--gutter) 1.75rem;
    box-shadow: 0 28px 48px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 250ms var(--ease-out),
      transform 250ms var(--ease-out),
      visibility 0s linear 250ms;       /* hide only after the fade-out finishes */
  }
  .js .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out), visibility 0s;
  }
  .js .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .js .nav-list a { padding: 1rem 0; font-size: 0.85rem; }
  .js .nav-list a::after { display: none; }
  .js .nav-list a[aria-current="page"] { color: var(--gold); }
  .js .nav-list .btn { margin: 1.25rem 0 0; }

  /* Links settle in one after another when the menu opens (exit is instant, no stagger) */
  .js .nav-list li { opacity: 0; transform: translateY(6px); transition: opacity 200ms ease, transform 200ms ease; }
  .js .site-nav.is-open .nav-list li { opacity: 1; transform: none; transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out); }
  .js .site-nav.is-open .nav-list li:nth-child(1) { transition-delay: 50ms; }
  .js .site-nav.is-open .nav-list li:nth-child(2) { transition-delay: 90ms; }
  .js .site-nav.is-open .nav-list li:nth-child(3) { transition-delay: 120ms; }
  .js .site-nav.is-open .nav-list li:nth-child(4) { transition-delay: 160ms; }
  .js .site-nav.is-open .nav-list li:nth-child(5) { transition-delay: 200ms; }
  .js .site-nav.is-open .nav-list li:nth-child(6) { transition-delay: 240ms; }

  /* Without JavaScript the nav simply wraps below the logo. */
  .no-js .header-inner { flex-wrap: wrap; padding-block: 0.75rem; }
  .no-js .nav-list { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(52rem, calc(100svh - var(--header-h)));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
/* Photo slot: assets/img/hero.jpg, full width on every screen. If it is missing, the
   gradients below show on their own. Service pages put their own <img> inside .hero-media
   instead (see .hero-media--photo). */
.hero-media {
  position: absolute; inset: 0; z-index: -2;
  background-color: var(--bg);
  background-image:
    url("../img/hero.jpg"),
    radial-gradient(60% 55% at 82% 22%, rgba(201, 169, 110, 0.2), transparent 70%),
    linear-gradient(0deg, rgba(201, 169, 110, 0.1), transparent 38%),
    linear-gradient(180deg, #1c1611 0%, #14100D 100%);
  background-size: cover;
  background-position: 50% 15%;   /* keeps the top of the tallest tower in frame */
  background-repeat: no-repeat;
  transform-origin: 60% 40%;
  animation: settle 2250ms var(--ease-out) backwards;   /* slow cinematic settle on load */
}
/* Warm tint: a gold layer blended in "color" mode pulls the photo's saturated blue
   towards the gold palette while keeping its light and detail. Raise opacity for warmer. */
.hero-media::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;                       /* above a page's own <img> as well */
  background: var(--gold);
  mix-blend-mode: color;
  opacity: 0.36;
}
/* Readability overlay: warm near-black, strongest on the left behind the headline,
   fading to a light veil on the right so the skyline still reads. */
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(20,16,13,0.94) 0%, rgba(20,16,13,0.86) 28%, rgba(20,16,13,0.52) 52%, rgba(20,16,13,0.2) 78%, rgba(20,16,13,0.12) 100%),
    linear-gradient(0deg, rgba(20,16,13,0.78) 0%, rgba(20,16,13,0) 40%),
    linear-gradient(180deg, rgba(20,16,13,0.4) 0%, rgba(20,16,13,0) 22%),
    linear-gradient(rgba(56,34,12,0.14), rgba(56,34,12,0.14));   /* uniform warm-brown wash */
}
.hero-content { padding-block: clamp(6rem, 14vw, 10rem) clamp(4rem, 8vw, 6.5rem); }
.hero h1 { max-width: 11ch; margin-bottom: 1.75rem; }
.hero .lead { max-width: 32rem; color: rgba(244, 239, 230, 0.86); margin-bottom: 2.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.25rem; }

/* Phones: text sits at the bottom, so the overlay is strongest there. */
@media (max-width: 40rem) {
  .hero-media {
    background-image:
      url("../img/hero-mobile.jpg"),   /* lighter full-frame copy for phones */
      radial-gradient(60% 55% at 82% 22%, rgba(201, 169, 110, 0.2), transparent 70%),
      linear-gradient(180deg, #1c1611 0%, #14100D 100%);
    background-position: 47% top;
  }
  .hero::after {
    background:
      linear-gradient(0deg, rgba(20,16,13,0.97) 0%, rgba(20,16,13,0.9) 42%, rgba(20,16,13,0.58) 64%, rgba(20,16,13,0.24) 100%),
      linear-gradient(rgba(56,34,12,0.14), rgba(56,34,12,0.14));
  }
}

/* ---------- Entrance choreography (runs once on load) ----------
   Hero and page headers: each child rises in turn, 100ms apart. */
.hero-content > *,
.page-hero .container > * { animation: rise 1000ms var(--ease-out) backwards; }
.hero-content > :nth-child(1), .page-hero .container > :nth-child(1) { animation-delay: 150ms; }
.hero-content > :nth-child(2), .page-hero .container > :nth-child(2) { animation-delay: 250ms; }
.hero-content > :nth-child(3), .page-hero .container > :nth-child(3) { animation-delay: 350ms; }
.hero-content > :nth-child(4), .page-hero .container > :nth-child(4) { animation-delay: 450ms; }

/* ---------- Scroll reveals ----------
   Elements with data-reveal are only hidden when the head script has confirmed
   IntersectionObserver exists (html.reveal-ready). main.js adds .is-visible as they
   scroll into view and sets --d for staggering. Without JS, nothing is hidden. */
.reveal-ready [data-reveal]:not(.is-visible) { opacity: 0; }
[data-reveal].is-visible { animation: rise 940ms var(--ease-out) var(--d, 0ms) backwards; }
/* Photos wipe in from the top (clip-path, GPU-friendly) */
.frame[data-reveal].is-visible { animation: clip-in 1380ms var(--ease-in-out) var(--d, 0ms) backwards; }

@keyframes rise    { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade    { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle  { from { transform: scale(1.06); } to { transform: scale(1); } }
@keyframes clip-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- Pathways (Buying / Selling / Mortgage) ---------- */
.section-head { max-width: 44rem; margin-bottom: clamp(3rem, 6vw, 5rem); }

.pathways { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 62rem) { .pathways { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }

.pathway {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(2.25rem, 3.5vw, 3.5rem);
  background: var(--surface);
  border-radius: 2px;
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  cursor: pointer;
  transition: transform 450ms var(--ease-out), background-color 320ms ease;
}
/* Gold hairline that draws across the top on hover */
.pathway::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 650ms var(--ease-out);
}
@media (min-width: 62rem) { .pathway { min-height: 26rem; } }
.pathway .pathway-num {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--gold);
  margin: 0 0 clamp(2.5rem, 5vw, 4.5rem);
}
.pathway h3 { font-size: clamp(2.1rem, 3.4vw, 2.75rem); margin-bottom: 1.25rem; }
.pathway p { color: var(--text-muted); }
.pathway .text-link { margin-top: auto; align-self: flex-start; }
/* The whole card is clickable through its one link */
.pathway .text-link::before { content: ""; position: absolute; inset: 0; }
.pathway p:last-of-type { margin-bottom: 2rem; }

/* ---------- How we help (light editorial section) ---------- */
.help-grid { display: grid; gap: clamp(3rem, 7vw, 6rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 62rem) { .help-grid { grid-template-columns: 1fr 1.1fr; } }

.principles { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 2rem; }
.principles h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.principles p { margin: 0; }

.steps-title { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--bronze); margin: 0 0 2rem; font-family: var(--font-sans); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 2rem; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.75rem 1fr;
  gap: 0.5rem 1rem;
}
.steps li::before {
  content: "0" counter(step);
  font-family: var(--font-serif);
  font-size: 2.1rem;
  line-height: 1.05;
  color: var(--bronze);
}
.steps h3 { font-size: 1.45rem; margin: 0 0 0.25rem; }
.steps p { margin: 0; }
.fine-print { font-size: 0.95rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(27, 26, 23, 0.16); }

/* ---------- About teaser / About page ---------- */
.split { display: grid; gap: clamp(3rem, 7vw, 6rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 62rem) { .split { grid-template-columns: 1.05fr 0.95fr; } }

/* About photo: an <img> inside .frame. The gradient shows while it loads. */
.frame {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: var(--surface);
  background-image:
    linear-gradient(115deg, rgba(201, 169, 110, 0.16) 0%, transparent 42%),
    linear-gradient(180deg, #261f18 0%, #17120e 100%);
}
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.frame::after {   /* light warm veil so the photo sits in the palette */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(rgba(56, 34, 12, 0.16), rgba(20, 16, 13, 0.22));
  pointer-events: none;
}
@media (max-width: 61.99rem) { .frame { aspect-ratio: 16 / 10; } }

/* ---------- About page: approach (no cards) ---------- */
.approach { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 62rem) { .approach { grid-template-columns: repeat(3, 1fr); gap: 4rem; } }
.approach-num { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.24em; color: var(--gold); margin: 0 0 1rem; }
.approach h3 { margin-bottom: 0.75rem; }
.approach p:last-child { color: var(--text-muted); margin: 0; }

/* ---------- Closing CTA ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band p { margin-inline: auto; color: var(--text-muted); }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2rem; margin-top: 2.25rem; }

/* ---------- Page header (About / Contact) ---------- */
.page-hero { padding-block: clamp(5rem, 11vw, 8.5rem) clamp(2.5rem, 5vw, 4rem); }
.page-hero h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); max-width: 16ch; }
.page-hero .lead { max-width: 40rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: clamp(3rem, 7vw, 6rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 62rem) { .contact-grid { grid-template-columns: 0.8fr 1.2fr; } }

.h-sm { font-size: 1.6rem; }
.contact-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.75rem; }
.contact-label { display: block; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.3rem; }
.contact-value { font-family: var(--font-serif); font-size: 1.35rem; margin: 0; }
.contact-value a {   /* 44px tap target; underline instead of a border so it stays close to the text */
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 0.3em;
  transition: text-decoration-color 250ms ease;
}

.form { margin-top: 1.5rem; }
.form fieldset { display: grid; gap: 1.25rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.form-row { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .form-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem; }
.field .req { color: var(--gold); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(244, 239, 230, 0.28);
  border-radius: var(--radius);
  font: inherit;
  transition: border-color 250ms ease;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field select {
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23C9A96E' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.field-hint { font-size: 0.9rem; color: var(--text-muted); margin: 0.4rem 0 0; }
.field-error { margin: 0.4rem 0 0; font-size: 0.9rem; color: #F2A28C; }   /* about 9:1 on the dark background */
.field [aria-invalid="true"] { border-color: #F2A28C; }
.form-consent { margin: 1rem 0 0; font-size: 0.9rem; color: var(--text-muted); }
.form-status { margin: 1.5rem 0 0; padding: 1rem 1.25rem; background: var(--surface); border-left: 3px solid var(--gold); max-width: none; }
.form-status--error { border-left-color: #F2A28C; }
.form-status a { color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { background: #0e0b09; padding-block: 4rem 2.25rem; font-size: 0.95rem; color: var(--text-muted); }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
/* Single-column footer (phones, small tablets): centre the logo. Its artwork has equal
   built-in space on both sides, so centring the image centres the visible logo. */
@media (max-width: 47.99rem) { .footer-grid > div:first-child { text-align: center; } }
.site-footer h2 { font-family: var(--font-sans); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.footer-list li { padding: 0.35rem 0; }
.footer-list a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; margin: -0.45rem 0; text-decoration: none; transition: color 250ms ease; }   /* 44px tap target */
.footer-legal { margin-top: 3rem; font-size: 0.85rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.75rem; }
.footer-legal p { margin: 0; max-width: none; }
.footer-legal a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; transition: color 250ms ease; }

/* ---------- Photo focal points (keeps the HTML free of inline styles) ---------- */
.frame--about { --focus: 50% 40%; }
.hero-media--buying { --focus: 50% 45%; }
.hero-media--selling { --focus: 50% 60%; }
.hero-media--mortgage { --focus: 50% 28%; }

/* ---------- Quick contact (mobile WhatsApp button) ----------
   An <aside> landmark around the floating button; main.js reveals it only when a WhatsApp
   number is configured. Not shown on larger screens, where the button is hidden anyway. */
@media (min-width: 48rem) { .quick-contact { display: none; } }

/* ---------- Long-form text (privacy policy) ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin: 2.75rem 0 1rem; }
.prose p, .prose li { color: var(--text); max-width: 70ch; }
.prose ul { margin: 0 0 1.1rem; padding-left: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.prose strong { font-weight: 600; }
.prose a { color: var(--gold); }
.form-consent a { color: var(--gold); }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Service pages (buying / selling / mortgage) ----------
   Shared structure: short hero, who it is for, numbered process, FAQ, closing CTA.
   They reuse .hero, .help-grid, .steps and .cta-band; only the pieces below are new. */
.hero--short { min-height: min(30rem, calc(100svh - var(--header-h))); }
/* Each service page shows its own photo as an <img> (so it has alt text); the CSS
   background photo is switched off there so hero.jpg is not downloaded as well. */
.hero-media--photo { background-image: none; }
.hero-media--photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);   /* set per page in the HTML */
}
.hero--short .hero-content { padding-block: clamp(4.5rem, 10vw, 7rem) clamp(3rem, 6vw, 4.5rem); }
.hero--short h1 { font-size: clamp(2.6rem, 6.5vw, 4.8rem); max-width: 14ch; }

.audience-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.audience-list li { font-family: var(--font-serif); font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.3; max-width: 32ch; }

/* FAQ accordion: native <details>, so it works with keyboard and screen readers, and
   without JavaScript. The panel eases open where the browser supports it (Chrome). */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4rem;
  padding: 1.1rem 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.3;
  transition: color 250ms ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; flex: none; width: 1rem; height: 1rem; }
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 100%; height: 1.5px; margin-top: -0.75px;
  background: var(--gold);
  transition: transform 320ms var(--ease-out);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }   /* plus becomes minus */
.faq-answer { padding: 0 2.5rem 1.5rem 0; }
.faq-answer p { margin: 0; color: var(--text-muted); }
@supports (interpolate-size: allow-keywords) {
  html { interpolate-size: allow-keywords; }
  .faq-item::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 350ms var(--ease-out), content-visibility 350ms allow-discrete;
  }
  .faq-item[open]::details-content { block-size: auto; }
}

/* ---------- Sticky WhatsApp button: phones only, and only when a number is configured ----------
   Hidden in the HTML; main.js reveals it (and sets its link) when site-config.js has a number. */
.wa-fab {
  position: fixed;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 60;
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.5rem 1.25rem 0.5rem 1rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--bg);
  font: 600 0.78rem/1 var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);   /* it floats, so a shadow is correct here */
  transition: transform 200ms var(--ease-out);
}
.wa-fab svg { width: 1.25rem; height: 1.25rem; flex: none; }
.wa-fab:active { transform: scale(0.96); }
@media (max-width: 47.99rem) {
  .wa-fab:not([hidden]) { display: inline-flex; animation: rise 620ms var(--ease-out) 880ms backwards; }
  .has-fab .site-footer { padding-bottom: 6.5rem; }   /* keep the footer clear of the button */
}

/* ---------- Page transitions ----------
   Cross-document view transitions: pages fade into each other and the header stays put.
   Supported in current Chrome and Safari; other browsers just navigate normally. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 320ms; animation-timing-function: ease; }

/* ---------- Hover effects: pointer devices only ----------
   Touch screens trigger :hover on tap, which would leave hover states stuck. */
@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover { background: var(--text); border-color: var(--text); }
  .section--light .btn:hover { background: var(--bronze); border-color: var(--bronze); color: var(--light-bg); }
  .nav-list .btn:hover { color: var(--bg); }

  .text-link:hover { border-bottom-color: var(--gold); }
  .text-link:hover::after { transform: translateX(4px); }
  .section--light .text-link:hover { border-bottom-color: var(--bronze); }

  .nav-list a:hover { color: var(--text); }
  .nav-list a:not(.btn):hover::after { transform: scaleX(1); }

  .pathway:hover { transform: translateY(-4px); background: #241e18; }
  .pathway:hover::after { transform: scaleX(1); }
  .pathway:hover .text-link::after { transform: translateX(4px); }

  .faq-item summary:hover { color: var(--gold); }
  .contact-value a:hover { text-decoration-color: var(--gold); }
  .field input:enabled:hover, .field select:enabled:hover, .field textarea:enabled:hover { border-color: var(--gold); }
  .footer-list a:hover, .footer-legal a:hover { color: var(--text); text-decoration: underline; }
}

/* ---------- Reduced motion ----------
   Fewer and gentler, not zero: fades and colour changes stay, movement goes. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media { animation: none; }
  .hero-content > *, .page-hero .container > * { animation-name: fade; animation-duration: 620ms; }
  [data-reveal].is-visible, .frame[data-reveal].is-visible { animation: fade 560ms ease-out var(--d, 0ms) backwards; }
  .pathway, .pathway::after, .text-link::after, .nav-list a:not(.btn)::after { transition-duration: 0.01ms; }
  .wa-fab:not([hidden]) { animation: fade 500ms ease-out 880ms backwards; }
  .faq-icon::before, .faq-icon::after { transition-duration: 0.01ms; }
  .faq-item::details-content { transition-duration: 0.01ms; }   /* own rule: unknown selectors drop the whole rule */
  .js .site-nav { transform: none; }
  .js .nav-list li { transform: none; }
  @media (hover: hover) and (pointer: fine) {
    .pathway:hover { transform: none; }
    .text-link:hover::after, .pathway:hover .text-link::after { transform: none; }
  }
}
