/* ===========================================================
   CHAMBERS REAL ESTATE — Design tokens & base styles
   Palette drawn from Kano's indigo-dye heritage (Kofar Mata)
   and its sand/adobe architecture.
=========================================================== */

:root{
  /* Color */
  --ink:        #5C2A20;   /* coffee brown — primary dark */
  --ink-2:      #713526;   /* lighter coffee brown, panels */
  --paper:      #FFFFFF;   /* white */
  --paper-2:    #F5F4F1;   /* faint warm-gray, section bg */
  --sand:       #C9A669;   /* adobe sand accent */
  --sand-dark:  #A9843F;
  --clay:       #CC5500;   /* burnt orange accent, used across buttons/icons/tags */
  --brand-orange: #FF7504; /* exact accent orange sampled from the Chambers logo, used only for the wordmark */
  --charcoal:   #1B1912;   /* body text on paper */
  --charcoal-60:rgba(27,25,18,.62);
  --charcoal-40:rgba(27,25,18,.4);
  --line:       rgba(27,25,18,.14);
  --line-dark:  rgba(255,255,255,.16);
  --white:      #FFFFFF;
  --ok:         #4B6B4B;

  /* Type */
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Scale */
  --step--1: clamp(.83rem, .8rem + .1vw, .92rem);
  --step-0:  clamp(1rem, .95rem + .2vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.1rem + .4vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.3rem + .8vw, 1.9rem);
  --step-3:  clamp(2rem, 1.6rem + 1.6vw, 2.8rem);
  --step-4:  clamp(2.7rem, 2rem + 3vw, 4.2rem);
  --step-5:  clamp(3.4rem, 2.4rem + 4.4vw, 5.6rem);

  --radius-s: 3px;
  --radius-m: 4px;
  --radius-l: 16px;

  --shadow-1: 0 1px 2px rgba(60,28,22,.08), 0 8px 24px -12px rgba(60,28,22,.22);
  --shadow-2: 0 4px 8px rgba(60,28,22,.1), 0 24px 48px -20px rgba(60,28,22,.32);

  --ease: cubic-bezier(.22,.61,.36,1);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; overflow-x:hidden; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

body{
  margin:0;
  background:var(--paper);
  color:var(--charcoal);
  font-family:var(--sans);
  font-size:var(--step-0);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  max-width:100vw;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
input,select,textarea{ font-family:inherit; font-size:inherit; }

::selection{ background:var(--ink); color:var(--paper); }

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

.wrap{
  max-width:1240px;
  margin-inline:auto;
  padding-inline:clamp(20px,5vw,56px);
}

h1,h2,h3,h4{
  font-family:var(--serif);
  font-weight:500;
  line-height:1.08;
  letter-spacing:-.01em;
  margin:0;
  color:var(--ink);
}
h1,h2,h3,h4,p,li,span,a,td,th,div{ overflow-wrap:break-word; }
h1{ font-size:var(--step-5); font-weight:440; }
h2{ font-size:var(--step-3); }
h3{ font-size:var(--step-2); }
p{ margin:0; }

.eyebrow{
  font-family:var(--sans);
  font-size:.8rem;
  color:var(--brand-orange);
  font-weight:600;
  letter-spacing:.02em;
}

.section{ padding-block:clamp(64px,9vw,120px); }
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:20px 32px;
  margin-bottom:clamp(32px,5vw,56px);
}
.section-head p{ max-width:42ch; color:var(--charcoal-60); font-size:var(--step-0); }
.section-tag{ color:var(--brand-orange); font-weight:600; font-size:.82rem; margin-bottom:10px; display:block; }

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:14px 26px;
  font-size:.92rem;
  font-weight:600;
  border-radius:var(--radius-s);
  border:1px solid transparent;
  transition:transform .35s var(--ease), background .25s, color .25s, border-color .25s;
  white-space:nowrap;
}
.btn:hover{ transform:translateY(-1px); }
.btn-primary{ background:var(--ink); color:var(--paper); }
.btn-primary:hover{ background:var(--ink-2); }
.btn-ghost{ background:transparent; color:var(--ink); border-color:var(--ink); }
.btn-ghost:hover{ background:var(--ink); color:var(--paper); }
.btn-ghost.on-dark{ color:var(--paper); border-color:var(--line-dark); }
.btn-ghost.on-dark:hover{ background:var(--paper); color:var(--ink); }
.btn-clay{ background:var(--clay); color:var(--paper); box-shadow:0 0 0 0 rgba(255,117,4,0); transition:background .25s, box-shadow .25s, transform .2s; }
.btn-clay:hover{ background:#8c4c31; box-shadow:0 6px 20px -4px rgba(255,117,4,.45); transform:translateY(-1px); }
.btn-wa{ background:#3E5C43; color:#fff; }
.btn-wa:hover{ background:#31492f; }
.btn-sm{ padding:10px 18px; font-size:.82rem; }
.btn-block{ width:100%; }

/* Nav */
.nav{
  position:sticky; top:0; z-index:100;
  background:rgba(255,255,255,.86);
  backdrop-filter:blur(10px) saturate(1.1);
  border-bottom:1px solid transparent;
  transition:border-color .3s, background .3s, box-shadow .3s;
}
.nav.scrolled{ border-color:var(--line); box-shadow:0 1px 0 rgba(0,0,0,.02); }
.nav-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding-block:12px;
}
.brand{
  display:inline-flex; align-items:center;
}
.brand-logo-img{ height:clamp(104px,11vw,132px); width:auto; display:block; }
.brand-logo-img-footer{ height:clamp(108px,11vw,136px); }
.brand-logo-img-admin{ height:88px; }
.nav-links{ display:flex; align-items:center; gap:38px; }
.nav-links a{
  font-size:.92rem; color:var(--charcoal); position:relative; padding-block:4px;
}
.nav-links a.active,.nav-links a:hover{ color:var(--ink); }
.nav-links a.active::after{
  content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px; background:var(--brand-orange);
}
.nav-cta{ display:flex; align-items:center; gap:14px; }
.nav-burger{ display:none; }

@media (max-width: 880px){
  .nav-links{
    position:fixed; inset:0 0 0 auto; width:min(320px,86vw); height:100vh;
    background:var(--ink); flex-direction:column; align-items:flex-start;
    padding:100px 32px 40px; gap:22px; transform:translateX(102%);
    transition:transform .45s var(--ease); z-index:110;
  }
  .nav-links.open{ transform:translateX(0); }
  .nav-links a{ color:var(--paper); font-size:1.1rem; }
  .nav-links a.active,.nav-links a:hover{ color:var(--sand); }
  .nav-links a.active::after{ display:none; }
  .nav-cta .btn-ghost{ display:none; }
  .nav-burger{
    display:flex; flex-direction:column; gap:5px; background:none; border:0; padding:8px; z-index:150;
  }
  .nav-burger span{ width:22px; height:1.5px; background:var(--ink); transition:transform .3s,opacity .3s; }
  .nav-burger.open span:nth-child(1){ transform:translateY(6.5px) rotate(45deg); }
  .nav-burger.open span:nth-child(2){ opacity:0; }
  .nav-burger.open span:nth-child(3){ transform:translateY(-6.5px) rotate(-45deg); }
  .nav-scrim{ position:fixed; inset:0; background:rgba(92,42,32,.4); opacity:0; pointer-events:none; transition:opacity .35s; z-index:90; }
  .nav-scrim.open{ opacity:1; pointer-events:auto; }
}

/* Footer */
.footer{ background:var(--ink); color:var(--paper); padding-block:72px 32px; }
.footer-grid{
  display:grid; grid-template-columns:1.4fr 1fr 1fr 1.2fr; gap:48px;
  padding-bottom:56px; border-bottom:1px solid var(--line-dark);
}
.footer-brand{ margin-bottom:14px; display:flex; align-items:center; }
.footer p{ color:rgba(255,255,255,.62); font-size:.92rem; line-height:1.7; }
.footer h4{ color:var(--paper); font-size:.82rem; font-weight:600; margin-bottom:16px; font-family:var(--sans); }
.footer ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:11px; }
.footer a{ color:rgba(255,255,255,.72); font-size:.92rem; transition:color .2s; }
.footer a:hover{ color:var(--sand); }
.social-link{ display:inline-flex; align-items:center; gap:9px; color:rgba(255,255,255,.72); font-size:.92rem; }
.social-link svg{ flex:none; opacity:.85; transition:opacity .2s; }
.footer a.ic-ig:hover{ color:#E1306C; }
.footer a.ic-x:hover{ color:#fff; }
.social-link.ic-fb:hover{ color:#1877F2; }
.social-link:hover svg{ opacity:1; }
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center; padding-top:28px;
  font-size:.82rem; color:rgba(255,255,255,.5); flex-wrap:wrap; gap:12px;
}
@media (max-width:880px){
  .footer-grid{ grid-template-columns:1fr 1fr; row-gap:36px; }
}
@media (max-width:560px){
  .footer-grid{ grid-template-columns:1fr; }
}

/* WhatsApp floating action */
.wa-float{
  position:fixed; bottom:24px; right:24px; z-index:120;
  width:54px; height:54px; border-radius:50%;
  background:#3E5C43; color:#fff; display:flex; align-items:center; justify-content:center;
  box-shadow:var(--shadow-2); transition:transform .3s var(--ease);
}
.wa-float:hover{ transform:scale(1.06); }

/* Reveal on scroll (single orchestrated pattern, not per-card spam) */
.reveal{ opacity:0; transform:translateY(18px); transition:opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in{ opacity:1; transform:none; }
.grid-3 > .reveal:nth-child(2){ transition-delay:.08s; }
.grid-3 > .reveal:nth-child(3){ transition-delay:.16s; }
.grid-3 > .reveal:nth-child(4){ transition-delay:.24s; }
.grid-3 > .reveal:nth-child(5){ transition-delay:.32s; }
.grid-3 > .reveal:nth-child(6){ transition-delay:.4s; }

/* Utility */
.muted{ color:var(--charcoal-60); }
.center{ text-align:center; }
.tag{
  display:inline-flex; align-items:center; gap:6px; font-size:.76rem; font-weight:600;
  padding:5px 11px; border-radius:2px; background:var(--white); border:1px solid var(--line);
  color:var(--charcoal-60);
}
.tag.avail,.tag.status-available{ color:var(--ok); border-color:rgba(75,107,75,.3); }
.tag.status-under-offer{ color:#8a6a1f; border-color:rgba(138,106,31,.3); background:#fbf3e0; }
.tag.status-sold,.tag.status-rented{ color:var(--charcoal-60); border-color:var(--line); }
.tag-featured{ background:var(--brand-orange); color:#fff; border-color:var(--brand-orange); }
.negotiable-tag{
  display:inline-block; font-size:.74rem; font-weight:600; color:var(--brand-orange);
  margin:-6px 0 10px;
}
.demo-flag{
  font-size:.72rem; color:var(--charcoal-40); border:1px dashed var(--charcoal-40);
  padding:2px 8px; border-radius:2px;
}
