/* ==========================================================================
   SlayImmo — design system
   --------------------------------------------------------------------------
   Structure adapted from the token architecture used by lapremierebrique.fr:
   a fluid clamp() type scale, a 12-column grid driven by a single
   --column-width variable, section rhythm expressed as tokens rather than
   ad-hoc padding, and tight negative tracking on display type.

   The palette is our own: laterite terracotta (the colour of Cameroonian
   earth and of unrendered brick), the deep green and gold of the flag for
   trust and rating signals, on a warm off-white ground.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* -- Viewport range the fluid scale interpolates across ------------------ */
  --viewport-min: 23.4375;   /* 375px  */
  --viewport-max: 82.5;      /* 1320px */

  /* -- Brand: laterite terracotta ----------------------------------------- */
  --brand-50:  #FCF1EC;
  --brand-100: #F8DED3;
  --brand-200: #F0BCA7;
  --brand-300: #E4937A;
  --brand-400: #D46B4D;
  --brand-500: #C2502F;
  --brand-600: #A03D22;
  --brand-700: #7E2E19;
  --brand-800: #5C2113;
  --brand-900: #3D160D;

  /* -- Secondary: forest green (verification, success) -------------------- */
  --green-50:  #E9F5EF;
  --green-100: #C8E8D8;
  --green-500: #0F7B4F;
  --green-600: #0B6340;
  --green-700: #084B31;

  /* -- Tertiary: gold (ratings, highlights, featured) --------------------- */
  --gold-50:  #FEF7E4;
  --gold-100: #FCECBE;
  --gold-400: #F2B705;
  --gold-500: #D89F00;
  --gold-600: #A87B00;

  /* -- Signal ------------------------------------------------------------- */
  --danger-50:  #FDECEC;
  --danger-500: #C42B2B;
  --danger-600: #9E2020;
  --info-50:    #E9F0FA;
  --info-500:   #2563A8;

  /* -- Warm neutrals ------------------------------------------------------ */
  --ink-900: #1A1614;
  --ink-800: #2F2A27;
  --ink-700: #4A423D;
  --ink-600: #6B615A;
  --ink-500: #8C8078;
  --ink-400: #ADA29A;
  --ink-300: #CFC5BC;
  --ink-200: #E7DFD5;
  --ink-100: #F2ECE4;
  --ink-50:  #FBF6EF;
  --white:   #FFFFFF;

  /* -- Semantic surfaces (redefined wholesale in dark mode) --------------- */
  --bg:            var(--ink-50);
  --bg-raised:     var(--white);
  --bg-sunken:     var(--ink-100);
  --bg-inverse:    var(--ink-900);
  --surface-brand: var(--brand-50);

  --text:          var(--ink-900);
  --text-muted:    var(--ink-600);
  --text-subtle:   var(--ink-500);
  --text-inverse:  var(--ink-50);
  --text-brand:    var(--brand-600);

  --border:        var(--ink-200);
  --border-strong: var(--ink-300);
  --border-brand:  var(--brand-200);

  --focus-ring: 0 0 0 3px var(--brand-200);

  /* -- Elevation ---------------------------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(26, 22, 20, .06);
  --shadow-sm: 0 1px 3px rgba(26, 22, 20, .08), 0 1px 2px rgba(26, 22, 20, .04);
  --shadow-md: 0 4px 14px rgba(26, 22, 20, .08), 0 1px 3px rgba(26, 22, 20, .04);
  --shadow-lg: 0 12px 32px rgba(26, 22, 20, .12), 0 2px 8px rgba(26, 22, 20, .05);
  --shadow-xl: 0 24px 60px rgba(26, 22, 20, .16);

  /* -- Radii -------------------------------------------------------------- */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* -- Typography --------------------------------------------------------- */
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Fluid scale: min at 375px, max at 1320px. */
  --fs-display: clamp(2.75rem, 1.6rem + 4.9vw, 5.5rem);
  --fs-h1:      clamp(2.125rem, 1.5rem + 2.7vw, 3.5rem);
  --fs-h2:      clamp(1.75rem, 1.34rem + 1.75vw, 2.75rem);
  --fs-h3:      clamp(1.375rem, 1.16rem + 0.9vw, 1.875rem);
  --fs-h4:      clamp(1.125rem, 1.03rem + 0.4vw, 1.375rem);
  --fs-h5:      clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
  --fs-lg:      1.0625rem;
  --fs-base:    1rem;
  --fs-sm:      0.9375rem;
  --fs-xs:      0.8125rem;
  --fs-2xs:     0.75rem;

  --lh-tight: 1.05;
  --lh-snug: 1.2;
  --lh-normal: 1.45;
  --lh-relaxed: 1.65;

  --tracking-tight: -0.03em;   /* display type, as on the reference site */
  --tracking-snug: -0.015em;
  --tracking-wide: 0.06em;

  /* -- Spacing ------------------------------------------------------------ */
  --sp-1: 0.375rem;
  --sp-2: 0.625rem;
  --sp-3: 0.875rem;
  --sp-4: 1.25rem;
  --sp-5: 1.75rem;
  --sp-6: 2rem;
  --sp-7: clamp(2.25rem, 1.9rem + 1.5vw, 3rem);
  --sp-8: clamp(2.5rem, 1.9rem + 2.5vw, 4rem);

  --section-sm:   clamp(2.5rem, 1.9rem + 2.5vw, 4rem);
  --section:      clamp(4rem, 3.2rem + 3.4vw, 6.25rem);
  --section-lg:   clamp(4.5rem, 3.3rem + 5vw, 7.5rem);

  /* -- Grid --------------------------------------------------------------- */
  --max-width: 82.5rem;      /* 1320px */
  --max-width-prose: 44rem;
  --gutter: 0.75rem;
  --page-margin: clamp(1rem, 0.3rem + 2.9vw, 3.75rem);

  /* -- Motion ------------------------------------------------------------- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 140ms;
  --dur: 220ms;
  --dur-slow: 420ms;

  --header-h: 72px;
}

/* Dark theme. Explicit choice wins in both directions; the system default
   falls through to prefers-color-scheme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #14100E;
    --bg-raised:     #1E1917;
    --bg-sunken:     #0E0B0A;
    --bg-inverse:    var(--ink-50);
    --surface-brand: #2A1710;

    --text:          #F4EEE7;
    --text-muted:    #B5A99F;
    --text-subtle:   #8C8078;
    --text-inverse:  var(--ink-900);
    --text-brand:    var(--brand-300);

    --border:        #332B27;
    --border-strong: #473C36;
    --border-brand:  var(--brand-700);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .5);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, .55);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .6);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  --bg:            #14100E;
  --bg-raised:     #1E1917;
  --bg-sunken:     #0E0B0A;
  --bg-inverse:    var(--ink-50);
  --surface-brand: #2A1710;

  --text:          #F4EEE7;
  --text-muted:    #B5A99F;
  --text-subtle:   #8C8078;
  --text-inverse:  var(--ink-900);
  --text-brand:    var(--brand-300);

  --border:        #332B27;
  --border-strong: #473C36;
  --border-brand:  var(--brand-700);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .5);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .55);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .6);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, .7);
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip, not hidden. Both stop a stray element widening the page, but
     `hidden` makes the body a scroll container, and a scroll container is
     what `position: sticky` sticks to -- so every sticky element on the site
     was sticking to a box that never scrolls, which looks exactly like
     sticky being ignored. `clip` does the same clipping without creating
     one. */
  overflow-x: clip;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }

a { color: var(--text-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

hr { border: none; border-top: 1px solid var(--border); margin: var(--sp-6) 0; }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection { background: var(--brand-200); color: var(--brand-900); }

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

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
  color: var(--text);
  text-wrap: balance;
}

.display {
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--fw-extrabold);
}
h1, .h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--tracking-tight); }
h2, .h2 { font-size: var(--fs-h2); letter-spacing: var(--tracking-tight); }
h3, .h3 { font-size: var(--fs-h3); }
h4, .h4 { font-size: var(--fs-h4); font-weight: var(--fw-bold); }
h5, .h5 { font-size: var(--fs-h5); font-weight: var(--fw-bold); }

p { margin: 0 0 var(--sp-3); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
}
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-2xs { font-size: var(--fs-2xs); }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-brand { color: var(--text-brand); }
.text-green { color: var(--green-500); }
.text-danger { color: var(--danger-500); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-medium { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold { font-weight: var(--fw-bold); }
.fw-extrabold { font-weight: var(--fw-extrabold); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-brand);
}

.prose { max-width: var(--max-width-prose); }
.prose h2 { font-size: var(--fs-h3); margin: var(--sp-7) 0 var(--sp-3); }
.prose h3 { font-size: var(--fs-h4); margin: var(--sp-6) 0 var(--sp-2); }
.prose p { margin-bottom: var(--sp-4); line-height: var(--lh-relaxed); color: var(--text-muted); }
.prose ul { margin: 0 0 var(--sp-4); padding-left: var(--sp-4); }
.prose li { list-style: disc; margin-bottom: var(--sp-1); color: var(--text-muted); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text); font-weight: var(--fw-bold); }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--max-width) + var(--page-margin) * 2);
  margin-inline: auto;
  padding-inline: var(--page-margin);
}
.container-narrow { max-width: calc(58rem + var(--page-margin) * 2); }
.container-prose { max-width: calc(var(--max-width-prose) + var(--page-margin) * 2); }

.section { padding-block: var(--section); }
.section-sm { padding-block: var(--section-sm); }
.section-lg { padding-block: var(--section-lg); }
.section-tint { background: var(--bg-sunken); }
.section-brand { background: var(--surface-brand); }
.section-dark { background: var(--bg-inverse); color: var(--text-inverse); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--text-inverse); }
.section-dark .text-muted { color: color-mix(in srgb, var(--text-inverse) 68%, transparent); }

.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }

.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--sp-2); }
.stack-lg { display: flex; flex-direction: column; gap: var(--sp-6); }

.row { display: flex; align-items: center; gap: var(--sp-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.row-top { display: flex; align-items: flex-start; gap: var(--sp-3); }

.sidebar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: var(--sp-7);
  align-items: start;
}
.sidebar-layout-left { grid-template-columns: 17.5rem minmax(0, 1fr); }
.sticky { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.section-head p { max-width: 46ch; }

@media (max-width: 62rem) {
  .sidebar-layout, .sidebar-layout-left { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticky { position: static; }
}
@media (max-width: 40rem) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  :root { --header-h: 64px; }
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.375rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn .icon { flex: none; }

.btn-primary { background: var(--brand-500); color: #fff; }
.btn-primary:hover { background: var(--brand-600); box-shadow: var(--shadow-md); }

.btn-dark { background: var(--ink-900); color: var(--ink-50); }
.btn-dark:hover { background: var(--ink-800); box-shadow: var(--shadow-md); }

.btn-green { background: var(--green-500); color: #fff; }
.btn-green:hover { background: var(--green-600); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--text); background: var(--bg-raised); }

.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-sunken); }

.btn-white { background: var(--white); color: var(--ink-900); }
.btn-white:hover { background: var(--ink-100); }

.btn-danger { background: var(--danger-500); color: #fff; }
.btn-danger:hover { background: var(--danger-600); }

.btn-sm { padding: 0.5rem 0.9375rem; font-size: var(--fs-xs); }
.btn-lg { padding: 1rem 1.875rem; font-size: var(--fs-base); }
.btn-block { width: 100%; }
.btn-icon { padding: 0.625rem; aspect-ratio: 1; border-radius: var(--r-pill); }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  color: var(--text-brand);
}
.btn-link:hover { gap: calc(var(--sp-1) + 3px); text-decoration: none; }

/* --------------------------------------------------------------------------
   6. Badges & pills
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-brand { background: var(--brand-500); color: #fff; }
.badge-brand-soft { background: var(--brand-50); color: var(--brand-700); }
.badge-green { background: var(--green-500); color: #fff; }
.badge-green-soft { background: var(--green-50); color: var(--green-700); }
.badge-gold { background: var(--gold-400); color: var(--ink-900); }
.badge-gold-soft { background: var(--gold-50); color: var(--gold-600); }
.badge-dark { background: var(--ink-900); color: var(--ink-50); }
.badge-neutral { background: var(--bg-sunken); color: var(--text-muted); }
.badge-danger { background: var(--danger-50); color: var(--danger-600); }
.badge-info { background: var(--info-50); color: var(--info-500); }
.badge-outline { border: 1px solid var(--border-strong); color: var(--text-muted); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.4375rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-raised);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  transition: all var(--dur) var(--ease);
}
.chip:hover { border-color: var(--text); color: var(--text); text-decoration: none; }
.chip.is-active { background: var(--ink-900); border-color: var(--ink-900); color: var(--ink-50); }
.chip-remove { display: inline-flex; opacity: .6; }
.chip-remove:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-pad { padding: var(--sp-5); }
.card-hover { transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease); }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }

/* -- Property card ------------------------------------------------------- */
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease);
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }

.pcard-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-sunken);
  overflow: hidden;
}
.pcard-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.pcard:hover .pcard-media img { transform: scale(1.045); }

.pcard-media-empty {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  color: var(--text-subtle);
  background: linear-gradient(135deg, var(--ink-100), var(--ink-200));
}

.pcard-badges {
  position: absolute; inset: var(--sp-2) auto auto var(--sp-2);
  display: flex; flex-wrap: wrap; gap: 0.3125rem;
  max-width: calc(100% - 5rem);
  z-index: 2;
}
.pcard-actions {
  position: absolute; inset: var(--sp-2) var(--sp-2) auto auto;
  display: flex; gap: 0.3125rem;
  z-index: 2;
}
.pcard-count {
  position: absolute; inset: auto auto var(--sp-2) var(--sp-2);
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.1875rem 0.5rem;
  border-radius: var(--r-sm);
  background: rgba(26, 22, 20, .72);
  color: #fff;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  backdrop-filter: blur(4px);
}

.icon-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .92);
  color: var(--ink-800);
  box-shadow: var(--shadow-sm);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.icon-btn:hover { background: #fff; transform: scale(1.08); }
.icon-btn.is-on { background: var(--brand-500); color: #fff; }

.pcard-body { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); flex: 1; }

.pcard-price {
  display: flex; align-items: baseline; gap: 0.375rem;
  font-size: var(--fs-h4);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--tracking-snug);
  color: var(--text);
}
.pcard-price small { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-muted); }

.pcard-title {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  line-height: 1.35;
  letter-spacing: var(--tracking-snug);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard-title a { color: var(--text); }
.pcard-title a:hover { color: var(--text-brand); text-decoration: none; }

.pcard-location {
  display: flex; align-items: center; gap: 0.3125rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.pcard-specs {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  padding-top: var(--sp-2);
  margin-top: auto;
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.pcard-spec { display: inline-flex; align-items: center; gap: 0.3125rem; }
.pcard-spec strong { color: var(--text); font-weight: var(--fw-bold); }

.pcard-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-top: 1px solid var(--border);
  background: var(--bg-sunken);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

/* Two explicit actions per card. A clickable surface tells a visitor
   nothing; a button tells them what happens next, which is what turns a
   browse into an enquiry. */
.pcard-cta {
  display: flex; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  border-top: 1px solid var(--border);
}
.pcard-cta .btn { white-space: nowrap; }

/* On the compact card used in dashboards the pair would wrap awkwardly. */
.pcard-sm .pcard-cta { padding: var(--sp-2) var(--sp-3) var(--sp-3); }

/* Horizontal variant used in list view and dashboards. */
.pcard-row { flex-direction: row; }
.pcard-row .pcard-media { flex: 0 0 17.5rem; aspect-ratio: 4 / 3; }
.pcard-row .pcard-body { padding: var(--sp-5); }
@media (max-width: 48rem) {
  .pcard-row { flex-direction: column; }
  .pcard-row .pcard-media { flex: none; width: 100%; }
}

/* --------------------------------------------------------------------------
   8. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "brand actions" "navigation navigation";
  grid-template-rows: 64px 44px;
  align-items: center;
  column-gap: 1rem;
  height: var(--header-h);
}

@media (width > 74rem) {
  :root { --header-h: 108px; }
}

.header-inner > .brand { grid-area: brand; }

.brand { display: inline-flex; align-items: center; gap: 0.5rem; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--brand-500);
  color: #fff;
  font-weight: var(--fw-extrabold);
  font-size: 0.9375rem;
  letter-spacing: -0.04em;
}
.brand-name {
  font-size: 1.1875rem;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.035em;
  color: var(--text);
}

img.brand-mark { background: transparent; }

.nav { display: flex; align-items: center; gap: var(--sp-1); }
.nav-desktop { grid-area: navigation; justify-content: center; }
.nav-desktop .nav-link { padding-inline: clamp(.4rem, .7vw, .75rem); white-space: nowrap; }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--text); background: var(--bg-sunken); text-decoration: none; }
.nav-link.is-active { color: var(--text-brand); }

.header-actions { grid-area: actions; display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }

/* -- Dropdown ------------------------------------------------------------- */
.dropdown { position: relative; }
.dropdown-panel {
  position: absolute; top: calc(100% + 0.5rem); left: 0;
  min-width: 15rem;
  padding: var(--sp-2);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  z-index: 70;
}
.dropdown-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-panel-right { left: auto; right: 0; }
.dropdown-panel-wide { min-width: 34rem; padding: var(--sp-4); }
.nav-desktop .dropdown-panel-wide { left: 50%; transform: translate(-50%, -6px); }
.nav-desktop .dropdown-panel-wide.is-open { transform: translate(-50%, 0); }

.dropdown-item {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 0.5rem 0.625rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  width: 100%;
  text-align: left;
}
.dropdown-item:hover { background: var(--bg-sunken); text-decoration: none; }
.dropdown-item.is-active { color: var(--text-brand); }
.dropdown-item.is-danger { color: var(--danger-500); }
.dropdown-sep { height: 1px; background: var(--border); margin: var(--sp-1) 0; }
.dropdown-label {
  padding: 0.375rem 0.625rem;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* -- Avatar --------------------------------------------------------------- */
.avatar {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; font-size: var(--fs-2xs); }
.avatar-lg { width: 56px; height: 56px; font-size: var(--fs-base); }
.avatar-xl { width: 88px; height: 88px; font-size: var(--fs-h4); }

.avatar-dot { position: relative; }
.avatar-dot::after {
  content: ""; position: absolute; right: 0; bottom: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green-500);
  border: 2px solid var(--bg-raised);
}

.count-dot {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--brand-500);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: var(--fw-bold);
}

/* -- Mobile nav ----------------------------------------------------------- */
.burger { display: none; }
.mobile-nav {
  display: none;
  position: fixed; inset: var(--header-h) 0 0 0;
  z-index: 55;
  padding: var(--sp-5) var(--page-margin) var(--sp-8);
  background: var(--bg);
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--dur) var(--ease), visibility var(--dur);
}
.mobile-nav.is-open { transform: translateX(0); visibility: visible; }
.mobile-nav .nav-link { font-size: var(--fs-h5); padding: var(--sp-3) 0; width: 100%; }
.header-language .nav-link { min-height: 44px; }

@media (max-width: 74rem) {
  .header-inner { display: flex; }
  .nav-desktop { display: none; }
  .mobile-nav { display: block; }
  .burger { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); }
  .header-actions .btn-desktop { display: none; }
}

/* --------------------------------------------------------------------------
   9. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) var(--section);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: -30% -10% auto -10%;
  height: 70vh;
  background: radial-gradient(60% 60% at 30% 20%, var(--brand-50), transparent 70%),
              radial-gradient(50% 50% at 85% 10%, var(--gold-50), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
:root[data-theme="dark"] .hero::before,
:root:not([data-theme="light"]) .hero::before { opacity: .3; }

.hero-inner { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--sp-8);
  align-items: center;
}
.hero-copy { max-width: 34ch; }
.hero h1 { margin-bottom: var(--sp-4); }
.hero .lead { max-width: 46ch; margin-bottom: var(--sp-6); }

.hero-media {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 5 / 4;
  box-shadow: var(--shadow-xl);
  background: var(--bg-sunken);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 62rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: none; }
  .hero-media { aspect-ratio: 16 / 10; }
}

/* -- Search bar ----------------------------------------------------------- */
.searchbar {
  display: flex;
  align-items: stretch;
  gap: 1px;
  padding: 0.4375rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-md);
}
.searchbar-field {
  display: flex; flex-direction: column; justify-content: center;
  gap: 1px;
  padding: 0.375rem 1.125rem;
  flex: 1;
  min-width: 0;
  border-radius: var(--r-pill);
  transition: background var(--dur) var(--ease);
}
.searchbar-field:hover { background: var(--bg-sunken); }
.searchbar-field + .searchbar-field { box-shadow: -1px 0 0 var(--border); }
.searchbar-field label {
  font-size: 0.6875rem;
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-subtle);
}
.searchbar-field input,
.searchbar-field select {
  border: none; background: none; padding: 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  width: 100%;
  min-width: 0;
  appearance: none;
}
.searchbar-field input:focus, .searchbar-field select:focus { outline: none; }
.searchbar .btn { flex: none; }

.searchbar-stack {
  border-radius: var(--r-lg);
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3);
}
.searchbar-stack .searchbar-field { box-shadow: none; border: 1px solid var(--border); }

@media (max-width: 48rem) {
  .searchbar { flex-direction: column; border-radius: var(--r-lg); gap: var(--sp-2); padding: var(--sp-3); }
  .searchbar-field { border: 1px solid var(--border); box-shadow: none !important; }
  .searchbar .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   10. Forms
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.field-hint { font-size: var(--fs-xs); color: var(--text-subtle); }
.field-error { font-size: var(--fs-xs); color: var(--danger-500); font-weight: var(--fw-medium); }
.field-required { color: var(--brand-500); }

.input, .select, .textarea,
input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="search"],
input[type="date"], input[type="datetime-local"], input[type="url"],
select, textarea {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--text-subtle); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: var(--focus-ring);
}
input[aria-invalid="true"], .has-error input, .has-error select, .has-error textarea {
  border-color: var(--danger-500);
}
textarea { min-height: 8rem; resize: vertical; line-height: var(--lh-relaxed); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236B615A' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 12px;
  padding-right: 2.25rem;
}

.input-group { position: relative; display: flex; align-items: center; }
.input-group .icon { position: absolute; left: 0.875rem; color: var(--text-subtle); pointer-events: none; }
.input-group input { padding-left: 2.5rem; }
.input-suffix {
  position: absolute; right: 0.875rem;
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  color: var(--text-subtle);
}

.check {
  display: flex; align-items: flex-start; gap: 0.625rem;
  padding: 0.5rem 0;
  cursor: pointer;
  font-size: var(--fs-sm);
}
.check input[type="checkbox"], .check input[type="radio"] {
  width: 1.125rem; height: 1.125rem;
  flex: none;
  margin-top: 0.125rem;
  accent-color: var(--brand-500);
  cursor: pointer;
}

/* Card-style radio group used for role choice and transaction type. */
.choice-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.choice {
  position: relative;
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-raised);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.choice:hover { border-color: var(--border-strong); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) {
  border-color: var(--brand-500);
  background: var(--surface-brand);
  box-shadow: var(--focus-ring);
}
.choice-title { font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.choice-desc { font-size: var(--fs-xs); color: var(--text-muted); }

.switch { display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-track {
  width: 40px; height: 23px;
  border-radius: var(--r-pill);
  background: var(--border-strong);
  padding: 2px;
  transition: background var(--dur) var(--ease);
}
.switch-thumb {
  width: 19px; height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease);
}
.switch input:checked + .switch-track { background: var(--green-500); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(17px); }

.form-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 48rem) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

.fieldset {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  margin: 0 0 var(--sp-5);
  background: var(--bg-raised);
}
.fieldset legend {
  padding: 0 0.5rem;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}

/* --------------------------------------------------------------------------
   11. Components
   -------------------------------------------------------------------------- */

/* -- Stats ---------------------------------------------------------------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--sp-5); }
.stat-value {
  font-size: var(--fs-h2);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}
.stat-label { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 0.375rem; }

/* -- Accordion ------------------------------------------------------------ */
.accordion { border-top: 1px solid var(--border); }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  width: 100%;
  padding: var(--sp-4) 0;
  text-align: left;
  font-size: var(--fs-h5);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-snug);
  color: var(--text);
}
.accordion-trigger .icon { flex: none; transition: transform var(--dur) var(--ease); color: var(--text-muted); }
.accordion-trigger[aria-expanded="true"] .icon { transform: rotate(45deg); color: var(--brand-500); }
.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur) var(--ease);
}
.accordion-panel.is-open { grid-template-rows: 1fr; }
.accordion-panel > div { overflow: hidden; }
.accordion-panel p { padding-bottom: var(--sp-4); color: var(--text-muted); max-width: 68ch; }

/* -- Tabs ----------------------------------------------------------------- */
.tabs {
  display: flex; gap: var(--sp-1);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--text); border-bottom-color: var(--brand-500); }

/* -- Breadcrumb ----------------------------------------------------------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; font-size: var(--fs-xs); color: var(--text-subtle); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-brand); }
.breadcrumb-sep { opacity: .5; }

/* -- Pagination ----------------------------------------------------------- */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.375rem; }
.page-link {
  display: grid; place-items: center;
  min-width: 40px; height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-raised);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  transition: all var(--dur) var(--ease);
}
.page-link:hover { border-color: var(--text); color: var(--text); text-decoration: none; }
.page-link.is-active { background: var(--ink-900); border-color: var(--ink-900); color: var(--ink-50); }
.page-link.is-disabled { opacity: .4; pointer-events: none; }

/* -- Alerts / messages ---------------------------------------------------- */
.alert {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
}
.alert .icon { flex: none; margin-top: 2px; }
.alert-success { background: var(--green-50); border-color: var(--green-100); color: var(--green-700); }
.alert-error, .alert-danger { background: var(--danger-50); border-color: color-mix(in srgb, var(--danger-500) 22%, transparent); color: var(--danger-600); }
.alert-warning { background: var(--gold-50); border-color: var(--gold-100); color: var(--gold-600); }
.alert-info { background: var(--info-50); border-color: color-mix(in srgb, var(--info-500) 20%, transparent); color: var(--info-500); }

.toast-stack {
  position: fixed; inset: auto 1rem 1rem auto;
  z-index: 90;
  display: flex; flex-direction: column; gap: var(--sp-2);
  max-width: min(24rem, calc(100vw - 2rem));
}
.toast {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  animation: toast-in var(--dur) var(--ease-out);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* -- Modal ---------------------------------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(26, 22, 20, .5);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: var(--sp-4);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.modal-backdrop.is-open { opacity: 1; visibility: visible; }
.modal {
  width: min(34rem, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-raised);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  transform: translateY(10px) scale(.99);
  transition: transform var(--dur) var(--ease-out);
}
.modal-backdrop.is-open .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-5) var(--sp-5) var(--sp-3); }
.modal-body { padding: 0 var(--sp-5) var(--sp-5); }
.modal-foot { display: flex; gap: var(--sp-2); justify-content: flex-end; padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border); }

/* -- Gallery -------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: var(--sp-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.gallery-item { position: relative; overflow: hidden; background: var(--bg-sunken); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item:first-child { grid-row: span 2; }
.gallery-more {
  position: absolute; inset: auto var(--sp-3) var(--sp-3) auto;
  padding: 0.5rem 0.875rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .94);
  color: var(--ink-900);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  box-shadow: var(--shadow-md);
}
@media (max-width: 48rem) {
  .gallery { grid-template-columns: 1fr; grid-template-rows: 1fr; aspect-ratio: 4 / 3; }
  .gallery-item:not(:first-child) { display: none; }
  .gallery-item:first-child { grid-row: auto; }
}

/* -- Carousel ------------------------------------------------------------- */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: var(--sp-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: var(--sp-2);
  margin-inline: calc(var(--page-margin) * -1);
  padding-inline: var(--page-margin);
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { flex: 0 0 min(21rem, 82%); scroll-snap-align: start; }
.carousel-nav { display: flex; gap: var(--sp-2); }
.carousel-btn {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--bg-raised);
  color: var(--text);
  transition: all var(--dur) var(--ease);
}
.carousel-btn:hover { background: var(--ink-900); border-color: var(--ink-900); color: var(--ink-50); }
.carousel-btn:disabled { opacity: .35; pointer-events: none; }

/* -- Progress ------------------------------------------------------------- */
.progress { height: 6px; border-radius: var(--r-pill); background: var(--bg-sunken); overflow: hidden; }
.progress-bar { height: 100%; border-radius: var(--r-pill); background: var(--brand-500); transition: width var(--dur-slow) var(--ease-out); }
.progress-bar.is-green { background: var(--green-500); }
.progress-bar.is-gold { background: var(--gold-400); }

/* -- Stars ---------------------------------------------------------------- */
.stars { display: inline-flex; gap: 1px; letter-spacing: 0; }
.star { color: var(--border-strong); font-size: 1.125rem; line-height: 1; }
.star.is-on { color: var(--gold-400); }

/* -- Feature list --------------------------------------------------------- */
.feature-list { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.feature-item { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-muted); }
.feature-item .icon { color: var(--green-500); flex: none; }

/* -- Key-value spec table ------------------------------------------------- */
.spec-grid { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.spec-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
}
.spec-item dt { color: var(--text-muted); }
.spec-item dd { margin: 0; font-weight: var(--fw-bold); text-align: right; }

/* -- Steps ---------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: var(--sp-5); }
.step { position: relative; padding-left: 3.25rem; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--r-pill);
  background: var(--brand-500);
  color: #fff;
  font-weight: var(--fw-extrabold);
  font-size: var(--fs-sm);
}

/* -- Table ---------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-raised); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: var(--sp-3) var(--sp-4); text-align: left; white-space: nowrap; }
.table th {
  background: var(--bg-sunken);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-subtle);
}
.table tbody tr { border-top: 1px solid var(--border); }
.table tbody tr:hover { background: var(--bg-sunken); }

/* -- Empty state ---------------------------------------------------------- */
.empty {
  display: grid; place-items: center; gap: var(--sp-3);
  padding: var(--section-sm) var(--sp-4);
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--bg-raised);
}
.empty .icon { color: var(--text-subtle); }

/* -- Skeleton ------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-sunken) 25%, var(--ink-200) 37%, var(--bg-sunken) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* -- Marquee (partner logos) ---------------------------------------------- */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: var(--sp-8); width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee img { height: 30px; width: auto; opacity: .55; filter: grayscale(1); transition: opacity var(--dur) var(--ease); }
.marquee img:hover { opacity: 1; filter: none; }

/* --------------------------------------------------------------------------
   12. Dashboard shell
   -------------------------------------------------------------------------- */
.dash { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: var(--sp-7); align-items: start; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
.dash-link {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0.625rem 0.875rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.dash-link:hover { background: var(--bg-sunken); color: var(--text); text-decoration: none; }
.dash-link.is-active { background: var(--ink-900); color: var(--ink-50); }
.dash-link .count-dot { margin-left: auto; }
.dash-group { padding: var(--sp-4) 0.875rem 0.375rem; font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-subtle); }

.kpi { padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-raised); }
.kpi-label { font-size: var(--fs-xs); color: var(--text-muted); }
.kpi-value { font-size: var(--fs-h3); font-weight: var(--fw-extrabold); letter-spacing: var(--tracking-tight); line-height: 1.1; margin-top: 0.25rem; }
.kpi-delta { font-size: var(--fs-xs); font-weight: var(--fw-semibold); margin-top: 0.25rem; }
.kpi-delta.is-up { color: var(--green-500); }
.kpi-delta.is-down { color: var(--danger-500); }

@media (max-width: 62rem) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: var(--sp-2); }
  .dash-link { white-space: nowrap; }
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink-900);
  color: var(--ink-300);
  padding-block: var(--section) var(--sp-6);
  margin-top: var(--section);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: var(--sp-6);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.site-footer h4 { color: #fff; font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.site-footer a { color: var(--ink-300); font-size: var(--fs-sm); }
.site-footer a:hover { color: #fff; }
.site-footer .brand-name { color: #fff; }
.footer-links { display: flex; flex-direction: column; gap: 0.625rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-5);
  font-size: var(--fs-xs);
  color: var(--ink-500);
}
.social-row { display: flex; gap: var(--sp-2); }
.social-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .07);
  color: var(--ink-200);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.social-btn:hover { background: var(--brand-500); color: #fff; }

@media (max-width: 62rem) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 40rem) { .footer-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   14. Utilities
   -------------------------------------------------------------------------- */
.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;
}
.skip-link {
  position: absolute; top: -100%; left: var(--sp-4); z-index: 100;
  padding: var(--sp-2) var(--sp-4);
  background: var(--ink-900); color: #fff;
  border-radius: var(--r-sm);
}
.skip-link:focus { top: var(--sp-2); }

.icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.ml-auto { margin-left: auto; }

.w-full { width: 100%; }
.flex-1 { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.relative { position: relative; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.divider { height: 1px; background: var(--border); }
.rounded { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.shadow-md { box-shadow: var(--shadow-md); }
.bg-raised { background: var(--bg-raised); }
.bg-sunken { background: var(--bg-sunken); }
.border { border: 1px solid var(--border); }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

@media (max-width: 48rem) { .hide-mobile { display: none !important; } }
@media (min-width: 48.0625rem) { .show-mobile { display: none !important; } }

.fade-up { animation: fade-up var(--dur-slow) var(--ease-out) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }

@media print {
  .site-header, .site-footer, .btn, .pcard-actions { display: none !important; }
  body { background: #fff; }
}


/* ---------------------------------------------------------------------------
   Social sign-in
   --------------------------------------------------------------------------- */
.social-auth { margin-top: var(--sp-5); }

.social-sep {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  color: var(--text-subtle);
  font-size: var(--fs-xs);
}
.social-sep::before,
.social-sep::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

/* Google's brand guidance wants its mark on a neutral surface, so this button
   keeps the outline treatment rather than taking the brand colour. */
.social-google { gap: var(--sp-3); }


/* ---------------------------------------------------------------------------
   Property gallery: a sliding stage plus a thumbnail strip
   ---------------------------------------------------------------------------
   Scroll-snap rather than a JavaScript carousel. A swipe is native on a phone,
   the arrows only nudge scrollLeft, and with scripting off it stays a
   scrollable row of photographs instead of a broken widget.
   --------------------------------------------------------------------------- */
.pgal {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-sunken);
}

.pgal-stage {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  aspect-ratio: 16 / 10;
}

/* On a wide screen the ratio has to go. The gallery runs the full width of the
   page, so 16/10 of a 1750px display is over a thousand pixels tall: one
   photograph filling the entire screen, with the price, the description and
   the thumbnail strip all pushed below the fold. A capped height would shrink
   the width to match instead, leaving the frame narrower than the column it
   sits in -- so the height is set outright and object-fit crops the sides.
   Below this width the ratio still governs, and a phone never comes near the
   limit anyway. */
@media (min-width: 900px) {
  .pgal-stage {
    aspect-ratio: auto;
    height: min(62vh, 560px);
  }
}
.pgal-stage::-webkit-scrollbar { display: none; }

.pgal-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  border: 0; padding: 0; margin: 0;
  background: var(--bg-sunken);
  cursor: zoom-in;
}
.pgal-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Arrows sit on the photograph, so they carry their own contrast rather than
   relying on whatever happens to be behind them. */
.pgal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 0; border-radius: 50%;
  background: rgba(20, 16, 14, .55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.pgal-nav:hover { background: rgba(20, 16, 14, .78); }
.pgal-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pgal-prev { left: var(--sp-3); }
.pgal-next { right: var(--sp-3); }
.pgal-nav[hidden] { display: none; }

.pgal-count {
  position: absolute; bottom: var(--sp-3); right: var(--sp-3);
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .25rem .625rem;
  border-radius: var(--r-pill);
  background: rgba(20, 16, 14, .62);
  color: #fff;
  font-size: var(--fs-2xs);
  backdrop-filter: blur(6px);
}

/* The strip scrolls horizontally on a phone rather than wrapping into a wall
   of thumbnails that pushes the price below the fold. */
.pgal-thumbs {
  display: flex; gap: var(--sp-2);
  margin-top: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-2);
  scrollbar-width: thin;
}
.pgal-thumb {
  flex: 0 0 auto;
  width: 5.5rem; height: 4rem;
  border: 2px solid transparent;
  border-radius: var(--r-sm);
  overflow: hidden;
  padding: 0;
  background: var(--bg-sunken);
  cursor: pointer;
  opacity: .62;
  transition: opacity var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.pgal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pgal-thumb:hover { opacity: 1; }
.pgal-thumb.is-active { opacity: 1; border-color: var(--brand-500); }
.pgal-thumb:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

@media (max-width: 640px) {
  .pgal-stage { aspect-ratio: 4 / 3; }
  .pgal-nav { width: 2.25rem; height: 2.25rem; }
  .pgal-thumb { width: 4.5rem; height: 3.25rem; }
}

/* Someone who has asked for less motion should not get smooth-scrolled. */
@media (prefers-reduced-motion: reduce) {
  .pgal-stage { scroll-behavior: auto; }
}

/* ==========================================================================
   Card rows that scroll sideways on a phone
   --------------------------------------------------------------------------
   Stacked one per row, four cities is four screens of scrolling before the
   next section, and a visitor who wanted to compare them has to remember the
   first one by the time they reach the last. Sideways, the row is one screen
   and the next card is visibly waiting at the edge, which is what tells you
   there is more.

   The negative margin pulls the rail out to the edge of the screen and the
   padding puts the first card back where the heading starts: the row bleeds
   off the side instead of stopping short inside the container's gutter.

   Only on a phone. On a desktop these stay the grid they were.
   ========================================================================== */
@media (max-width: 40rem) {
  .grid-rail {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: calc(var(--page-margin) * -1);
    padding-inline: var(--page-margin);
    padding-bottom: var(--sp-2);
  }
  .grid-rail::-webkit-scrollbar { display: none; }

  .grid-rail > * {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }
  /* A city tile carries a name and a count, so it needs far less width than a
     property card carrying a photograph, a price and a location. */
  .grid-4.grid-rail > * { flex-basis: 44%; }
}

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

/* Homepage */
.home-hero { padding-block: clamp(3rem, 7vw, 7rem) clamp(2.25rem, 4.5vw, 4rem); }
.home-hero .hero-grid { gap: clamp(2.25rem, 6vw, 6rem); }
.home-hero .hero-copy { max-width: none; }
.home-hero .display { font-size: clamp(2.75rem, 4.3vw, 4.75rem); line-height: 1; text-wrap: balance; }
.home-hero .hero-media { aspect-ratio: 5 / 4; border-radius: var(--r-xl); }
.home-search { margin-top: clamp(2rem, 5vw, 4.5rem); border-radius: var(--r-lg); }
.home-search .searchbar-field { border-radius: var(--r-md); min-height: 48px; }
.home-search .searchbar-field:focus-within { outline: 2px solid var(--text-brand); outline-offset: -2px; }
.home-search-location { flex: 1.4; }
.home-stats { border-block: 1px solid var(--border); background: var(--bg-sunken); }
.home-stats .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; text-align: center; }
.home-stats .stat-row > div { padding: var(--sp-4) var(--sp-2); }
.home-stats .stat-row > div + div { border-inline-start: 1px solid var(--border); }
.home-showcase { background: var(--surface-brand); }
.home-showcase .carousel-track > * { flex-basis: min(28rem, 85%); }
.home-showcase .carousel-nav { justify-content: center; }
.home-process, .home-faq, .home-close-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}
.home-process .section-head, .home-faq .section-head {
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0;
}
.home-process-steps .card { padding: clamp(1.125rem, 2vw, 2rem); }
.home-faq summary { list-style: none; cursor: pointer; }
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq details[open] summary .icon { transform: rotate(45deg); color: var(--text-brand); }
.home-faq-answer { color: var(--text-muted); padding: 0 var(--sp-4) var(--sp-4) 0; }
.home-newsletter { display: flex; gap: var(--sp-2); flex: 1; min-width: min(100%, 20rem); }
.home-newsletter input { min-width: 0; }
.home-close { padding-block: var(--section); }
.home-close-panel {
  padding: clamp(1.5rem, 6vw, 5rem);
  background: var(--surface-brand);
  border: 1px solid var(--border-brand);
  border-radius: var(--r-xl);
}
.home-close-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; }
.footer-top-link { white-space: nowrap; }

@media (max-width: 62rem) {
  .home-hero .hero-copy { text-align: center; margin-inline: auto; }
  .home-hero .lead { margin-inline: auto; }
  .home-hero-actions, .home-hero-notes { justify-content: center; }
  .home-hero .hero-media { aspect-ratio: 16 / 9; }
  .home-process, .home-faq, .home-close-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 48rem) {
  .home-hero { padding-top: 2.25rem; }
  .home-hero .hero-grid { gap: 1.75rem; }
  .home-hero .display { font-size: clamp(2.25rem, 9.8vw, 3.5rem); }
  .home-search { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-search .searchbar-field { padding-inline: .75rem; }
  .home-search-location, .home-search-budget, .home-search .btn { grid-column: 1 / -1; }
  .home-stats .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-stats .stat-row > div:nth-child(3) { border-inline-start: 0; }
  .home-stats .stat-row > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

@media (max-width: 40rem) {
  .home-hero-actions > .btn { flex: 1 0 100%; }
  .home-process-steps { grid-template-columns: minmax(0, 1fr); }
  .home-newsletter { flex-direction: column; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
