/* Legacy Elite Real Estate — site styles */

/* Brand palette and typography from "Legacy Elite_Brand Guideline.pdf":
   Oxford Blue #0E2544 (primary), White #FFFFFF, Gold #C9A941 (accent),
   gold gradient #C9A941 -> #EBD26E. Headings: Trajan Pro. Body: Source Sans Pro.
   Trajan Pro is a licensed Adobe font; Cinzel (free, same Roman-capital style) stands in
   until a web licence / Adobe Fonts kit is added. Source Sans 3 is Source Sans Pro renamed. */
:root {
  --navy: #0e2544;
  --navy-deep: #091a31;
  --gold: #c9a941;
  --gold-light: #ebd26e;
  --gold-gradient: linear-gradient(135deg, #c9a941 0%, #ebd26e 100%);
  --ink: #1b2536;
  --muted: #5a6475;
  --line: #e6e1d3;
  --paper: #ffffff;
  --sand: #f9f6ee;

  --font-display: "Trajan Pro", "Trajan Pro 3", "Cinzel", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans Pro", "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 10px;
  --shadow: 0 10px 30px rgba(14, 37, 68, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

h1, h2, h3, h4, .feature__num, .card__title, .aside-box .price {
  font-variant-numeric: lining-nums;
}
/* Trajan-style faces are all capitals, so headings are sized smaller and tracked a little wider. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 600;
  letter-spacing: 0.02em;
}
h1 { font-size: clamp(1.8rem, 3.8vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2.05rem); }
h3 { font-size: clamp(1.05rem, 1.7vw, 1.2rem); }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: var(--paper); padding: 8px 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 26px;
  border: 1px solid var(--gold); border-radius: 999px;
  background: var(--gold-gradient); color: var(--navy-deep);
  font: 700 0.98rem/1 var(--font-body); letter-spacing: 0.03em;
  text-decoration: none; cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s;
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(14, 37, 68, 0.22); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn--ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 60px; width: auto; }
@media (max-width: 420px) { .brand img { height: 50px; } }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .nav summary {
  display: block; padding: 10px 12px; border-radius: 6px;
  color: var(--ink); font-size: 0.93rem; font-weight: 500; text-decoration: none; cursor: pointer;
}
.nav a:hover, .nav summary:hover, .nav a[aria-current="page"] { color: var(--gold); }
.nav details { position: relative; }
.nav summary { list-style: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: " ▾"; font-size: 0.75em; }
.nav details[open] .submenu { display: block; }
.submenu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 210px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px;
}
.nav .btn { margin-left: 10px; min-height: 42px; padding: 10px 20px; color: var(--navy-deep); }
.nav .btn:hover { color: #fff; }

.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; color: var(--navy); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 18px;
    max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav a, .nav summary { padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .submenu { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 14px; }
  .nav details summary::after { content: ""; }
  .nav .btn { margin: 14px 0 0; }
}

/* ---------- Page hero ---------- */

.hero {
  position: relative; color: #fff; background: var(--navy);
  isolation: isolate; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(9, 26, 49, 0.92) 0%, rgba(9, 26, 49, 0.55) 60%, rgba(9, 26, 49, 0.35) 100%);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.hero .wrap { padding-top: clamp(80px, 12vw, 150px); padding-bottom: clamp(80px, 12vw, 150px); }
.hero h1 { color: #fff; max-width: 760px; }
.hero p { max-width: 620px; font-size: 1.1rem; color: rgba(255, 255, 255, 0.88); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.eyebrow {
  display: inline-block; margin-bottom: 14px;
  color: var(--gold); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}

.page-head { background: var(--navy); color: #fff; }
.page-head .wrap { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(48px, 7vw, 80px); }
.page-head h1 { color: #fff; margin-bottom: 0.3em; }
.page-head p { color: rgba(255, 255, 255, 0.85); max-width: 680px; margin: 0; font-size: 1.05rem; }
.crumbs { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); margin-bottom: 12px; }
.crumbs a { color: rgba(255, 255, 255, 0.85); }
.crumbs--dark { color: var(--muted); }
.crumbs--dark a { color: var(--navy); }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--sand { background: var(--sand); }
.section--navy { background: var(--navy); color: rgba(255, 255, 255, 0.88); }
.section--navy h2, .section--navy h3 { color: #fff; }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head::after {
  content: ""; display: block; width: 64px; height: 2px; margin: 18px auto 0; background: var(--gold-gradient);
}
.section-head p { color: var(--muted); }
.section--navy .section-head p { color: rgba(255, 255, 255, 0.8); }

.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose--center { margin: 0 auto; }

.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); } }

.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--muted); margin: 0; }
.feature__num { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--gold); line-height: 1; margin-bottom: 10px; }

/* ---------- Project cards ---------- */

.card {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: box-shadow 0.35s, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s;
}
.card:hover { box-shadow: 0 18px 40px rgba(14, 37, 68, 0.14); transform: translateY(-5px); border-color: rgba(201, 169, 65, 0.55); color: inherit; }
.card__img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--sand); position: relative; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__tag {
  position: absolute; top: 14px; left: 14px; padding: 5px 12px; border-radius: 999px;
  background: rgba(9, 26, 49, 0.85); color: #fff; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title { font-family: var(--font-display); font-size: 1.3rem; color: var(--navy); margin: 0; }
.card__meta { color: var(--muted); font-size: 0.92rem; margin: 0; }
.card__price { margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--navy); }
.card__price small { font-weight: 500; color: var(--muted); }

/* ---------- Team ---------- */

.team { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }
.person { width: min(100%, 280px); text-align: center; }
.person img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; }
.person h3 { font-size: 1.2rem; margin: 0 0 4px; }
.person p { margin: 0; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Testimonials ---------- */

.quote { background: #fff; border-radius: var(--radius); padding: 30px; border: 1px solid var(--line); margin: 0; }
.quote p { font-size: 1.02rem; }
.quote footer { font-weight: 600; color: var(--navy); }
.quote footer span { display: block; font-weight: 400; color: var(--muted); font-size: 0.9rem; }

/* ---------- FAQ ---------- */

.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 36px 20px 0; position: relative;
  font-weight: 600; color: var(--navy); font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.5rem; color: var(--gold); }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 20px; color: var(--muted); }

/* ---------- Property detail ---------- */

.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .main { grid-row: span 2; aspect-ratio: 4 / 3; }
.gallery .side { min-height: 0; }
@media (max-width: 720px) { .gallery { grid-template-columns: minmax(0, 1fr); } .gallery .side { display: none; } }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.thumbs a { display: block; aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
@media (max-width: 960px) { .detail { grid-template-columns: minmax(0, 1fr); } }
.facts { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.facts li { background: var(--sand); border-radius: 8px; padding: 14px 16px; }
.facts b { display: block; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.amenities { columns: 2 220px; padding: 0; list-style: none; }
.amenities li { break-inside: avoid; padding: 6px 0 6px 26px; position: relative; text-transform: capitalize; }
.amenities li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

.aside-box { position: sticky; top: 100px; background: var(--sand); border-radius: var(--radius); padding: 26px; }
.aside-box .price { font-family: var(--font-display); font-size: 1.9rem; color: var(--navy); margin: 0 0 4px; }

/* ---------- Forms ---------- */

.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 6px; font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.form input, .form textarea, .form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); font: inherit; font-weight: 400;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.form textarea { min-height: 120px; resize: vertical; }
.hidden-field { position: absolute; left: -9999px; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list b { display: block; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }

/* ---------- CTA band ---------- */

.cta { background: var(--navy); color: #fff; border-radius: 14px; padding: clamp(32px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta h2 { color: #fff; margin: 0 0 6px; }
.cta p { margin: 0; color: rgba(255, 255, 255, 0.82); }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.78); font-size: 0.93rem; }
.site-footer .wrap { padding-top: 64px; padding-bottom: 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-family: var(--font-body); color: #fff; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-brand > img { width: 150px; height: auto; margin-bottom: 18px; }
.site-footer .form label { color: #fff; }
.post-hero { width: 100%; border-radius: var(--radius); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 44px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 0.85rem; }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a {
  display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 50%; transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.socials a img { width: 18px; height: 18px; object-fit: contain; }
.socials a:hover { background: var(--gold); border-color: var(--gold); transform: translateY(-2px); }

.whatsapp-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.whatsapp-float svg { width: 28px; height: 28px; fill: currentColor; }

/* Share a property on WhatsApp (project pages). */
.share-wa {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 18px;
  border: 1px solid #25d366; border-radius: 999px; color: #128c4a; background: #fff;
  font-weight: 700; font-size: 0.93rem; text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s;
}
.share-wa svg { width: 20px; height: 20px; fill: currentColor; }
.share-wa:hover { background: #25d366; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3); }

/* ---------- Motion ----------
   Reveal-on-scroll, hero headline, slow zoom on photos, marquee. All of it is switched off
   for visitors whose device asks for reduced motion (see the media query at the end). */

main { overflow-x: clip; } /* slide-ins must never cause sideways scrolling */
.js .reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .split > .reveal:nth-child(2) { transform: translateX(40px); }
.js .split > .reveal:nth-child(2).is-visible { transform: none; }

/* Gold rule under section headings draws itself in. */
.js .section-head.reveal::after { width: 0; transition: width 1s ease 0.5s; }
.js .section-head.reveal.is-visible::after { width: 64px; }

/* Hero: headline words rise in one by one; background slowly zooms. */
.js .hero h1 { visibility: hidden; }
.js.hero-ready .hero h1 { visibility: visible; }
.hero h1 .word { display: inline-block; opacity: 0; transform: translateY(0.6em); animation: word-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; animation-delay: calc(0.15s + var(--i) * 0.09s); }
.hero .eyebrow, .hero p, .hero .actions { animation: fade-up 0.9s ease both; }
.hero .eyebrow { animation-delay: 0.05s; }
.hero p { animation-delay: 0.9s; }
.hero .actions { animation-delay: 1.1s; }
.hero__bg { animation: slow-zoom 22s ease-out both; }
@keyframes word-in { to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes slow-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }

/* Parallax: the hero photo is a little taller than the hero and drifts slower than the page
   (site.js sets --parallax). `translate` is separate from the zoom animation's `transform`. */
.js .hero__bg { top: -12%; height: 124%; translate: 0 var(--parallax, 0px); will-change: translate; }
.hero .wrap { translate: 0 var(--parallax-fg, 0px); opacity: var(--hero-fade, 1); }

/* ---------- Home: fixed backdrop (photo, dawn sky, layered skyline) ----------
   home.js sets --p (0 at the top of the page, 1 at the bottom) and --sx (mouse, -1 to 1).
   Sections marked .is-window are see-through; all others get a solid background and slide over. */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--navy-deep); }
.backdrop__photo, .backdrop__shade, .backdrop__dawn { position: absolute; inset: 0; width: 100%; height: 100%; }
.backdrop__photo {
  object-fit: cover; object-position: 50% 25%; will-change: opacity, transform;
  opacity: calc(1 - var(--p, 0) * 1.6); transform: scale(calc(1.04 + var(--p, 0) * 0.12));
}
.backdrop__shade { background: linear-gradient(100deg, rgba(9, 26, 49, 0.9) 0%, rgba(9, 26, 49, 0.5) 60%, rgba(9, 26, 49, 0.3) 100%); }
.backdrop__dawn {
  will-change: opacity; opacity: clamp(0, calc(var(--p, 0) * 2.4 - 0.35), 1);
  background: linear-gradient(180deg, #0b1f3a 0%, #1c2c55 30%, #4a3a63 52%, #9a5a5e 70%, #d9955a 86%, #ebd26e 100%);
}
:where(.backdrop ~ :not(.is-window)) { background-color: var(--paper); }

/* Skyline layers (templates/_skyline.html, drawn by tools/make_skyline.py). */
.skyline { position: absolute; left: -12%; right: -12%; bottom: -1px; height: clamp(120px, 22vw, 320px); pointer-events: none; }
.skyline__layer { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }
.skyline__far { fill: #24497a; opacity: 0.5; transform: translate3d(calc(var(--sx, 0) * 8px - var(--p, 0) * 3%), calc(var(--p, 0) * -40px), 0); }
.skyline__mid { fill: #0f2748; transform: translate3d(calc(var(--sx, 0) * 18px - var(--p, 0) * 5%), calc(var(--p, 0) * -20px), 0); }
.skyline__near { fill: var(--navy-deep); transform: translate3d(calc(var(--sx, 0) * 30px - var(--p, 0) * 8%), 0, 0); }
.skyline__landmarks path { fill: #0d2444; stroke: rgba(235, 210, 110, 0.6); stroke-width: 1.4; stroke-linejoin: round; }
.skyline__wheel circle, .skyline__wheel line, .skyline__legs { fill: none; stroke: #102a4c; stroke-width: 5; }
.skyline__wheel line { stroke-width: 1.5; stroke: rgba(201, 169, 65, 0.35); }
.skyline__wheel circle { stroke: rgba(201, 169, 65, 0.55); stroke-width: 3; }
.skyline__wheel { animation: wheel-turn 90s linear infinite; }
.skyline__lights { opacity: calc(1 - var(--p, 0) * 2); }
.skyline__lights rect { fill: var(--gold-light); opacity: 0.55; }
.skyline__lights .tw { animation: twinkle 4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes wheel-turn { to { transform: rotate(360deg); } }
@keyframes twinkle { 50% { opacity: 0.08; } }

/* Window sections. */
.hero--home { background: transparent; min-height: calc(100vh - 76px); min-height: calc(100svh - 76px); display: flex; align-items: center; }
.hero--home::before { display: none; }
.hero--home .wrap { padding-top: 56px; padding-bottom: clamp(140px, 22vw, 320px); }
.stats.is-window { background: rgba(9, 26, 49, 0.78); }
.interlude { min-height: 95vh; padding-top: 16vh; }
.interlude__text {
  max-width: 900px; margin: 0 auto; text-align: center; color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 4vw, 3.1rem); line-height: 1.3; letter-spacing: 0.02em;
  text-shadow: 0 2px 30px rgba(9, 26, 49, 0.6);
}
.section--navy.is-window { background: linear-gradient(180deg, rgba(14, 37, 68, 0.2) 0%, rgba(14, 37, 68, 0.88) 28%, var(--navy) 100%); }

/* Word-by-word headings (home.js wraps each word). */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.w__i { display: inline-block; }
.gsap-on [data-motion] .section-head::after { width: 0; transition: width 1s ease; }
.gsap-on [data-motion] .section-head.is-drawn::after { width: 64px; }

/* Image wipe. */
.wipe { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.wipe img { border-radius: 0; box-shadow: none; }

/* Featured projects: a normal grid by default; a swipe carousel on phones; on larger screens home.js
   adds .is-active, pins the section and slides the track sideways as you scroll. */
.hscroll__wrap { display: flex; flex-direction: column; }
.hscroll__intro { display: contents; }
.hscroll__viewport { order: 1; }
.hscroll__more { order: 2; text-align: center; margin: 40px 0 0; }
.hscroll__end { display: none; }
.hscroll__end {
  position: relative; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 32px;
  background: var(--navy); color: #fff; border-radius: var(--radius); text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s;
}
.hscroll__end:hover { color: #fff; box-shadow: 0 18px 40px rgba(14, 37, 68, 0.3); }
.hscroll__end-title { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.25; }
.hscroll__end-arrow { font-size: 2rem; color: var(--gold); transition: transform 0.3s; }
.hscroll__end:hover .hscroll__end-arrow { transform: translateX(8px); }
.hscroll.is-active { overflow: hidden; min-height: calc(100vh - 76px); display: flex; align-items: center; padding: 40px 0; }
.hscroll.is-active .hscroll__wrap { display: grid; grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); gap: 56px; align-items: center; }
.hscroll.is-active .hscroll__intro { display: block; }
.hscroll.is-active .section-head { text-align: left; margin: 0 0 28px; }
.hscroll.is-active .section-head::after { margin-left: 0; }
.hscroll.is-active .hscroll__more { text-align: left; margin: 0; }
.hscroll.is-active .hscroll__viewport { position: relative; clip-path: inset(-60px -100vw -60px -8px); }
.hscroll.is-active .hscroll__viewport::before { /* cards fade out as they slide under the intro */
  content: ""; position: absolute; z-index: 2; left: -8px; top: -60px; bottom: -60px; width: 80px; pointer-events: none;
  background: linear-gradient(90deg, var(--sand) 10%, rgba(249, 246, 238, 0));
}
.hscroll.is-active .hscroll__track { display: flex; gap: 24px; width: max-content; }
.hscroll.is-active .hscroll__track > * { width: 400px; flex: none; }
.hscroll.is-active .hscroll__end { display: flex; }
@media (max-width: 860px) {
  .hscroll__track {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter)); padding: 6px var(--gutter) 18px;
  }
  .hscroll__track::-webkit-scrollbar { display: none; }
  .hscroll__track > * { flex: 0 0 82%; scroll-snap-align: center; }
  .hscroll__end { display: flex; }
}

/* 3D tilt with a gold sheen (home.js sets --rx/--ry/--mx/--my). */
.card { position: relative; }
.gsap-on .tiltable, .gsap-on .tiltable:hover {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform 0.25s ease-out, box-shadow 0.35s, border-color 0.35s;
}
.gsap-on .tiltable:hover { --lift: -6px; }
.tiltable::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(235, 210, 110, 0.32), rgba(255, 255, 255, 0) 50%);
}
.tiltable:hover::after { opacity: 1; }

/* Why Dubai numbers. */
.gold-line { height: 2px; margin: 0 0 44px; background: var(--gold-gradient); transform-origin: left; }
.numbers .feature__num { font-size: clamp(2.4rem, 5vw, 3.6rem); transform-origin: left bottom; }

/* Golden Visa steps: progress line (home.js sets --gv from 0 to 1 and marks reached steps). */
.gv-steps { position: relative; }
.gv-steps li { z-index: 1; }
.gv-steps li::before { transition: background 0.4s, color 0.4s, box-shadow 0.4s; }
.gv-steps.is-tracked::before, .gv-steps.is-tracked::after { content: ""; position: absolute; left: 19px; top: 24px; bottom: 44px; width: 2px; z-index: 0; }
.gv-steps.is-tracked::before { background: var(--line); }
.gv-steps.is-tracked::after { background: linear-gradient(var(--gold), var(--gold-light)); transform-origin: top; transform: scaleY(var(--gv, 0)); }
.gv-steps.is-tracked li { transition: opacity 0.5s; }
.gv-steps.is-tracked li:not(.is-active) { opacity: 0.45; }
.gv-steps.is-tracked li:not(.is-active)::before { background: #fff; color: var(--muted); box-shadow: inset 0 0 0 2px var(--line); }

/* Small hover touches. */
.nav a, .nav summary, .site-footer a { transition: color 0.2s; }
.person img { transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s; }
.person:hover img { transform: translateY(-4px); box-shadow: var(--shadow); }
.quote, .feature { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s; }
.quote:hover, .feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.whatsapp-float { transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); }
.whatsapp-float:hover { transform: scale(1.08); }

/* Photos zoom gently on hover. */
.card__img img, .gallery img, .thumbs img { transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.card:hover .card__img img, .gallery a:hover img, .thumbs a:hover img { transform: scale(1.06); }
.gallery a, .thumbs a { overflow: hidden; }

/* Marquee band of areas. */
.marquee { background: var(--gold-gradient); color: var(--navy-deep); overflow: hidden; white-space: nowrap; }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__list { display: flex; margin: 0; padding: 0; list-style: none; }
.marquee__list li {
  padding: 14px 28px; font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 56px;
}
.marquee__list li::after { content: "◆"; font-size: 0.55rem; opacity: 0.6; margin-left: 28px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Golden Visa (home) ---------- */

.golden-visa { background: linear-gradient(180deg, #fff 0%, var(--sand) 100%); }
.golden-visa__media { position: relative; }
.golden-visa__media img { aspect-ratio: 4 / 5; object-fit: cover; }
.golden-visa__badge {
  position: absolute; left: -18px; bottom: 28px; background: var(--navy); color: #fff;
  padding: 16px 22px; border-radius: 12px; box-shadow: var(--shadow); text-align: center;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  animation: float 5s ease-in-out infinite;
}
.golden-visa__badge span {
  display: block; font-family: var(--font-display); font-size: 2.6rem; line-height: 1; letter-spacing: 0;
  background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
@keyframes float { 50% { transform: translateY(-10px); } }
@media (max-width: 860px) { .golden-visa__badge { left: 12px; } }
.gv-steps { list-style: none; counter-reset: gv; padding: 0; margin: 22px 0; display: grid; gap: 14px; }
.gv-steps li { counter-increment: gv; position: relative; padding: 4px 0 4px 58px; }
.gv-steps li::before {
  content: counter(gv); position: absolute; left: 0; top: 2px; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-gradient); color: var(--navy-deep); font-weight: 700; font-family: var(--font-display);
}
.gv-steps b { display: block; color: var(--navy); }
.gv-steps span { color: var(--muted); font-size: 0.97rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal, .hero h1 .word { opacity: 1 !important; transform: none !important; }
  .js .hero h1 { visibility: visible; }
  .js .section-head.reveal::after { width: 64px; }
  .js .hero__bg, .hero .wrap { translate: none; opacity: 1; }
}

/* ---------- Why Dubai ---------- */

.hero--page .wrap { padding-top: clamp(70px, 10vw, 130px); padding-bottom: clamp(70px, 10vw, 130px); }
.hero .crumbs a { color: rgba(255, 255, 255, 0.85); }

.figures__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(255, 255, 255, 0.12); border-radius: 14px; overflow: hidden; }
.figure { background: var(--navy); padding: 30px 26px; }
.figure__value {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1;
  background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: var(--gold); -webkit-text-fill-color: transparent;
  margin-bottom: 8px; font-variant-numeric: lining-nums;
}
.figure__label { color: rgba(255, 255, 255, 0.85); font-size: 0.98rem; }
@media (max-width: 860px) { .figures__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .figures__grid { grid-template-columns: minmax(0, 1fr); } }
.cite { font-size: 0.75em; vertical-align: super; line-height: 0; text-decoration: none; color: var(--gold); margin-left: 2px; }
.section--navy .cite { color: var(--gold-light); }

.map-frame { background: var(--navy); border-radius: 16px; padding: clamp(8px, 2vw, 20px); box-shadow: var(--shadow); }
.world-map { display: block; width: 100%; height: auto; font-family: var(--font-body); }
.world-map__land { fill: #1d3a60; stroke: #2b4d77; stroke-width: 0.8; }
.world-map__ring { fill: rgba(201, 169, 65, 0.06); stroke: var(--gold); stroke-width: 1.6; stroke-dasharray: 6 6; }
.world-map__ring--8 { fill: rgba(201, 169, 65, 0.03); stroke-opacity: 0.6; }
.world-map__route { stroke: rgba(235, 210, 110, 0.55); stroke-width: 1.2; stroke-dasharray: 3 5; }
.world-map__city { fill: #fff; }
.world-map__label { fill: #fff; font-size: 15px; font-weight: 600; paint-order: stroke; stroke: rgba(14, 37, 68, 0.9); stroke-width: 4px; }
.world-map__label tspan { fill: var(--gold-light); font-weight: 700; }
.world-map__region { fill: rgba(255, 255, 255, 0.28); font-family: var(--font-display); font-size: 30px; letter-spacing: 0.3em; }
.world-map__ring-label { fill: var(--gold-light); font-size: 14px; font-weight: 700; letter-spacing: 0.06em; }
.world-map__dubai { fill: var(--gold); stroke: #fff; stroke-width: 3; }
.world-map__pulse { fill: none; stroke: var(--gold); stroke-width: 3; transform-origin: center; transform-box: fill-box; animation: pulse 2.2s ease-out infinite; }
.world-map__dubai-label { fill: #fff; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: 0.12em; paint-order: stroke; stroke: rgba(14, 37, 68, 0.9); stroke-width: 5px; }
@keyframes pulse { from { transform: scale(0.6); opacity: 1; } to { transform: scale(3.2); opacity: 0; } }
.js .world-map__route { stroke-dashoffset: 400; }
.js .map-frame.is-visible .world-map__route { animation: draw-route 2.4s ease forwards; }
@keyframes draw-route { to { stroke-dashoffset: 0; } }

.zigzag { display: grid; gap: clamp(32px, 5vw, 56px); }
.zigzag__row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.zigzag__row:nth-child(even) .zigzag__media { order: 2; }
.zigzag__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 3 / 2; }
.zigzag__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.zigzag__row:hover .zigzag__media img { transform: scale(1.05); }
.zigzag__text h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); }
.zigzag__text p { color: var(--muted); font-size: 1.05rem; }
@media (max-width: 760px) { .zigzag__row { grid-template-columns: minmax(0, 1fr); } .zigzag__row:nth-child(even) .zigzag__media { order: 0; } }

.notable .card__tag { top: auto; bottom: 14px; text-transform: none; letter-spacing: 0.02em; }

/* Megaprojects timeline with a photo per entry. */
.timeline--media { max-width: 980px; }
.timeline.timeline--media li { grid-template-columns: 72px minmax(0, 1fr) 240px; align-items: start; }
.timeline__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; background: var(--navy-deep); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.timeline__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.timeline--media li:hover .timeline__media img { transform: scale(1.06); }
@media (max-width: 760px) {
  .timeline.timeline--media li { grid-template-columns: 72px minmax(0, 1fr); }
  .timeline.timeline--media .timeline__media { grid-column: 2; max-width: 420px; }
}

.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 860px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 88px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--gold), rgba(201, 169, 65, 0.1)); }
.timeline li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 40px; padding: 0 0 34px; position: relative; }
.timeline li::after { content: ""; position: absolute; left: 82px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(201, 169, 65, 0.2); }
.timeline__year { font-family: var(--font-display); font-weight: 700; color: var(--gold-light); font-size: 1.15rem; text-align: right; font-variant-numeric: lining-nums; }
.timeline h3 { margin-bottom: 0.3em; }
.timeline p { margin: 0; color: rgba(255, 255, 255, 0.82); }
.timeline a { color: var(--gold-light); }
@media (max-width: 560px) {
  .timeline::before { left: 7px; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-left: 32px; }
  .timeline li::after { left: 1px; }
  .timeline__year { text-align: left; }
  .timeline.timeline--media li { grid-template-columns: minmax(0, 1fr); }
  .timeline.timeline--media .timeline__media { grid-column: 1; margin-top: 10px; }
}

.sources__title { font-size: 1.1rem; }
.sources, .credits { font-size: 0.88rem; color: var(--muted); padding-left: 1.3em; display: grid; gap: 6px; }
.credits { list-style: disc; }
.sources li:target { background: var(--sand); }

/* ---------- Why Legacy: team ---------- */

.leader {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center;
  background: #fff; border-radius: 16px; padding: clamp(20px, 3vw, 36px); box-shadow: var(--shadow); margin-bottom: 40px;
}
.leader__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 12px; }
.leader__name { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.5em; }
.leader__text p { color: var(--muted); font-size: 1.05rem; }
.leader__text .btn { margin-top: 8px; }
@media (max-width: 860px) { .leader { grid-template-columns: minmax(0, 1fr); } .leader__photo img { aspect-ratio: 1 / 1; } }
.team--small .person { width: min(100%, 220px); }
.team--small .person h3 { font-size: 1.05rem; }

/* ---------- Why Legacy: social + video ---------- */

.social-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .social-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .social-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.social-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 22px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; color: var(--ink);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.social-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); color: var(--ink); }
.social-card__icon { width: 52px; height: 52px; border-radius: 50%; background: var(--navy); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; transition: background 0.25s; }
.social-card:hover .social-card__icon { background: var(--gold); }
.social-card__icon img { width: 26px; height: 26px; object-fit: contain; }
.social-card__name { font-family: var(--font-display); font-weight: 700; color: var(--navy); font-size: 1.1rem; }
.social-card__handle { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.social-card__cta { margin-top: 8px; color: var(--gold); font-weight: 700; font-size: 0.9rem; }
.fb-embed { display: flex; justify-content: center; margin-top: 32px; }
.fb-embed iframe { width: 100%; max-width: 500px; height: 560px; border-radius: var(--radius); background: var(--sand); }

.yt {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: #000;
  aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius);
}
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.3s, transform 0.6s; }
.yt:hover img { opacity: 1; transform: scale(1.04); }
.yt__play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; margin: -25px 0 0 -36px;
  border-radius: 14px; background: rgba(255, 0, 0, 0.9); transition: transform 0.2s;
}
.yt__play::after { content: ""; position: absolute; left: 29px; top: 15px; border-style: solid; border-width: 10px 0 10px 18px; border-color: transparent transparent transparent #fff; }
.yt:hover .yt__play { transform: scale(1.1); }
.yt__caption { position: absolute; left: 16px; bottom: 14px; color: #fff; font-weight: 700; background: rgba(9, 26, 49, 0.8); padding: 6px 12px; border-radius: 999px; }
.yt__frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); display: block; }
.video-feature { max-width: 900px; margin: 0 auto 28px; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.video-grid--project { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .video-grid, .video-grid--project { grid-template-columns: minmax(0, 1fr); } }
.video-card { margin: 0; }
.video-feature.video-card { margin: 0 auto 28px; } /* keep the featured video centred */
.video-card figcaption { margin-top: 10px; font-size: 0.95rem; font-weight: 600; }
.section--navy .video-card figcaption { color: rgba(255, 255, 255, 0.9); }

.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-top: 18px; background: var(--sand); }
.map-embed iframe { display: block; width: 100%; height: 360px; border: 0; }

/* ---------- Site search (static/js/search.js) ---------- */

.search-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%;
  background: #fff; color: var(--navy); cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.search-toggle:hover { border-color: var(--gold); color: var(--gold); }
@media (max-width: 1080px) {
  .site-header .wrap { gap: 10px; }
  .brand { margin-right: auto; }
  .search-toggle { order: 2; width: 46px; height: 46px; border-radius: 8px; }
  .nav-toggle { order: 3; }
}
@media (min-width: 1081px) {
  .site-header .wrap { justify-content: flex-start; }
  .site-header .nav { margin-left: auto; }
  .search-toggle { margin-left: -6px; }
}

.search {
  position: fixed; inset: 0; z-index: 150; background: rgba(6, 16, 31, 0.72); backdrop-filter: blur(3px);
  display: flex; justify-content: center; align-items: flex-start; padding: clamp(16px, 8vh, 90px) 16px 16px;
}
.search__panel {
  width: min(720px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); overflow: hidden;
  animation: search-in 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes search-in { from { opacity: 0; transform: translateY(-12px) scale(0.98); } }
.search__box { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--gold); }
.search__input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 1.15rem; color: var(--ink); background: transparent; }
.search__input::-webkit-search-cancel-button { display: none; }
.search__close { border: 1px solid var(--line); background: var(--sand); color: var(--muted); border-radius: 6px; padding: 4px 8px; font-size: 0.75rem; cursor: pointer; }
.search__suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 18px; font-size: 0.9rem; color: var(--muted); }
.search__suggest button {
  border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 999px; padding: 6px 14px;
  font: inherit; font-size: 0.88rem; cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.search__suggest button:hover { border-color: var(--gold); background: var(--sand); }
.search__results { overflow-y: auto; padding: 0 8px 8px; }
.search__results:empty { display: none; }
.search__note { margin: 0; padding: 14px 10px 8px; font-size: 0.85rem; color: var(--muted); }
.search__hit {
  display: flex; gap: 14px; align-items: flex-start; padding: 12px 10px; border-radius: 10px;
  color: var(--ink); text-decoration: none; transition: background 0.15s;
}
.search__hit:hover, .search__hit:focus { background: var(--sand); color: var(--ink); outline: none; }
.search__hit:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); }
.search__hit img, .search__icon { flex: none; width: 64px; height: 48px; border-radius: 6px; object-fit: cover; }
.search__icon { display: flex; align-items: center; justify-content: center; background: var(--navy); color: var(--gold); font-family: var(--font-display); font-weight: 700; }
.search__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search__type { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.search__title { font-weight: 700; color: var(--navy); line-height: 1.35; }
.search__snippet { font-size: 0.88rem; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.search mark { background: rgba(235, 210, 110, 0.45); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ---------- Property filters ---------- */

/* Fields share each row evenly and wrap as the screen narrows (one row on desktop). */
.filters {
  display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: end;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 28px; box-shadow: var(--shadow);
}
.filters__field { flex: 1 1 140px; display: grid; gap: 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); }
.filters__field--wide { flex: 2 1 220px; }
.filters input, .filters select {
  width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); font: inherit; font-size: 0.97rem; letter-spacing: 0; text-transform: none; font-weight: 400;
}
.filters input:focus, .filters select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.filters__bar { flex: 1 1 100%; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.filters__count { margin: 0; color: var(--muted); font-size: 0.92rem; }
.filters__reset { border: 0; background: none; color: var(--navy); font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
@media (max-width: 620px) {
  .filters { padding: 16px; }
  .filters__field--wide { flex-basis: 100%; }
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 16, 31, 0.94); padding: 56px 72px;
}
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lightbox__caption { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; text-align: center; }
.lightbox__nav, .lightbox__close {
  position: absolute; border: 0; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, 0.12); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2.2rem; padding-bottom: 4px; }
.lightbox__nav:hover, .lightbox__close:hover { background: var(--gold); color: var(--navy-deep); }
.lightbox__prev { left: 14px; }
.lightbox__next { right: 14px; }
.lightbox__close { top: 14px; right: 14px; width: 44px; height: 44px; font-size: 1.8rem; }
.lightbox button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 620px) {
  .lightbox { padding: 56px 8px 80px; }
  .lightbox__nav { top: auto; bottom: 16px; transform: none; }
  .lightbox__prev { left: calc(50% - 64px); }
  .lightbox__next { right: calc(50% - 64px); }
}
.gallery a, .thumbs a { cursor: zoom-in; }

/* ---------- Project detail extras ---------- */

.price-table { width: 100%; border-collapse: collapse; margin: 0 0 8px; font-size: 1rem; }
.price-table th, .price-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.price-table th { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.price-table td:last-child { font-weight: 700; color: var(--navy); white-space: nowrap; }
.plan { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plan li { display: flex; align-items: center; gap: 16px; background: var(--sand); border-radius: 8px; padding: 12px 16px; }
.plan b { font-family: var(--font-display); font-size: 1.35rem; color: var(--navy); min-width: 64px; }
.nearby { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 24px; }
.nearby li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.nearby span { color: var(--muted); white-space: nowrap; }
.detail h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-top: 40px; }
.faq__group { font-size: clamp(1.15rem, 2vw, 1.4rem); margin-bottom: 4px; }
.card__summary { color: var(--muted); font-size: 0.95rem; margin: 4px 0 0; }

/* ---------- Highlight figures ---------- */

.stats { background: var(--navy-deep); border-top: 1px solid rgba(201, 169, 65, 0.35); }
.stats__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 34px; padding-bottom: 34px; }
.stat { text-align: center; padding: 6px 12px; }
.stat + .stat { border-left: 1px solid rgba(255, 255, 255, 0.14); }
.stat__value {
  display: block; font-family: var(--font-display); font-weight: 700; line-height: 1.1;
  font-size: clamp(2rem, 4.5vw, 3rem); font-variant-numeric: lining-nums;
  background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: var(--gold);
  -webkit-text-fill-color: transparent;
}
.stat__label { display: block; margin-top: 6px; color: rgba(255, 255, 255, 0.82); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
@media (max-width: 560px) {
  .stats__grid { padding-top: 24px; padding-bottom: 24px; }
  .stat { padding: 4px 6px; }
  .stat__label { font-size: 0.68rem; letter-spacing: 0.08em; }
}

.muted { color: var(--muted); }
.center { text-align: center; }
.mt-lg { margin-top: 40px; }

/* Grid and flex children may shrink below their content's natural width (large photos, long words). */
.gallery > *, .detail > *, .split > *, .grid > *, .thumbs > * { min-width: 0; }
.prose { overflow-wrap: anywhere; }

