/* =========================================================
   NOMA REAL ESTATE — polished luxury brokerage
   Palette: deep navy, ocean blue, sky, white, mist, warm gold
   Type: Oswald (display) + Source Sans 3 (body)
   ========================================================= */

:root {
  --navy: #052C4C;
  --navy-soft: #0a3e66;
  --ocean: #137BA6;
  --sky: #A9DAEE;
  --mist: #F4F7F8;
  --white: #FFFFFF;
  --gold: #D4A746;
  --gold-light: #E5C168;
  --charcoal: #171C20;
  --ink: #2A3340;
  --muted: rgba(42, 51, 64, .68);
  --rule: rgba(5, 44, 76, .12);
  --rule-soft: rgba(5, 44, 76, .06);

  --display: "Oswald", "Bebas Neue", Impact, sans-serif;
  --sans: "Source Sans 3", system-ui, "Segoe UI", sans-serif;

  --maxw: 1280px;
  --gut: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { font-family: var(--sans); font-weight: 400; font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: 0; }
ul { list-style: none; padding: 0; }
input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.vh, .skip { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip:focus { top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--gold); color: var(--navy); padding: 10px 16px; z-index: 200; }

h1, h2, h3, h4 { font-family: var(--display); color: var(--navy); font-weight: 600; line-height: 1.05; text-transform: uppercase; letter-spacing: .005em; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.9rem); }
.muted { color: var(--ocean); }

.eyebrow {
  display: inline-block; font-family: var(--sans); font-weight: 600;
  font-size: .72rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
}

/* ---------- Header ---------- */
.hdr { position: sticky; top: 0; z-index: 80; background: var(--white); border-bottom: 1px solid var(--rule-soft); transition: box-shadow .3s var(--ease); }
.hdr.is-scrolled { box-shadow: 0 6px 24px -16px rgba(5, 44, 76, .35); }
.hdr__inner { max-width: var(--maxw); margin: 0 auto; padding: 1rem var(--gut); display: flex; align-items: center; gap: var(--gut); }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--navy); flex-shrink: 0; }
.brand__mark { width: 36px; height: 36px; color: var(--gold); }
.brand span { font-family: var(--display); font-size: 1.05rem; line-height: 1; text-transform: uppercase; letter-spacing: .04em; font-weight: 500; }
.brand strong { color: var(--gold); font-weight: 700; }
.nav { display: flex; gap: clamp(1rem, 1.4vw, 1.8rem); flex: 1; justify-content: center; align-items: center; }
.nav > a, .nav__item > a {
  position: relative; padding: 1.5rem 0; font-weight: 500; font-size: .9rem; letter-spacing: .04em;
  color: var(--ink); transition: color .3s var(--ease);
}
.nav > a::after, .nav__item > a::after { content: ""; position: absolute; left: 0; bottom: 1.2rem; width: 0; height: 2px; background: var(--gold); transition: width .35s var(--ease); }
.nav > a:hover, .nav__item:hover > a { color: var(--navy); }
.nav > a:hover::after, .nav__item:hover > a::after { width: 100%; }
.nav__item { position: relative; }
.nav__item .dd {
  position: absolute; top: 100%; left: 0; min-width: 180px;
  background: var(--white); padding: .5rem 0;
  border: 1px solid var(--rule); border-top: 3px solid var(--gold);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .3s var(--ease); z-index: 2;
}
.nav__item:hover .dd, .nav__item:focus-within .dd { opacity: 1; visibility: visible; transform: none; }
.nav__item .dd a { display: block; padding: .6rem 1.2rem; font-size: .88rem; color: var(--ink); }
.nav__item .dd a:hover { background: var(--mist); color: var(--navy); }
.hdr__utils { display: flex; gap: .8rem; align-items: center; }
.util { width: 40px; height: 40px; display: grid; place-items: center; color: var(--navy); border-radius: 50%; transition: all .3s var(--ease); }
.util svg { width: 19px; height: 19px; }
.util:hover { background: var(--mist); color: var(--ocean); }
.btn-navy {
  display: inline-block; padding: .8rem 1.5rem; background: var(--navy); color: var(--white);
  font-weight: 600; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  transition: all .3s var(--ease);
}
.btn-navy:hover { background: var(--ocean); transform: translateY(-1px); }
.btn-navy--ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-navy--ghost:hover { background: var(--navy); color: var(--white); }
.btn--block { width: 100%; padding: .9rem 1rem; }
.burger { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; align-items: center; justify-content: center; }
.burger span { width: 22px; height: 2px; background: var(--navy); }

.hdr-search { position: absolute; left: 0; right: 0; top: 100%; background: var(--mist); border-bottom: 1px solid var(--rule); padding: 1rem var(--gut); animation: drop .3s var(--ease); }
.hdr-search input { width: 100%; max-width: 600px; margin: 0 auto; display: block; padding: .8rem 1rem; border: 1px solid var(--rule); font-size: 1rem; }
.hdr-search input:focus { outline: none; border-color: var(--gold); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Drawer ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(82vw, 340px); background: var(--navy); padding: 2rem 1.5rem; transform: translateX(100%); transition: transform .4s var(--ease); display: flex; flex-direction: column; gap: .4rem; }
.drawer[data-open="true"] { transform: none; }
.drawer__close { position: absolute; top: 1rem; right: 1.2rem; font-size: 2rem; color: var(--white); }
.drawer a { font-family: var(--display); font-size: 1.3rem; text-transform: uppercase; color: var(--white); padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.scrim { position: fixed; inset: 0; z-index: 90; background: rgba(5, 44, 76, .5); opacity: 0; transition: opacity .35s var(--ease); }
.scrim.is-visible { opacity: 1; }

/* ---------- Buttons ---------- */
.btn-gold {
  display: inline-block; padding: .9rem 1.8rem; background: var(--gold); color: var(--navy);
  font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  border: 0; cursor: pointer; transition: all .3s var(--ease);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); }

.link-gold { display: inline-block; margin-top: 1rem; font-weight: 600; color: var(--navy); position: relative; padding-bottom: 3px; }
.link-gold::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--gold); transition: transform .35s var(--ease); transform-origin: left; }
.link-gold:hover::after { transform: scaleX(0); transform-origin: right; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(640px, 90vh, 860px); overflow: hidden; background: var(--navy); display: flex; align-items: flex-end; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(95deg, rgba(5, 44, 76, .92) 0%, rgba(5, 44, 76, .55) 40%, rgba(5, 44, 76, 0) 75%); }
.hero__content { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; padding: clamp(50px, 7vw, 100px) var(--gut) clamp(180px, 22vw, 280px); color: var(--white); }
.hero__content h1 { color: var(--white); max-width: 18ch; }
.hero__content p { color: rgba(255,255,255,.82); margin: 1.2rem 0; max-width: 56ch; font-size: 1.08rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }

/* Search panel */
.search-panel {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: -52px; z-index: 4;
  width: min(1200px, 92%);
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 0;
  background: var(--navy); padding: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 30px 60px -30px rgba(5, 44, 76, .6);
  border-top: 4px solid var(--gold);
}
.search-panel__field { padding: 0 .9rem; border-right: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: .3rem; }
.search-panel__field:last-of-type { border-right: 0; }
.search-panel__field label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.search-panel__field input, .search-panel__field select { background: transparent; border: 0; color: var(--white); padding: .3rem 0; font-size: .98rem; }
.search-panel__field input::placeholder { color: rgba(255,255,255,.5); }
.search-panel__field input:focus, .search-panel__field select:focus { outline: none; }
.search-panel__field select option { color: var(--ink); }
.search-panel__submit { align-self: stretch; padding: 0 2rem; margin-left: 1rem; }
.search-panel__empty { grid-column: 1 / -1; padding: 1rem .9rem 0; color: rgba(255,255,255,.7); font-size: .9rem; }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 9vw, 130px) var(--gut); }
.hd { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.hd--center { max-width: none; text-align: center; }
.hd--between { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }

/* ---------- Why ---------- */
.why { padding-top: clamp(140px, 16vw, 200px); }
.why__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 2vw, 32px); }
.why-item { text-align: center; padding: 1.5rem; }
.why-item__icon {
  width: 64px; height: 64px; margin: 0 auto 1.2rem;
  border: 1.5px solid var(--gold); border-radius: 50%;
  display: grid; place-items: center; color: var(--navy);
  transition: all .35s var(--ease);
}
.why-item:hover .why-item__icon { background: var(--navy); color: var(--gold); transform: translateY(-3px); }
.why-item__icon svg { width: 28px; height: 28px; }
.why-item h3 { font-size: 1.2rem; color: var(--navy); margin-bottom: .5rem; }
.why-item p { color: var(--muted); font-size: .92rem; }

/* ---------- Listings ---------- */
.listings { background: var(--mist); padding: clamp(70px, 9vw, 120px) var(--gut); }
.listings__inner { max-width: var(--maxw); margin: 0 auto; }
.listings__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2vw, 30px); }
.prop {
  background: var(--white); border-radius: 6px; overflow: hidden;
  box-shadow: 0 18px 40px -28px rgba(5, 44, 76, .25);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  position: relative;
}
.prop:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -28px rgba(5, 44, 76, .4); }
.prop__media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.prop__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.prop:hover .prop__media img { transform: scale(1.05); }
.prop__badge { position: absolute; top: 1rem; left: 1rem; background: var(--gold); color: var(--navy); padding: .3rem .8rem; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.prop__fav { position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px; background: rgba(255,255,255,.92); border-radius: 50%; display: grid; place-items: center; color: var(--navy); transition: all .3s var(--ease); }
.prop__fav:hover, .prop__fav.is-fav { background: var(--gold); color: var(--white); }
.prop__fav svg { width: 18px; height: 18px; }
.prop__count { position: absolute; bottom: 1rem; right: 1rem; background: rgba(5, 44, 76, .85); color: var(--white); padding: .3rem .7rem; font-size: .76rem; font-weight: 600; border-radius: 2px; }
.prop__body { padding: 1.4rem 1.5rem 1.5rem; }
.prop__price { font-family: var(--display); font-size: 1.5rem; font-weight: 600; color: var(--navy); }
.prop__name { font-family: var(--display); font-size: 1.3rem; color: var(--navy); text-transform: uppercase; margin-top: .3rem; }
.prop__loc { font-size: .86rem; color: var(--ocean); margin-top: .3rem; display: flex; align-items: center; gap: .35rem; }
.prop__loc svg { width: 14px; height: 14px; }
.prop__stats { display: flex; gap: 1rem; padding: 1rem 0; margin-top: 1rem; border-top: 1px solid var(--rule); font-size: .85rem; color: var(--muted); }
.prop__stats span { display: inline-flex; align-items: center; gap: .35rem; }
.prop__stats svg { width: 16px; height: 16px; color: var(--gold); }
.prop .btn-navy { width: 100%; margin-top: .4rem; }
.listings__empty { text-align: center; padding: 2rem; color: var(--ocean); }

/* ---------- Services ---------- */
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2vw, 30px); }
.svc {
  padding: 2rem 1.8rem; background: var(--white);
  border: 1px solid var(--rule);
  transition: all .35s var(--ease);
  position: relative;
}
.svc::before { content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 0; background: var(--gold); transition: width .35s var(--ease); }
.svc:hover { border-color: var(--gold); transform: translateY(-4px); }
.svc:hover::before { width: 100%; }
.svc__icon { width: 52px; height: 52px; color: var(--gold); margin-bottom: 1.2rem; }
.svc__icon svg { width: 100%; height: 100%; }
.svc h3 { font-size: 1.4rem; color: var(--navy); margin-bottom: .5rem; }
.svc__cat { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: .8rem; display: block; }
.svc p { color: var(--muted); }

/* ---------- Testimonials ---------- */
.testi { background: var(--navy); padding: clamp(70px, 9vw, 120px) var(--gut); color: var(--white); }
.testi__inner { max-width: var(--maxw); margin: 0 auto; }
.testi .hd h2 { color: var(--white); }
.testi__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2vw, 30px); }
.testi-card { background: rgba(255,255,255,.05); padding: 3rem 1.8rem 1.8rem; border: 1px solid rgba(255,255,255,.08); position: relative; margin-top: 3rem; }
.testi-card__avatar { position: absolute; top: -42px; left: 50%; transform: translateX(-50%); width: 80px; height: 80px; border-radius: 50%; border: 4px solid var(--navy); object-fit: cover; box-shadow: 0 0 0 1px var(--gold); }
.testi-card__stars { color: var(--gold); display: flex; gap: 2px; justify-content: center; margin-bottom: 1rem; }
.testi-card__stars svg { width: 16px; height: 16px; }
.testi-card__quote { color: rgba(255,255,255,.88); text-align: center; font-style: italic; line-height: 1.6; margin-bottom: 1.2rem; }
.testi-card__name { text-align: center; font-family: var(--display); font-size: 1.2rem; color: var(--white); text-transform: uppercase; }
.testi-card__role { text-align: center; font-size: .82rem; color: var(--gold); margin-top: .2rem; }
.testi-card__more { display: block; text-align: center; margin-top: 1rem; color: var(--gold); font-size: .82rem; font-weight: 600; }

/* ---------- Blog ---------- */
.blog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2vw, 32px); }
.post { display: block; }
.post__media { aspect-ratio: 4/3; overflow: hidden; }
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.post:hover .post__media img { transform: scale(1.04); }
.post__body { padding-top: 1.2rem; }
.post__cat { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.post h3 { font-size: 1.4rem; color: var(--navy); margin: .4rem 0 .6rem; line-height: 1.2; }
.post p { color: var(--muted); font-size: .92rem; margin-bottom: .8rem; }

/* ---------- Final CTA ---------- */
.final-cta { position: relative; min-height: 460px; display: grid; place-items: center; overflow: hidden; text-align: center; padding: clamp(80px, 11vw, 150px) var(--gut); background: var(--navy); }
.final-cta__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.final-cta__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 44, 76, .82) 0%, rgba(5, 44, 76, .92) 100%); }
.final-cta__body { position: relative; z-index: 2; max-width: 760px; }
.final-cta__body h2 { color: var(--white); }
.final-cta__body p { color: rgba(255,255,255,.85); margin: 1rem 0 2rem; font-size: 1.1rem; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 1.5rem; background: rgba(5, 44, 76, .75); backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s var(--ease); }
.modal[data-open="true"] { opacity: 1; }
.modal__card { background: var(--white); padding: 2.5rem; max-width: 520px; width: 100%; position: relative; animation: pop .35s var(--ease); }
@keyframes pop { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__close { position: absolute; top: 1rem; right: 1.2rem; font-size: 2rem; color: var(--navy); }
.modal__card h3 { font-size: 1.7rem; margin-bottom: .5rem; }
.modal__card > p { color: var(--muted); margin-bottom: 1.5rem; }
.form-field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.form-field label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); font-weight: 600; }
.form-field input, .form-field select, .form-field textarea { padding: .8rem 1rem; border: 1px solid var(--rule); font-size: .95rem; font-family: inherit; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--gold); }
.form-field input.invalid, .form-field select.invalid, .form-field textarea.invalid { border-color: #d77b5a; }
.form-msg { margin-top: 1rem; font-size: .9rem; }
.form-msg.ok { color: var(--ocean); }
.form-msg.err { color: #d77b5a; }

/* ---------- Footer ---------- */
.ft { background: var(--white); padding: clamp(60px, 7vw, 100px) var(--gut) 1.5rem; border-top: 1px solid var(--rule); }
.ft__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: clamp(28px, 4vw, 50px); padding-bottom: 2.5rem; border-bottom: 1px solid var(--rule); }
.ft .brand { color: var(--navy); margin-bottom: 1.2rem; }
.ft__brand p { font-size: .92rem; margin-bottom: 1.2rem; max-width: 44ch; color: var(--muted); }
.ft__social { display: flex; gap: .4rem; }
.ft__social a { width: 38px; height: 38px; border: 1px solid var(--rule); border-radius: 50%; display: grid; place-items: center; color: var(--navy); transition: all .3s var(--ease); }
.ft__social a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.ft__social svg { width: 17px; height: 17px; }
.ft__col h3 { color: var(--navy); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 1rem; font-family: var(--sans); font-weight: 600; }
.ft__col a { display: block; font-size: .92rem; padding: .28rem 0; color: var(--muted); transition: color .3s var(--ease); }
.ft__col a:hover { color: var(--navy); }
.ft__col p { font-size: .9rem; color: var(--muted); margin-bottom: .4rem; }
.ft__col a[href^="mailto"], .ft__col a[href^="tel"] { color: var(--ocean); }
.ft__legal { max-width: var(--maxw); margin: 1.5rem auto 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .82rem; color: var(--muted); }
.ft__legal ul { display: flex; gap: 1.4rem; }
.ft__legal a { color: var(--muted); }
.ft__legal a:hover { color: var(--navy); }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translate(-50%, 30px); background: var(--navy); color: var(--white); padding: 1rem 1.6rem; font-size: .9rem; z-index: 200; opacity: 0; transition: all .35s var(--ease); border-left: 4px solid var(--gold); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .85s var(--ease), transform .85s var(--ease); }
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav { display: none; }
  .util { display: none; }
  .burger { display: flex; }
  .btn-navy:not(.btn-navy--ghost) { display: none; }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
  .listings__grid { grid-template-columns: repeat(2, 1fr); }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .testi__grid { grid-template-columns: 1fr; max-width: 540px; margin: 0 auto; }
  .blog__grid { grid-template-columns: repeat(2, 1fr); }
  .ft__inner { grid-template-columns: 1fr 1fr; }
  .ft__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .search-panel { position: relative; left: auto; transform: none; bottom: auto; width: calc(100% - 40px); margin: -80px auto 0; grid-template-columns: 1fr; padding: 1.2rem; gap: 1rem; }
  .search-panel__field { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); padding: 0 0 .8rem; }
  .search-panel__field:last-of-type { border-bottom: 0; }
  .search-panel__submit { margin-left: 0; padding: 1rem; }
  .hero__content { padding-bottom: clamp(140px, 25vw, 200px); }
}
@media (max-width: 620px) {
  :root { --gut: 20px; }
  .why__grid, .listings__grid, .services__grid, .blog__grid { grid-template-columns: 1fr; }
  .hd--between { flex-direction: column; align-items: flex-start; }
  .ft__inner { grid-template-columns: 1fr; }
  .ft__legal { flex-direction: column; text-align: center; }
  .hero__cta .btn-gold, .hero__cta .btn-navy { width: 100%; }
}
