/* ============================================================
   PRECONPROFIT — Design System
   Barlow Condensed display + Barlow body + Cormorant Garamond serif.
   Navy-led, white/warm surfaces, gold accent.
   Brand: navy #0C2251 · deep #000027 · gold #FCE09D · white #FFFFFF
   ============================================================ */

:root {
  /* Navy = primary ink */
  --ink:        #0C2251;   /* brand navy */
  --ink-2:      #33405F;   /* softer navy */
  --deep:       #000027;   /* near-black navy for dark sections */

  /* Surfaces */
  --paper:      #FBFAF6;   /* warm white page */
  --paper-2:    #F1EFE8;
  --surface:    #FFFFFF;
  --surface-2:  #FAF9F5;
  --line:       #E7E4DB;
  --line-2:     #D3CFC4;
  --muted:      #5C6377;   /* navy-grey */
  --muted-2:    #8A90A0;

  /* Gold accent (brand pale gold — FILLS & highlights only, never small text on white) */
  --gold:       #FCE09D;
  --gold-soft:  #FEF3D4;
  --gold-line:  #E9C86A;   /* deeper gold for visible marks / stars / icons */
  --gold-ink:   #9A7B1E;   /* accessible gold for small marks on light */

  /* Back-compat: legacy --brick tokens now map to gold so any stray refs stay on-brand */
  --brick:      #FCE09D;
  --brick-deep: #9A7B1E;
  --brick-tint: #FEF3D4;

  /* Semantic */
  --ok:         #1F5C86;   /* status blue-navy for "now selling" */
  --ok-tint:    #E4EEF4;

  /* Type */
  --display: "Barlow Condensed", ui-sans-serif, system-ui, sans-serif;
  --sans: "Barlow", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  /* Layout */
  --wrap: 1280px;
  --gut: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --radius-lg: 10px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.6s;

  --shadow-1: 0 1px 2px rgba(12,34,81,.05), 0 6px 20px -12px rgba(12,34,81,.20);
  --shadow-2: 0 2px 6px rgba(12,34,81,.07), 0 28px 60px -28px rgba(12,34,81,.32);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--ink); color: var(--paper); }

/* ---------- Typography ---------- */
h1,h2,h3,h4 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.02; letter-spacing: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--gold-line); display: inline-block; border-radius: 2px;
}
.eyebrow.no-mark::before { display: none; }

/* Barlow Condensed is narrow, so it can run large; keep tracking near zero. */
.display-xl { font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 8.6vw, 7.4rem); line-height: 0.9; letter-spacing: -0.01em; text-transform: uppercase; }
/* Section headings use Title Case (only the super-big display-xl stays ALL CAPS). */
.display-lg { font-family: var(--display); font-weight: 700; font-size: clamp(2.05rem, 5.4vw, 4.4rem); line-height: 0.95; letter-spacing: -0.005em; }
.display-md { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: 0; }
/* Elegant serif accent (Cormorant Garamond) for eyebrow-style flourishes and quotes */
.serif { font-family: var(--serif); font-weight: 500; }
.serif-italic { font-family: var(--serif); font-style: italic; font-weight: 500; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.28rem); line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.tabnum { font-variant-numeric: tabular-nums; }
.mono-label { font-family: var(--display); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
/* gold highlight behind a word (replaces the old colored accent word) */
.hl { background: linear-gradient(transparent 62%, var(--gold) 62% 92%, transparent 92%); padding: 0 .06em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 100px;
  font-size: 14.5px; font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  touch-action: manipulation;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--gold); color: var(--deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--gold); color: var(--deep); transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--deep); }
.btn-gold:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn-sm { height: 42px; padding: 0 18px; font-size: 13px; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px;
}
/* on dark surfaces the ring must be gold to stay visible */
.ink-section :focus-visible, .btn-primary:focus-visible, .contact-fab:focus-visible,
.btn-light:focus-visible, .site-footer :focus-visible, .cta-band :focus-visible { outline-color: var(--gold); }

/* ---------- Top market-alert bar ---------- */
.alertbar {
  background: var(--ink); color: var(--paper);
  font-size: 13px; letter-spacing: .01em;
  position: relative; z-index: 60;
}
.alertbar .wrap { display: flex; align-items: center; gap: 16px; justify-content: center; min-height: 42px; padding-block: 8px; text-align: center; }
.alertbar strong { color: #fff; font-weight: 700; }
.alertbar .tag {
  font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  background: var(--gold); color: var(--deep); padding: 3px 10px; border-radius: 100px; white-space: nowrap;
}
.alertbar a.alink { display: inline-flex; align-items: center; gap: 5px; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; white-space: nowrap; }
/* This arrow ships with only a viewBox — without an explicit size it lays out
   at its 116px intrinsic size and drags the page into horizontal scroll. */
.alertbar a.alink svg { width: 14px; height: 14px; flex: none; }
.alertbar a.alink:hover { color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-color: var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 23px; letter-spacing: 0; line-height: 1; text-transform: uppercase; }
.brand .mark { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: block; flex: none; box-shadow: 0 1px 4px rgba(12,34,81,.14); }
.brand span { display: flex; flex-direction: column; }
.brand small { display:block; font-family: var(--sans); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight:600; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  padding: 9px 15px; border-radius: 100px; position: relative;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-2); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav-links a.active::after { content:""; position:absolute; left:15px; right:15px; bottom:2px; height:2px; background: var(--gold-line); border-radius: 2px; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; width: 46px; height: 46px; border-radius: 100px; border: 1px solid var(--line-2); background: transparent; align-items: center; justify-content: center; }
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- EN / ES language switch ---------- */
.lang-switch {
  display: inline-flex; align-items: center; flex: none;
  border: 1px solid var(--line-2); border-radius: 100px;
  padding: 3px; background: var(--surface);
}
.lang-btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; color: var(--muted);
  padding: 6px 10px; border-radius: 100px; line-height: 1;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.on { background: var(--ink); color: var(--paper); }
.lang-btn:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 2px; }

/* ---------- Persistent floating contact (newgtahomes-inspired) ---------- */
.contact-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 55;
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 22px 0 20px; border-radius: 100px;
  background: var(--gold); color: var(--deep); font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 30px -8px rgba(12,34,81,.45); border: none;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.contact-fab:hover { transform: translateY(-3px) scale(1.02); background: var(--ink); color: #fff; box-shadow: 0 16px 40px -8px rgba(12,34,81,.55); }
.contact-fab svg { width: 20px; height: 20px; }
@media (max-width: 520px){ .contact-fab span { display: none; } .contact-fab { padding: 0; width: 56px; justify-content: center; } }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding-block: clamp(64px, 9vw, 132px); }
.section-tight { padding-block: clamp(48px, 6vw, 84px); }
.ink-section { background: var(--ink); color: var(--paper); }
.ink-section .lede { color: rgba(243,241,234,.72); }
.ink-section .muted { color: rgba(243,241,234,.55); }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: clamp(32px, 5vw, 56px); }
.head-row .lede { margin-top: 18px; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.ink-section .rule { background: rgba(243,241,234,.16); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(28px, 4vw, 40px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 4vw, 56px); align-items: end; }
.hero h1 { margin-bottom: 22px; }
.hero .kicker { display:flex; gap: 10px; align-items:center; margin-bottom: 26px; }
.hero-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5; background: var(--paper-2); box-shadow: var(--shadow-2); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-stats { display: flex; gap: 40px; margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero-stat .n { font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; letter-spacing: -0.03em; }
.hero-stat .l { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; margin-top: 4px; }

/* Floating spec card over hero media */
.hero-float {
  position: absolute; left: 18px; bottom: 18px; right: 18px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 8px; padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  box-shadow: var(--shadow-1);
}
.hero-float .hf-name { font-family: var(--display); font-weight: 600; font-size: 16px; }
.hero-float .hf-loc { font-size: 12.5px; color: var(--muted); }
.hero-float .hf-price { font-family: var(--display); font-weight: 600; font-size: 18px; }
.hero-float .hf-price small { display:block; font-family: var(--sans); font-weight: 500; font-size: 10.5px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; text-align: right; }

/* ---------- Search bar (keyword + city + go) ---------- */
.searchbar {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-1);
  display: grid; grid-template-columns: 2.4fr 1fr auto; gap: 0;
  overflow: hidden;
}
.searchbar .field { padding: 12px 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; justify-content: center; }
.searchbar .field label { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.searchbar .field select, .searchbar .field input {
  border: 0; background: transparent; font-family: var(--sans); font-size: 16px; color: var(--ink); font-weight: 500;
  padding: 2px 0; width: 100%; -webkit-appearance: none; appearance: none;
}
.searchbar .field input::placeholder { color: var(--muted-2); }
.searchbar .field select:focus, .searchbar .field input:focus { outline: none; }
.searchbar .key-wrap { display: flex; align-items: center; gap: 11px; }
.searchbar .key-wrap svg { width: 19px; height: 19px; color: var(--gold-ink); flex: none; }
.searchbar .field-key { background: var(--surface); }
.searchbar .go { background: var(--ink); color: #fff; border: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 34px; font-weight: 600; font-size: 15px; transition: background .25s, color .25s; cursor: pointer; }
.searchbar .go svg { width: 18px; height: 18px; }
.searchbar .go:hover { background: var(--gold); color: var(--deep); }

/* quick search chips under the bar */
.quick-chip { font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); padding: 6px 14px; border-radius: 100px; transition: all .2s; }
.quick-chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Community / project cards (preconfactory-inspired) ---------- */
.grid { display: grid; gap: clamp(18px, 2.2vw, 28px); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative; /* containing block for .card-click */
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.card-media { position: relative; aspect-ratio: 16/11; overflow: hidden; background: var(--paper-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card-media img { transform: scale(1.045); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }

/* status chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 5px 11px; border-radius: 100px; text-transform: uppercase; }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; }
.chip-selling { background: var(--ok-tint); color: var(--ok); }
.chip-selling .chip-dot { background: var(--ok); }
.chip-move { background: var(--gold-soft); color: var(--ink); }
.chip-move .chip-dot { background: var(--gold-line); }
.chip-soon { background: var(--paper-2); color: var(--muted); }
.chip-soon .chip-dot { background: var(--muted-2); }
.card-media .chip { position: absolute; top: 14px; left: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px); }

.card-fav { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.6); display: grid; place-items: center; color: var(--ink); transition: background .2s, color .2s, transform .2s; }
.card-fav svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.card-fav:hover { background: var(--ink); color: #fff; }
.card-fav.on { background: var(--gold); color: var(--deep); border-color: var(--gold); }
.card-fav.on svg { fill: currentColor; }

/* community card specifics */
.comm-card .card-body { gap: 16px; }
.comm-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.comm-name { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.comm-loc { font-size: 13px; color: var(--muted); margin-top: 5px; display:flex; align-items:center; gap: 6px; }
.comm-loc svg { width: 14px; height: 14px; }
.comm-meta { display: flex; gap: 22px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.comm-meta .m .k { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.comm-meta .m .v { font-family: var(--display); font-weight: 600; font-size: 16px; margin-top: 2px; }
.comm-tags { display:flex; gap:6px; flex-wrap: wrap; }
.tag-pill { font-size: 11.5px; font-weight: 500; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); padding: 4px 11px; border-radius: 100px; }

/* model/listing card specifics */
.model-card .price { font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.model-card .price small { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; margin-left: 2px; }
.model-card .name { font-family: var(--display); font-size: 18px; font-weight: 600; }
.model-card .sub { font-size: 12.5px; color: var(--muted); }
.spec-row { display: flex; gap: 0; border-top: 1px solid var(--line); margin-top: auto; }
.spec-row .spec { flex: 1; padding-top: 12px; display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.spec-row .spec svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
/* Full-card click target. MUST reset the UA button chrome: a bare <button>
   paints ButtonFace grey + an outset border over the whole card. */
.card-click {
  position: absolute; inset: 0; z-index: 2;
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
  border-radius: var(--radius-lg);
}
.card-click:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
/* keep the favourite button clickable above the overlay */
.card-fav { z-index: 3; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fbtn { height: 40px; padding: 0 16px; border-radius: 100px; border: 1px solid var(--line-2); background: transparent; font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: all .2s; display:inline-flex; align-items:center; gap: 7px; }
.fbtn:hover { border-color: var(--ink); }
.fbtn.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fbtn .count { font-variant-numeric: tabular-nums; opacity: .6; font-size: 12px; }
.result-count { font-size: 14px; color: var(--muted); }
.result-count b { color: var(--ink); font-family: var(--display); }

/* ---------- Big wordmark band ---------- */
.wordmark {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(4rem, 22vw, 22rem); line-height: .8; letter-spacing: -0.04em;
  white-space: nowrap; color: var(--ink); user-select: none;
}
.ink-section .wordmark { color: var(--paper); }
.wordmark-wrap { overflow: hidden; }
.wordmark-outline { color: transparent; -webkit-text-stroke: 1.5px currentColor; }

/* ---------- Stats strip ---------- */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.ink-section .stats-strip { background: rgba(243,241,234,.14); border-color: rgba(243,241,234,.14); }
.stat-cell { background: var(--surface); padding: 28px 26px; }
.ink-section .stat-cell { background: var(--ink); }
.stat-cell .n { font-family: var(--display); font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 600; letter-spacing: -0.03em; }
.stat-cell .n .u { color: var(--gold); }
.stat-cell .l { font-size: 13px; color: var(--muted); margin-top: 6px; }
.ink-section .stat-cell .l { color: rgba(243,241,234,.6); }

/* ---------- Feature list / why-us ---------- */
.feat { display: flex; gap: 18px; padding: 26px 0; border-top: 1px solid var(--line); }
.ink-section .feat { border-color: rgba(243,241,234,.16); }
.feat .fnum { font-family: var(--display); font-size: 14px; color: var(--gold-ink); font-weight: 700; letter-spacing: .06em; padding-top: 4px; min-width: 34px; }
.feat h3 { font-size: 21px; margin-bottom: 8px; }
.feat p { margin: 0; color: var(--muted); font-size: 15px; max-width: 52ch; }
.ink-section .feat p { color: rgba(243,241,234,.6); }

/* ---------- Video / media block ---------- */
.media-block { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/8; background: var(--ink); }
.media-block img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.media-block .play { position: absolute; inset: 0; display: grid; place-items: center; }
.play-btn { width: 78px; height: 78px; border-radius: 50%; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(4px); display: grid; place-items: center; border: none; transition: transform .3s var(--ease), background .3s; }
.play-btn:hover { transform: scale(1.08); background: var(--brick); }
.play-btn svg { width: 26px; height: 26px; margin-left: 3px; color: var(--ink); }
.play-btn:hover svg { color: #fff; }
/* With no video configured the play button is removed entirely, so the still
   reads as a photo rather than a broken player. */
.media-block.no-video img { opacity: .9; }
.media-block.no-video { cursor: default; }

/* Video lightbox */
.video-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,39,.88); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: clamp(16px,4vw,48px);
  animation: videoIn .25s var(--ease);
}
@keyframes videoIn { from { opacity: 0 } to { opacity: 1 } }
.video-frame {
  width: min(1100px, 100%); aspect-ratio: 16/9;
  background: #000; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
}
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; display: block; }
.video-close {
  position: absolute; top: clamp(12px,3vw,28px); right: clamp(12px,3vw,28px);
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--paper); color: var(--ink);
  display: grid; place-items: center;
}
.video-close svg { width: 20px; height: 20px; }
.video-close:hover { background: var(--gold); }
@media (prefers-reduced-motion: reduce) { .video-scrim { animation: none; } }
.media-cap { position: absolute; left: 24px; bottom: 22px; color: var(--paper); }
.media-cap .t { font-family: var(--display); font-size: 20px; font-weight: 600; }
.media-cap .d { font-size: 13px; opacity: .75; }

/* ---------- Testimonials ---------- */
.quote-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 30px 26px; display: flex; flex-direction: column; gap: 18px; height: 100%; }
.quote-card .stars { color: var(--gold-ink); letter-spacing: 2px; font-size: 15px; }
.quote-card blockquote { margin: 0; font-family: var(--display); font-weight: 500; font-size: 19px; line-height: 1.35; letter-spacing: -0.01em; }
.quote-card .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.quote-card .av { width: 40px; height: 40px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-family: var(--display); font-weight: 600; color: var(--ink-2); }
.quote-card .who .nm { font-weight: 600; font-size: 14px; }
.quote-card .who .rl { font-size: 12px; color: var(--muted); }

/* ---------- Site plan ---------- */
.siteplan { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.siteplan img { width: 100%; height: auto; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.legend .lg { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.legend .sw { width: 14px; height: 14px; border-radius: 3px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--paper); border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.cta-band h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); max-width: 16ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding-top: clamp(56px, 7vw, 96px); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; }
.foot-grid h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(243,241,234,.5); font-weight: 600; margin-bottom: 18px; }
.foot-grid a { display: block; color: rgba(243,241,234,.8); font-size: 14.5px; padding: 6px 0; transition: color .2s; }
.foot-grid a:hover { color: #fff; }
.foot-brand .brand { color: var(--paper); font-size: 24px; }
.foot-brand p { color: rgba(243,241,234,.6); font-size: 14px; max-width: 34ch; margin: 18px 0 0; }
.foot-bottom { border-top: 1px solid rgba(243,241,234,.14); padding-block: 26px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: rgba(243,241,234,.5); }
.foot-bottom .socials { display: flex; gap: 8px; }
.foot-bottom .socials a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(243,241,234,.2); display: grid; place-items: center; }
.foot-bottom .socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--deep); }
.foot-bottom .socials svg { width: 16px; height: 16px; }

/* ---------- Modal (model detail) ---------- */
.modal-scrim { position: fixed; inset: 0; z-index: 100; background: rgba(22,19,14,.55); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s; display: grid; place-items: center; padding: 20px; }
.modal-scrim.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); max-width: 960px; width: 100%; max-height: 92vh; overflow: auto;
  transform: translateY(16px) scale(.98); transition: transform .35s var(--ease);
  display: grid; grid-template-columns: 1.1fr 1fr;
}
.modal-scrim.open .modal { transform: none; }
.modal-media { position: relative; background: var(--paper-2); }
.modal-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 32px 34px 34px; display: flex; flex-direction: column; gap: 18px; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); display: grid; place-items: center; }
.modal-close svg { width: 18px; height: 18px; }
.modal .specs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.modal .specs-grid .sc { background: var(--surface); padding: 14px 16px; }
.modal .specs-grid .sc .k { font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.modal .specs-grid .sc .v { font-family: var(--display); font-weight: 600; font-size: 18px; margin-top: 3px; display:flex; align-items:center; gap: 7px; }
.modal .specs-grid .sc .v svg { width: 16px; height: 16px; color: var(--gold-ink); }
.modal ul.feat-list { list-style: none; margin: 0; padding: 0; columns: 1; }
.modal ul.feat-list li { padding: 7px 0 7px 26px; position: relative; font-size: 14px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.modal ul.feat-list li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 8px; border-left: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink); transform: rotate(-45deg); }

/* ---------- Floor-plan download link (modal) ---------- */
.plan-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface-2); font-size: 14px; font-weight: 600; color: var(--ink);
  transition: border-color .2s, background .2s, transform .2s;
}
.plan-link span { flex: 1; }
.plan-link svg { width: 20px; height: 20px; color: var(--gold-ink); flex: none; }
.plan-link svg:last-child { width: 16px; height: 16px; color: var(--muted); }
.plan-link:hover { border-color: var(--ink); background: var(--surface); transform: translateY(-1px); }

/* ---------- Rebate breakdown (modal) ---------- */
.rebate-box { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.rb-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 15px; font-size: 13.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.rb-row b { font-family: var(--display); font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.rb-row:last-child { border-bottom: 0; }
.rb-total { background: var(--gold-soft); color: var(--ink); }
.rb-total b { color: var(--ink); font-size: 18px; }

/* ---------- Incentives / deposit ---------- */
.incentive-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.incentive-list li { position: relative; padding: 12px 0 12px 30px; font-size: 15px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.ink-section .incentive-list li { color: rgba(243,241,234,.82); border-color: rgba(243,241,234,.14); }
.incentive-list li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 12px; height: 7px; border-left: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink); transform: rotate(-45deg); }
.dep { padding: 16px 0; border-bottom: 1px solid var(--line); }
.ink-section .dep { border-color: rgba(243,241,234,.14); }
.dep:last-child { border-bottom: 0; }
.dep-k { font-family: var(--display); font-weight: 600; font-size: 15px; margin-bottom: 5px; }
.dep-v { font-size: 14px; color: var(--muted); line-height: 1.55; }
.ink-section .dep-v { color: rgba(243,241,234,.6); }
.payee-note { font-size: 12.5px; color: var(--muted); margin-top: 16px; }
.ink-section .payee-note { color: rgba(243,241,234,.5); }
.site-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.site-link { white-space: nowrap; }
.site-link svg { width: 16px; height: 16px; flex: none; }

/* ---------- Footer extras ---------- */
.foot-contact { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; }
.foot-contact a { display: inline-flex; align-items: center; gap: 9px; color: #fff; font-weight: 600; font-size: 15px; padding: 4px 0; }
.foot-contact svg { width: 16px; height: 16px; }
.estar { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 12px; color: rgba(243,241,234,.6); border: 1px solid rgba(243,241,234,.2); padding: 6px 12px; border-radius: 100px; }
.estar svg { width: 14px; height: 14px; color: var(--gold); }
.foot-legal { border-top: 1px solid rgba(243,241,234,.14); padding-block: 22px; }
.foot-legal p { margin: 0; font-size: 11.5px; line-height: 1.6; color: rgba(243,241,234,.42); max-width: 110ch; }

/* ---------- Card entrance ----------
   Intentionally NONE. Listing cards are the primary content; any technique that
   hides them first (gsap.from, animation fill-backwards, opacity-0 + observer)
   can strand them invisible if the animation never advances. They stay visible;
   motion is carried by hover tilt and hero parallax instead. */

/* ---------- 3D tilt on cards ----------
   No `will-change` / `transform-style` here: promoting 47 cards to their own
   GPU layers can leave their contents unrasterized (blank tiles). The tilt uses
   perspective() inside the transform function, so neither is needed. */
.tilt { transition: transform .4s var(--ease); }
.tilt .card-media img { transition: transform .5s var(--ease); }
@media (hover: none) { .tilt { transform: none !important; } }

/* ---------- Reveal animation ----------
   Hidden ONLY when JS has taken over (html.js-reveal). If app.js fails to load
   or throws, content stays visible rather than stranded at opacity 0. */
.reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js-reveal .reveal { opacity: 0; transform: translateY(22px); }
html.js-reveal .reveal.in { opacity: 1; transform: none; }
/* last-resort safety net: if nothing revealed it, show it anyway */
html.reveal-safety .reveal { opacity: 1 !important; transform: none !important; }
.reveal[data-d="1"] { transition-delay: .06s; }
.reveal[data-d="2"] { transition-delay: .12s; }
.reveal[data-d="3"] { transition-delay: .18s; }
.reveal[data-d="4"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* marquee */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee .track { display: inline-flex; gap: 3rem; align-items: center; animation: scrollx 34s linear infinite; }
.marquee .track span { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem,3vw,2.6rem); letter-spacing: -.02em; display:inline-flex; align-items:center; gap: 3rem; }
.marquee .track span::after { content: "•"; color: var(--gold-line); }
@keyframes scrollx { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(30px, 4vw, 48px); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 22px; display:flex; gap: 8px; align-items:center; }
.crumbs a:hover { color: var(--ink); }
.crumbs svg { width: 13px; height: 13px; }

/* community detail hero */
.cd-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 21/9; }
.cd-hero img { width: 100%; height: 100%; object-fit: cover; }
.cd-hero .ov { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,19,14,.05) 30%, rgba(22,19,14,.72) 100%); }
.cd-hero .ov-in { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(24px,4vw,48px); color: var(--paper); display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cd-hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); }

/* overview facts */
.facts { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.facts .f { background: var(--surface); padding: 22px 24px; }
.facts .f .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.facts .f .v { font-family: var(--display); font-weight: 600; font-size: 20px; margin-top: 5px; }

/* move-in ready table */
.mir-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mir-table th { text-align: left; font-family: var(--sans); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.mir-table td { padding: 15px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mir-table tr:hover td { background: var(--surface-2); }
.mir-table .m-model { font-family: var(--display); font-weight: 600; font-size: 15px; }
.mir-table .m-price { font-family: var(--display); font-weight: 600; font-size: 16px; }
.mir-table .m-old { text-decoration: line-through; color: var(--muted-2); font-size: 12px; margin-right: 6px; }
.mir-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.mir-scroll { overflow-x: auto; }

/* form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-b { display: flex; flex-direction: column; gap: 7px; }
.field-b.full { grid-column: 1 / -1; }
.field-b label { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.field-b input, .field-b select, .field-b textarea {
  font-family: var(--sans); font-size: 15px; padding: 13px 15px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); width: 100%;
}
.ink-section .field-b input, .ink-section .field-b select, .ink-section .field-b textarea { background: rgba(243,241,234,.06); border-color: rgba(243,241,234,.2); color: var(--paper); }
.field-b input:focus, .field-b select:focus, .field-b textarea:focus { outline: none; border-color: var(--ink); }
.field-b textarea { resize: vertical; min-height: 110px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16/11; max-height: 60vh; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats-strip, .facts { grid-template-columns: repeat(2, 1fr); }
  .modal { grid-template-columns: 1fr; }
  .modal-media { aspect-ratio: 16/10; }
}
/* Spanish nav labels run ~40% longer than the English ones ("Todas las
   viviendas" vs "All Homes"), which pushed the header onto two lines between
   720px and 1280px. Scoped to lang="es" so the English layout is unchanged. */
@media (min-width: 721px) and (max-width: 1180px) {
  html[lang="es"] .nav-links { display: none; }
  html[lang="es"] .nav-toggle { display: flex; }
  html[lang="es"] .nav-links.open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: 12px var(--gut) 20px; gap: 2px;
  }
  html[lang="es"] .nav-links.open a { padding: 13px 8px; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px var(--gut) 20px; gap: 2px; }
  .nav-links.open a { padding: 13px 8px; }
  .searchbar { grid-template-columns: 1fr; }
  .searchbar .field { border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 18px; }
  .searchbar .go { padding: 16px; justify-content: center; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats-strip, .facts { grid-template-columns: 1fr 1fr; }
  .head-row { align-items: flex-start; }
  .nav-right .btn:not(.always) { display: none; }
}
@media (max-width: 420px) {
  .stats-strip, .facts { grid-template-columns: 1fr; }
}

/* alert bar mobile: keep it to 1–2 lines */
@media (max-width: 760px) {
  .alertbar .wrap { gap: 10px; padding-block: 9px; }
  .alertbar a.alink { display: none; }   /* a.alink to out-specify the base rule */
}
@media (max-width: 520px) {
  .alertbar .tag { display: none; }
  .alertbar .wrap { font-size: 12px; line-height: 1.35; text-align: center; }
}

/* ============================================================
   TU CASA — brand components (team, builder attribution)
   ============================================================ */

/* community name uses the condensed display face */
.comm-name { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.hero-float .hf-name, .model-card .name, .modal-body h2, .quote-card blockquote,
.comm-meta .m .v, .facts .f .v, .stat-cell .n, .hero-stat .n, .mir-table .m-model,
.mir-table .m-price, .price, .display-md { font-family: var(--display); }

/* builder attribution line on cards */
.builder-line {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  letter-spacing: .01em;
}
.builder-line svg { width: 15px; height: 15px; color: var(--gold-ink); flex: none; }

/* community-page builder ribbon */
.cd-builder {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  background: var(--gold-soft); border: 1px solid var(--gold);
  padding: 8px 16px; border-radius: 100px; margin-bottom: 18px;
}
.cd-builder svg { width: 17px; height: 17px; color: var(--gold-ink); }

/* ---- FAQ ---- */
.faq-q { text-transform: uppercase; letter-spacing: .01em; }
.faq-q > span:first-child { max-width: 62ch; }

/* ---- Team ---- */
.team-av {
  width: 64px; height: 64px; border-radius: 50%; flex: none;
  background: var(--ink); color: var(--gold);
  font-family: var(--display); font-weight: 700; font-size: 24px;
  display: grid; place-items: center; letter-spacing: .02em;
  overflow: hidden;
}
.team-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-av.lg { width: 108px; height: 108px; font-size: 40px; }
/* larger portrait on the About page */
.team-full .team-av.lg {
  width: clamp(150px, 20vw, 210px); height: clamp(150px, 20vw, 210px);
  border-radius: var(--radius-lg);
}
.team-card {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.team-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.team-name { font-family: var(--display); font-weight: 700; font-size: 24px; text-transform: uppercase; letter-spacing: 0; }
.team-role { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--gold-ink); margin-top: 2px; }
.team-bio { color: var(--ink-2); font-size: 15px; line-height: 1.65; margin: 14px 0 12px; }
/* first column must track the portrait size set on .team-full .team-av.lg */
.team-full { display: grid; grid-template-columns: clamp(150px, 20vw, 210px) 1fr; gap: 30px; align-items: start; padding: 36px 0; border-top: 1px solid var(--line); }
.team-full .team-bio { max-width: 68ch; }

@media (max-width: 720px) {
  .team-card { flex-direction: column; gap: 14px; }
  .team-full { grid-template-columns: 1fr; gap: 18px; }
}

/* listings page search input */
.listing-search { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); transition: border-color .2s; }
.listing-search:focus-within { border-color: var(--ink); }
.listing-search svg { width: 18px; height: 18px; color: var(--gold-ink); flex: none; }
.listing-search input { border: 0; background: transparent; font-family: var(--sans); font-size: 16px; color: var(--ink); padding: 14px 0; width: 100%; }
.listing-search input:focus { outline: none; }

/* results-summary banner */
.results-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.results-summary b { color: var(--ink); font-family: var(--display); font-weight: 700; }
.clear-search { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); background: var(--gold-soft); border: 1px solid var(--gold); padding: 4px 11px; border-radius: 100px; }
.clear-search:hover { background: var(--gold); }
.clear-search svg { width: 13px; height: 13px; }

/* ============================================================
   HERO — centered, dark, search-first (preconfactory-style)
   ============================================================ */
.hero-dark {
  position: relative; overflow: hidden;
  background: var(--deep); color: #fff;
  padding-block: clamp(36px, 5vw, 68px);
}
.hero-dark-bg { position: absolute; inset: 0; overflow: hidden; }
/* Ken Burns crossfade slideshow — reads as motion footage, no external video needed.
   4 slides x 8s = 32s cycle. */
.hero-slide { position: absolute; inset: 0; opacity: 0; animation: heroFade 32s cubic-bezier(.4,0,.2,1) infinite; }
.hero-slide img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  animation: heroKen 32s ease-out infinite;
  will-change: transform;
}
.hero-slide:nth-child(1), .hero-slide:nth-child(1) img { animation-delay: 0s; }
.hero-slide:nth-child(2), .hero-slide:nth-child(2) img { animation-delay: 8s; }
.hero-slide:nth-child(3), .hero-slide:nth-child(3) img { animation-delay: 16s; }
.hero-slide:nth-child(4), .hero-slide:nth-child(4) img { animation-delay: 24s; }
@keyframes heroFade {
  0%   { opacity: 0; }
  4%   { opacity: .46; }
  22%  { opacity: .46; }
  28%  { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes heroKen {
  0%   { transform: scale(1.06) translate3d(0, 0, 0); }
  28%  { transform: scale(1.19) translate3d(-1.5%, -1.2%, 0); }
  100% { transform: scale(1.19) translate3d(-1.5%, -1.2%, 0); }
}
/* slow light sweep for a cinematic sheen */
.hero-sheen {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 32%, rgba(252,224,157,.5) 50%, transparent 68%);
  background-size: 260% 100%;
  animation: heroSheen 17s ease-in-out infinite;
}
@keyframes heroSheen {
  0%, 100% { background-position: 150% 0; }
  50%      { background-position: -50% 0; }
}
.hero-dark::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(12,34,81,.42), transparent 58%),
    linear-gradient(180deg, rgba(0,0,39,.72) 0%, rgba(0,0,39,.60) 42%, var(--deep) 88%);
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; opacity: 0; }
  .hero-slide:nth-child(1) { opacity: .4; }
  .hero-slide img { animation: none; transform: scale(1.04); }
  .hero-sheen { animation: none; opacity: .25; }
}
.hero-dark-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--gold); background: rgba(252,224,157,.09);
  border: 1px solid rgba(252,224,157,.34); padding: 8px 17px; border-radius: 100px;
}
.hero-badge svg { width: 15px; height: 15px; }

/* Tightened so the search bar stays above the fold — it is the hero's main feature. */
.hero-dark h1 {
  color: #fff; margin-top: 18px; max-width: 22ch;
  font-size: clamp(2.35rem, 5.6vw, 4.9rem);
}
.ul-gold { position: relative; white-space: nowrap; }
.ul-gold::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .1em; background: var(--gold); border-radius: 6px; }

.hero-sub { margin-top: 15px; max-width: 62ch; color: rgba(255,255,255,.72); font-size: clamp(1.02rem, 1.4vw, 1.24rem); line-height: 1.6; }

/* the search bar becomes the centrepiece on dark */
.hero-dark .searchbar {
  width: 100%; max-width: 880px; margin-top: 28px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(252,224,157,.30);
  box-shadow: 0 30px 80px -34px rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
}
.hero-dark .searchbar .field { border-right-color: rgba(255,255,255,.14); }
.hero-dark .searchbar .field label { color: rgba(252,224,157,.85); }
.hero-dark .searchbar .field input,
.hero-dark .searchbar .field select { color: #fff; }
.hero-dark .searchbar .field input::placeholder { color: rgba(255,255,255,.55); }
.hero-dark .searchbar .field-key { background: transparent; }
.hero-dark .searchbar .key-wrap svg { color: var(--gold); }
.hero-dark .searchbar .field select option { color: var(--ink); } /* readable dropdown popup */
.hero-dark .searchbar .go { background: var(--gold); color: var(--deep); }
.hero-dark .searchbar .go:hover { background: #fff; color: var(--deep); }

.hero-quick { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; }
.hero-quick > span { color: rgba(255,255,255,.55); font-size: 13px; }
.hero-dark .quick-chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.22); color: #fff; }
.hero-dark .quick-chip:hover { background: var(--gold); color: var(--deep); border-color: var(--gold); }

.hero-stats-pills {
  margin-top: 46px; padding-top: 30px; width: 100%; max-width: 760px;
  display: flex; gap: clamp(24px, 5vw, 72px); flex-wrap: wrap; justify-content: center;
  border-top: 1px solid rgba(255,255,255,.14);
}
.hsp { display: flex; flex-direction: column; align-items: center; }
.hsp-n { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 3.4vw, 2.9rem); color: #fff; line-height: 1; }
.hsp-l { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 7px; letter-spacing: .02em; }

@media (max-width: 520px) {
  .hero-stats-pills { gap: 22px; }
  .hsp { flex: 1 0 40%; }
}
