@font-face {
  font-family: Coconat;
  src: url("../fonts/Coconat-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Coconat;
  src: url("../fonts/Coconat-Demi.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Luxurious Script";
  src: url("../fonts/luxurious-script-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: hsl(32 18% 7%);
  --bg-elev: hsl(32 14% 11%);
  --ink: hsl(38 35% 93%);
  --ink-muted: hsl(35 14% 74%);
  --line: hsl(34 12% 22%);
  --accent: hsl(39 42% 68%);
  --accent-bright: hsl(39 48% 76%);
  --accent-on-dark: hsl(39 42% 68%);
  --gold: hsl(39 48% 62%);
  --gold-on-dark: hsl(39 48% 70%);
  --on-dark: hsl(38 35% 93%);
  --dark: hsl(32 20% 5%);
  --btn-ink: hsl(32 18% 8%);
  --map-stroke: #c4a574;
  --map-fill: #8a7349;
  --sold: hsl(35 8% 72%);
  --offer: hsl(32 55% 62%);
  --danger: hsl(8 70% 72%);
  --radius: 2px;
  --shadow: 0 24px 60px hsl(0 0% 0% / 0.35);
  --font-display: Coconat, Georgia, serif;
  --font-script: "Luxurious Script", cursive;
  --font-body: Manrope, Arial, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --wrap: 72rem;
  --measure: 40rem;
  --header-h: 4.5rem;
  --lb-accent: var(--accent-on-dark);
  --lb-muted: hsl(215 12% 70%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-bright);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

h1,
h2,
h3,
.brand {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: 0;
}

h1,
#listings {
  scroll-margin-top: calc(var(--header-h) + var(--space-3));
}

h1 {
  font-size: clamp(2.15rem, 4.2vw, 3.6rem);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.02em;
}

.script-accent {
  /* font-family: var(--font-script); */
  font-family: var(--font-body);
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
  color: var(--gold);
  margin: 0 0 var(--space-2);
  padding-block: 0.12em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  margin: 0 0 var(--space-4);
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 var(--space-3);
}

p {
  margin: 0 0 var(--space-4);
}

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: hsl(32 18% 7% / 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid hsl(39 30% 28%);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.2rem 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 500;
}

.brand:hover {
  color: var(--ink);
}

.nav-toggle {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 0.8rem;
  font: inherit;
  color: var(--ink);
  min-height: 44px;
}

.site-nav {
  width: 100%;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.04em;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.btn.header-cta {
  display: none;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    width: auto;
    margin-left: auto;
  }

  .site-nav ul {
    flex-direction: row;
    gap: var(--space-5);
  }

  .btn.header-cta {
    display: inline-flex;
  }
}

.site-nav.is-open,
.nav-toggle[aria-expanded="true"] + .site-nav {
  display: block;
}

@media (max-width: 899px) {
  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: 400 0.78rem var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--gold);
  color: var(--btn-ink);
}

.btn-primary:hover {
  background: var(--accent-bright);
  color: var(--btn-ink);
}

.btn-secondary {
  background: var(--bg-elev);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  color: var(--ink);
}

.btn-gold {
  background: var(--gold);
  color: var(--btn-ink);
}

.btn-gold:hover {
  color: var(--btn-ink);
}

.hero {
  padding: var(--space-7) 0 var(--space-5);
}

.lede {
  max-width: var(--measure);
  color: var(--ink-muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.home-main {
  display: flex;
  flex-direction: column;
}

.map-section {
  padding: 0;
}

.map-bleed {
  width: 100%;
}

.map-shell {
  position: relative;
  min-height: 22rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow);
}

#property-map,
#admin-editor-map {
  position: relative;
  z-index: 0;
}

#property-map {
  min-height: 22rem;
  height: min(70vh, 40rem);
}

.map-chrome,
.map-jump {
  position: absolute;
  z-index: 2;
}

.map-chrome {
  top: max(var(--space-3), env(safe-area-inset-top, 0px));
  left: var(--space-3);
  right: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  pointer-events: none;
  z-index: 6;
}

.map-chrome > * {
  pointer-events: auto;
}

.map-hint {
  margin: 0;
  padding: 0.55rem 0.8rem;
  background: hsl(32 18% 7% / 0.88);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-full-btn,
.map-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.55rem 0.9rem;
  border: 1px solid hsl(39 30% 28%);
  background: hsl(32 18% 7% / 0.92);
  color: var(--gold);
  font: 600 0.72rem var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.map-full-btn:hover,
.map-jump:hover {
  color: var(--accent-bright);
}

.map-jump {
  left: 50%;
  bottom: max(var(--space-4), env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
}

.map-shell:has(#map-empty:not([hidden])) .map-chrome,
.map-shell:has(#map-empty:not([hidden])) .map-jump,
.map-shell:has(#map-fallback:not([hidden])) .map-chrome,
.map-shell:has(#map-fallback:not([hidden])) .map-jump {
  display: none;
}

.map-shell:has(#map-empty:not([hidden])) #property-map,
.map-shell:has(#map-fallback:not([hidden])) #property-map {
  height: 0;
  min-height: 0;
}

.map-shell.is-full {
  position: fixed;
  inset: 0;
  z-index: 80;
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.map-shell.is-full #property-map {
  height: 100dvh;
  min-height: 100dvh;
}

.map-shell.is-full .map-hint,
.map-shell.is-full .map-jump {
  display: none;
}

body.is-map-full {
  overflow: hidden;
}

body.is-map-full .site-header,
body.is-map-full .consent-banner {
  visibility: hidden;
}

@media (max-width: 899px) {
  .home-main .map-section {
    order: -1;
  }

  .home-main .map-shell,
  .home-main #property-map {
    min-height: calc(100dvh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    border-radius: 0;
  }

  .home-main .map-shell {
    border-inline: 0;
    box-shadow: none;
  }

  .home-intro {
    padding-top: var(--space-6);
  }

  .map-hint {
    max-width: 11rem;
  }

  .home-main .map-shell:has(#map-empty:not([hidden])),
  .home-main .map-shell:has(#map-fallback:not([hidden])),
  .home-main .map-shell:has(#map-empty:not([hidden])) #property-map,
  .home-main .map-shell:has(#map-fallback:not([hidden])) #property-map {
    height: auto;
    min-height: 0;
  }

  .home-main .map-shell.is-full,
  .home-main .map-shell.is-full #property-map {
    height: 100dvh;
    min-height: 100dvh;
  }
}

@media (min-width: 900px) {
  .map-section .map-bleed {
    width: min(100% - 2rem, var(--wrap));
    margin-inline: auto;
  }

  #property-map {
    height: min(70vh, 44rem);
    min-height: 28rem;
  }
}

.map-empty:not([hidden]),
.map-fallback:not([hidden]) {
  position: relative;
}

.map-empty,
.map-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-6);
  background:
    linear-gradient(180deg, hsl(32 16% 10%), hsl(32 18% 7%));
}

.map-empty[hidden],
.map-fallback[hidden] {
  display: none;
}

.disclaimer-note {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-left: 3px solid var(--gold);
  background: var(--bg-elev);
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.section {
  padding: var(--space-7) 0;
}

.section-dark {
  background: var(--dark);
  color: var(--on-dark);
}

.section-dark :not(.eyebrow) {
  color: var(--on-dark);
}

.section-dark a:not(.btn) {
  color: var(--accent-on-dark);
}

.section-dark .btn-primary {
  background: var(--gold);
  color: var(--btn-ink);
}

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.section-dark .eyebrow {
  color: var(--gold-on-dark);
}

.card-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
}

.property-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.property-card h2 {
  margin-bottom: var(--space-2);
}

.status {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.status-available {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.status-offer {
  background: transparent;
  color: var(--offer);
  border: 1px solid var(--offer);
}

.status-sold {
  background: transparent;
  color: var(--sold);
  border: 1px solid var(--line);
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
}

.steps li {
  counter-increment: step;
  padding-left: 3.2rem;
  position: relative;
}

.steps li::before {
  display: none;
}

.step-icon {
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 40px;
  height: 40px;
}

.form {
  max-width: 36rem;
  display: grid;
  gap: var(--space-4);
}

.listings-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: end;
  margin: 0 0 var(--space-4);
}

.listings-search {
  flex: 1 1 12rem;
}

.sort-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 44px;
}

.sort-btn[aria-sort="ascending"]::after {
  content: " \2191";
  color: var(--gold);
}

.sort-btn[aria-sort="descending"]::after {
  content: " \2193";
  color: var(--gold);
}

.listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.listing-actions select {
  min-width: 9rem;
}

.admin-editor {
  max-width: none;
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
}

.admin-editor-grid {
  display: grid;
  gap: var(--space-6);
}

.admin-editor-fields,
.admin-editor-map-col {
  display: grid;
  gap: var(--space-4);
}

.admin-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.admin-search-row input {
  flex: 1 1 12rem;
}

.admin-map-shell {
  min-height: 22rem;
}

#admin-editor-map {
  min-height: 22rem;
  height: min(32rem, 70vh);
  border: 0;
  background: var(--bg-elev);
}

.admin-map-tools {
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: max(var(--space-3), env(safe-area-inset-bottom, 0px));
  z-index: 6;
  justify-content: center;
}

.admin-map-shell.is-full .map-hint {
  display: block;
}

.admin-map-shell.is-full #admin-editor-map {
  height: 100dvh;
  min-height: 100dvh;
}

.coord-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (min-width: 900px) {
  .admin-editor-grid {
    grid-template-columns: minmax(16rem, 24rem) minmax(20rem, 1fr);
    align-items: start;
  }

  .admin-editor-map-col {
    position: sticky;
    top: calc(var(--header-h) + var(--space-3));
  }
}

label {
  display: grid;
  gap: var(--space-1);
  font-weight: 400;
  letter-spacing: 0.04em;
}

input,
select,
textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: hsl(32 16% 9%);
  color: var(--ink);
  min-height: 44px;
}

textarea {
  min-height: 8rem;
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.consent {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-weight: 400;
}

.consent input {
  min-height: 1.25rem;
  min-width: 1.25rem;
  margin-top: 0.25rem;
}

.form-status {
  min-height: 1.5rem;
  font-weight: 600;
}

.form-status.is-error {
  color: var(--danger);
}

.form-status.is-ok {
  color: var(--accent);
}

.site-footer {
  background: var(--dark);
  color: var(--on-dark);
  padding: var(--space-7) 0 var(--space-5);
  margin-top: var(--space-8);
  border-top: 1px solid hsl(39 30% 28%);
}

.site-footer :not(.eyebrow) {
  color: var(--on-dark);
}

.site-footer a {
  color: var(--accent-on-dark);
}

.footer-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.muted {
  color: var(--ink-muted);
}

.stats-row {
  display: grid;
  gap: var(--space-3);
}

.popup-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.property-popup {
  max-width: min(18rem, 78vw);
  font-family: var(--font-body);
  color: hsl(32 18% 12%);
}

.property-popup a:not(.btn) {
  color: hsl(32 30% 28%);
}

.property-id {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0 0 0.25rem;
}

.gallery {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.gallery figure {
  margin: 0;
}

.gallery figcaption {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-top: var(--space-2);
}

.admin-login,
.admin-app {
  max-width: 72rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.kpi {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
}

.kpi strong {
  display: block;
  font-size: 1.6rem;
  font-family: var(--font-display);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elev);
}

.guide h2 {
  margin-top: var(--space-7);
}

.guide ul,
.guide ol {
  max-width: 42rem;
  padding-left: 1.25rem;
}

.guide li + li {
  margin-top: var(--space-2);
}

.guide code {
  font-size: 0.92em;
}

th,
td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.consent-banner {
  position: sticky;
  bottom: 0;
  background: var(--dark);
  color: var(--on-dark);
  padding: var(--space-4);
  z-index: 30;
}

.consent-banner :not(.eyebrow) {
  color: var(--on-dark);
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
