/* ==========================================================================
   HOMES by Jo — shared stylesheet
   One file for every page. Tokens first, then layout, then components.
   Page markup carries only classes — no inline styles.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
:root {
  --paper:        oklch(0.98 0.008 75);
  --paper-warm:   oklch(0.96 0.012 70);
  --paper-tint:   oklch(0.94 0.015 60);
  --card:         #fff;
  --ink:          oklch(0.25 0.02 60);
  --ink-strong:   oklch(0.24 0.03 60);
  --ink-mid:      oklch(0.28 0.03 60);
  --ink-soft:     rgba(40, 30, 20, .6);
  --ink-faint:    rgba(40, 30, 20, .5);
  --ink-ghost:    rgba(40, 30, 20, .42);
  --brand:        oklch(0.36 0.11 35);
  --brand-dark:   oklch(0.30 0.10 35);
  --brand-bright: oklch(0.62 0.14 40);
  --brand-soft:   oklch(0.94 0.02 40);
  --nav-link:     oklch(0.40 0.07 50);
  --dark-panel:   oklch(0.28 0.03 60);
  --rule:         rgba(60, 40, 20, .08);
  --rule-mid:     rgba(60, 40, 20, .1);
  --rule-strong:  rgba(60, 40, 20, .15);
  --bar-idle:     oklch(0.85 0.02 60);

  --shadow-card:  0 2px 10px rgba(90, 50, 20, .06);
  --shadow-tile:  0 1px 6px rgba(90, 50, 20, .06);
  --shadow-lift:  0 4px 20px rgba(90, 50, 20, .1);

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Karla', system-ui, sans-serif;

  --page:    1200px;
  --gutter:  48px;
  --section: 48px;
}

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

/* The `hidden` attribute is how the shared script toggles sections; it must beat
   any author `display` rule on the same element. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  max-width: 100vw;
  overflow-x: hidden;
  padding-bottom: 90px;
  text-wrap: pretty;
}

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

img { max-width: 100%; }

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { margin-top: var(--section); }

.section-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-strong);
  margin-bottom: 16px;
}
.section-title.tight { margin-bottom: 4px; }

.section-note {
  font-size: 13px;
  color: rgba(40, 30, 20, .55);
  margin-bottom: 16px;
}

.fineprint {
  font-size: 11px;
  color: var(--ink-ghost);
  margin-top: 12px;
}

.caption-note {
  font-size: 10px;
  color: var(--ink-ghost);
  margin-top: 8px;
  font-style: italic;
}

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: oklch(0.98 0.008 75 / .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .logo { display: block; }

.site-nav {
  display: flex;
  gap: 30px;
  font-size: 14px;
  color: rgba(40, 30, 20, .68);
  font-weight: 500;
}
.site-nav a { color: var(--nav-link); }

.btn-wa {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13.5px;
  font-weight: 700;
}
.btn-wa:hover { color: #fff; background: var(--brand-dark); }

.breadcrumb {
  max-width: var(--page);
  margin: 0 auto;
  padding: 16px var(--gutter) 0;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* --- Hero: gallery + sticky summary ------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
  align-items: start;
  margin-top: var(--section);
}

.gallery-stage {
  height: 420px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  position: relative;
  background: var(--card);
}
.gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}
.gallery-stage img[data-fit="contain"] { object-fit: contain; background: var(--card); }

.gallery-label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(20, 14, 8, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(20, 14, 8, .55);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}
.gallery-arrow.prev { left: 14px; }
.gallery-arrow.next { right: 14px; }

.gallery-tabs { display: flex; gap: 12px; margin-top: 12px; }
.gallery-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
}
.gallery-tab[aria-selected="true"] {
  background: var(--card);
  color: var(--brand);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.gallery-tab[disabled] { color: rgba(40, 30, 20, .35); cursor: default; }

.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.gallery-thumbs .track { display: flex; gap: 8px; flex: 1; min-width: 0; }
.gallery-thumbs img {
  width: 100%;
  height: 80px;
  flex: 1 1 0;
  border-radius: 8px;
  object-fit: cover;
  background: var(--card);
  border: 2px solid transparent;
  cursor: pointer;
}
.gallery-thumbs img[data-fit="contain"] { object-fit: contain; }
.gallery-thumbs img[aria-current="true"] { border-color: var(--brand); }

.thumb-arrow {
  flex: 0 0 auto;
  width: 30px;
  height: 80px;
  border: none;
  border-radius: 8px;
  background: var(--paper-tint);
  color: var(--brand);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* Summary card */
.summary {
  position: sticky;
  top: 90px;
  background: var(--card);
  border-radius: 16px;
  padding: 26px;
  box-shadow: var(--shadow-lift);
}
.badge {
  display: inline-block;
  background: var(--brand-bright);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.summary h1 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-strong);
  margin: 0;
}
.summary h1 .cn { font-size: 16px; color: var(--ink-faint); }
.summary .location { font-size: 13px; color: rgba(40, 30, 20, .55); margin: 4px 0 18px; }

.summary-stats {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 16px;
}
.summary-stats dt { font-size: 11px; color: var(--ink-faint); margin: 0; }
.summary-stats dd { font-size: 19px; font-weight: 800; color: var(--ink-strong); margin: 0; }
.summary-stats .price dd { color: var(--brand); }

.summary .highlights { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 20px; }

.btn-primary {
  display: block;
  text-align: center;
  background: var(--brand);
  color: #fff;
  padding: 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}
.btn-primary:hover { color: #fff; background: var(--brand-dark); }

.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-ghost {
  text-align: center;
  border: 1px solid var(--rule-strong);
  padding: 11px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: oklch(0.3 0.03 60);
  cursor: pointer;
  background: none;
  font-family: var(--sans);
}

.agent {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.agent .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: 0 0 auto;
  background-image: url('joanne-otsuka.jpeg');
  background-size: 250%;
  background-position: 47% 15%;
  background-repeat: no-repeat;
}
.agent b { color: var(--ink-mid); }

/* --- Quick facts --------------------------------------------------------- */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 28px;
  background: var(--card);
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
  font-size: 13.5px;
}
.facts dt { color: var(--ink-faint); margin: 0; }
.facts dd { margin: 0; font-weight: 700; }
.facts dd.tba { color: var(--ink-faint); font-weight: 500; font-style: italic; }

/* --- Prose story --------------------------------------------------------- */
.prose {
  max-width: 820px;
  font-size: 14.5px;
  line-height: 1.8;
  color: rgba(40, 30, 20, .7);
}
.prose p { margin: 0 0 16px; }
.prose p:last-child { margin-bottom: 0; }
.prose b { color: var(--ink-mid); }

/* --- Joanne's take ------------------------------------------------------- */
.take {
  background: var(--paper-warm);
  border: 1px solid var(--rule-mid);
  border-radius: 16px;
  padding: 30px 34px;
}
.take-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.take-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.take-head h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-strong);
  margin: 0;
}
.take-head .credential { font-size: 11.5px; color: rgba(40, 30, 20, .55); }
.take-body { font-size: 14px; line-height: 1.75; color: rgba(40, 30, 20, .7); }
.take-body p { margin: 0 0 14px; }
.take-body p:last-child { margin-bottom: 0; }

/* --- Unit mix table ----------------------------------------------------- */
.mix {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.mix-row {
  display: grid;
  grid-template-columns: 1.7fr 1.2fr .7fr 1.1fr 1fr;
  padding: 14px 24px;
  font-size: 13px;
  align-items: center;
  border-top: 1px solid rgba(60, 40, 20, .06);
}
.mix.has-plans .mix-row { grid-template-columns: 1.7fr 1.2fr .7fr 1.1fr 1fr .9fr; }
.mix-row.head {
  background: var(--paper);
  font-size: 12px;
  font-weight: 700;
  color: rgba(40, 30, 20, .55);
  border-top: none;
}
.mix-row .type { font-weight: 700; }
.mix-row .plan { text-align: center; }

.plan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  color: var(--brand);
  background: var(--brand-soft);
  cursor: pointer;
}
.plan-btn[disabled] { color: rgba(40, 30, 20, .22); background: none; cursor: default; }

.callout {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--paper-tint);
  border-radius: 12px;
  padding: 12px 16px;
}

/* --- Location ----------------------------------------------------------- */
.map {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  background: var(--card);
}
.map img { width: 100%; display: block; }

.map-placeholder {
  height: 280px;
  border-radius: 14px;
  background-color: oklch(0.93 0.015 60);
  background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, .06) 0 12px, rgba(0, 0, 0, .02) 12px 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: rgba(60, 40, 20, .4);
  margin-bottom: 16px;
}

.amenities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.amenity {
  background: var(--card);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow-tile);
}
.amenity .icon { font-size: 22px; }
.amenity h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-strong);
  margin: 8px 0 3px;
}
.amenity p { font-size: 12.5px; color: rgba(40, 30, 20, .55); line-height: 1.5; margin: 0; }

/* --- PSF chart ---------------------------------------------------------- */
.chart {
  background: var(--card);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.chart-plot {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  height: 160px;
  padding: 0 10px;
}
.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}
.chart-col .value { font-size: 11.5px; font-weight: 700; color: oklch(0.3 0.03 60); }
.chart-col .bar {
  width: 44px;
  background: var(--bar-idle);
  border-radius: 4px 4px 0 0;
}
.chart-col.self .bar { background: var(--brand); }
.chart-col .name { font-size: 11px; color: var(--ink-faint); text-align: center; }

/* --- Payment & financials ---------------------------------------------- */
.calc {
  background: var(--card);
  border-radius: 14px;
  padding: 28px 30px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.calc label { display: block; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 4px; }
.calc input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
  margin-bottom: 14px;
}
.profile-toggle { display: flex; gap: 8px; }
.profile-toggle button {
  flex: 1;
  text-align: center;
  padding: 9px 6px;
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  background: var(--paper);
  color: var(--ink-soft);
}
.profile-toggle button[aria-pressed="true"] { background: var(--brand); color: #fff; }

.calc-out { border-left: 1px solid var(--rule-mid); padding-left: 36px; }
.calc-out .out-label { font-size: 12.5px; color: rgba(40, 30, 20, .55); margin-bottom: 6px; }
.calc-out .out-figure {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 18px;
}
.calc-out .line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
}
.calc-out .line span { color: rgba(40, 30, 20, .55); }
.calc-out .line.total { border-bottom: 1px solid var(--rule); }
.calc-out .line.total span { color: inherit; font-weight: 700; }
.calc-out .line.total b { color: var(--brand); }

/* --- Enquiry ------------------------------------------------------------ */
.enquiry {
  background: var(--dark-panel);
  border-radius: 16px;
  padding: 40px 44px;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}
.enquiry h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 10px;
}
.enquiry .lede { font-size: 13.5px; color: rgba(255, 255, 255, .7); line-height: 1.7; }
.enquiry form,
.enquiry .enquiry-actions { display: flex; flex-direction: column; gap: 10px; }
.enquiry input[type="text"],
.enquiry input[type="tel"] {
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  font-size: 13.5px;
  font-family: var(--sans);
}
.enquiry .consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .7);
  line-height: 1.5;
}
.enquiry .consent input { margin-top: 2px; accent-color: var(--brand-bright); }
.enquiry .consent a { color: #fff; text-decoration: underline; }
.btn-submit {
  text-align: center;
  background: var(--brand-bright);
  color: #fff;
  padding: 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}
.btn-submit:hover { color: #fff; }

/* --- Disclaimer --------------------------------------------------------- */
.disclaimer {
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.65;
}

/* --- Lightbox ----------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 10, 6, .86);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox img[data-fit="contain"] { background: var(--card); }
.lightbox .caption { color: #fff; font-size: 13px; font-weight: 600; }
.lightbox .note {
  font-size: 10px;
  color: rgba(255, 255, 255, .55);
  font-style: italic;
  text-align: center;
  max-width: 600px;
}
.lightbox .close {
  position: absolute;
  top: 22px;
  right: 26px;
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  font-weight: 300;
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1000px) {
  :root { --gutter: 24px; }
  .hero { grid-template-columns: 1fr; }
  .summary { position: static; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .amenities { grid-template-columns: 1fr 1fr; }
  .calc, .enquiry { grid-template-columns: 1fr; }
  .calc-out { border-left: none; padding-left: 0; border-top: 1px solid var(--rule-mid); padding-top: 24px; }
  .site-nav { display: none; }
}

@media (max-width: 640px) {
  .facts, .amenities { grid-template-columns: 1fr; }
  .gallery-stage { height: 260px; }
  .mix { overflow-x: auto; }
  .mix-row, .mix.has-plans .mix-row { min-width: 640px; }
  .enquiry { padding: 28px 22px; }
}


/* ==========================================================================
   HOME PAGE
   ========================================================================== */

/* --- Persona modal ------------------------------------------------------- */
.persona-modal {
  position: fixed;
  inset: 0;
  background: oklch(0.2 0.02 60 / .55);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.persona-modal[hidden] { display: none; }
.persona-modal .sheet {
  background: var(--card);
  border-radius: 6px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(20, 12, 4, .35);
  overflow: hidden;
}
.persona-modal .rule-top {
  height: 4px;
  background: linear-gradient(90deg, var(--brand), oklch(0.7 0.11 85));
}
.persona-modal .body { padding: 48px 52px 40px; text-align: center; }
.persona-modal .eyebrow {
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 14px;
}
.persona-modal h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: oklch(0.22 0.03 60);
  margin: 0 0 10px;
  line-height: 1.3;
}
.persona-modal .lede {
  font-size: 13.5px;
  color: rgba(40, 30, 20, .55);
  max-width: 400px;
  margin: 0 auto 34px;
  line-height: 1.6;
}
.persona-options {
  display: flex;
  border: 1px solid rgba(60, 40, 20, .12);
  border-radius: 8px;
  overflow: hidden;
}
.persona-options button {
  flex: 1;
  padding: 30px 24px;
  text-align: left;
  background: none;
  border: none;
  border-right: 1px solid rgba(60, 40, 20, .12);
  cursor: pointer;
  font-family: var(--sans);
}
.persona-options button:last-child { border-right: none; }
.persona-options .n {
  font-size: 10.5px;
  letter-spacing: .1em;
  color: rgba(40, 30, 20, .4);
  font-weight: 700;
  margin-bottom: 10px;
}
.persona-options h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-strong);
  margin: 0 0 8px;
}
.persona-options p { font-size: 12.5px; color: rgba(40, 30, 20, .55); line-height: 1.6; margin: 0 0 18px; }
.persona-options .go { font-size: 12.5px; font-weight: 700; color: var(--brand); }
.persona-modal .signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 11.5px;
  color: var(--ink-faint);
}
.persona-modal .signature img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* --- Home header extras ------------------------------------------------- */
.site-header.home { gap: clamp(10px, 2vw, 28px); padding: 14px clamp(16px, 3.5vw, 48px); }
.header-tools { display: flex; align-items: center; flex: 0 0 auto; gap: clamp(8px, 1vw, 14px); }

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: var(--paper-tint);
  color: var(--brand);
  cursor: pointer;
}

.persona-pill {
  display: flex;
  flex: 0 0 auto;
  background: var(--paper-tint);
  border-radius: 20px;
  padding: 3px;
  white-space: nowrap;
}
.persona-pill button {
  padding: 7px 16px;
  border: none;
  border-radius: 18px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  background: transparent;
  color: rgba(40, 30, 20, .55);
}
.persona-pill button[aria-pressed="true"] { background: var(--brand); color: #fff; }

.mobile-menu {
  position: sticky;
  top: 64px;
  z-index: 49;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-mid);
  box-shadow: 0 10px 26px rgba(90, 50, 20, .1);
  padding: 14px clamp(16px, 3.5vw, 48px) 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a, .mobile-menu span {
  padding: 11px 2px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid rgba(60, 40, 20, .07);
}
.mobile-menu a { color: var(--nav-link); }
.mobile-menu span { color: rgba(40, 30, 20, .68); }
.mobile-menu .persona-pill { margin-top: 12px; align-self: flex-start; }

/* --- Home hero ---------------------------------------------------------- */
.hero-home {
  position: relative;
  padding: 64px var(--gutter) 48px;
  text-align: center;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg .frame {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
}
.hero-bg .frame.on { opacity: 1; }
.hero-bg .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, oklch(0.98 0.008 75 / .86), oklch(0.98 0.008 75 / .9));
}
.hero-inner { position: relative; z-index: 1; }

.agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: 24px;
  padding: 7px 16px;
  box-shadow: var(--shadow-tile);
  margin-bottom: 26px;
  font-size: 12.5px;
  color: rgba(40, 30, 20, .65);
}
.agent-badge img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

.hero-home h1 {
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1.18;
  font-weight: 700;
  max-width: 820px;
  margin: 0 auto 16px;
  color: var(--nav-link);
}
.hero-home .hero-sub {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 auto 32px;
}

.smart-search { max-width: 660px; margin: 0 auto 10px; position: relative; }
.smart-search .field {
  display: flex;
  align-items: center;
  background: var(--card);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(90, 50, 20, .1);
  padding: 6px 6px 6px 20px;
}
.smart-search .spark { font-size: 16px; margin-right: 10px; }
.smart-search input {
  flex: 1;
  padding: 11px 0;
  border: none;
  font-size: 14.5px;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
}
.smart-search .ask {
  padding: 10px 18px;
  background: var(--dark-panel);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--sans);
}
.search-results {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(90, 50, 20, .16);
  z-index: 30;
  overflow: hidden;
  text-align: left;
}
.search-results[hidden] { display: none; }
.search-results a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(60, 40, 20, .06);
  font-size: 13px;
  color: var(--ink-mid);
}
.search-results .district { color: var(--ink-faint); }
.search-results .price { color: var(--brand); font-weight: 700; }

.hero-hint { font-size: 11.5px; color: rgba(40, 30, 20, .45); margin-bottom: 14px; }

.chips { display: flex; justify-content: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.chips span {
  background: var(--card);
  padding: 7px 16px;
  border-radius: 20px;
  color: oklch(0.4 0.05 50);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

/* --- AI chat ------------------------------------------------------------ */
.chat-panel {
  position: fixed;
  bottom: 96px;
  right: 26px;
  width: 360px;
  max-height: 520px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, .22);
  z-index: 90;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-panel .bar {
  background: var(--dark-panel);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 700;
}
.chat-panel .bar button { background: none; border: none; color: #fff; opacity: .7; cursor: pointer; font-size: 14px; }
.chat-log { padding: 18px; overflow-y: auto; flex: 1; }
.chat-log .msg {
  padding: 10px 14px;
  font-size: 12.5px;
  margin-bottom: 10px;
  max-width: 85%;
}
.chat-log .msg.bot {
  background: var(--paper-tint);
  color: var(--ink-mid);
  border-radius: 12px 12px 12px 2px;
}
.chat-log .msg.me {
  background: var(--brand);
  color: #fff;
  border-radius: 12px 12px 2px 12px;
  margin-left: auto;
}
.chat-log .result {
  display: block;
  background: var(--paper);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--ink-mid);
}
.chat-log .result .meta { color: rgba(40, 30, 20, .55); }
.chat-chips {
  padding: 14px 18px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chat-chips button {
  background: var(--paper-tint);
  color: oklch(0.3 0.03 60);
  padding: 8px 13px;
  border: none;
  border-radius: 16px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* --- Coverflow carousel ------------------------------------------------- */
.band { padding: 60px var(--gutter); }
.band.white { background: var(--card); }
.band.center { text-align: center; }

.band-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--nav-link);
  margin: 0 0 8px;
}
.band-title.dark { color: var(--ink-strong); }
.band-sub { font-size: 14px; color: rgba(40, 30, 20, .55); margin: 0 0 30px; }

.band-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto 26px;
}
.band-head .band-title { margin: 0; }
.band-head a { font-size: 13.5px; font-weight: 700; }

.coverflow {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.coverflow-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300px;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(90, 50, 20, .16);
  cursor: pointer;
  transition: transform .5s cubic-bezier(.22, .9, .35, 1), opacity .5s;
}
.coverflow-card .shot { height: 190px; position: relative; background: oklch(0.93 0.015 60); }
.coverflow-card .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.coverflow-card .status {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--brand-bright);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
.coverflow-card .meta { padding: 18px 20px 20px; text-align: left; }
.coverflow-card .name { font-size: 16.5px; font-weight: 700; color: var(--ink-strong); }
.coverflow-card .district { font-size: 12.5px; color: rgba(40, 30, 20, .55); margin: 4px 0 12px; }
.coverflow-card .row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.coverflow-card .row b { font-weight: 700; }
.coverflow-card .row span { color: rgba(40, 30, 20, .55); }
.coverflow-card .tenure { font-size: 12px; color: rgba(40, 30, 20, .45); }

.carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
}
.carousel-nav button.arrow {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 1px 6px rgba(90, 50, 20, .12);
  font-size: 16px;
  cursor: pointer;
  color: oklch(0.4 0.1 50);
}
.dots { display: flex; gap: 8px; align-items: center; }
.dots button {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 4px;
  background: rgba(60, 40, 20, .2);
  cursor: pointer;
  transition: all .3s;
  padding: 0;
}
.dots button[aria-current="true"] { width: 22px; background: var(--brand); }

/* --- Property card grids ----------------------------------------------- */
.launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
}
.launch-card {
  display: block;
  background: var(--paper);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.launch-card .shot { height: 150px; position: relative; overflow: hidden; }
.launch-card .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.launch-card .status {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--brand-bright);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 20px;
}
.launch-card .status.preview { background: oklch(0.62 0.14 85); }
.launch-card .status.live { background: oklch(0.62 0.14 145); }
.launch-card .meta { padding: 14px 16px 16px; }
.launch-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.launch-card .tags span {
  background: oklch(0.95 0.008 75);
  color: oklch(0.4 0.03 60);
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 7px;
}
.launch-card .name { font-size: 14.5px; font-weight: 700; color: var(--ink-strong); }
.launch-card .row { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 8px; }
.launch-card .row b { font-weight: 700; }
.launch-card .row span { color: var(--ink-faint); }

.resale-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1240px; margin: 0 auto; }
.resale-card {
  display: block;
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.resale-card .shot { height: 180px; position: relative; overflow: hidden; background: oklch(0.93 0.015 60); }
.resale-card .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.resale-card .status {
  position: absolute;
  top: 10px;
  left: 10px;
  background: oklch(0.35 0.03 60);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
.resale-card .meta { padding: 16px 18px 18px; }
.resale-card .name { font-size: 15.5px; font-weight: 700; color: var(--ink-strong); }
.resale-card .district { font-size: 12px; color: rgba(40, 30, 20, .55); margin: 4px 0 10px; }
.resale-card .row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.resale-card .row b { font-weight: 700; }
.resale-card .row span { color: var(--ink-faint); }
.resale-card .spec { font-size: 12px; color: rgba(40, 30, 20, .45); }

/* --- Districts, tools --------------------------------------------------- */
.district-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
}
.district-grid span {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: oklch(0.3 0.03 60);
}

.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1000px; margin: 0 auto; }
.tool-card {
  background: var(--card);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.tool-card .icon { font-size: 28px; margin-bottom: 10px; }
.tool-card h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 6px; color: var(--ink-strong); }
.tool-card p { font-size: 12.5px; color: rgba(40, 30, 20, .55); margin: 0; }

/* --- Home calculators --------------------------------------------------- */
.home-calc {
  max-width: 1000px;
  margin: 36px auto 0;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 3px 16px rgba(90, 50, 20, .08);
  padding: 30px 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.home-calc h3 { font-size: 15px; font-weight: 700; color: var(--ink-strong); margin: 0 0 16px; }
.home-calc label { display: block; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 4px; }
.home-calc input[type="range"] { width: 100%; accent-color: var(--brand); margin-bottom: 14px; }
.home-calc .out { border-left: 1px solid var(--rule-mid); padding-left: 36px; }
.home-calc .out .k { font-size: 12.5px; color: rgba(40, 30, 20, .55); margin-bottom: 6px; }
.home-calc .out .big {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 20px;
}
.home-calc .out .mid { font-size: 20px; font-weight: 700; color: var(--ink-strong); margin-bottom: 20px; }
.home-calc .out .line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-top: 1px solid var(--rule);
}
.home-calc .out .line:first-child { border-top: none; }
.home-calc .out .line span { color: rgba(40, 30, 20, .55); }
.home-calc .out .line.net {
  padding: 10px 0;
  border-top: 1px solid var(--rule-strong);
  margin-top: 6px;
}
.home-calc .out .line.net span { color: inherit; font-weight: 700; }
.home-calc .out .line.net b { font-family: var(--serif); font-size: 20px; color: var(--brand); }

/* --- Seller: valuation, steps, comps ----------------------------------- */
.val-form {
  max-width: 760px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
}
.val-form .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.val-form input[type="text"], .val-form select {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--rule-strong);
  font-size: 13.5px;
  font-family: var(--sans);
  background: var(--card);
}
.val-form label { display: block; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 4px; }
.val-form input[type="range"] { width: 100%; accent-color: var(--brand); }
.val-form .estimate {
  text-align: center;
  padding: 20px;
  background: var(--card);
  border-radius: 12px;
  margin: 18px 0 16px;
}
.val-form .estimate .k { font-size: 12px; color: rgba(40, 30, 20, .55); margin-bottom: 6px; }
.val-form .estimate .v {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--brand);
}

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 44px; }
.step {
  background: var(--card);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.step .n {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 14px;
}
.step h3 { font-size: 14px; font-weight: 700; color: var(--ink-strong); margin: 0 0 6px; }
.step p { font-size: 12px; color: rgba(40, 30, 20, .55); margin: 0; }

.comps {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.comps .row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 13px 22px;
  font-size: 12.5px;
  border-top: 1px solid rgba(60, 40, 20, .06);
}
.comps .row.head {
  padding: 14px 22px;
  background: var(--paper);
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(40, 30, 20, .55);
  border-top: none;
}
.comps .row .project { font-weight: 600; }

/* --- Lead banner, footer, FAB ------------------------------------------ */
.lead-banner {
  padding: 56px var(--gutter);
  text-align: center;
  background: var(--dark-panel);
  color: #fff;
}
.lead-banner h2 { font-family: var(--serif); font-size: 26px; font-weight: 700; margin: 0 0 10px; }
.lead-banner p { font-size: 14.5px; color: rgba(255, 255, 255, .7); margin: 0 0 24px; }
.lead-banner a {
  display: inline-block;
  background: var(--brand-bright);
  color: #fff;
  padding: 13px 30px;
  border-radius: 26px;
  font-size: 14.5px;
  font-weight: 700;
}

.site-footer { padding: 44px var(--gutter) 100px; font-size: 12.5px; color: rgba(40, 30, 20, .55); }
.site-footer .cols {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.site-footer h3 { font-weight: 700; color: oklch(0.3 0.03 60); margin: 0 0 8px; font-size: 12.5px; }
.site-footer .brand svg { display: block; margin-bottom: 10px; }
.site-footer a { color: inherit; }

.fab {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  font-size: 26px;
  z-index: 60;
}

/* --- Home responsive --------------------------------------------------- */
@media (max-width: 900px) {
  .site-header.home .site-nav { display: none; }
  .menu-btn { display: flex; }
  .hero-home h1 { font-size: 34px; }
  .district-grid { grid-template-columns: repeat(4, 1fr); }
  .resale-grid, .tools-grid, .steps { grid-template-columns: 1fr 1fr; }
  .home-calc { grid-template-columns: 1fr; }
  .home-calc .out { border-left: none; padding-left: 0; border-top: 1px solid var(--rule-mid); padding-top: 24px; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .chat-panel { right: 12px; left: 12px; width: auto; }
}

@media (max-width: 600px) {
  .persona-pill { display: none; }
  .header-cta-label { display: none; }
  .persona-modal .body { padding: 32px 24px 28px; }
  .persona-options { flex-direction: column; }
  .persona-options button { border-right: none; border-bottom: 1px solid rgba(60, 40, 20, .12); }
  .district-grid { grid-template-columns: repeat(3, 1fr); }
  .resale-grid, .tools-grid, .steps, .val-form .fields { grid-template-columns: 1fr; }
  .coverflow { height: 360px; }
  .site-footer .cols { grid-template-columns: 1fr; }
}
