/* ==========================================================
   Sunwave Imobiliária — Global styles
   Brand tokens: edit these to re-skin the whole site
   ========================================================== */
:root {
  /* Sunwave brand: wine, gold, cream */
  --navy: #5A1526;        /* wine (primary) */
  --navy-2: #3A0A14;      /* deep wine */
  --gold: #C9A24E;        /* brand gold */
  --gold-2: #A67C2E;      /* darker gold for text on cream */
  --gold-3: #E8C97A;      /* light gold highlight */
  --teal: #8A2A3F;        /* accent: lighter wine (links) */
  --sand: #FBF6EE;        /* cream */
  --sand-2: #F1E7D6;      /* darker cream */
  --ink: #2A1A1E;
  --muted: #6E5A5F;
  --line: #E7DCCB;
  --white: #FFFFFF;
  --success: #2E8B57;
  --danger: #C0392B;
  --wa: #25D366;

  --font-display: "Playfair Display", Georgia, serif;
  --font-serif2: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(58, 10, 20, 0.12);
  --shadow-sm: 0 4px 14px rgba(58, 10, 20, 0.08);
  --max: 1180px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .8rem; font-weight: 600; color: var(--gold-2); margin-bottom: .6em; display: block; font-family: var(--font-serif2); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 72px 0; }
.section-tight { padding: 44px 0; }
.section-sand { background: var(--sand); }
.section-navy { background: var(--navy-2); color: #EBD9CF; }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy .muted { color: #C9AEB4; }
.center { text-align: center; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
  text-decoration: none !important; line-height: 1.2; font-family: var(--font-body);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--gold); color: var(--navy-2); }
.btn-primary:hover { background: var(--gold-2); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.7); color: var(--white); }
.btn-wa { background: var(--wa); color: var(--white); }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn-sm { padding: 9px 16px; font-size: .85rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--navy); }
.brand-mark { width: 42px; height: 42px; }
.brand-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.brand-name small { display: block; font-family: var(--font-serif2); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); font-weight: 600; margin-top: -3px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--navy); font-weight: 500; font-size: .95rem; }
.nav-links a.active { color: var(--gold-2); border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.nav-links a:hover { text-decoration: none; color: var(--gold-2); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-toggle { display: inline-flex; gap: 6px; }
.lang-toggle button {
  background: transparent; border: 2px solid transparent; border-radius: 8px; padding: 4px; cursor: pointer;
  opacity: .45; transition: opacity .15s, border-color .15s, transform .15s; line-height: 0;
}
.lang-toggle button:hover { opacity: .85; }
.lang-toggle button.on { opacity: 1; border-color: var(--gold); }
.lang-toggle .flag { width: 28px; height: 20px; display: block; box-shadow: 0 1px 3px rgba(0,0,0,.25); border-radius: 3px; }
.nav-burger { display: none; background: none; border: 0; width: 42px; height: 42px; cursor: pointer; }
.nav-burger span { display: block; height: 2px; background: var(--navy); margin: 6px 0; border-radius: 2px; transition: .2s; }
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); flex-direction: column; align-items: stretch; gap: 0; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 16px var(--gutter); border-top: 1px solid var(--line); }
  .nav-burger { display: block; }
  .nav-cta { display: none; }
}

/* Hero */
.hero {
  position: relative; color: var(--white); overflow: hidden;
  background: linear-gradient(160deg, #2E0710 0%, #4A1020 55%, #5A1526 100%);
  min-height: 82vh; display: flex; align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1200px 500px at 85% 110%, rgba(201,162,78,.28), transparent 60%),
    radial-gradient(600px 400px at 10% -10%, rgba(255,255,255,.12), transparent 60%);
}
.hero .container { position: relative; }
.hero h1 { color: var(--white); max-width: 720px; }
.hero p.lead { font-size: 1.15rem; max-width: 620px; color: #EBD9CF; }
.hero .eyebrow { color: var(--gold-3); }
.hero-sun { position: absolute; right: -80px; bottom: -160px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #E8C97A, #C9A24E 55%, rgba(201,162,78,0) 72%); opacity: .45; pointer-events: none; }
.hero-emblem { position: absolute; right: 7%; top: 44%; transform: translateY(-50%); width: min(380px, 34vw); opacity: .3; pointer-events: none; }
@media (max-width: 900px) { .hero-emblem { display: none; } }
.hero-waves { position: absolute; left: 0; right: 0; bottom: -2px; }

/* Search bar */
.search-bar {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 10px; margin-top: 34px; max-width: 980px;
}
.search-bar select, .search-bar input, .filters select, .filters input, .form input, .form select, .form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 12px; font: inherit; font-size: .95rem; color: var(--ink); background: var(--white);
}
.search-bar .btn { border-radius: var(--radius-sm); align-self: end; }
.search-bar label > span { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px 2px; }
@media (max-width: 900px) { .search-bar { grid-template-columns: 1fr 1fr; } .search-bar .btn { grid-column: 1 / -1; } }

/* Stats / trust */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--navy); }
.stat { border-top: 3px solid var(--gold); }
.stat span { color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--sand-2); overflow: hidden; }
.card-media img, .card-media .ph { width: 100%; height: 100%; object-fit: cover; }
.ph { display: flex; align-items: flex-end; padding: 14px; color: rgba(255,255,255,.9); font-family: var(--font-display); font-size: 1.1rem; }
.badge { position: absolute; top: 12px; left: 12px; background: var(--gold); color: var(--navy-2); font-weight: 700; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }
.badge.teal { background: var(--teal); color: var(--white); }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.15rem; }
.card-body h3 a { color: var(--navy); }
.price { font-weight: 700; color: var(--navy); font-size: 1.15rem; }
.price small { display: block; color: var(--muted); font-weight: 500; font-size: .82rem; }
.loc { color: var(--muted); font-size: .9rem; }
.specs { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .85rem; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }
.specs span { display: inline-flex; align-items: center; gap: 5px; }
.card-actions { display: flex; gap: 8px; padding: 0 18px 18px; }
.card-actions .btn { flex: 1; }

/* Filters (listings page) */
.filters { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 26px; }
@media (max-width: 900px) { .filters { grid-template-columns: repeat(2, 1fr); } }
.filters label > span { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px 2px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; color: var(--muted); font-size: .92rem; flex-wrap: wrap; gap: 10px; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Listing detail */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 260px 260px; gap: 10px; border-radius: var(--radius); overflow: hidden; }
.gallery > * { width: 100%; height: 100%; object-fit: cover; }
.gallery > :first-child { grid-row: 1 / 3; }
@media (max-width: 800px) { .gallery { grid-template-columns: 1fr; grid-template-rows: 260px; } .gallery > :not(:first-child) { display: none; } .gallery > :first-child { grid-row: auto; } }
.detail-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 36px; margin-top: 30px; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 92px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 20px 0; }
.spec-grid div { background: var(--sand); border-radius: var(--radius-sm); padding: 12px; font-size: .9rem; }
.spec-grid b { display: block; color: var(--navy); font-size: 1.05rem; }
.feature-list { columns: 2; gap: 24px; padding-left: 18px; }
@media (max-width: 600px) { .feature-list { columns: 1; } }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.panel .price { font-size: 1.6rem; }

/* Steps / guide */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--white); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); position: relative; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-size: 2.2rem; color: var(--gold); line-height: 1; display: block; margin-bottom: 10px; }
.step h3 { font-size: 1.1rem; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Testimonials */
.quote { background: var(--white); border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.quote p { font-style: italic; color: var(--ink); }
.quote footer { font-weight: 600; color: var(--navy); font-size: .9rem; }
.quote footer span { display: block; color: var(--muted); font-weight: 400; }

/* Team */
.avatar { width: 88px; height: 88px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-2), var(--navy)); color: var(--gold-3); display: flex; align-items: center; justify-content: center; color: var(--white); font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 14px; }

/* Blog */
.post-meta { color: var(--muted); font-size: .85rem; }
.prose { max-width: 760px; margin: 0 auto; font-size: 1.05rem; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose blockquote { border-left: 4px solid var(--gold); margin: 1.4em 0; padding: 6px 18px; background: var(--sand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.tag { display: inline-block; background: var(--sand); color: var(--navy); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }

/* Forms */
.form { display: grid; gap: 14px; }
.form label { font-weight: 600; font-size: .9rem; color: var(--navy); display: block; margin-bottom: 6px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.form textarea { min-height: 130px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--muted); }
.check input { width: auto; margin-top: 3px; }
.form-msg { padding: 12px 14px; border-radius: var(--radius-sm); font-size: .92rem; display: none; }
.form-msg.ok { display: block; background: #E6F4EC; color: var(--success); }
.form-msg.err { display: block; background: #FBE9E7; color: var(--danger); }
.hp { position: absolute; left: -9999px; }

/* Page header */
.page-head { background: var(--sand); padding: 56px 0 44px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .3em; }
.page-head p { max-width: 640px; color: var(--muted); margin: 0; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--navy-2), var(--navy)); color: var(--white); border-radius: var(--radius); padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin: 0 0 6px; }
.cta-band p { margin: 0; color: #EBD9CF; }

/* Footer */
.site-footer { background: var(--navy-2); color: #C9AEB4; padding: 56px 0 28px; margin-top: 40px; }
.site-footer h4 { color: var(--gold); font-family: var(--font-body); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #EBD9CF; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.social { display: flex; gap: 12px; margin-top: 14px; }
.social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); display: inline-flex; align-items: center; justify-content: center; }
.social svg { width: 18px; height: 18px; fill: var(--white); }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(37,211,102,.45);
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; fill: var(--white); }

/* Utilities */
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; } .mt-4 { margin-top: 44px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 28px; }
.flex { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.small { font-size: .85rem; }
.hidden { display: none !important; }
.notice { background: #FFF6E5; border: 1px solid #F5D9A6; color: #6B4E0B; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .9rem; }
