/* ================================================================
   Team Real City — Buyer site design system
   ================================================================ */

:root {
  /* Color */
  --navy: #0e3a8a;
  --navy-2: #0a2a6a;
  --navy-3: #061942;
  --navy-ink: #04102e;
  --red: #d8302a;
  --red-2: #b32521;
  --cream: #f5efe2;
  --cream-2: #ece4d2;
  --paper: #fbf8f1;
  --white: #ffffff;
  --ink: #0d1426;
  --ink-2: #2a3349;
  --muted: #5d6479;
  --muted-2: #8a8f9f;
  --line: #e3dac4;
  --line-2: #d8ceb4;
  --gold: #b8893a;

  /* Type */
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 6px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Typography ---------- */

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow.on-navy { color: #f3c9b2; }
.eyebrow.muted { color: var(--muted); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

.h-display {
  font-size: clamp(44px, 6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 500;
}
.h1 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.06; letter-spacing: -0.02em; }
.h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.1;  letter-spacing: -0.015em; }
.h3 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.18; }
.h4 { font-size: 20px; line-height: 1.25; }

.italic-serif { font-style: italic; font-family: var(--serif); }

.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-2); line-height: 1.5; max-width: 56ch; text-wrap: pretty; }
.body-lg { font-size: 17px; color: var(--ink-2); }
.body { color: var(--ink-2); }
.small { font-size: 13px; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }

/* ---------- Layout ---------- */

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }
.section.on-navy { background: var(--navy); color: #e9ecf4; }
.section.on-navy h1,
.section.on-navy h2,
.section.on-navy h3,
.section.on-navy h4 { color: #fff; }
.section.on-cream { background: var(--cream); }
.section.on-paper { background: var(--paper); }
.section.on-ink { background: var(--navy-ink); color: #d8dcea; }
.section.on-ink h1, .section.on-ink h2, .section.on-ink h3 { color: #fff; }

.row { display: flex; gap: 24px; }
.grid { display: grid; gap: 24px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.center { display: flex; align-items: center; justify-content: center; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-2); }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }

.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }

.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--cream); }

.btn-ghost.on-navy { color: #fff; border-color: rgba(255,255,255,0.3); }
.btn-ghost.on-navy:hover { background: rgba(255,255,255,0.08); }

.btn-sm { height: 40px; font-size: 14px; padding: 0 18px; }
.btn-lg { height: 60px; font-size: 16px; padding: 0 32px; }

.btn .arrow { display: inline-block; transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(8px);
}
.site-header.on-hero {
  background: rgba(251, 248, 241, 0.92);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 48px; width: auto; }
.brand .brand-tx {
  display: flex; flex-direction: column; line-height: 1;
  font-family: var(--serif);
  color: var(--navy);
}
.brand .brand-tx b { font-size: 16px; font-weight: 600; letter-spacing: 0.01em; }
.brand .brand-tx span { font-size: 11px; color: var(--muted); margin-top: 3px; letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--sans); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  padding: 10px 14px;
  font-size: 14.5px;
  color: var(--ink-2);
  border-radius: 6px;
  font-weight: 500;
}
.nav a:hover { background: var(--cream); color: var(--ink); }
.nav a.active { color: var(--navy); font-weight: 600; }

.header-cta { display: flex; align-items: center; gap: 12px; }
.header-cta .phone {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--navy);
  font-weight: 500;
}
.header-cta .phone .label { display: block; font-family: var(--sans); font-size: 10px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }

@media (max-width: 880px) {
  .nav { display: none; }
  .header-cta .phone { display: none; }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-ink); color: #b8becf; padding: 80px 0 28px; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; margin-bottom: 18px; }
.site-footer a { color: #b8becf; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 56px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer-brand p { max-width: 32ch; line-height: 1.5; color: #8a91a5; font-size: 14px; margin: 16px 0 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: #6e7488; gap: 24px; flex-wrap: wrap; }
.footer-bottom .disclaimer { max-width: 70ch; line-height: 1.55; }

@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Form controls ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.input, .select, textarea.input {
  height: 52px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line-2);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.input { height: auto; padding: 14px 16px; resize: vertical; min-height: 120px; line-height: 1.5; }
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(14, 58, 138, 0.12);
}
.input::placeholder { color: var(--muted-2); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235d6479' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ---------- Cards / placeholders ---------- */

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 60px -28px rgba(14,30,80,0.25); border-color: var(--line-2); }

.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(135deg, rgba(14,58,138,0.06) 0 14px, rgba(14,58,138,0.03) 14px 28px),
    var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-2);
  overflow: hidden;
}
.placeholder.on-navy {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.07) 0 14px, rgba(255,255,255,0.03) 14px 28px),
    var(--navy-2);
  color: #cdd5ee;
}
.placeholder .pl-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.85);
  color: var(--navy-ink);
  padding: 6px 10px;
  border-radius: 4px;
}
.placeholder.on-navy .pl-tag { background: rgba(255,255,255,0.12); color: #fff; }

/* ---------- Misc ---------- */

.divider { height: 1px; background: var(--line); }
.divider.on-navy { background: rgba(255,255,255,0.12); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 100px;
  background: var(--cream);
  border: 1px solid var(--line-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.tag.red { background: rgba(216,48,42,0.08); border-color: rgba(216,48,42,0.2); color: var(--red-2); }
.tag.navy { background: rgba(14,58,138,0.08); border-color: rgba(14,58,138,0.2); color: var(--navy); }

.kpi { font-family: var(--serif); font-size: clamp(40px, 5vw, 64px); line-height: 1; color: var(--navy); font-weight: 500; letter-spacing: -0.02em; }
.kpi.on-navy { color: #fff; }
.kpi .unit { font-size: 0.45em; color: var(--muted); margin-left: 6px; letter-spacing: 0; font-weight: 500; }

/* ---------- Tweaks panel (vanilla) ---------- */

.tweaks-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 320px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 24px 60px -20px rgba(14,30,80,0.35);
  z-index: 200;
  font-family: var(--sans);
  font-size: 14px;
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.tweaks-panel header b { font-family: var(--serif); font-size: 17px; color: var(--navy); }
.tweaks-panel .close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.tweaks-panel .body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.tweaks-panel label { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; display: block; }
.tweaks-panel input[type="text"] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
}
.tweaks-panel input[type="text"]:focus { border-color: var(--navy); }
.tweaks-panel .hint { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* Real photos — replaces .placeholder for filled image slots */
.nb-img[style], .lst-img[style], .agent-img[style] {
  background-size: cover;
  background-position: center;
}
