:root {
  --bg: #f3ede3;
  --paper: #fbf8f2;
  --ink: #15233a;
  --muted: #6b7280;
  --accent: #c8643b;
  --line: rgba(21, 35, 58, 0.12);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
em { font-style: italic; color: var(--accent); }

.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--accent); z-index: 60; }
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(20px, 5vw, 72px); color: var(--ink); transition: color 0.6s, background 0.4s, padding 0.4s; }
.nav.dark { color: #f6efe3; }
.nav.solid { background: rgba(243, 237, 227, 0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--ink); padding-block: 14px; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: 0.02em; }
.nav nav { display: flex; gap: 36px; font-size: 14px; font-weight: 600; }
.nav-cta { border: 1.5px solid currentColor; border-radius: 999px; padding: 10px 20px; font-size: 14px; font-weight: 700; }

.hero { height: 330vh; position: relative; }
.hero-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #1b2140; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.win { fill: #3b4a5e; }
#trees circle { fill: #34503d; }
#trees rect { fill: #2a3b2f; }
.hero-copy { position: absolute; left: clamp(20px, 5vw, 72px); top: 22%; width: min(620px, 80vw); }
.band { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; will-change: opacity, transform; transition: color 0.6s; }
.band[data-start="0"] { opacity: 1; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.hero h1, .hero h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(48px, 6.4vw, 100px); line-height: 0.95; letter-spacing: -0.02em; }
.hero.dark .band { color: #f6efe3; }
.hero.dark em { color: #f2a679; }
.sub { margin-top: 18px; font-size: 18px; opacity: 0.8; }
.search { margin-top: 28px; display: flex; gap: 6px; background: #fff; border-radius: 999px; padding: 6px; max-width: 520px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 18px; background: transparent; color: var(--ink); font-size: 15px; }
.search button { border: 0; background: var(--accent); color: #fff; border-radius: 999px; padding: 14px 22px; font-weight: 700; font-size: 14px; white-space: nowrap; }

.section { padding: clamp(80px, 11vw, 150px) clamp(20px, 5vw, 72px); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; }
.section h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(42px, 5.4vw, 80px); line-height: 0.95; letter-spacing: -0.02em; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 600; transition: all 0.3s; }
.filters button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.listings { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.home { background: var(--paper); border-radius: 22px; overflow: hidden; border: 1px solid var(--line); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s; animation: in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes in { from { opacity: 0; transform: translateY(18px); } }
.home:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(21, 35, 58, 0.35); }
.home-art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.home-art svg { width: 100%; height: 100%; display: block; transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.home:hover .home-art svg { transform: scale(1.05); }
.badge { position: absolute; top: 14px; left: 14px; background: rgba(251, 248, 242, 0.92); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; }
.heart { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(251, 248, 242, 0.92); font-size: 18px; line-height: 1; color: var(--muted); transition: transform 0.3s, color 0.3s; }
.heart.on { color: var(--accent); transform: scale(1.12); }
.home-body { padding: 20px 22px 22px; }
.home-body h3 { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.loc { color: var(--muted); font-size: 14px; margin-top: 2px; }
.facts { display: flex; gap: 16px; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--muted); }
.home-price { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }

.calc-sec { background: var(--ink); color: var(--paper); }
.calc-sec em { color: #f2a679; }
.calc { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.ranges { margin-top: 40px; display: grid; gap: 26px; }
.ranges label { display: grid; grid-template-columns: 1fr auto; gap: 10px; font-size: 14px; font-weight: 600; opacity: 0.9; }
.ranges output { font-weight: 800; font-size: 16px; }
.ranges input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); height: 4px; }
.result { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 28px; padding: 36px; display: grid; justify-items: center; text-align: center; }
.donut { width: 220px; height: 220px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 22; }
.d-bg { stroke: #f6efe3; }
.d-int { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.monthly { margin-top: -146px; margin-bottom: 84px; }
.monthly small { display: block; font-size: 12px; opacity: 0.7; }
.monthly strong { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.legend { list-style: none; margin-top: 28px; display: grid; gap: 8px; font-size: 14px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.l1 { background: #f6efe3; } .l2 { background: var(--accent); }
.legend b { margin-left: 6px; }
.note { margin-top: 18px; font-size: 12px; opacity: 0.55; }

.agent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.lead { margin-top: 18px; color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 420px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.form label { display: grid; gap: 8px; font-size: 13px; font-weight: 700; }
.form input, .form textarea { border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: #fff; font-size: 15px; font-weight: 500; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.full { grid-column: 1 / -1; }
.form button { border: 0; background: var(--accent); color: #fff; border-radius: 999px; padding: 16px; font-weight: 800; font-size: 15px; }
.sent { color: var(--accent); font-weight: 700; font-size: 14px; }

.footer { display: flex; justify-content: space-between; gap: 16px; padding: 28px clamp(20px, 5vw, 72px); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer .brand { color: var(--ink); font-size: 24px; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .nav nav { display: none; }
  .nav-cta { padding: 8px 14px; font-size: 13px; }
  .hero-copy { top: 16%; }
  .hero h1, .hero h2 { font-size: 46px; }
  .listings, .calc, .agent-grid { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .hero { height: 100vh; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
