:root {
  --navy: #0a192f;
  --navy-2: #0f172a;
  --navy-muted: #1e3a5f;
  --cta: #e67e22;
  --cta-hover: #d35400;
  --ok: #10b981;
  --wa: #25d366;
  --wa-hover: #1fb855;
  --white: #ffffff;
  --pearl: #f8fafc;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 12px 32px rgba(15, 23, 42, 0.14);
  --max: 1180px;
  --font: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  --accent: var(--cta);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: var(--navy);
  color: var(--cta);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

nav.main-nav {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  flex: 1;
  min-width: 0;
  scrollbar-gutter: stable;
}

nav.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

nav.main-nav a:hover,
nav.main-nav a[aria-current="page"] {
  color: var(--navy);
}

.header-cta {
  display: none;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.header-auth a:not(.btn) {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  padding: 0.4rem 0.2rem;
}

.header-auth .btn {
  min-height: 44px;
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
}

.pw-row {
  display: grid;
  gap: 0.45rem;
}

.auth-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.guide-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.guide-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.article-body {
  max-width: 44rem;
}

.article-body h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.2rem;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.article-body p {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.intent-tab:focus-visible {
  outline: 3px solid var(--cta);
  outline-offset: 2px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}

.btn-navy:hover {
  background: var(--navy-muted);
}

.btn-cta {
  background: var(--cta);
  color: var(--white);
}

.btn-cta:hover {
  background: var(--cta-hover);
}

.btn-wa {
  background: var(--wa);
  color: var(--white);
}

.btn-wa:hover {
  background: var(--wa-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  min-height: 78dvh;
  display: grid;
  align-items: end;
  color: var(--white);
  isolation: isolate;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 25, 47, 0.25) 0%, rgba(10, 25, 47, 0.78) 70%, rgba(10, 25, 47, 0.92) 100%);
}

.hero-copy {
  padding: 4.5rem 0 7.5rem;
  max-width: 42rem;
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0;
  color: #e2e8f0;
  font-size: 1.05rem;
}

.search-card {
  position: relative;
  margin-top: -4.25rem;
  margin-bottom: 3rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  color: var(--ink);
}

.intent-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.intent-tab {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--pearl);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.intent-tab[aria-selected="true"] {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.search-grid {
  display: grid;
  gap: 0.75rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  font: inherit;
  background: var(--white);
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid {
  border-color: #b91c1c;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section.alt {
  background: var(--pearl);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.section-head h2,
.cta-band h2,
.diaspora h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  letter-spacing: -0.03em;
  color: var(--navy);
}

.lede {
  margin: 0;
  color: var(--muted);
}

.zones {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.zone-card {
  position: relative;
  overflow: clip;
  border-radius: var(--radius);
  min-height: 180px;
  color: var(--white);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.15rem;
  background: var(--navy) center / cover no-repeat;
}

.zone-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(10, 25, 47, 0.82));
}

.zone-card > * {
  position: relative;
}

.zone-card strong {
  font-size: 1.15rem;
}

.zone-card span {
  font-size: 0.9rem;
  color: #cbd5e1;
}

.listings {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 1fr;
}

.listing-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: clip;
  box-shadow: var(--shadow);
  container-type: inline-size;
}

.listing-card:hover {
  box-shadow: var(--shadow-hover);
}

.listing-media {
  position: relative;
}

.listing-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
}

.badge-acd {
  background: var(--cta);
}

.badge-exclu {
  background: var(--navy);
}

.badge-new {
  background: var(--ok);
}

.badge-sale {
  background: var(--navy-muted);
}

.listing-body {
  padding: 1rem 1.05rem 1.15rem;
}

.price {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.price small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.listing-title {
  margin: 0.45rem 0 0.2rem;
  font-size: 1.02rem;
}

.listing-loc {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.specs svg {
  width: 1rem;
  height: 1rem;
  vertical-align: -0.15rem;
}

.card-actions {
  display: grid;
  gap: 0.5rem;
}

.diaspora-grid {
  display: grid;
  gap: 1rem;
}

.icon-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.icon-card h3 {
  margin: 0.5rem 0 0.35rem;
  font-size: 1.05rem;
}

.icon-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--pearl);
  color: var(--cta);
}

.cta-band {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  display: grid;
  gap: 1rem;
}

.cta-band p {
  margin: 0;
  color: #cbd5e1;
}

.site-footer {
  background: var(--navy-2);
  color: #cbd5e1;
  padding: 2.5rem 0 5.5rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.site-footer a {
  color: var(--white);
}

.site-footer h2 {
  color: var(--white);
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.wa-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
  text-decoration: none;
}

.wa-float:hover {
  background: var(--wa-hover);
}

.wa-float svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Wizard */
.wizard-shell {
  max-width: 40rem;
  margin: 1.5rem auto 4rem;
  padding: 0 1rem;
}

.progress {
  margin-bottom: 1.25rem;
}

.progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: clip;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--cta);
  width: 20%;
}

.step {
  display: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.step.active {
  display: block;
}

.choice-grid {
  display: grid;
  gap: 0.6rem;
}

.choice-grid label {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-weight: 650;
}

.choice-grid input {
  accent-color: var(--cta);
}

.dropzone {
  position: relative;
  display: block;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  background: var(--pearl);
  cursor: pointer;
}

.dropzone.is-drag {
  border-color: var(--cta);
  background: #fff7ed;
}

.dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.preview-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.preview-row img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.success-box {
  display: none;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

@media (min-width: 720px) {
  .header-cta {
    display: flex;
  }

  .intent-tabs {
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  }

  .search-grid {
    grid-template-columns: 1.4fr 1fr 1fr auto;
    align-items: end;
  }

  .zones {
    grid-template-columns: repeat(2, 1fr);
  }

  .listings {
    grid-template-columns: repeat(2, 1fr);
  }

  .diaspora-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guide-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cta-band {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 2rem 2.25rem;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .card-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .listings {
    grid-template-columns: repeat(3, 1fr);
  }

  .zones {
    grid-template-columns: repeat(4, 1fr);
  }

  .diaspora-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
