/* PropertEase — Redesigned tokens & base
   Palette inspired by the brand logo: red roof / blue / yellow checkmark
   on a warm ivory canvas. Editorial layout, futuristic-PropTech accents.
*/

:root {
  /* Canvas — warm ivory */
  --bg:        #FBF8F2;   /* page background */
  --bg-2:      #F4EFE3;   /* alt section */
  --bg-3:      #ECE5D2;   /* warmer block */
  --paper:     #FFFFFF;   /* card surface */
  --line:      #E5DDC9;
  --line-2:    #D6CBB1;

  /* Ink */
  --ink:       #14110B;
  --ink-2:     #3A332A;
  --ink-3:     #6E6557;
  --ink-4:     #A89F8B;

  /* Brand — pulled from logo */
  --red:       #D6261D;
  --red-d:     #A91912;
  --blue:      #1B49B8;
  --blue-d:    #0D2E8A;
  --gold:      #E8B007;
  --gold-d:    #B68705;
  --gold-l:    #FAEBA8;

  /* Dark accent block (for "futuristic" sections) */
  --night:     #14120D;
  --night-2:   #1F1C16;

  /* Type */
  --display:   'DM Serif Display', 'Playfair Display', Georgia, serif;
  --serif:     'Playfair Display', Georgia, serif;
  --sans:      'DM Sans', system-ui, -apple-system, sans-serif;
  --mono:      'JetBrains Mono', ui-monospace, monospace;

  /* Geometry */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  --topbar-h: 43px;
  --nav-h: 72px;
  --container: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  font-weight: 400;
  overflow-x: hidden;
  font-feature-settings: "ss01","cv11";
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--sans); border: 0; background: none; }
input, select, textarea { font-family: var(--sans); font-size: 14px; }
::selection { background: var(--blue); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px){ .container { padding: 0 20px; } }

/* ===== Type utilities ===== */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--gold-d);
}
.h-display {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.h-display em {
  font-style: italic;
  color: var(--blue-d);
  font-family: var(--display);
}
.h-section {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.h-section em { font-style: italic; color: var(--blue-d); }
.lede {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 56ch;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  border-radius: 999px;
  transition: all .25s cubic-bezier(.2,.8,.2,1);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--blue-d); transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-d); transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-d); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: rgba(255,255,255,0.12); color: #fff; backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.2); }
.btn-light:hover { background: rgba(255,255,255,0.2); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-lg { padding: 17px 28px; font-size: 15px; }

/* ===== Top bar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  min-height: var(--topbar-h);
  background: var(--night);
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  padding: 9px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.topbar .left { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar .right { display: flex; gap: 18px; align-items: center; }
.topbar .right a { color: var(--gold); }
.topbar .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.6); }
  70%  { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* ===== Nav ===== */
.nav {
  position: sticky; top: var(--topbar-h); z-index: 89;
  background: rgba(251,248,242,0.85);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  height: var(--nav-h);
  transition: background .3s, border-color .3s, height .3s;
}
nav.nav {
  display: block !important;
  padding: 0 !important;
  gap: 0 !important;
}
.nav.scrolled {
  background: rgba(251,248,242,0.95);
  border-bottom: 1px solid var(--line);
  height: 60px;
}
.nav .container { width: 100%; height: 100%; display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 36px; width: 36px; }
.brand-name {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-name em { font-style: italic; color: var(--red); font-weight: 400; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: rgba(20,17,11,0.06); }
.nav-links a.active { color: var(--ink); background: rgba(20,17,11,0.07); }
.nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
  background: transparent;
  color: inherit;
  padding: 0;
  border: 0;
  border-radius: 0;
  text-transform: none;
  letter-spacing: 0;
  text-decoration: none;
}

/* ── Nav alignment fix: every item centers on the same baseline ── */
.nav-links { align-items: center; }
.nav-drop { display: inline-flex; align-items: center; position: relative; }
.nav-drop > a { display: inline-flex; align-items: center; }
.nav-drop > a > span { display: inline-flex; align-items: center; line-height: 1; }
.nav-caret {
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: .55;
  flex: 0 0 auto;
}
.nav-phone {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: 0;
  color: var(--ink-2); padding: 6px 12px; border-radius: 999px;
}
.nav-phone:hover { color: var(--ink); background: var(--bg-2); }

/* ===== Nav: dropdown ===== */
.nav-drop-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 640px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 12px;
  box-shadow: 0 24px 60px -20px rgba(20,17,11,0.20);
  z-index: 90;
  display: flex; flex-direction: column; gap: 2px;
  animation: navDrop .18s cubic-bezier(.2,.8,.2,1) both;
}
/* Critical: the hidden attribute must beat display:flex above */
.nav-drop-menu[hidden] { display: none !important; }
@keyframes navDrop { from { opacity:0; transform: translateY(-8px);} to { opacity:1; transform:none;} }
.nav-drop-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
}
.nav-drop-section {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.nav-drop-section--wide {
  padding-right: 10px;
  border-right: 1px solid var(--line);
}
.nav-drop-menu .nav-drop-h {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  color: var(--ink-3); text-transform: uppercase; padding: 8px 12px 4px;
}
.nav-drop-menu button,
.nav-drop-menu a {
  background: transparent; border: 0; cursor: pointer;
  padding: 9px 12px; border-radius: 8px;
  text-align: left; font-family: var(--sans); font-size: 14px; color: var(--ink-2);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  transition: background .15s, color .15s;
}
.nav-drop-menu button:hover,
.nav-drop-menu a:hover { background: var(--bg-2); color: var(--ink); }
.nav-drop-main {
  align-items: flex-start !important;
  padding: 11px 12px !important;
}
.nav-drop-main strong {
  display: block;
  font-size: 14px;
  line-height: 1.15;
  color: var(--ink);
}
.nav-drop-main small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-3);
}
.nav-drop-c {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  color: var(--ink-3); padding: 2px 7px; background: var(--bg-2); border-radius: 999px;
}
.nav-drop-divider { height: 1px; background: var(--line); margin: 8px 0; }

/* ===== Nav: hamburger button (mobile only) ===== */
.nav-burger {
  display: none;
  width: 42px; height: 42px;
  background: transparent; border: 1px solid var(--line-2);
  border-radius: 8px; cursor: pointer;
  padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-burger span {
  display: block; width: 18px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-burger:hover { border-color: var(--ink); }

/* ===== Mobile drawer (hidden by default; only renders when .open) ===== */
.mob-drawer {
  display: none;          /* fully removed from layout when closed */
  position: fixed !important;
  inset: 0;
  z-index: 9990;
  background: rgba(20,17,11,0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.mob-drawer.open {
  display: block;         /* shown when toggled via React/inline JS */
  animation: mobDrawerIn .2s ease both;
}
@keyframes mobDrawerIn { from { background: rgba(20,17,11,0); } to { background: rgba(20,17,11,0.5); } }
.mob-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 88vw; max-width: 380px;
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
  box-shadow: -24px 0 60px -20px rgba(20,17,11,0.30);
  overflow-y: auto;
}
.mob-drawer.open .mob-panel { transform: translateX(0); }
.mob-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.mob-close {
  background: transparent; border: 1px solid var(--line-2);
  width: 36px; height: 36px; border-radius: 8px;
  font-size: 18px; color: var(--ink); cursor: pointer;
}
.mob-close:hover { background: var(--bg-2); }
.mob-body { flex: 1; overflow-y: auto; padding: 16px 14px 24px; }
.mob-link, .mob-sublink {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; background: transparent; border: 0;
  padding: 12px 14px; border-radius: 10px; cursor: pointer;
  font-family: var(--sans); font-size: 16px; font-weight: 500;
  color: var(--ink); text-align: left;
}
.mob-link { font-size: 17px; font-weight: 500; }
.mob-sublink { font-size: 14px; color: var(--ink-2); padding: 10px 14px; }
.mob-link:hover, .mob-sublink:hover { background: var(--bg-2); }
.mob-link.active { background: var(--ink); color: var(--bg); }
.mob-link.active .mob-c { background: rgba(255,255,255,0.18); color: var(--gold); }
.mob-section {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  color: var(--ink-3); text-transform: uppercase;
  padding: 18px 14px 6px;
}
.mob-c {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  color: var(--ink-3); padding: 2px 7px; background: var(--bg-2); border-radius: 999px;
}
.mob-foot {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 18px 22px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.mob-foot-cta {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  padding: 14px; border-radius: 12px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  background: var(--ink); color: var(--bg);
  transition: transform .15s, background .15s;
}
.mob-foot-cta--wa { background: #25D366; color: #fff; }
.mob-foot-cta:hover { transform: translateY(-1px); }

/* ===== Sections ===== */
.section { padding: 120px 0; position: relative; }
.section--tight { padding: 80px 0; }
.section--dark {
  background: var(--night);
  color: rgba(255,255,255,0.85);
}
.section--dark .h-section { color: #fff; }
.section--dark .h-section em { color: var(--gold); }
.section--dark .eyebrow { color: rgba(255,255,255,0.5); }
.section--dark .lede { color: rgba(255,255,255,0.65); }
.section--cream { background: var(--bg-2); }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 56px; }
.section-head--center { justify-content: center; text-align: center; flex-direction: column; align-items: center; }
.section-head h2 { margin-top: 14px; }
.section-head .lede { margin-top: 16px; }

/* ===== Cards ===== */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(20,17,11,0.18); border-color: var(--line-2); }

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px);} to { opacity: 1; transform: none;} }
@keyframes fadeIn { from { opacity: 0;} to { opacity: 1;} }
.fadeUp { animation: fadeUp .8s cubic-bezier(.2,.8,.2,1) both; }

/* In-view animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s, transform .9s; transition-timing-function: cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Forms */
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field select, .field textarea {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(27,73,184,0.12);
}

/* Util */
.divider { height: 1px; background: var(--line); width: 100%; }
.kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--ink-3); background: var(--bg); }

/* ═══════════════════════════════════════════════════
   MOBILE-FIRST OVERRIDES
   Fixes hamburger alignment + prevents text overlap
   ═══════════════════════════════════════════════════ */

/* ── Hamburger / nav layout on mobile ──
   !important throughout because the previous deploy shipped without
   these rules and aggressively-cached old CSS keeps returning to phones
   even after a redeploy with new cache busters. The !important guarantees
   the layout regardless of cascade weirdness. */
@media (max-width: 980px){
  :root { --topbar-h: 36px; }

  /* Hide everything except brand and burger on mobile */
  .nav-links { display: none !important; }
  .nav-phone { display: none !important; }
  .nav-cta .btn { display: none !important; }     /* hide "Book a viewing" CTA — drawer has its own */
  .nav-burger { display: flex !important; }

  /* Layout: brand left, burger flush right */
  .nav .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    height: 100% !important;
    width: 100% !important;
    padding: 0 16px !important;
  }
  .brand { margin-right: auto !important; }
  .nav-cta {
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
  }
  /* Compact brand on mobile so it doesn't crowd the burger */
  .brand img { height: 32px; width: 32px; }
  .brand-name { font-size: 18px !important; }

  /* Hamburger: top-right, no border (cleaner) */
  .nav-burger {
    width: 44px; height: 44px;
    border: 1px solid var(--line-2);
    background: var(--paper);
    border-radius: 10px;
  }
  .nav-burger:active { background: var(--bg-2); }

  .nav-drop-menu { min-width: min(92vw, 640px); }
  .nav-drop-grid { grid-template-columns: 1fr; }
  .nav-drop-section--wide {
    padding-right: 0;
    padding-bottom: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  /* Topbar — keep readable on mobile */
  .topbar { font-size: 10px; padding: 7px 0; }
  .topbar .container { gap: 10px; }
  .topbar .left { gap: 12px; flex-wrap: wrap; }
  .topbar .right { gap: 10px; }
  .topbar .right span { display: none; }

  .section { padding: 72px 0; }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 36px;
  }
}

/* ── Tighter mobile (phones) ── */
@media (max-width: 600px){
  :root { --topbar-h: 34px; }

  /* Topbar — show only marquee on tiny screens */
  .topbar .left span:nth-child(2),
  .topbar .left span:nth-child(3) { display: none; }
  .topbar .right a { font-size: 10px; }

  /* Container margins */
  .container { padding: 0 16px; }

  /* Type: prevent giant headlines from overflowing */
  .h-display { font-size: clamp(34px, 9vw, 56px); line-height: 1.0; word-break: break-word; }
  .h-section { font-size: clamp(28px, 7vw, 42px); line-height: 1.05; }
  .lede { font-size: 15px; }

  /* Eyebrow stays on one line */
  .eyebrow { font-size: 10px; letter-spacing: .14em; }
  .eyebrow::before { width: 16px; }

  /* Buttons full-width on mobile when stacked in CTA group */
  .btn-lg { padding: 14px 22px; font-size: 14px; }

  /* Section padding tighter */
  .section { padding: 56px 0; }
  .section--tight { padding: 48px 0; }
}

/* ── Tablet ↔ Desktop boundary niceties ── */
@media (max-width: 1100px) and (min-width: 981px){
  .nav .container { gap: 24px; }
  .nav-phone .nav-phone-num { display: none; }  /* keep icon only at narrow desktop */
}
