/* ==========================================================================
   Ndangira Inzu — Stylesheet
   Design language: editorial light mode + anthracite/khaki dark sections.
   Signature element: the "Cadastral Mark" — a hairline compass/seal motif
   drawn from land-survey plans, used as logo, watermark and divider.
   ========================================================================== */

:root {
  /* Color tokens */
  --ivory: #FAF9F6;
  --paper: #F1EFE8;
  --paper-line: #E4E0D4;
  --anthracite: #171614;
  --anthracite-2: #211F1B;
  --anthracite-line: #3A362E;
  --khaki: #A3906A;
  --khaki-soft: #C3B392;
  --khaki-deep: #7C6B47;
  --ink: #232019;
  --ink-soft: #5C574C;
  --bone: #EEE9DC;
  --bone-soft: #B8B1A0;

  /* Type */
  --font-display: 'Cormorant Garamond', serif;
  --font-sans: 'Inter', sans-serif;

  /* Motion */
  --ease: cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--ivory);
  color: var(--ink);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--khaki); color: var(--ivory); }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 1px solid var(--khaki);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Typography ---- */
.font-display { font-family: var(--font-display); }
.font-sans { font-family: var(--font-sans); }

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--khaki-deep);
}
.on-dark .eyebrow { color: var(--khaki-soft); }

.text-ink { color: var(--ink); }
.text-ink-soft { color: var(--ink-soft); }

/* Manual utilities: "bone" tones aren't part of Tailwind's default
   palette, so these are hand-declared (including the two variants
   the markup uses) rather than relying on the Tailwind CDN JIT scan. */
.text-bone { color: var(--bone); }
.text-bone-soft { color: var(--bone-soft); }
.hover\:text-bone:hover { color: var(--bone); }
.placeholder\:text-bone-soft::placeholder { color: var(--bone-soft); }

/* ---- Cadastral mark (signature element) ---- */
.cadastral-mark {
  display: inline-block;
  width: 1em; height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 0.6;
}

.mark-divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--khaki);
}
.mark-divider::before, .mark-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: currentColor;
  opacity: 0.4;
}

.watermark-seal {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
  color: var(--khaki);
}

/* ---- Ref / lot number tag on property cards ---- */
.ref-tag {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-soft);
}

/* ---- Navbar ---- */
#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(250, 249, 246, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
#site-nav.nav-scrolled { border-bottom-color: var(--paper-line); }

.nav-link {
  position: relative;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 3px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--khaki-deep);
  transition: width .3s var(--ease);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--khaki-deep); }

.btn-khaki {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--anthracite);
  color: var(--bone);
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--anthracite);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-khaki:hover { background: var(--khaki-deep); border-color: var(--khaki-deep); }

.btn-outline {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--khaki);
  color: var(--ink);
  padding: 0.85rem 1.6rem;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.btn-outline:hover { background: var(--khaki); color: var(--ivory); }
.on-dark .btn-outline { color: var(--bone); }

/* Mobile menu */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--anthracite);
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}
#mobile-menu.open { transform: translateY(0); }

.burger-line { transition: transform .35s var(--ease), opacity .25s var(--ease); }
#burger-btn[aria-expanded="true"] .line-1 { transform: translateY(6px) rotate(45deg); }
#burger-btn[aria-expanded="true"] .line-2 { opacity: 0; }
#burger-btn[aria-expanded="true"] .line-3 { transform: translateY(-6px) rotate(-45deg); }

/* ---- Hero slider ---- */
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  background-size: cover;
  background-position: center;
}
.hero-slide.active { opacity: 1; }

.hero-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(238,233,220,0.4);
  transition: background .3s var(--ease), width .3s var(--ease);
}
.hero-dot.active { background: var(--khaki-soft); width: 22px; border-radius: 4px; }

/* ---- Section framing ---- */
.section-dark { background: var(--anthracite); color: var(--bone); }
.section-paper { background: var(--paper); }

/* ---- Property cards ---- */
.property-card { cursor: pointer; }
.property-card .img-wrap { overflow: hidden; position: relative; }
.property-card img {
  transition: transform 1s var(--ease);
}
.property-card:hover img { transform: scale(1.07); }

.card-hover-reveal {
  position: absolute; inset: auto 0 0 0;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(0deg, rgba(23,22,20,0.88), rgba(23,22,20,0));
  color: var(--bone);
  transform: translateY(100%);
  opacity: 0;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.property-card:hover .card-hover-reveal { transform: translateY(0); opacity: 1; }

.status-pill {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  background: rgba(250,249,246,0.92);
  color: var(--ink);
}
.status-pill.for-rent { background: var(--khaki); color: var(--ivory); }

/* ---- Filters ---- */
#filters-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .5s var(--ease);
}
#filters-panel.open { max-height: 420px; }

/* ---- Featured carousel (features section) ---- */
#feature-track { transition: transform .7s var(--ease); }

/* ---- Forms ---- */
.field-line {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--paper-line);
  padding: 0.7rem 0.1rem;
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--ink);
  transition: border-color .3s var(--ease);
}
.on-dark .field-line { border-bottom-color: var(--anthracite-line); color: var(--bone); }
.field-line:focus { border-bottom-color: var(--khaki); outline: none; }
.field-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.on-dark .field-label { color: var(--bone-soft); }

/* Multi-step form */
.form-step { display: none; }
.form-step.active { display: block; animation: stepIn .5s var(--ease); }
@keyframes stepIn { from { opacity:0; transform: translateY(10px);} to {opacity:1; transform:none;} }

.step-dot {
  width: 26px; height: 1px;
  background: var(--paper-line);
  transition: background .3s var(--ease);
}
.step-dot.step-done, .step-dot.step-active { background: var(--khaki-deep); }

/* Dropzone */
.dropzone {
  border: 1px dashed var(--paper-line);
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.dropzone.drag-over { border-color: var(--khaki); background: rgba(163,144,106,0.06); }

/* ---- Modal ---- */
#property-modal {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(23,22,20,0.82);
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
}
#property-modal.open { opacity: 1; pointer-events: auto; }
#modal-panel {
  transform: translateY(24px) scale(0.98);
  opacity: 0;
  transition: transform .45s var(--ease), opacity .45s var(--ease);
}
#property-modal.open #modal-panel { transform: none; opacity: 1; }

/* Toast */
#toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0; pointer-events: none;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
  z-index: 80;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Portrait grayscale (About page) */
.portrait { filter: grayscale(1) contrast(1.05); transition: filter .5s var(--ease); }
.portrait:hover { filter: grayscale(0.15) sepia(0.12) contrast(1.05); }

/* Utility */
.hairline { border-color: var(--paper-line); }
.on-dark .hairline { border-color: var(--anthracite-line); }
