/* Villa Beaux Duin: page components. Loaded after theme.css on every page. */
:root {
  --ink: #1d1b18;
  --ink-soft: #55504a;
  --paper: #f6f2ea;
  --paper-deep: #ebe5d9;
  --forest: #1b3a35;
  --forest-deep: #12282a;
  --sand: #d9c8a9;
  --line: rgba(29,27,24,0.14);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Helvetica Neue', sans-serif;
  --gutter: clamp(20px, 5vw, 80px);
  
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--paper); }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.06; letter-spacing: -0.005em; }
h2 { font-size: clamp(2.3rem, 4.6vw, 4.1rem); }
.label { font-size: 0.76rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 34em; }

.link { display: inline-flex; align-items: center; gap: 10px; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; padding-bottom: 6px; border-bottom: 1px solid currentColor; transition: gap 0.25s ease; }
.link:hover { gap: 16px; }
.btn { display: inline-block; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; padding: 17px 30px; border: 1px solid transparent; transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-line { border-color: rgba(255,255,255,0.6); color: #fff; }
.btn-line:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-forest { background: var(--forest); color: #fff; }
.btn-forest:hover { background: var(--forest-deep); }

/* Hero */
.hero { position: relative; height: 100vh; min-height: 620px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: #0f0d0b; }
.hero-img { position: absolute; inset: 0; animation: settle 2.4s cubic-bezier(0.2,0.6,0.2,1) both; }
.hero-img img { object-position: center 58%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,8,6,0.5) 0%, rgba(10,8,6,0) 26%, rgba(10,8,6,0) 46%, rgba(10,8,6,0.82) 100%); }
.hero-body { position: relative; z-index: 2; width: 100%; padding: 0 var(--gutter) clamp(26px, 4vh, 44px); animation: rise 0.9s ease 0.15s both; }
.hero h1 { font-size: clamp(2.8rem, 7.4vw, 6.8rem); letter-spacing: 0.06em; text-transform: uppercase; margin: 14px 0 10px; }
.hero-tag { font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2vw, 1.7rem); opacity: 0.92; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.facts { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 18px 28px; margin-top: clamp(28px, 5vh, 52px); padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.28); }
.fact-value { font-family: var(--serif); font-size: clamp(1.4rem, 2.1vw, 1.95rem); line-height: 1.1; white-space: nowrap; }
.fact-name { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.72; margin-top: 6px; }
@keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Statement */
.statement { padding: clamp(80px, 13vh, 150px) var(--gutter); max-width: 1180px; }
.statement p.big { font-family: var(--serif); font-size: clamp(1.7rem, 3.3vw, 2.9rem); line-height: 1.22; margin-top: 22px; }
.statement .lead { margin-top: 28px; }

/* Split feature */
.split { display: grid; grid-template-columns: 1.55fr 1fr; align-items: center; gap: clamp(28px, 5vw, 84px); padding: 0 var(--gutter) clamp(80px, 13vh, 150px) 0; }
.split.flip { grid-template-columns: 1fr 1.55fr; padding: 0 0 clamp(80px, 13vh, 150px) var(--gutter); }
.split.flip .split-media { order: 2; }
.split-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-deep); }
.split-text h2 { margin: 16px 0 22px; }
.split-text .link { margin-top: 30px; }
.label.forest { color: var(--forest); }

/* Full-bleed feature */
.bleed { position: relative; height: min(92vh, 900px); min-height: 520px; color: #fff; display: flex; align-items: flex-end; overflow: hidden; background: #0f0d0b; }
.bleed > img { position: absolute; inset: 0; }
.bleed::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,8,6,0) 40%, rgba(10,8,6,0.8) 100%); }
.bleed-body { position: relative; z-index: 2; padding: 0 var(--gutter) clamp(36px, 7vh, 72px); max-width: 900px; }
.bleed-body h2 { margin: 14px 0 16px; }
.bleed-body p { font-size: 1.08rem; opacity: 0.9; max-width: 32em; }

/* Pool: full image, never cropped */
.pool > img { width: 100%; height: auto; aspect-ratio: 3 / 2; max-height: 96vh; object-position: center 70%; }
.pool-text { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 84px); align-items: end; padding: clamp(36px, 6vh, 64px) var(--gutter) 0; }
.pool-text h2 { margin-top: 16px; }

/* Wellness */
.wellness { padding: clamp(80px, 13vh, 150px) var(--gutter); }
.wellness-head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 84px); align-items: end; margin-bottom: clamp(36px, 6vh, 64px); }
.wellness-head h2 { margin-top: 16px; }
.wellness-grid { display: grid; grid-template-columns: 2.1fr 1fr 1fr; gap: clamp(10px, 1.2vw, 18px); height: clamp(300px, 42vw, 620px); }
.wellness-grid figure { position: relative; overflow: hidden; background: var(--paper-deep); }
.wellness-grid figcaption { position: absolute; left: 18px; bottom: 16px; color: #fff; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; text-shadow: 0 1px 12px rgba(0,0,0,0.6); }

/* Numbers */
.numbers { background: var(--forest-deep); color: #fff; padding: clamp(80px, 13vh, 140px) var(--gutter); }
.numbers-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
.numbers-head h2 { margin-top: 16px; max-width: 13em; }
.numbers .label { color: var(--sand); }
.numbers-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px clamp(24px, 4vw, 64px); margin-top: clamp(48px, 8vh, 84px); padding-top: clamp(32px, 5vh, 52px); border-top: 1px solid rgba(255,255,255,0.2); }
.num { font-family: var(--serif); font-size: clamp(2.5rem, 4.6vw, 4.3rem); line-height: 1; color: var(--sand); white-space: nowrap; }
.num-name { font-size: 0.76rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; margin: 16px 0 8px; }
.num-note { font-size: 0.95rem; opacity: 0.74; line-height: 1.55; }
.numbers-foot { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: clamp(40px, 7vh, 72px); }
.small-print { font-size: 0.82rem; opacity: 0.6; margin-top: 26px; max-width: 46em; }

/* Location */
.times { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 18px 28px; margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.28); }
.location { height: auto; min-height: min(92vh, 900px); padding-top: 160px; }
.location::after { background: linear-gradient(180deg, rgba(10,8,6,0.1) 0%, rgba(10,8,6,0.5) 42%, rgba(10,8,6,0.9) 100%); }
.location .bleed-body { max-width: none; width: 100%; }
.location .bleed-body p { max-width: 34em; }
.location .link { margin-top: 30px; }

/* Team */
.team { padding: clamp(80px, 13vh, 150px) var(--gutter); }
.team-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px clamp(24px, 4vw, 64px); margin-top: clamp(36px, 6vh, 60px); }
.team-list div { border-top: 1px solid var(--line); padding-top: 22px; }
.team-list h3 { font-size: clamp(1.6rem, 2.3vw, 2.1rem); margin: 10px 0 12px; }
.team-list p { font-size: 0.98rem; color: var(--ink-soft); }

/* Closing */
.closing { position: relative; color: #fff; text-align: center; padding: clamp(100px, 18vh, 190px) var(--gutter); overflow: hidden; background: #0f0d0b; }
.closing > img { position: absolute; inset: 0; opacity: 0.42; }
.closing-body { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.closing h2 { margin: 16px 0 20px; }
.closing p { font-size: 1.08rem; opacity: 0.9; }
.closing .btn { margin-top: 34px; }
.closing-phone { display: block; margin-top: 18px; font-size: 0.88rem; opacity: 0.75; letter-spacing: 0.06em; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s ease, transform 0.9s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 1020px) {
  .split, .split.flip { grid-template-columns: 1fr; padding: 0 0 clamp(64px, 10vh, 100px); gap: 28px; }
  .split.flip .split-media { order: 0; }
  .split-text { padding: 0 var(--gutter); }
  .wellness-head, .pool-text { grid-template-columns: 1fr; }
  .numbers-row { grid-template-columns: 1fr 1fr; }
  .team-list { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .facts, .times { grid-template-columns: 1fr 1fr; justify-content: start; }
  .facts > :first-child { grid-column: 1 / -1; }
  .wellness-grid { grid-template-columns: 1fr 1fr; height: auto; }
  .wellness-grid figure { aspect-ratio: 4 / 5; }
  .wellness-grid figure:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
  .bleed { height: 78vh; }
  .location { height: auto; }
}
@media (max-width: 480px) {
  .numbers-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-img, .hero-body { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ─── Inner page banner ─── */
.banner { position: relative; height: min(72vh, 700px); min-height: 460px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: #0f0d0b; }
.banner > img { position: absolute; inset: 0; animation: settle 2.4s cubic-bezier(0.2,0.6,0.2,1) both; }
.banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,8,6,0.55) 0%, rgba(10,8,6,0.05) 30%, rgba(10,8,6,0.1) 45%, rgba(10,8,6,0.85) 100%); }
.banner-body { position: relative; z-index: 2; width: 100%; padding: 0 var(--gutter) clamp(34px, 6vh, 60px); animation: rise 0.9s ease 0.15s both; }
.banner h1 { font-size: clamp(2.6rem, 6vw, 5.4rem); margin: 14px 0 12px; max-width: 14em; }
.banner .hero-tag { max-width: 30em; }
.hero.hero-short { height: min(86vh, 820px); }

/* ─── Generic blocks ─── */
.block { padding: clamp(80px, 13vh, 150px) var(--gutter); }
.block.deep { background: var(--paper-deep); }
.block.dark { background: var(--forest-deep); color: #fff; }
.block.dark .label { color: var(--sand); }
.block.dark .lead { color: rgba(255,255,255,0.8); }
.block.tight-top { padding-top: 0; }
.head-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 84px); align-items: end; margin-bottom: clamp(36px, 6vh, 64px); }
.head-row h2 { margin-top: 16px; }
.split + .split, .split + .block.plain { margin-top: 0; }
.split.first { padding-top: clamp(80px, 13vh, 150px); }
.checks { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 30px; font-size: 1rem; color: var(--ink); }
.checks li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 16px; height: 1px; background: var(--forest); }
.note { font-size: 0.84rem; color: var(--ink-soft); margin-top: 22px; max-width: 46em; }
.block.dark .note { color: rgba(255,255,255,0.6); }

/* Columns separated by a fine line */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px clamp(24px, 4vw, 64px); }
.cols.four { grid-template-columns: repeat(4, 1fr); }
.cols.two { grid-template-columns: repeat(2, 1fr); }
.cols > div { border-top: 1px solid var(--line); padding-top: 22px; }
.block.dark .cols > div { border-top-color: rgba(255,255,255,0.22); }
.cols h3 { font-size: clamp(1.6rem, 2.3vw, 2.1rem); margin: 10px 0 12px; }
.cols p { font-size: 0.98rem; color: var(--ink-soft); }
.block.dark .cols p { color: rgba(255,255,255,0.76); }
.cols .featured-tag { display: inline-block; background: var(--forest); color: #fff; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 10px; margin-bottom: 4px; }
.block.dark .num { margin-top: 2px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); font-size: 1rem; vertical-align: top; }
.table th { font-size: 0.74rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.table td:first-child { font-size: 0.74rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); width: 34%; padding-top: 22px; }
.table.figures td:not(:first-child) { font-family: var(--serif); font-size: 1.5rem; }
.table.figures tr.strong td:not(:first-child) { color: var(--forest); }
.table.costs td:last-child { text-align: right; font-family: var(--serif); font-size: 1.4rem; width: 20%; }
.table.costs td:first-child { text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 400; color: var(--ink); width: auto; padding-top: 18px; }
.block.dark .table th, .block.dark .table td { border-bottom-color: rgba(255,255,255,0.2); }
.block.dark .table th, .block.dark .table td:first-child { color: var(--sand); }
.block.dark .table.figures tr.strong td:not(:first-child) { color: var(--sand); }
.two-up { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(28px, 6vw, 110px); align-items: start; }
.two-up h2 { margin: 16px 0 22px; }

/* ─── Gallery (tabs + slider, driven by main.js) ─── */
.gallery { padding: clamp(40px, 7vh, 72px) var(--gutter) clamp(80px, 13vh, 150px); }
.gallery-tabs { display: flex; gap: clamp(18px, 2.4vw, 36px); border-bottom: 1px solid var(--line); margin: 18px 0 24px; overflow-x: auto; }
.gallery-tab { font: inherit; font-size: 0.76rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; padding: 14px 0; background: none; border: 0; color: var(--ink-soft); cursor: pointer; }
.gallery-tab.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--forest); }
.slider { position: relative; overflow: hidden; aspect-ratio: 3 / 2; max-height: 88vh; margin: 0 auto; background: var(--paper-deep); transition: aspect-ratio 0.45s ease; }
.slider-track { display: flex; height: 100%; transition: transform 0.5s ease; }
.slider-img { flex: 0 0 100%; width: 100%; min-width: 0; height: 100%; object-fit: cover; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(15,13,11,0.5); color: #fff; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s ease; }
.slider-btn:hover { background: rgba(15,13,11,0.8); }
.slider-btn--prev { left: 18px; }
.slider-btn--next { right: 18px; }
.slider-counter { position: absolute; right: 18px; bottom: 16px; z-index: 2; background: rgba(15,13,11,0.5); color: #fff; font-size: 0.78rem; letter-spacing: 0.1em; padding: 5px 12px; border-radius: 20px; }
.gallery-duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.2vw, 18px); margin-top: clamp(10px, 1.2vw, 18px); }
.gallery-duo img { aspect-ratio: 4 / 3; }

/* Floor plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 36px); align-items: start; }
.plans figure { background: #fff; padding: 14px; }
.plans img { height: auto; object-fit: contain; }
.plans figcaption { font-size: 0.74rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); padding: 14px 4px 4px; }

/* Map */
.map svg { display: block; width: 100%; height: auto; }

/* Places list */
.places { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(28px, 5vw, 84px); }
.places > div { border-top: 1px solid var(--line); padding: 28px 0 36px; }
.places h3 { font-size: clamp(1.7rem, 2.5vw, 2.3rem); margin: 8px 0 12px; }
.places p { color: var(--ink-soft); font-size: 1rem; }

/* ─── ROI simulator ─── */
.sim { max-width: 980px; margin: 0 auto; }
.preset-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }
.preset-btn { flex: 1; font: inherit; font-size: 0.76rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; padding: 16px 20px; background: none; border: 1px solid var(--line); color: var(--ink-soft); cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.preset-btn.active, .preset-btn:hover { background: var(--forest); border-color: var(--forest); color: #fff; }
.sim-slider-group { margin-bottom: 40px; }
.sim-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.sim-label-text { font-size: 0.76rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.sim-label-value { font-family: var(--serif); font-size: 2rem; line-height: 1; }
.sim-range { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.8rem; color: var(--ink-soft); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; background: rgba(29,27,24,0.25); outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--forest); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--forest); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--forest); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--forest); }
.sim-outputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px clamp(24px, 4vw, 64px); margin-top: 56px; }
.sim-output { border-top: 1px solid var(--line); padding-top: 22px; }
.sim-output-value { font-family: var(--serif); font-size: clamp(2.8rem, 5.4vw, 4.8rem); line-height: 1; color: var(--forest); }
.sim-output-label { font-size: 0.76rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 14px; }
.formula { font-family: var(--serif); font-size: 1.35rem; line-height: 1.7; margin-top: 22px; }

/* Founder */
.founder { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(28px, 6vw, 110px); align-items: start; }
.founder-name { font-family: var(--serif); font-size: clamp(3rem, 6vw, 5.4rem); line-height: 1; margin-top: 14px; }
.founder p + p { margin-top: 1.1em; }

/* Contact */
.closing.full { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.closing.full h1 { font-size: clamp(2.8rem, 6.4vw, 5.6rem); margin: 16px 0 20px; }

@media (max-width: 1020px) {
  .head-row, .two-up, .founder { grid-template-columns: 1fr; }
  .cols, .cols.four { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .places { grid-template-columns: 1fr; }
  .split.first { padding-top: 0; }
}
@media (max-width: 720px) {
  .cols, .cols.four, .cols.two { grid-template-columns: 1fr; }
  .sim-outputs { grid-template-columns: 1fr; }
  .banner { height: 64vh; }
  .table td:first-child { width: 40%; }
  .slider-btn { width: 42px; height: 42px; }
  .gallery-duo { grid-template-columns: 1fr; }
  .table.figures td:not(:first-child) { font-size: 1.15rem; }
  .table th, .table td { padding-right: 8px; }
}
@media (max-width: 720px) {
  .table.figures { table-layout: fixed; }
  .table.figures th { font-size: 0.58rem; letter-spacing: 0.04em; }
  .table.figures td:first-child { width: 27%; font-size: 0.62rem; letter-spacing: 0.06em; }
}
