:root {
  --sand: #f5ead8;
  --sand-light: #fffaf2;
  --terracotta: #c96f4a;
  --terracotta-dark: #9d4f34;
  --olive: #6b6b45;
  --olive-dark: #4f5031;
  --brown: #483c32;
  --muted: #6f6155;
  --line: #dfcfb9;
  --white: #ffffff;
  --font-display: "Marcellus", Georgia, serif;
  --font-body: "Mulish", Arial, sans-serif;
  --container: 76rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --space: clamp(4.75rem, 9vw, 8.5rem);
  --radius: 1.5rem;
  --shadow: 0 1.4rem 3.5rem rgba(83, 61, 43, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-width: 20rem; overflow-x: hidden;
  overflow-x: clip; /* avoid body becoming a scroll container (Safari scroll clamp) */ background: var(--sand-light);
  color: var(--brown); font-family: var(--font-body); line-height: 1.7;
}
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
a { color: inherit; }
p, h1, h2, h3, figure, blockquote, ol { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.04; }
h1 { margin-bottom: 1.4rem; font-size: clamp(2.8rem, 8vw, 6rem); letter-spacing: -0.035em; }
h2 { margin-bottom: 1.25rem; font-size: clamp(2.3rem, 6vw, 4.6rem); letter-spacing: -0.025em; }
h3 { margin-bottom: 0.65rem; font-size: 1.45rem; }
::selection { background: #df9d7f; color: var(--brown); }
:focus-visible { outline: 3px solid var(--terracotta-dark); outline-offset: 4px; }
.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 1000; padding: 0.75rem 1rem;
  border-radius: 999px; background: var(--olive-dark); color: var(--white); font-weight: 700; text-decoration: none; transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.container { width: min(calc(100% - (var(--gutter) * 2)), var(--container)); margin-inline: auto; }
.section { padding-block: var(--space); }
.eyebrow { margin-bottom: 0.8rem; color: var(--terracotta-dark); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }

.site-header { padding: 1.3rem var(--gutter) 1rem; border-bottom: 1px solid var(--line); background: var(--sand-light); text-align: center; }
.logotype { display: inline-flex; flex-direction: column; align-items: center; color: var(--olive-dark); text-decoration: none; }
.logotype span { font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 2.55rem); line-height: 1; letter-spacing: 0.01em; }
.logotype small { margin-top: 0.38rem; color: var(--terracotta-dark); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.19em; text-transform: uppercase; }
.primary-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1rem; margin-top: 1.15rem; }
.primary-nav a { font-size: 0.67rem; font-weight: 700; text-decoration: none; }
.primary-nav a:hover { color: var(--terracotta-dark); }

.hero { display: grid; min-width: 0; gap: 2.5rem; padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(4rem, 8vw, 7rem); background: var(--sand); }
.hero-copy { align-self: center; min-width: 0; }
.hero-copy > p:not(.eyebrow) { max-width: 35rem; margin-bottom: 1.7rem; color: var(--muted); font-size: 1.04rem; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.button {
  display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; padding: 0.75rem 1.3rem;
  border: 0; border-radius: 999px; font-size: 0.77rem; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer;
}
.button--terracotta { background: var(--terracotta-dark); color: var(--white); }
.button--terracotta:hover { background: var(--terracotta-dark); }
.button--olive { background: var(--olive); color: var(--white); }
.button--olive:hover { background: var(--olive-dark); }
.soft-link { color: var(--olive-dark); font-size: 0.78rem; font-weight: 700; text-underline-offset: 0.35rem; }
.hero-photos { position: relative; width: 100%; min-width: 0; max-width: 39rem; margin-inline: auto; padding-bottom: 16%; }
.photo-card { margin: 0; overflow: hidden; border: 0.45rem solid var(--sand-light); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; }
.photo-card figcaption { padding: 0.7rem 0.85rem; color: var(--olive-dark); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.photo-card--large { width: 82%; }
.photo-card--large img { aspect-ratio: 4 / 3; object-position: 48% 52%; }
.photo-card--small { position: absolute; right: 0; bottom: 0; width: 46%; }
.photo-card--small img { aspect-ratio: 1 / 1.05; object-position: 43% 52%; }
.photo-card--small figcaption { padding: 0.6rem; }

.center-heading { max-width: 46rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.center-heading > p:last-child { margin: 0 auto; color: var(--muted); }
.steps-grid, .homes-grid, .story-grid { display: grid; gap: 1rem; padding: 0; list-style: none; }
.step-card {
  height: 100%; padding: clamp(1.5rem, 4vw, 2.4rem); border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--sand-light); text-align: center;
}
.soft-icon { display: grid; width: 4.2rem; height: 4.2rem; margin: 0 auto 1.4rem; place-items: center; border-radius: 50% 46% 54% 48%; background: #f2d2bd; color: var(--terracotta-dark); }
.soft-icon span { font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.soft-icon--key { background: #dcdcbc; color: var(--olive-dark); transform: rotate(-4deg); }
.soft-icon--key span { transform: rotate(4deg); }
.soft-icon--heart { background: #ead1c8; }
.step-number { margin-bottom: 0.45rem; color: var(--terracotta-dark); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.step-card > p:last-child { margin-bottom: 0; color: var(--muted); font-size: 0.9rem; }

.homes-section { background: #efe0cb; }
.split-heading { display: grid; gap: 0.5rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.split-heading h2 { max-width: 38rem; margin-bottom: 0; }
.split-heading > p { max-width: 34rem; margin-bottom: 0; color: var(--muted); }
.home-card { display: flex; height: 100%; flex-direction: column; overflow: hidden; border-radius: var(--radius); background: var(--sand-light); box-shadow: 0 0.8rem 2rem rgba(83,61,43,0.08); }
.home-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 58% center; }
.home-card > .interior-photo { object-position: 50% 48%; }
.home-card > .golden-photo { object-position: 42% 52%; }
.home-card-body { display: flex; flex: 1; flex-direction: column; padding: 1.35rem; }
.home-location { margin-bottom: 0.35rem; color: var(--terracotta-dark); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.home-specs { margin-bottom: 1.4rem; color: var(--muted); font-size: 0.75rem; }
.home-card-foot { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-top: auto; }
.home-card-foot strong { color: var(--olive-dark); font-size: 0.87rem; }
.home-card-foot a { color: var(--terracotta-dark); font-size: 0.74rem; font-weight: 700; text-underline-offset: 0.25rem; }

.agent-section { background: var(--sand-light); }
.agent-feature { display: grid; align-items: stretch; overflow: hidden; border-radius: calc(var(--radius) * 1.15); background: var(--white); box-shadow: var(--shadow); }
.agent-portrait { position: relative; min-height: 26rem; overflow: hidden; background: #d4c598; }
.portrait-sun { position: absolute; top: 2.5rem; left: 50%; width: 11rem; height: 11rem; border-radius: 50%; background: #eadba9; transform: translateX(-50%); }
.portrait-face { position: absolute; z-index: 2; top: 6.5rem; left: 50%; width: 7.2rem; height: 8.3rem; border-radius: 48% 48% 45% 45%; background: #c98262; transform: translateX(-50%); }
.portrait-hair { position: absolute; z-index: 3; top: 5.2rem; left: 50%; width: 8.5rem; height: 9rem; border-radius: 50% 50% 35% 35%; background: #49352c; transform: translateX(-50%); }
.portrait-face { z-index: 4; clip-path: inset(0 0 0 0 round 48%); }
.portrait-body { position: absolute; z-index: 3; bottom: -3.5rem; left: 50%; width: 18rem; height: 15rem; border-radius: 50% 50% 0 0; background: var(--terracotta); transform: translateX(-50%); }
.agent-portrait > p { position: absolute; z-index: 5; bottom: 1.25rem; left: 1.25rem; margin: 0; color: var(--white); font-family: var(--font-display); font-size: 1.25rem; line-height: 1.15; }
.agent-story { min-width: 0; padding: clamp(1.75rem, 5vw, 4.5rem); }
.agent-story h2 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.agent-story > p { color: var(--muted); }
.agent-story .story-lead { color: var(--brown); font-family: var(--font-display); font-size: clamp(1.25rem, 2.5vw, 1.7rem); line-height: 1.45; }

.stories-section { background: var(--sand); }
.story-grid { align-items: stretch; }
.story-card { display: flex; height: 100%; flex-direction: column; justify-content: space-between; margin: 0; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: var(--radius); background: var(--sand-light); }
.story-card blockquote { margin-bottom: 2rem; color: var(--brown); font-family: var(--font-display); font-size: clamp(1.25rem, 3vw, 1.75rem); line-height: 1.5; }
.story-card figcaption { color: var(--olive-dark); font-size: 0.76rem; font-weight: 700; }
.story-card figcaption span { display: block; margin-top: 0.2rem; color: var(--muted); font-weight: 400; }

.stats-section { padding-block: clamp(3.5rem, 7vw, 6rem); background: var(--olive); color: var(--white); }
.stats-grid { display: grid; gap: 2.25rem; text-align: center; }
.stat strong { font-family: var(--font-display); font-size: clamp(2.8rem, 8vw, 5rem); font-weight: 400; line-height: 1; letter-spacing: -0.04em; }
.stat-unit { color: #e7c5aa; }
.stat p { margin: 0.55rem 0 0; color: #ecebdc; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

.contact-section { background: var(--sand-light); }
.contact-card { width: min(calc(100% - (var(--gutter) * 2)), 58rem); margin-inline: auto; padding: clamp(1.6rem, 5vw, 4rem); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.2); background: var(--sand); box-shadow: var(--shadow); }
.contact-intro { max-width: 41rem; margin: 0 auto 2rem; text-align: center; }
.contact-intro p:last-child { margin-bottom: 0; color: var(--muted); }
.contact-card form { display: grid; gap: 1rem; }
.field-pair { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
label { color: var(--olive-dark); font-size: 0.7rem; font-weight: 700; }
input, textarea { width: 100%; min-width: 0; border: 1px solid #c9b599; border-radius: 0.75rem; background: var(--sand-light); color: var(--brown); padding: 0.75rem 0.85rem; }
textarea { resize: vertical; }
.contact-card form .button { justify-self: center; margin-top: 0.25rem; }
.form-status { min-height: 1.6em; margin: 0; color: #476235; font-size: 0.8rem; text-align: center; }
.contact-direct { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.4rem; margin-top: 1.2rem; }
.contact-direct a { color: var(--terracotta-dark); font-size: 0.76rem; font-weight: 700; overflow-wrap: anywhere; }
.site-footer { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 2rem var(--gutter); border-top: 1px solid var(--line); background: var(--sand-light); text-align: center; }
.logotype--footer span { font-size: 1.7rem; }
.site-footer p { margin: 0; color: var(--muted); font-size: 0.7rem; }

.motion-ready .reveal { opacity: 0; transform: translateY(1.4rem); transition: opacity 650ms ease, transform 650ms ease; transition-delay: calc(var(--delay, 0) * 95ms); }
.motion-ready .reveal.is-visible { opacity: 1; transform: none; }

@media (min-width: 42rem) {
  .hero-actions { flex-direction: row; align-items: center; }
  .steps-grid, .homes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-grid, .field-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat + .stat { border-left: 1px solid rgba(255,255,255,0.24); }
}

@media (min-width: 58rem) {
  .site-header { padding-top: 1.6rem; }
  .primary-nav { gap: 2rem; }
  .hero { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); align-items: center; gap: clamp(3rem, 7vw, 7rem); padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2)); }
  .hero-copy { order: 1; }
  .hero-photos { order: 2; }
  .steps-grid, .homes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split-heading { grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.65fr); align-items: end; }
  .agent-feature { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); }
  .agent-portrait, .agent-story { height: 100%; min-height: 39rem; }
  .agent-story { display: flex; flex-direction: column; justify-content: center; }
  .site-footer { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Standard: back-to-top button with scroll-progress ring */
.btt-button {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 900;
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(17, 17, 17, 0.85); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  display: grid; place-items: center;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.btt-button.btt-visible { opacity: 1; visibility: visible; transform: none; }
.btt-button:focus-visible { outline: 3px solid #c96f4a; outline-offset: 3px; }
.btt-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.btt-ring circle { fill: none; stroke-width: 3; }
.btt-ring-track { stroke: rgba(255, 255, 255, 0.22); }
.btt-ring-fill { stroke: #c96f4a; stroke-dasharray: 125.66; stroke-dashoffset: 125.66; stroke-linecap: round; }
.btt-arrow { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .btt-button { transition: none; } }
