:root {
  --primary: #102a43;
  --primary-2: #163f5f;
  --accent: #d9a441;
  --accent-2: #f2c15d;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --muted: #64748b;
  --text: #0f172a;
  --border: #dbe4ee;
  --success: #0f766e;
  --danger: #b91c1c;
  --shadow: 0 20px 55px rgba(16, 42, 67, 0.13);
  --radius: 22px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #f8fafc;
  line-height: 1.55;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.container { width: min(var(--max), calc(100% - 34px)); margin: 0 auto; }
.section { padding: 72px 0; }
.section.soft { background: var(--surface-2); }
.section-header { display: flex; justify-content: space-between; gap: 22px; align-items: end; margin-bottom: 30px; }
.eyebrow { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.74rem; }
h1, h2, h3 { margin: 0; line-height: 1.08; color: var(--primary); }
h1 { font-size: clamp(2.35rem, 5vw, 5.2rem); letter-spacing: -0.06em; }
h2 { font-size: clamp(1.8rem, 3vw, 3rem); letter-spacing: -0.04em; }
h3 { font-size: 1.12rem; }
p { margin: 0; }
.lead { color: #d8e5f1; font-size: 1.08rem; max-width: 680px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; color: var(--muted); }

.topbar {
  background: #071a2f;
  color: #d9e7f2;
  font-size: 0.85rem;
  padding: 9px 0;
}
.topbar-grid { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.topbar strong { color: var(--accent-2); }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(219,228,238,0.75);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 900; color: var(--primary); letter-spacing: -0.03em; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #1e6091 62%, var(--accent));
  display: grid; place-items: center; color: white; font-weight: 900;
  box-shadow: 0 12px 25px rgba(16,42,67,.18);
}
.nav-links { display: flex; align-items: center; gap: 26px; color: #31455d; font-weight: 700; font-size: 0.94rem; }
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; border: 0; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; cursor: pointer; }

.btn {
  border: 0;
  border-radius: 999px;
  padding: 13px 19px;
  background: var(--primary);
  color: white;
  font-weight: 850;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 14px 32px rgba(16,42,67,.18);
}
.btn:hover { transform: translateY(-2px); background: #0b2036; }
.btn.accent { background: var(--accent); color: #162033; box-shadow: 0 14px 32px rgba(217,164,65,.25); }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--border); box-shadow: none; }
.btn.block { width: 100%; }
.btn.small-btn { padding: 9px 13px; font-size: 0.86rem; box-shadow: none; }

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(217,164,65,.26), transparent 29%),
    linear-gradient(135deg, rgba(7,26,47,.96), rgba(16,64,98,.96)),
    url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1800&q=80') center/cover;
  color: white;
  padding: 82px 0 112px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -36% 45%;
  height: 520px;
  background: radial-gradient(circle, rgba(242,193,93,.35), transparent 55%);
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .78fr; gap: 38px; align-items: center; }
.hero h1 { color: white; margin: 14px 0 22px; }
.hero-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 34px; max-width: 730px; }
.metric { border: 1px solid rgba(255,255,255,.18); border-radius: 18px; padding: 18px; background: rgba(255,255,255,.07); backdrop-filter: blur(10px); }
.metric strong { display: block; font-size: 1.35rem; color: white; }
.metric span { color: #cbddeb; font-size: .88rem; }
.hero-card { background: rgba(255,255,255,.96); color: var(--text); border-radius: 30px; padding: 24px; box-shadow: var(--shadow); }
.hero-card img { height: 240px; width: 100%; object-fit: cover; border-radius: 22px; }
.hero-card .price { font-size: 1.4rem; }

.search-panel {
  position: relative;
  z-index: 5;
  margin-top: -58px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.search-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.field label { display: block; color: var(--primary); font-weight: 850; font-size: .78rem; margin: 0 0 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 15px; padding: 12px 13px; outline: 0; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(217,164,65,.12); }

.filters-advanced { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 14px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: #eef6fb; color: var(--primary-2); border: 1px solid #d4e8f7; border-radius: 999px; padding: 8px 12px; font-weight: 750; font-size: .84rem; }

.property-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 23px; }
.property-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(15,23,42,.06);
  transition: transform .22s ease, box-shadow .22s ease;
}
.property-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-image { position: relative; height: 226px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.property-card:hover .card-image img { transform: scale(1.05); }
.badge-row { position: absolute; inset: 14px 14px auto 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.badge { background: rgba(255,255,255,.94); color: var(--primary); border-radius: 999px; padding: 7px 10px; font-weight: 850; font-size: .75rem; }
.badge.gold { background: var(--accent); color: #172033; }
.favorite { position: absolute; right: 14px; bottom: 14px; border: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.95); cursor: pointer; font-size: 1.1rem; }
.card-body { padding: 20px; }
.card-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; margin: 10px 0 14px; }
.price { color: var(--primary); font-weight: 950; font-size: 1.16rem; }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 20px 20px; }

.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service-card, .journey-card, .panel, .stat, .proposal-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 10px 28px rgba(15,23,42,.05);
}
.service-icon { width: 46px; height: 46px; border-radius: 16px; background: #fff7e6; display: grid; place-items: center; color: var(--accent); font-weight: 900; margin-bottom: 15px; }

.journey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: steps; }
.journey-card { position: relative; }
.journey-card::before { counter-increment: steps; content: counter(steps); width: 38px; height: 38px; border-radius: 12px; background: var(--primary); color: white; display: grid; place-items: center; font-weight: 900; margin-bottom: 16px; }

.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; align-items: center; }
.feature-list { display: grid; gap: 13px; margin-top: 22px; }
.feature-item { display: flex; gap: 12px; align-items: flex-start; color: #334155; }
.tick { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: #e7f6f3; color: var(--success); display: grid; place-items: center; font-weight: 900; }
.image-stack { position: relative; min-height: 450px; }
.image-stack img { border-radius: 28px; object-fit: cover; box-shadow: var(--shadow); }
.image-stack .main-img { width: 84%; height: 410px; }
.image-stack .floating-img { position: absolute; width: 48%; height: 205px; right: 0; bottom: 0; border: 8px solid white; }

.cta { background: linear-gradient(135deg, var(--primary), #1a5276); color: white; border-radius: 34px; padding: 42px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; overflow: hidden; position: relative; }
.cta h2 { color: white; }
.cta p { color: #d9e7f2; margin-top: 10px; max-width: 760px; }

.footer { background: #071a2f; color: #cbddeb; padding: 54px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(3,.7fr); gap: 28px; margin-bottom: 32px; }
.footer h4 { color: white; margin: 0 0 14px; }
.footer a { display: block; color: #cbddeb; margin: 8px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #93a9bd; }

.page-hero { background: linear-gradient(135deg, #102a43, #1c5a7e); color: white; padding: 58px 0; }
.page-hero h1 { color: white; }
.page-hero p { color: #d9e7f2; margin-top: 14px; max-width: 780px; }

.detail-layout { display: grid; grid-template-columns: 1.2fr .48fr; gap: 28px; align-items: start; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gallery img { width: 100%; height: 230px; object-fit: cover; border-radius: 22px; }
.gallery img:first-child { grid-column: 1 / -1; height: 440px; }
.detail-card { background: white; border: 1px solid var(--border); border-radius: 28px; padding: 24px; box-shadow: var(--shadow); position: sticky; top: 94px; }
.detail-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 22px 0; }
.detail-stats div { background: var(--surface-2); border-radius: 18px; padding: 14px; text-align: center; }
.detail-stats strong { color: var(--primary); display: block; }
.amenities { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.amenity { border: 1px solid var(--border); border-radius: 999px; padding: 8px 12px; background: white; color: #334155; font-weight: 700; font-size: .88rem; }

.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(7,26,47,.68); }
.modal.open { display: flex; }
.modal-card { width: min(560px, 100%); background: white; border-radius: 28px; padding: 24px; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.icon-btn { border: 0; background: var(--surface-2); width: 42px; height: 42px; border-radius: 14px; cursor: pointer; font-weight: 900; }
.form-grid { display: grid; gap: 13px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: #052e2b; color: white; border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); display: none; z-index: 110; }
.toast.show { display: block; }

.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 72px); }
.sidebar { background: #071a2f; color: #d9e7f2; padding: 24px; }
.sidebar .brand { color: white; margin-bottom: 30px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar button { text-align: left; border: 0; background: transparent; color: #cbddeb; padding: 12px 14px; border-radius: 14px; cursor: pointer; font-weight: 800; }
.sidebar button.active, .sidebar button:hover { background: rgba(255,255,255,.1); color: white; }
.admin-main { padding: 28px; }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin: 24px 0; }
.stat strong { display: block; font-size: 2rem; color: var(--primary); letter-spacing: -0.04em; }
.admin-grid { display: grid; grid-template-columns: 1.5fr .9fr; gap: 20px; align-items: start; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; border-bottom: 1px solid var(--border); padding: 13px 10px; font-size: .9rem; }
th { color: var(--primary); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.status-pill { border-radius: 999px; padding: 6px 10px; font-size: .76rem; font-weight: 900; background: #edf7f5; color: var(--success); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.empty { text-align: center; border: 1px dashed var(--border); border-radius: 20px; padding: 36px; color: var(--muted); background: white; }

@media (max-width: 1000px) {
  .hero-grid, .split, .detail-layout, .admin-grid { grid-template-columns: 1fr; }
  .property-grid, .service-grid { grid-template-columns: repeat(2,1fr); }
  .search-grid { grid-template-columns: repeat(2,1fr); }
  .filters-advanced, .journey, .stat-grid { grid-template-columns: repeat(2,1fr); }
  .detail-card { position: static; }
}
@media (max-width: 760px) {
  .topbar { display: none; }
  .nav-links { position: fixed; inset: 72px 16px auto 16px; background: white; border: 1px solid var(--border); border-radius: 22px; padding: 18px; flex-direction: column; align-items: stretch; box-shadow: var(--shadow); display: none; }
  body.menu-open .nav-links { display: flex; }
  .menu-btn { display: inline-flex; }
  .nav-actions .btn { display: none; }
  .hero { padding: 56px 0 92px; }
  .hero-metrics, .search-grid, .filters-advanced, .property-grid, .service-grid, .journey, .footer-grid, .stat-grid, .detail-stats { grid-template-columns: 1fr; }
  .section-header, .cta, .footer-bottom { display: block; }
  .cta .btn { margin-top: 20px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery img:first-child, .gallery img { height: 280px; }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .sidebar nav { grid-template-columns: repeat(2,1fr); }
}

/* Upgrade v2: richer relocation and supplier journey */
.relocation-highlight {
  margin-top: 34px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, rgba(10, 34, 57, 0.96), rgba(17, 67, 93, 0.92));
  color: #fff;
  border-radius: 28px;
  padding: 30px;
  overflow: hidden;
  position: relative;
}
.relocation-highlight::after {
  content: '';
  position: absolute;
  right: -70px;
  top: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 32px solid rgba(213, 170, 87, 0.18);
}
.relocation-highlight .eyebrow,
.relocation-highlight .muted { color: rgba(255,255,255,0.75); }
.relocation-highlight h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin: 6px 0 12px; }
.relocation-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.relocation-steps span {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  font-weight: 700;
}
.supplier-section { align-items: stretch; }
.supplier-cards { display: grid; gap: 16px; }
.supplier-cards article {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: white;
  box-shadow: 0 12px 34px rgba(15,23,42,.06);
}
.supplier-cards strong {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(213,170,87,0.16);
  color: var(--primary);
  margin-bottom: 12px;
}
.supplier-cards h3 { margin-bottom: 8px; }
.supplier-cards p { color: var(--muted); margin: 0; }
@media (max-width: 820px) {
  .relocation-highlight { grid-template-columns: 1fr; padding: 24px; }
  .relocation-steps { grid-template-columns: 1fr; }
}


/* Upgrade v3: clickable journeys and payment-ready prototype flows */
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn.light { background: #ffffff; color: var(--primary); box-shadow: 0 14px 32px rgba(255,255,255,.15); }
.btn.outline-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.34); box-shadow: none; }
.service-card-clickable { display: flex; flex-direction: column; gap: 12px; }
.service-card-clickable p { flex: 1; }
.relocation-steps button {
  text-align: left;
  color: #fff;
  cursor: pointer;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  font-weight: 800;
  transition: transform .2s ease, background .2s ease;
}
.relocation-steps button:hover { transform: translateY(-2px); background: rgba(255,255,255,0.2); }
.supplier-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.clickable-stack button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: white;
  box-shadow: 0 12px 34px rgba(15,23,42,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.clickable-stack button:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.clickable-stack button span:last-child { display: inline-block; margin-top: 12px; color: var(--accent); font-weight: 900; }
.wide-modal { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; }
.wizard-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 20px; }
.wizard-progress span { border: 1px solid var(--border); border-radius: 999px; padding: 9px 10px; font-weight: 850; font-size: .78rem; color: var(--muted); text-align: center; background: var(--surface-2); }
.wizard-progress span.done { color: var(--success); border-color: #a7e0d7; background: #ecfdf8; }
.wizard-progress span.active { color: #172033; background: var(--accent); border-color: var(--accent); }
.wizard-body { min-height: 285px; }
.wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.flow-summary, .payment-placeholder { border: 1px solid var(--border); border-radius: 22px; padding: 22px; background: var(--surface-2); }
.mini-steps, .payment-options, .checklist-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.mini-steps span, .payment-options span, .checklist-grid span { border: 1px solid var(--border); border-radius: 16px; background: white; padding: 12px 13px; font-weight: 800; color: var(--primary); }
.review-list { display: grid; gap: 8px; margin: 16px 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.choice-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 18px; padding: 14px; cursor: pointer; background: white; font-weight: 850; }
.choice-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(217,164,65,.12); }
@media (max-width: 760px) {
  .hero-actions, .supplier-actions, .wizard-actions { display: grid; }
  .wizard-progress, .mini-steps, .payment-options, .checklist-grid, .choice-grid { grid-template-columns: 1fr; }
}
