/* ===========================================================
   Coastal Properties FL — DEMO site
   A fictional coastal real estate brokerage by Digital Footprint.
   Fourth distinct design system: light, architectural, navy +
   sand + terracotta. Layout-led (listing cards, specs, filters).
   =========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:      #12293D;
  --navy-2:    #1D3C55;
  --navy-soft: #43596C;
  --terra:     #C2634A;
  --terra-dk:  #A44E38;
  --sand:      #EFE7DC;
  --sand-lt:   #F7F1E9;
  --paper:     #FCFAF7;
  --muted:     #6B7A85;
  --line:      #E3DACE;
  --white:     #FFFFFF;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 10px rgba(18,41,61,.06);
  --shadow:    0 14px 44px rgba(18,41,61,.10);
  --shadow-lg: 0 30px 80px rgba(18,41,61,.16);
  --font-h:    'Outfit', system-ui, sans-serif;
  --font-b:    'Inter', system-ui, sans-serif;
  --ease:      cubic-bezier(0.16,1,0.3,1);
}

html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--navy);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--terra); color: #fff; }
img { max-width: 100%; display: block; }
a { color: var(--terra-dk); }

.wrap { max-width: 1220px; margin: 0 auto; padding: 0 32px; }
.wrap--narrow { max-width: 820px; }
h1, h2, h3, h4 { font-family: var(--font-h); font-weight: 600; line-height: 1.14; letter-spacing: -.025em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-h); font-size: .74rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--terra);
  margin-bottom: 16px;
}
.eyebrow::before { content: ''; width: 20px; height: 2px; background: var(--terra); }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-h); font-weight: 600; font-size: .93rem;
  padding: 14px 28px; border-radius: 999px; text-decoration: none;
  cursor: pointer; border: 1.5px solid transparent;
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-terra { background: var(--terra); color: #fff; }
.btn-terra:hover { background: var(--terra-dk); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--navy); background: var(--white); }
.btn-ghost:hover { border-color: var(--navy); transform: translateY(-2px); }

/* ── Nav ──────────────────────────────────────────────────── */
nav { position: sticky; top: 0; z-index: 60; background: rgba(252,250,247,.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1220px; margin: 0 auto; padding: 0 32px; height: 78px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--navy); display: flex; align-items: center; justify-content: center; color: var(--sand); flex-shrink: 0; }
.brand-name { display: block; font-family: var(--font-h); font-weight: 700; font-size: 1.1rem; color: var(--navy); letter-spacing: -.02em; line-height: 1.1; }
.brand-sub { display: block; font-size: .63rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a { font-family: var(--font-h); font-size: .93rem; font-weight: 500; color: var(--navy); text-decoration: none; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--terra); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; }
@media (max-width: 900px) {
  .nav-links {
    position: fixed; inset: 78px 0 auto 0; background: var(--white); flex-direction: column;
    gap: 0; padding: 8px 0; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-130%); visibility: hidden;
    transition: transform .35s var(--ease), visibility 0s .35s;
  }
  .nav-links.open { transform: translateY(0); visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links li a { display: block; padding: 14px; }
  .nav-links li .btn { margin: 10px auto; }
  .nav-toggle { display: flex; }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero { position: relative; padding: 0 0 130px; }
.hero-media { position: relative; height: 62vh; min-height: 430px; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(58% 46% at 50% 46%, rgba(18,41,61,.58) 0%, rgba(18,41,61,0) 100%),
    linear-gradient(180deg, rgba(18,41,61,.5) 0%, rgba(18,41,61,.34) 60%, rgba(18,41,61,.5) 100%);
}
.hero-copy { position: absolute; z-index: 2; top: 50%; left: 0; right: 0; transform: translateY(-60%); text-align: center; color: #fff; padding: 0 24px; }
.hero-copy .eyebrow { color: var(--sand); }
.hero-copy .eyebrow::before { background: var(--sand); }
.hero-copy h1 { font-size: clamp(2.3rem, 1.3rem + 3.6vw, 4rem); color: #fff; }
.hero-copy p { margin-top: 16px; font-size: 1.1rem; color: rgba(255,255,255,.9); max-width: 560px; margin-inline: auto; }

/* Search card overlapping the hero */
.search-card {
  position: relative; z-index: 3; max-width: 980px; margin: -78px auto 0;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 26px; display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 16px; align-items: end;
}
@media (max-width: 900px) {
  .search-card { grid-template-columns: 1fr 1fr; margin-top: -40px; }
  /* Lift hero copy so it clears the overlapping search card */
  .hero-copy { transform: translateY(-96%); }
  .hero-media { height: 56vh; }
}
@media (max-width: 560px) {
  .search-card { grid-template-columns: 1fr; }
  .hero-copy { transform: translateY(-104%); }
  .hero-copy p { font-size: .98rem; }
}
.sf label { display: block; font-family: var(--font-h); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.sf input, .sf select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-b); font-size: .95rem; color: var(--navy); background: var(--white);
}
.sf input:focus, .sf select:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 3px rgba(194,99,74,.12); }
.search-card .btn { width: 100%; justify-content: center; }

/* ── Sections ─────────────────────────────────────────────── */
section { padding: 92px 0; }
.section-head { max-width: 640px; margin-bottom: 46px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(1.85rem, 1.2rem + 2.2vw, 2.8rem); }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 1.04rem; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.band { background: var(--sand-lt); }

/* ── Listing cards ────────────────────────────────────────── */
.listing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 980px) { .listing-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 640px) { .listing-grid { grid-template-columns: 1fr; } }

.listing {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: transform .38s var(--ease), box-shadow .38s, border-color .3s;
}
.listing:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.listing-img { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.listing-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.listing:hover .listing-img img { transform: scale(1.06); }
.listing-tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(252,250,247,.95); color: var(--navy); font-family: var(--font-h);
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
.listing-tag.hot { background: var(--terra); color: #fff; }
.listing-price {
  position: absolute; bottom: 14px; left: 14px; z-index: 2;
  background: var(--navy); color: #fff; font-family: var(--font-h); font-weight: 700;
  font-size: 1.05rem; padding: 8px 16px; border-radius: 999px;
}
.listing-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.listing-body h3 { font-size: 1.15rem; }
.listing-addr { color: var(--muted); font-size: .9rem; margin-top: 5px; flex: 1; }
.specs { display: flex; gap: 0; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 15px; }
.spec { flex: 1; text-align: center; border-right: 1px solid var(--line); }
.spec:last-child { border-right: none; }
.spec b { display: block; font-family: var(--font-h); font-size: 1.02rem; color: var(--navy); }
.spec span { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Filter chips */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.chip {
  font-family: var(--font-h); font-size: .88rem; font-weight: 500; padding: 9px 18px;
  border: 1.5px solid var(--line); background: var(--white); color: var(--navy);
  border-radius: 999px; cursor: pointer; transition: all .22s;
}
.chip:hover { border-color: var(--terra); color: var(--terra); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ── Stats ────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; padding: 30px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.stat b { display: block; font-family: var(--font-h); font-size: 2.1rem; font-weight: 700; color: var(--terra); letter-spacing: -.03em; }
.stat span { font-size: .82rem; color: var(--muted); }

/* ── Split ────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }
.split-img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.split-img img { width: 100%; height: 100%; object-fit: cover; }
.checklist { list-style: none; margin-top: 22px; display: grid; gap: 15px; }
.checklist li { display: flex; gap: 13px; align-items: flex-start; }
.checklist .tick { width: 26px; height: 26px; border-radius: 50%; background: var(--sand); color: var(--terra-dk); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; font-size: .8rem; }
.checklist strong { font-family: var(--font-h); }
.checklist p { color: var(--muted); font-size: .94rem; margin-top: 2px; }

/* ── Neighborhoods ────────────────────────────────────────── */
.hood-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .hood-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hood-grid { grid-template-columns: 1fr; } }
.hood { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/2; text-decoration: none; display: block; }
.hood img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.hood:hover img { transform: scale(1.07); }
.hood::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18,41,61,.85), transparent 60%); }
.hood-label { position: absolute; z-index: 2; left: 20px; bottom: 18px; color: #fff; }
.hood-label b { font-family: var(--font-h); font-size: 1.15rem; display: block; }
.hood-label span { font-size: .82rem; color: rgba(255,255,255,.8); }

/* ── Agents ───────────────────────────────────────────────── */
.agent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 820px) { .agent-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; } }
.agent { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: center; padding-bottom: 26px; transition: transform .35s var(--ease), box-shadow .35s; }
.agent:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.agent-img { aspect-ratio: 1/1; overflow: hidden; }
.agent-img img { width: 100%; height: 100%; object-fit: cover; }
.agent h3 { margin-top: 20px; font-size: 1.18rem; }
.agent .role { color: var(--terra-dk); font-family: var(--font-h); font-weight: 600; font-size: .86rem; }
.agent p { color: var(--muted); font-size: .9rem; margin-top: 9px; padding: 0 22px; }

/* ── Quote ────────────────────────────────────────────────── */
.quote-band { background: var(--navy); color: #fff; }
.quote-band .stars { color: var(--terra); letter-spacing: 4px; margin-bottom: 16px; }
.quote-band blockquote { font-family: var(--font-h); font-weight: 500; font-size: clamp(1.35rem, 1rem + 1.5vw, 1.95rem); line-height: 1.45; max-width: 800px; margin: 0 auto; letter-spacing: -.015em; }
.quote-band .who { margin-top: 20px; color: rgba(255,255,255,.65); font-size: .92rem; }

/* ── Page head ────────────────────────────────────────────── */
.page-head { background: var(--sand-lt); padding: 62px 0 42px; border-bottom: 1px solid var(--line); }
.crumbs { font-size: .84rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--terra-dk); text-decoration: none; }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.page-head p { margin-top: 14px; max-width: 600px; color: var(--muted); font-size: 1.04rem; }

/* ── Contact ──────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 52px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 38px; } }
.info-item { display: flex; gap: 15px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.info-item:last-child { border-bottom: none; }
.info-item .ico { width: 44px; height: 44px; border-radius: 11px; background: var(--sand); color: var(--terra-dk); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-item h4 { font-size: 1rem; }
.info-item p, .info-item a { color: var(--muted); font-size: .94rem; text-decoration: none; }
form .field { margin-bottom: 18px; }
form label { display: block; font-family: var(--font-h); font-size: .78rem; font-weight: 600; color: var(--navy); margin-bottom: 7px; }
form input, form select, form textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-b); font-size: .95rem; color: var(--navy); background: var(--white);
  transition: border-color .2s, box-shadow .2s;
}
form input:focus, form select:focus, form textarea:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 3px rgba(194,99,74,.12); }
form textarea { resize: vertical; min-height: 120px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 500px) { .f-row { grid-template-columns: 1fr; } }
.form-ok { display: none; background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; text-align: center; }
.form-ok .ico { width: 46px; height: 46px; border-radius: 50%; background: var(--terra); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.form-ok h4 { font-size: 1.15rem; }
.form-ok p { color: var(--muted); margin-top: 6px; }
.map-block { margin-top: 24px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; border: 1px solid var(--line); }
.map-block img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }

/* ── CTA ──────────────────────────────────────────────────── */
.cta-band { background: var(--sand-lt); }
.cta-inner { background: var(--navy); border-radius: 22px; padding: 58px 44px; text-align: center; color: #fff; box-shadow: var(--shadow-lg); }
.cta-inner h2 { color: #fff; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); }
.cta-inner p { margin: 14px auto 0; max-width: 520px; color: rgba(255,255,255,.75); }
.cta-inner .btn { margin-top: 26px; }

/* ── Footer ───────────────────────────────────────────────── */
footer.site { background: var(--navy); color: rgba(255,255,255,.66); padding: 58px 0 26px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 38px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
footer.site .brand-name { color: #fff; }
footer.site p { font-size: .92rem; margin-top: 13px; }
footer.site h5 { font-family: var(--font-h); color: #fff; font-size: .94rem; margin-bottom: 13px; }
footer.site ul { list-style: none; display: grid; gap: 9px; }
footer.site a, footer.site li { color: rgba(255,255,255,.66); text-decoration: none; font-size: .92rem; transition: color .2s; }
footer.site a:hover { color: var(--terra); }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; text-align: center; font-size: .82rem; color: rgba(255,255,255,.42); }

/* ── DEMO badge ───────────────────────────────────────────── */
.demo-badge {
  position: fixed; z-index: 200; right: 18px; bottom: 18px;
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(18,41,61,.94); color: #fff; backdrop-filter: blur(8px);
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
  font-family: var(--font-h); font-size: .78rem; font-weight: 500;
  box-shadow: 0 10px 30px rgba(18,41,61,.3); opacity: .82;
  transition: opacity .25s, transform .25s var(--ease);
}
.demo-badge:hover { opacity: 1; transform: translateY(-2px); }
.demo-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--terra); box-shadow: 0 0 0 4px rgba(194,99,74,.28); }
.demo-badge b { color: #fff; font-weight: 700; }
.demo-badge .arrow { color: var(--terra); }
@media (max-width: 520px) { .demo-badge { right: 10px; bottom: 10px; font-size: .72rem; padding: 9px 13px; } }

/* ── Typography detail ───────────────────────────────────────
   This site was running two sans faces (Outfit + Inter), which is not a
   pairing so much as two similar voices — part of why it read flat. A
   Playfair Display italic is added purely as a display accent, giving a
   genuine serif/sans contrast and the aspirational, editorial tone that
   suits waterfront property. Deliberately different from Bayside's warm
   rounded treatment so the portfolio shows range, not one house style. */

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.hero h1 { letter-spacing: -.035em; font-weight: 700; }

/* The serif italic carries the emotional half of the headline. */
.hero h1 .accent {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic; font-weight: 400;
  color: var(--terra);
  letter-spacing: -.01em;
}

.hero p { font-size: 1.16rem; line-height: 1.62; }

/* Stats as editorial figures: large, light, tabular, with hairline rules. */
.stat b { font-size: 2.5rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.stat span { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }

/* Small caps for spec/label chrome — quiet, precise, estate-agent formal. */
.spec b { letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.spec span { letter-spacing: .12em; font-weight: 600; }
.hood-label b { letter-spacing: -.02em; }

.section-head h2, .page-head h1 { letter-spacing: -.035em; }
.section-head h2 em, .page-head h1 em {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic; font-weight: 400; color: var(--terra);
}

/* Opening paragraph of long copy gets a drop cap — an editorial signal
   that this is a story, not a listing blurb. */
.prose > p:first-of-type::first-letter,
.lede-drop::first-letter {
  float: left; font-family: 'Playfair Display', Georgia, serif;
  font-size: 3.4em; line-height: .82; font-weight: 600;
  color: var(--terra); margin: .04em .12em 0 0;
}

.quote-band blockquote {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic; font-weight: 400; letter-spacing: -.01em;
}

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
