/* =========================================================
   Bellford Estates — Luxury Real Estate HTML Template
   Version 1.0
   ---------------------------------------------------------
   1.  Fonts & design tokens
   2.  Base
   3.  Layout helpers & type
   4.  Buttons & links
   5.  Header & menu
   6.  Hero
   7.  Property cards & home sections
   8.  Listing & filters
   9.  Property detail & gallery
   10. Projects, about & journal
   11. Contact & forms
   12. Footer
   13. Motion
   14. Responsive
   ========================================================= */

/* 1. Fonts & design tokens
   Change the look of the whole template here. */
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }

:root {
  --color-paper: #edeae4;     /* page background */
  --color-card: #f4f1ec;      /* cards and forms */
  --color-stone: #e3ded6;     /* alternate bands, footer */
  --color-ink: #262421;       /* headings, dark band, buttons */
  --color-text: #46423d;      /* body text */
  --color-muted: #6a655d;     /* secondary text */
  --color-light: #f4f1ec;     /* text on dark */
  --color-light-muted: #b3ada3;
  --line: rgba(38, 36, 33, .14);
  --line-strong: rgba(38, 36, 33, .34);

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 4.4vw, 64px);
  --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  --section: clamp(72px, 8.5vw, 124px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-text);
  font: 400 1rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; color: var(--color-ink); margin: 0; text-wrap: balance; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 4px; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 12px 18px; background: var(--color-ink); color: var(--color-light); text-decoration: none; }
.skip-link:focus { top: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.muted { color: var(--color-muted); }

/* 3. Layout helpers & type */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--flush-top { padding-top: 0; }
.section--tight-top { padding-top: clamp(28px, 3vw, 44px); }
.section--stone { background: var(--color-stone); }

.display { font-size: clamp(2.5rem, 4.3vw, 3.9rem); line-height: 1.12; letter-spacing: -.012em; font-variation-settings: "opsz" 60; }
.display--page { font-size: clamp(2.4rem, 4vw, 3.5rem); }
.display--post { font-size: clamp(2.2rem, 3.6vw, 3.2rem); }
.title { font-size: clamp(1.7rem, 2.5vw, 2.25rem); line-height: 1.2; letter-spacing: -.005em; font-variation-settings: "opsz" 48; }
.label { font: 500 .68rem/1.4 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--color-muted); margin-bottom: 1rem; }

.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(36px, 4vw, 56px); }
.section-head .title { max-width: 20ch; }
.section-head__side p { max-width: 26rem; margin-bottom: 1.4rem; }

.page-intro { padding-bottom: clamp(32px, 4vw, 52px); }
.page-intro__text { max-width: 30rem; margin-top: 1.2rem; }

/* 4. Buttons & links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 13px 26px;
  background: transparent; color: var(--color-ink);
  border: 1px solid var(--line-strong); border-radius: 0;
  font: 500 .7rem/1.2 var(--font-body); letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-light); transform: translateY(-2px); }
.btn--small { min-height: 40px; padding: 9px 18px; font-size: .66rem; }
.btn--solid { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-light); }
.btn--solid:hover { background: #3d3a35; border-color: #3d3a35; }
.btn--light { border-color: rgba(244, 241, 236, .6); color: var(--color-light); }
.btn--light:hover { background: var(--color-light); border-color: var(--color-light); color: var(--color-ink); }
.btn--block { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 2rem; }

/* Text link: a fine line that grows wider on hover */
.text-link, .more-link {
  display: inline-block; padding-bottom: 8px;
  font: 500 .68rem/1.3 var(--font-body); letter-spacing: .18em; text-transform: uppercase;
  color: var(--color-ink); text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / calc(100% + 14px) 1px no-repeat;
  transition: background-size .4s var(--ease);
}
.text-link:hover, .more-link:hover { background-size: calc(100% + 40px) 1px; }
.more-link { padding-bottom: 5px; background-size: 100% 1px; }
.more-link:hover { background-size: 0 1px; background-position: right bottom; }
.back-link { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font: 500 .66rem/1.4 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--color-muted); text-decoration: none; }
.back-link:hover { color: var(--color-ink); }
.back-link svg { transition: transform .3s var(--ease); }
.back-link:hover svg { transform: translateX(-4px); }

/* 5. Header & menu */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--color-paper); transition: box-shadow .3s var(--ease); }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; min-height: 84px; }
.logo { display: inline-flex; flex-direction: column; align-items: center; justify-self: start; color: var(--color-ink); text-decoration: none; line-height: 1; }
.logo__name { font: 400 1.32rem/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; margin-right: -.16em; }
.logo__tag { font: 500 .58rem/1 var(--font-body); letter-spacing: .42em; text-transform: uppercase; margin: 6px -.42em 0 0; }
.main-nav ul { display: flex; gap: clamp(22px, 3vw, 44px); }
.main-nav a {
  position: relative; display: inline-block; padding: 8px 0;
  font: 500 .68rem/1.2 var(--font-body); letter-spacing: .18em; text-transform: uppercase;
  color: var(--color-ink); text-decoration: none;
}
.main-nav a::after { content: ""; position: absolute; left: 0; right: .18em; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.header-cta { justify-self: end; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 46px; height: 46px; margin-right: -10px; justify-self: end; background: none; border: 0; color: var(--color-ink); cursor: pointer; padding: 0; }
.menu-toggle svg line { transition: transform .35s var(--ease); }
.menu-toggle:hover svg line:nth-child(2) { transform: translateX(-6px); }

.menu-panel { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: flex-end; visibility: hidden; pointer-events: none; }
.menu-panel.is-open { visibility: visible; pointer-events: auto; }
.menu-panel__backdrop { position: absolute; inset: 0; background: rgba(38, 36, 33, .4); opacity: 0; transition: opacity .35s var(--ease); }
.menu-panel.is-open .menu-panel__backdrop { opacity: 1; }
.menu-panel__inner {
  position: relative; width: min(420px, 100%); height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; gap: 40px; padding: 18px var(--gutter) 36px;
  background: var(--color-paper); transform: translateX(100%); transition: transform .45s var(--ease);
}
.menu-panel.is-open .menu-panel__inner { transform: none; }
.menu-panel__top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.menu-close { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; margin-right: -12px; background: none; border: 0; color: var(--color-ink); cursor: pointer; transition: transform .35s var(--ease); }
.menu-close:hover { transform: rotate(90deg); }
.menu-panel nav a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); font: 400 1.6rem/1.2 var(--font-display); color: var(--color-ink); text-decoration: none; transition: padding-left .3s var(--ease); }
.menu-panel nav a:hover, .menu-panel nav a[aria-current="page"] { padding-left: 8px; }
.menu-panel__meta { margin-top: auto; display: grid; gap: 16px; }
.menu-panel__meta a { text-decoration: none; }
body.is-locked { overflow: hidden; }

.socials { display: flex; gap: 4px; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; color: var(--color-ink); transition: transform .3s var(--ease); }
.socials a:hover { transform: translateY(-2px); }

/* 6. Hero: the photo forms an L around the heading */
.hero { position: relative; min-height: clamp(560px, 84vh, 800px); }
.hero__media {
  position: absolute; inset: 0; overflow: hidden; background: var(--color-stone);
  clip-path: polygon(44% 0, 100% 0, 100% 100%, 0 100%, 0 72%, 44% 72%);
}
.hero__slide { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 1.4s var(--ease); }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 55%; }
.hero__caption {
  position: absolute; left: var(--edge); bottom: 26px; z-index: 2; display: flex; align-items: center; gap: 18px;
  color: var(--color-light); text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}
.hero__media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; z-index: 1; pointer-events: none; background: linear-gradient(0deg, rgba(20, 19, 17, .45), rgba(20, 19, 17, 0)); }
.counter { margin: 0; font: 500 .7rem/1 var(--font-body); letter-spacing: .2em; white-space: nowrap; }
.hero__project { margin: 0; font: 500 .66rem/1.3 var(--font-body); letter-spacing: .18em; text-transform: uppercase; }
.hero__place { opacity: .75; margin-left: 6px; }
.slideshow-toggle { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; background: none; border: 1px solid rgba(244, 241, 236, .5); color: inherit; cursor: pointer; transition: border-color .25s var(--ease); }
.slideshow-toggle:hover { border-color: var(--color-light); }
.slideshow-toggle .icon-play, .slideshow-toggle[aria-pressed="true"] .icon-pause { display: none; }
.slideshow-toggle[aria-pressed="true"] .icon-play { display: block; }
.hero__inner { position: relative; z-index: 1; }
.hero__content { max-width: calc(44vw - var(--gutter) - 24px); padding-top: clamp(56px, 9vh, 110px); }
.hero__content .display { font-size: clamp(2.3rem, 3.4vw, 3.2rem); margin-bottom: 2.2rem; }

/* 7. Property cards & home sections */
.property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.property { display: flex; flex-direction: column; background: var(--color-card); border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.property:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -32px rgba(38, 36, 33, .8); }
.property__media { position: relative; overflow: hidden; aspect-ratio: 4 / 4.6; background: var(--color-stone); }
.property__media > a, .property__media img { display: block; width: 100%; height: 100%; }
.property__media img { object-fit: cover; transition: transform 1.1s var(--ease); }
.property:hover .property__media img { transform: scale(1.05); }
.property__body { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 16px; }
.property__type { font: 500 .62rem/1.4 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--color-muted); margin-bottom: .5rem; }
.property__name { font-size: 1.3rem; line-height: 1.2; letter-spacing: .06em; text-transform: uppercase; }
.property__name a { text-decoration: none; }
.property__name a::after { content: ""; position: absolute; inset: 0; } /* the whole card is clickable */
.property { position: relative; }
.property__place { margin: .35rem 0 0; font: 500 .62rem/1.4 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--color-muted); }
.property__meta { display: flex; align-items: center; gap: 24px; margin: auto 0 0; padding-top: 18px; font-size: .9rem; color: var(--color-ink); }
.property__price { font-weight: 500; }
.arrow-icon { margin-left: auto; transition: transform .35s var(--ease); }
.property:hover .arrow-icon { transform: translateX(5px); }

.fav {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(244, 241, 236, .92); border: 0; border-radius: 50%; color: var(--color-ink); cursor: pointer;
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.fav:hover { transform: scale(1.08); }
.fav[aria-pressed="true"] svg { fill: var(--color-ink); }
.fav.is-popping svg { animation: pop .45s var(--ease); }

.vision { display: grid; grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); background: var(--color-stone); }
.vision__text { align-self: center; padding: clamp(56px, 6vw, 96px) clamp(32px, 4.5vw, 72px) clamp(56px, 6vw, 96px) var(--edge); }
.vision__text .title { margin-bottom: 1.4rem; }
.vision__text p { max-width: 24rem; margin-bottom: 2rem; }
.vision__media { position: relative; min-height: clamp(420px, 42vw, 620px); overflow: hidden; }
.vision__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vision--reverse .vision__text { order: 2; padding: clamp(56px, 6vw, 96px) var(--edge) clamp(56px, 6vw, 96px) clamp(32px, 4.5vw, 72px); }
.vision--reverse { grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); background: var(--color-paper); }

.teasers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.teaser { display: grid; color: var(--color-ink); text-decoration: none; }
.teaser__media { display: block; overflow: hidden; aspect-ratio: 16 / 11; background: var(--color-stone); margin-bottom: 16px; }
.teaser__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.teaser:hover .teaser__media img { transform: scale(1.05); }
.teaser__status { font: 500 .62rem/1.4 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--color-muted); }
.teaser__name { font: 400 1.3rem/1.25 var(--font-display); margin: .3rem 0 .1rem; }
.teaser:hover .teaser__name { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.teaser__place { font-size: .92rem; color: var(--color-muted); }

.valuation { background: var(--color-ink); color: var(--color-light-muted); padding-block: clamp(48px, 6vw, 80px); }
.valuation__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.valuation .title { color: var(--color-light); margin-bottom: .4rem; }
.valuation p { margin: 0; }

.stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 4vw, 56px) clamp(20px, 2.4vw, 32px); }
.story { display: flex; flex-direction: column; align-items: flex-start; }
.story__media { display: block; width: 100%; overflow: hidden; aspect-ratio: 4 / 3; background: var(--color-stone); margin-bottom: 16px; }
.story__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.story:hover .story__media img { transform: scale(1.05); }
.story__meta { font: 500 .62rem/1.4 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--color-muted); margin-bottom: .5rem; }
.story__meta a { text-decoration: none; }
.story__meta a:hover { color: var(--color-ink); }
.story__title { font-size: 1.3rem; line-height: 1.3; margin-bottom: 1rem; }
.story__title a { text-decoration: none; }
.story__title a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* 8. Listing & filters */
.filter-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 16px 24px; align-items: end; padding: 22px 0; border-block: 1px solid var(--line); }
.filter-field { display: grid; gap: 4px; min-width: 0; }
.filter-field label { font: 500 .62rem/1.4 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--color-muted); }
.reset-link { padding: 12px 0; background: none; border: 0; cursor: pointer; font: 500 .66rem/1.2 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--color-ink); text-decoration: underline; text-underline-offset: 5px; }
.reset-link:hover { color: var(--color-muted); }
.listing .property__media { aspect-ratio: 4 / 3.5; }
.listing__count { margin: 22px 0 26px; font: 500 .66rem/1.4 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--color-muted); }
.listing .property.is-hidden, .listing .property.is-later { display: none; }
.listing__empty { padding: 48px 0; text-align: center; }
.listing__empty p { font: 400 1.3rem/1.4 var(--font-display); color: var(--color-ink); }
.listing__more { display: flex; justify-content: center; margin-top: clamp(36px, 4vw, 56px); }
.listing__more[hidden] { display: none; }

.select, .input, .textarea {
  width: 100%; min-height: 46px; padding: 10px 0;
  background-color: transparent; color: var(--color-ink);
  border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  font: 400 .98rem/1.4 var(--font-body);
  transition: border-color .25s var(--ease);
}
.select { -webkit-appearance: none; appearance: none; padding-right: 28px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23262421' stroke-width='1.3'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; }
.select:hover, .input:hover, .textarea:hover { border-color: var(--color-ink); }
.select:focus, .input:focus, .textarea:focus { outline: none; border-color: var(--color-ink); box-shadow: 0 1px 0 var(--color-ink); }

/* 9. Property detail & gallery */
.gallery__stage { position: relative; overflow: hidden; aspect-ratio: 16 / 8; background: var(--color-stone); }
.gallery__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease); }
.gallery__slide.is-active { opacity: 1; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__open { position: absolute; inset: 0; z-index: 1; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery__bar { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 14px 0; }
.gallery__arrow { width: 44px; height: 40px; display: grid; place-items: center; padding: 0; background: none; border: 0; color: var(--color-ink); cursor: pointer; transition: transform .3s var(--ease); }
.gallery__arrow[data-prev]:hover { transform: translateX(-4px); }
.gallery__arrow[data-next]:hover { transform: translateX(4px); }
.gallery__thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.gallery__thumb { padding: 0; border: 0; background: var(--color-stone); cursor: pointer; overflow: hidden; aspect-ratio: 16 / 10; opacity: .6; outline-offset: 3px; transition: opacity .3s var(--ease); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover, .gallery__thumb.is-active { opacity: 1; }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: clamp(36px, 6vw, 96px); align-items: start; margin-top: clamp(40px, 5vw, 64px); }
.detail__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.detail__name { font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.1; letter-spacing: .05em; text-transform: uppercase; }
.detail__price { margin: 0; font: 400 clamp(1.5rem, 2.4vw, 2rem)/1.1 var(--font-display); color: var(--color-ink); text-align: right; }
.detail__price span { display: block; margin-top: 6px; font: 400 .8rem/1.4 var(--font-body); color: var(--color-muted); }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 26px 0; border-bottom: 1px solid var(--line); }
.specs div { display: flex; flex-direction: column-reverse; gap: 4px; }
.specs dd { font: 400 1.5rem/1.1 var(--font-display); color: var(--color-ink); }
.specs dt { font-size: .82rem; color: var(--color-muted); }
.detail__text { padding-top: 28px; max-width: 38rem; }
.detail__sub { font-size: 1.4rem; margin: 2.4rem 0 1rem; }
.features { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; border-top: 1px solid var(--line); }
.features div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.features dt { font-size: .85rem; color: var(--color-muted); }
.features dd { color: var(--color-ink); }
.interest { position: sticky; top: 108px; padding: clamp(26px, 3vw, 36px); background: var(--color-stone); }
.interest__title { font: 500 .7rem/1.4 var(--font-body); letter-spacing: .2em; text-transform: uppercase; margin-bottom: .8rem; }
.interest .contact-list { margin: 1.4rem 0 1.6rem; }

.lightbox { width: min(1180px, 94vw); max-width: none; max-height: 94vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(24, 23, 21, .95); }
.lightbox img { width: 100%; max-height: 84vh; object-fit: contain; }
.lightbox__arrow { position: absolute; bottom: -52px; width: 48px; height: 40px; display: grid; place-items: center; padding: 0; background: none; border: 0; color: var(--color-light); cursor: pointer; }
.lightbox__prev { left: 0; }
.lightbox__next { right: 0; }
.lightbox__close { position: absolute; top: -54px; right: -6px; margin: 0; color: var(--color-light); }

/* 10. Projects, about & journal */
.page-split__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.page-split--reverse .page-split__inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.page-split__text > p { max-width: 26rem; margin: 1.4rem 0 2rem; }
.page-split__media { display: block; position: relative; overflow: hidden; aspect-ratio: 16 / 10.5; background: var(--color-stone); }
.page-split__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.featured { color: var(--color-light); text-decoration: none; }
.featured::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 19, 17, .55), rgba(20, 19, 17, 0) 50%); }
.featured__title { position: absolute; left: 24px; right: 24px; bottom: 20px; z-index: 1; font: 400 clamp(1.2rem, 1.8vw, 1.6rem)/1.3 var(--font-display); }
.featured:hover img { transform: scale(1.04); }

.projects { display: grid; }
.project { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr) auto; gap: 20px clamp(24px, 4vw, 56px); align-items: start; padding: 28px 0; border-bottom: 1px solid var(--line); }
.project:first-child { border-top: 1px solid var(--line); }
.project__media { overflow: hidden; aspect-ratio: 16 / 10; background: var(--color-stone); }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.project:hover .project__media img { transform: scale(1.05); }
.project__name { font-size: 1.35rem; line-height: 1.2; letter-spacing: .06em; text-transform: uppercase; }
.project__body > p:not(.property__place) { max-width: 30rem; margin: 1rem 0 1.4rem; }
.badge { margin: 0; padding: 7px 12px; background: var(--color-stone); font: 500 .62rem/1.3 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--color-ink); white-space: nowrap; }

.values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); }
.value { padding-top: 22px; border-top: 1px solid var(--line-strong); }
.value__icon { display: inline-block; color: var(--color-ink); margin-bottom: 14px; }
.value h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.value p { font-size: .95rem; }
.numbers { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 32px; margin-top: 2rem; }
.numbers div { display: flex; flex-direction: column-reverse; gap: 4px; }
.numbers dd { font: 400 clamp(2rem, 3vw, 2.6rem)/1 var(--font-display); color: var(--color-ink); }
.numbers dt { font-size: .85rem; color: var(--color-muted); }

.post__head { max-width: calc(44rem + 2 * var(--gutter)); padding-top: clamp(48px, 6vw, 88px); }
.post__lead { margin-top: 1rem; font: 400 clamp(1.15rem, 1.6vw, 1.35rem)/1.5 var(--font-display); color: var(--color-muted); }
.post__hero { margin-block: clamp(28px, 4vw, 48px); }
.post__hero img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; background: var(--color-stone); }
.post__body { max-width: 42rem; margin-inline: auto; padding-bottom: var(--section); }
.post__body > p { font-size: 1.06rem; line-height: 1.85; }
.post__body h2 { font-size: clamp(1.4rem, 2vw, 1.7rem); margin: 2.4rem 0 .9rem; }
.post__body figure { margin: 2.6rem 0; }
.post__body figcaption { margin-top: 10px; font-size: .9rem; color: var(--color-muted); }
.post__body--left { margin-inline: 0; padding-bottom: 0; margin-top: 2rem; }
.pullquote { margin: 2.6rem 0; padding-left: 26px; border-left: 1px solid var(--color-ink); }
.pullquote p { font: 400 clamp(1.4rem, 2.2vw, 1.75rem)/1.4 var(--font-display); color: var(--color-ink); }
.post__credits { margin-top: 2.4rem; padding-top: 18px; border-top: 1px solid var(--line); font-size: .95rem !important; color: var(--color-muted); }
.post__credits a { color: var(--color-ink); }
.notfound { min-height: 56vh; }

/* 11. Contact & forms */
.contact__inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.contact__intro > p { max-width: 24rem; margin: 1.4rem 0 0; }
.contact-list { display: grid; gap: 14px; margin-top: 2.2rem; }
.contact-item { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; color: var(--color-ink); }
.contact-item__icon { padding-top: 2px; }
.contact-item a { text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.contact-item a:hover { background-size: 100% 1px; }
.contact__form { padding: clamp(28px, 4vw, 44px); background: var(--color-card); border: 1px solid var(--line); scroll-margin-top: 110px; }
.contact__visual { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(16px, 2vw, 24px); margin-top: clamp(40px, 5vw, 72px); }
.contact__map, .contact__photo { overflow: hidden; aspect-ratio: 16 / 11; background: var(--color-stone); }
.contact__photo { aspect-ratio: auto; }
.map-art { display: block; width: 100%; height: 100%; }
.contact__photo img { width: 100%; height: 100%; object-fit: cover; }

.form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font: 500 .62rem/1.4 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--color-muted); }
.field .optional { text-transform: none; letter-spacing: 0; }
.textarea { min-height: 140px; resize: vertical; }
.form-note { margin: 0; font-size: .88rem; color: var(--color-muted); }
.form-note a { color: var(--color-ink); }
.form-status { display: none; margin: 0; padding: 14px 16px; border: 1px solid var(--color-ink); color: var(--color-ink); font-size: .95rem; }
.form-status.is-visible { display: block; }

/* 12. Footer */
.site-footer { background: var(--color-stone); font-size: .92rem; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 36px; padding-block: clamp(48px, 5vw, 72px); }
.footer-brand .logo { margin-bottom: 1rem; align-items: flex-start; }
.footer-brand .logo__tag { margin-right: 0; }
.footer-brand p { max-width: 24ch; color: var(--color-muted); }
.footer-list { display: grid; align-content: start; gap: 8px; }
.footer-list a { text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.footer-list a:hover { background-size: 100% 1px; }
.footer-hours { color: var(--color-muted); }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 16px 22px;
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  font-size: .82rem; color: var(--color-muted);
}
.footer-bottom p { margin: 0; }
.footer-bottom ul { display: flex; gap: 22px; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--color-ink); }
.footer-bottom .socials { margin-left: auto; margin-right: -10px; }

/* 13. Motion */
.icon { display: block; overflow: visible; }
.icon .move { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
  /* One calm entrance for the opening of each page */
  .hero__slide.is-active img, .page-split__media img { animation: settle 2.4s var(--ease) backwards; }
  .hero__content > *, .page-split__text > *, .page-intro .wrap > *, .post__head > *, .contact__intro > * { animation: rise .9s var(--ease) backwards; }
  .hero__content > :nth-child(2), .page-split__text > :nth-child(2), .page-intro .wrap > :nth-child(2), .post__head > :nth-child(2), .contact__intro > :nth-child(2) { animation-delay: .14s; }
  .page-split__text > :nth-child(3), .page-intro .wrap > :nth-child(3), .post__head > :nth-child(3), .contact__intro > :nth-child(3) { animation-delay: .28s; }
  .hero__caption { animation: rise .9s .5s var(--ease) backwards; }

  /* Sections slide in softly (only when JavaScript runs) */
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
  .js .property[data-reveal].is-visible { transition: opacity .9s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease); }
  .js .property[data-reveal].is-visible:hover { transform: translateY(-4px); }

  /* Each icon moves in its own way on hover, once on phones when it scrolls into view */
  .value:hover .icon-user .move, .icon-user.is-played .move { animation: nod .8s var(--ease); }
  .value:hover .icon-key .move, .icon-key.is-played .move { animation: turn .9s var(--ease); transform-origin: 30% 50%; }
  .value:hover .icon-shield .move, .icon-shield.is-played .move { animation: draw-check .7s var(--ease); }
  .value:hover .icon-diamond .move, .icon-diamond.is-played .move { animation: shine 1s var(--ease); }
  .contact-item:hover .icon-phone, .icon-phone.is-played { animation: buzz .5s linear; }
  .contact-item:hover .icon-mail .move, .icon-mail.is-played .move { animation: flap .7s var(--ease); transform-origin: 50% 0%; }
  .contact-item:hover .icon-pin .move, .icon-pin.is-played .move { animation: drop .7s var(--ease); }
  .contact-item:hover .icon-clock .move, .icon-clock.is-played .move { animation: tick 1s var(--ease); transform-origin: 50% 100%; }
  .contact__map:hover .map-pin { animation: drop .7s var(--ease); }
  .socials a:hover svg { animation: tilt .5s var(--ease); }
}
@keyframes settle { from { transform: scale(1.05); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes nod { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-2.5px); } 70% { transform: translateY(1px); } }
@keyframes turn { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-35deg); } }
@keyframes draw-check { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes shine { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-3px) rotate(-8deg); } 70% { transform: translateY(0) rotate(5deg); } }
@keyframes buzz { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-2px) rotate(-6deg); } 40%, 80% { transform: translateX(2px) rotate(6deg); } }
@keyframes flap { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(-1); } }
@keyframes drop { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-6px); } 65% { transform: translateY(1px); } }
@keyframes tick { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes tilt { 50% { transform: rotate(-10deg) scale(1.1); } }
.icon-pin .move { transform-origin: 50% 100%; }
.map-pin { transform-box: fill-box; transform-origin: 50% 100%; }

/* 14. Responsive */
@media (max-width: 1100px) {
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reset-link { justify-self: start; }
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .detail { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); }
}

@media (max-width: 960px) {
  .header-inner { grid-template-columns: 1fr auto auto; min-height: 72px; gap: 12px; }
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .logo { align-items: flex-start; }
  .logo__tag { margin-right: 0; }
}

@media (max-width: 1000px) {
  /* Heading first, then the photo */
  .hero { display: flex; flex-direction: column; min-height: 0; }
  .hero__inner { order: 0; }
  .hero__content { max-width: 36rem; padding-block: 36px 32px; }
  .hero__content .display { margin-bottom: 1.6rem; }
  .hero__media { order: 1; position: relative; inset: auto; aspect-ratio: 4 / 3.4; clip-path: none; }
  .hero__caption { left: var(--gutter); }

}

@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .property-grid, .teasers, .stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vision, .vision--reverse, .page-split__inner, .page-split--reverse .page-split__inner, .contact__inner, .detail { grid-template-columns: 1fr; }
  .vision__text, .vision--reverse .vision__text { order: 0; padding: 56px var(--gutter); }
  .vision__media { min-height: 0; aspect-ratio: 4 / 3; }
  .page-split--reverse .page-split__media { order: -1; }
  .interest { position: static; }
  .project { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
  .badge { grid-column: 2; justify-self: start; grid-row: 1; margin-bottom: -8px; }
  .project__body { grid-column: 2; grid-row: 2; }
  .project__media { grid-row: 1 / span 2; }
  .contact__visual { grid-template-columns: 1fr; }
  .contact__photo { aspect-ratio: 16 / 10; }
}

@media (max-width: 640px) {
  body { font-size: .98rem; }
  .display { font-size: clamp(2.2rem, 10vw, 2.6rem); }
  .hero__content .display { font-size: clamp(1.7rem, 8.2vw, 2.5rem); }
  .property-grid, .teasers, .stories { grid-template-columns: 1fr; }
  .property__media, .listing .property__media { aspect-ratio: 4 / 3.2; }
  .filter-bar { grid-template-columns: 1fr 1fr; gap: 14px 16px; }
  .gallery__stage { aspect-ratio: 4 / 3; }
  .gallery__thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .detail__price { text-align: left; }
  .specs { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .features { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; }
  .project__media, .project__body, .badge { grid-column: 1; grid-row: auto; }
  .badge { justify-self: start; margin: 0; }
  .numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom .socials { margin-left: -10px; width: 100%; }
  .lightbox__arrow { bottom: -56px; }
}

@media (max-width: 359px) {
  .header-cta { display: none; } /* Contact stays in the menu */
}

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