:root {
  --navy: #0a1d32;
  --navy-soft: #142c45;
  --paper: #f7f5f0;
  --white: #fff;
  --ink: #11161c;
  --muted: #65707b;
  --line: #d8d8d4;
  --blue: #9dbbd3;
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
button { font: inherit; }

.skip-link {
  position: fixed; top: 1rem; left: 1rem; z-index: 100;
  padding: .7rem 1rem; background: var(--white); transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  height: 88px; padding: 0 clamp(1.25rem, 4vw, 4.5rem);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--paper); border-bottom: 1px solid rgba(10,29,50,.11);
  position: relative; z-index: 20;
}
.brand { display: inline-flex; align-items: baseline; gap: .85rem; }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 2.05rem; letter-spacing: -.075em; line-height: 1; }
.brand-name span { color: #527a9a; }
.brand-line { color: var(--muted); text-transform: uppercase; font-size: .65rem; letter-spacing: .2em; }
.main-nav { display: flex; align-items: center; gap: 2.4rem; font-size: .9rem; }
.main-nav a { position: relative; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -.4rem; height: 1px; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .25s ease; }
.main-nav a:hover::after, .main-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; }

.hero { min-height: min(790px, calc(100vh - 88px)); position: relative; overflow: hidden; color: white; background: var(--navy); }
.hero-media, .hero-shade { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; animation: reveal 1.1s ease-out both; }
.hero-shade { background: linear-gradient(90deg, rgba(5,18,31,.89) 0%, rgba(5,18,31,.48) 47%, rgba(5,18,31,.12) 100%), linear-gradient(0deg, rgba(5,18,31,.35), transparent 45%); }
.hero-copy { position: relative; z-index: 2; padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 8vw, 8.8rem); max-width: 850px; }
.eyebrow { margin: 0 0 1.5rem; font-size: .73rem; font-weight: 650; text-transform: uppercase; letter-spacing: .18em; }
.eyebrow.dark { color: #51606d; }
.eyebrow.light-blue { color: var(--blue); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.045em; }
h1 { font-size: clamp(4rem, 8.5vw, 8.4rem); line-height: .84; margin-bottom: 2rem; }
.hero-text { max-width: 470px; font-size: clamp(1rem, 1.4vw, 1.17rem); color: rgba(255,255,255,.83); margin-bottom: 2.2rem; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: space-between; gap: 2rem; padding: .85rem 1.15rem; font-size: .86rem; transition: background .25s ease, color .25s ease, transform .25s ease; }
.button:hover { transform: translateY(-2px); }
.button-light { background: white; color: var(--navy); min-width: 225px; }
.button-light:hover { background: var(--blue); }
.button-dark { background: var(--navy); color: white; min-width: 210px; }
.button-dark:hover { background: #173652; }
.hero-index { position: absolute; z-index: 2; bottom: 2rem; right: clamp(1.25rem, 4vw, 4.5rem); font-size: .72rem; letter-spacing: .15em; }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }

.section { padding: clamp(5rem, 9vw, 8.5rem) clamp(1.25rem, 4vw, 4.5rem); }
.section-heading { max-width: var(--max); margin: 0 auto 3.5rem; display: grid; grid-template-columns: 1fr minmax(260px, 390px); gap: 3rem; align-items: end; }
h2 { font-size: clamp(2.8rem, 5vw, 5rem); line-height: .96; margin-bottom: 0; }
.heading-note { color: var(--muted); margin: 0; max-width: 370px; }
.filter-row { max-width: var(--max); margin: 0 auto 1.25rem; display: flex; border-bottom: 1px solid var(--line); gap: 2rem; }
.filter { border: 0; border-bottom: 2px solid transparent; background: transparent; color: #6b747d; padding: .7rem 0 1rem; cursor: pointer; }
.filter span { margin-left: .35rem; font-size: .68rem; vertical-align: top; }
.filter.active { color: var(--ink); border-bottom-color: var(--ink); }
.property-search { max-width: var(--max); margin: 0 auto 1rem; padding: 1rem; display: grid; grid-template-columns: minmax(220px, 1.8fr) repeat(3, minmax(130px, 1fr)) auto; gap: .75rem; background: #eceeea; border: 1px solid #d9ddd8; }
.property-search label { display: grid; gap: .35rem; color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.property-search input, .property-search select { width: 100%; min-height: 48px; padding: .7rem .8rem; color: var(--ink); background: var(--white); border: 1px solid #cdd2ce; border-radius: 0; font: inherit; font-size: .9rem; letter-spacing: 0; text-transform: none; }
.property-search input::placeholder { color: #77818a; }
.search-field { align-content: end; }
.search-reset { align-self: end; min-height: 48px; padding: .7rem .9rem; border: 1px solid transparent; color: var(--navy); background: transparent; font-size: .85rem; white-space: nowrap; }
.search-reset:hover { border-color: #aeb9c1; background: var(--white); }
.search-summary { max-width: var(--max); margin: 0 auto 1.25rem; color: var(--muted); font-size: .84rem; }
.property-search { grid-template-columns: minmax(200px,1.5fr) minmax(120px,.7fr) minmax(160px,1fr) minmax(250px,1.4fr); align-items: end; }
.property-search .search-reset { grid-column: 1 / -1; justify-self: end; min-height: 36px; padding: .25rem .5rem; }
.price-range { min-width: 0; margin: 0; padding: 0; border: 0; }
.price-range legend { color: var(--muted); font-size: .8rem; text-transform: uppercase; margin-bottom: .4rem; }
.price-values { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.price-values label { font-size: .75rem; }
.price-values input { min-width: 0; min-height: 40px; }
.price-track { --low: 0%; --high: 100%; position: relative; height: 36px; margin: .35rem 12px 0; }
.price-track-fill { position: absolute; top: 16px; left: 0; right: 0; height: 4px; border-radius: 2px; background: linear-gradient(to right, #ccd2d5 var(--low), var(--navy) var(--low), var(--navy) var(--high), #ccd2d5 var(--high)); }
.property-search .price-track input { appearance: none; -webkit-appearance: none; position: absolute; inset: 0 -12px; width: calc(100% + 24px); height: 36px; min-height: 0; margin: 0; padding: 0; border: 0; background: transparent; pointer-events: none; }
.price-track input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); border: 2px solid var(--navy); pointer-events: auto; cursor: grab; box-shadow: 0 2px 5px #0a1d3220; }
.price-track input::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--paper); border: 2px solid var(--navy); pointer-events: auto; cursor: grab; }
.price-track input:focus-visible { outline: 0; }
.price-track input:focus-visible::-webkit-slider-thumb { outline: 3px solid #9dbbd3; outline-offset: 3px; }
.price-track input:focus-visible::-moz-range-thumb { outline: 3px solid #9dbbd3; outline-offset: 3px; }
.video-pending { margin-top: 1.5rem; padding: clamp(1.5rem,4vw,3rem); background: var(--navy); color: var(--paper); display: flex; align-items: center; gap: 2.5rem; border-radius: 8px; }
.video-pending > .brand-name { color: var(--blue); }
.video-pending p { margin-bottom: 0; }
.video-pending .eyebrow { margin-bottom: .65rem; }
.video-pending-status { margin-left: auto; border: 1px solid #9dbbd370; padding: .65rem 1rem; color: #c3d4e1; font-size: .875rem; }
@media(max-width: 1100px) { .property-search { grid-template-columns: 1fr 1fr; } }
@media(max-width: 760px) { .price-range { grid-column: 1 / -1; } .video-pending { flex-direction: column; align-items: start; gap: 1.5rem; } .video-pending-status { margin-left: 0; } }
.demo-note { max-width: var(--max); margin: 0 auto 2rem; font-size: .78rem; color: #7f878d; }
.property-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4.5rem 1.4rem; }
.property-card.is-hidden { display: none; }
.property-card.featured { grid-column: 1 / -1; }
.card-image { display: block; position: relative; overflow: hidden; background: #dfe2e1; aspect-ratio: 16 / 11; }
.property-card:not(.featured) .card-image { aspect-ratio: 4 / 3.25; }
.card-image img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .65s cubic-bezier(.2,.8,.2,1); }
.property-card:nth-child(2) .card-image img { object-position: center 58%; }
.card-image:hover img { transform: scale(1.025); }
.status { position: absolute; top: 1rem; left: 1rem; padding: .45rem .7rem; color: var(--navy); background: rgba(255,255,255,.92); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; }
.card-arrow { position: absolute; right: 1rem; bottom: 1rem; width: 44px; height: 44px; display: grid; place-items: center; color: white; background: rgba(10,29,50,.92); font-size: 1.2rem; }
.card-info { padding: 1.3rem 0 .8rem; display: flex; justify-content: space-between; align-items: start; gap: 1.5rem; border-bottom: 1px solid var(--line); }
.location { margin-bottom: .35rem; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
h3 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.4rem, 2vw, 2rem); font-weight: 400; letter-spacing: -.025em; }
.price { font-size: 1rem; white-space: nowrap; margin-bottom: 0; }
.features { margin: .85rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.3rem; list-style: none; color: var(--muted); font-size: .82rem; }

.manifesto { background: var(--navy); color: white; display: grid; grid-template-columns: minmax(120px, 1fr) minmax(280px, 2.3fr); gap: 3rem; }
.manifesto-number { color: var(--blue); font-size: .72rem; letter-spacing: .2em; }
.manifesto-copy { max-width: 900px; }
.manifesto-copy h2 { font-size: clamp(3.5rem, 7vw, 7.4rem); margin-bottom: 2rem; }
.manifesto-copy > p:not(.eyebrow) { color: rgba(255,255,255,.71); max-width: 630px; font-size: 1.08rem; }
.text-link { display: inline-flex; gap: 2rem; padding: 1rem 0 .3rem; border-bottom: 1px solid rgba(255,255,255,.55); margin-top: 1.2rem; font-size: .9rem; }

.contact { max-width: calc(var(--max) + 9rem); margin: 0 auto; display: grid; grid-template-columns: 1.4fr .7fr; gap: clamp(3rem, 10vw, 9rem); align-items: end; }
.contact h2 { max-width: 750px; }
.contact-action p { color: var(--muted); margin-bottom: 1.7rem; }

footer { padding: 2.1rem clamp(1.25rem, 4vw, 4.5rem); background: #071522; color: rgba(255,255,255,.65); display: grid; grid-template-columns: 1fr auto auto auto; gap: 2.5rem; align-items: center; font-size: .78rem; }
footer p { margin: 0; }
.footer-brand { color: white; }

@media (max-width: 760px) {
  .site-header { height: 74px; }
  .brand-line { display: none; }
  .menu-toggle { display: grid; gap: 6px; padding: .65rem; border: 0; background: transparent; position: relative; z-index: 22; }
  .menu-toggle span:not(.sr-only) { display: block; width: 24px; height: 1px; background: var(--ink); transition: transform .25s ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
  .main-nav { position: fixed; inset: 0; background: var(--paper); padding: 8rem 1.5rem 2rem; flex-direction: column; align-items: start; gap: 1.4rem; font-family: Georgia, serif; font-size: 2.5rem; transform: translateX(100%); transition: transform .35s ease; }
  .main-nav.open { transform: translateX(0); }
  .hero { min-height: calc(100svh - 74px); }
  .hero-copy { padding-top: 24vh; }
  .hero-shade { background: linear-gradient(0deg, rgba(5,18,31,.9), rgba(5,18,31,.14) 90%); }
  .section-heading { grid-template-columns: 1fr; gap: 1.5rem; }
  .filter-row { overflow-x: auto; gap: 1.5rem; }
  .filter { flex: 0 0 auto; }
  .property-search { grid-template-columns: 1fr 1fr; padding: .75rem; }
  .property-search .search-field { grid-column: 1 / -1; }
  .search-reset { justify-self: start; }
  .property-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .property-card.featured { grid-column: auto; }
  .property-card.featured .card-image, .property-card:not(.featured) .card-image { aspect-ratio: 4 / 3.5; }
  .card-info { display: block; }
  .price { margin-top: .7rem; }
  .manifesto { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr 1fr; gap: 1.3rem; }
}

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

button { cursor: pointer; }
.button { border: 0; }
.nav-contact, .footer-contact { padding: 0; color: inherit; background: none; border: 0; font: inherit; }
.nav-contact:hover, .footer-contact:hover { text-decoration: underline; text-underline-offset: .4rem; }
:focus-visible { outline: 2px solid #527a9a; outline-offset: 5px; }
body.modal-open { overflow: hidden; }
.contact-dialog { width: min(440px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; padding: 2.25rem; border: 1px solid #dedfdc; border-radius: 18px; color: var(--navy); background: var(--paper); box-shadow: 0 24px 90px #07152240; }
.contact-dialog::backdrop { background: #07152299; backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: .65rem; right: .65rem; width: 44px; height: 44px; border: 0; border-radius: 50%; color: var(--navy); background: transparent; font-size: 1.8rem; }
.dialog-close:hover { background: #e5e7e6; }
.contact-dialog .eyebrow { margin-bottom: 1.25rem; font-size: .75rem; }
.contact-dialog h2 { font-size: 3rem; line-height: 1.1; margin-bottom: .8rem; }
.contact-dialog > p:not(.eyebrow) { color: var(--muted); margin-bottom: 1.5rem; }
.contact-options { display: grid; }
.contact-options a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem .6rem; border-top: 1px solid var(--line); border-radius: 3px; }
.contact-options a:hover { background: #e8ecee; }
.contact-options strong, .contact-options small { display: block; }
.contact-options strong { font-size: 1rem; font-weight: 550; }
.contact-options small { color: var(--muted); font-size: .875rem; margin-top: .15rem; }
.encebras-card .card-image { aspect-ratio: 16 / 9; }
.empty-properties { max-width: var(--max); margin: 2rem auto; color: var(--muted); }
.property-detail { max-width: 1464px; padding: 3rem clamp(1.25rem, 4vw, 4.5rem) 6rem; margin: auto; }
.back-link { display: inline-block; color: var(--muted); margin-bottom: 3rem; font-size: .9rem; }
.detail-heading { display: flex; justify-content: space-between; gap: 3rem; align-items: end; margin-bottom: 2rem; }
.detail-heading h1 { font-size: clamp(2.7rem, 5.5vw, 5.2rem); line-height: 1.04; max-width: 900px; margin: 0; }
.detail-price { font-size: 1.8rem; white-space: nowrap; margin: 0; color: var(--navy); }
.detail-price span { display: block; font-size: .875rem; color: var(--muted); margin-top: .4rem; }
.detail-facts { display: flex; gap: 1.2rem 2rem; flex-wrap: wrap; list-style: none; padding: 1.5rem 0; border-top: 1px solid var(--line); margin-bottom: 1.2rem; color: var(--muted); }
.detail-facts strong { font-weight: 500; color: var(--navy); }
.detail-cover { max-height: 720px; object-fit: contain; background: #e6e6e2; }
.detail-description { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; padding: 5rem 0; }
.detail-description h2 { font-size: clamp(2.5rem, 4vw, 4rem); line-height: 1.08; max-width: 440px; }
.detail-description p:not(.eyebrow) { line-height: 1.8; color: #46515c; }
.detail-description .button { margin-top: 1rem; }
.detail-gallery-section h2 { font-size: 3rem; line-height: 1.1; margin-bottom: 1rem; }
.gallery-note { color: var(--muted); }
.detail-gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2rem 1.5rem; margin-top: 2rem; }
.detail-gallery figure { margin: 0; min-width: 0; }
.detail-gallery img { aspect-ratio: 4 / 3; object-fit: contain; background: #e6e6e2; }
.detail-gallery figcaption { margin-top: .65rem; color: var(--muted); font-size: .875rem; }
.cover-gallery-button, .gallery-photo-button { display: block; width: 100%; padding: 0; border: 0; background: #e6e6e2; cursor: zoom-in; }
.cover-gallery-button { position: relative; }
.cover-gallery-label { position: absolute; right: 1.25rem; bottom: 1.25rem; padding: .8rem 1rem; display: flex; gap: 1.5rem; background: var(--paper); color: var(--navy); font-size: .875rem; box-shadow: 0 4px 20px #07152220; }
.photo-viewer { width: min(1200px, calc(100vw - 3rem)); height: min(920px, calc(100dvh - 3rem)); max-width: none; max-height: none; padding: 0; border: 1px solid #9dbbd340; border-radius: 14px; color: var(--paper); background: #091827; box-shadow: 0 30px 100px #0009; overflow: hidden; }
.photo-viewer[open] { animation: viewer-reveal .22s ease-out; }
.photo-viewer::backdrop { background: #030b14d9; backdrop-filter: blur(8px); }
.viewer-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; padding: 0 1.5rem; }
.viewer-header { display: flex; align-items: center; gap: 1.5rem; padding: .9rem 0; }
.viewer-brand { font-size: 2rem; }
.viewer-brand span { color: var(--blue); }
.viewer-header h2 { flex: 1; font-family: inherit; font-size: .875rem; line-height: 1.5; letter-spacing: 0; color: #e0e8ee; }
.viewer-header h2 span { color: #a5b8c9; }
.viewer-close { flex-shrink: 0; width: 44px; height: 44px; border: 1px solid #9dbbd345; border-radius: 50%; background: transparent; color: white; font-size: 1.8rem; line-height: 1; }
.viewer-close:hover, .viewer-arrow:hover { background: #294058; }
.viewer-stage { min-height: 0; position: relative; display: grid; place-items: center; background: #050f1a; }
.viewer-stage::before, .viewer-stage::after { content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none; z-index: 1; border-color: #b6cddd80; border-style: solid; }
.viewer-stage::before { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.viewer-stage::after { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }
.viewer-image { width: 100%; height: 100%; min-height: 0; object-fit: contain; user-select: none; }
.viewer-image[hidden] { display: none; }
.viewer-error { max-width: 400px; padding: 2rem 4rem; text-align: center; }
.viewer-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 54px; display: grid; place-items: center; border: 1px solid #ffffff40; border-radius: 6px; background: #091827bf; color: white; font-size: 2.5rem; line-height: 1; }
.viewer-prev { left: 1rem; }
.viewer-next { right: 1rem; }
.viewer-caption { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; font-size: .875rem; line-height: 1.4; }
.viewer-count { color: #a5b8c9; white-space: nowrap; font-variant-numeric: tabular-nums; }
.viewer-thumbnails { display: flex; gap: .5rem; overflow-x: auto; padding: 4px 3px 8px; position: relative; scrollbar-width: thin; scrollbar-color: #57708a transparent; }
.viewer-thumbnail { flex: 0 0 76px; width: 76px; height: 56px; padding: 3px; border: 1px solid transparent; border-radius: 4px; background: transparent; opacity: .55; }
.viewer-thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.viewer-thumbnail[aria-current="true"] { opacity: 1; border-color: #dbe8f2; background: #9dbbd31f; }
.viewer-thumbnail:hover, .viewer-thumbnail:focus-visible { opacity: 1; }
.viewer-signature { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0 .9rem; border-top: 1px solid #9dbbd325; color: #a5b8c9; font-size: .75rem; }
.viewer-signature span:first-child { letter-spacing: .15em; }
.viewer-signature span:last-child { font-family: Georgia, serif; font-style: italic; }
@keyframes viewer-reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) {
  .photo-viewer { width: calc(100vw - 1rem); height: calc(100dvh - 1rem); border-radius: 10px; }
  .viewer-shell { padding: 0 .75rem; }
  .viewer-header { gap: 1rem; }
  .viewer-header h2 span { display: none; }
  .viewer-arrow { width: 44px; height: 48px; }
  .viewer-prev { left: .4rem; }
  .viewer-next { right: .4rem; }
  .viewer-thumbnail { flex-basis: 62px; width: 62px; height: 48px; }
  .viewer-signature { flex-wrap: wrap; gap: .25rem; }
  .cover-gallery-label { right: .75rem; bottom: .75rem; }
}
@media (max-height: 480px) {
  .viewer-header { padding: .25rem 0; }
  .viewer-caption { padding: .35rem 0; }
  .viewer-thumbnail { height: 40px; }
  .viewer-signature { display: none; }
}
@media (max-width: 760px) {
  .detail-heading { display: block; }
  .detail-price { margin-top: 1.5rem; }
  .detail-description { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0; }
  .detail-gallery { grid-template-columns: 1fr; }
  .contact-dialog { padding: 2rem 1.5rem 1.3rem; }
}
