/* Siteplan Marketing: one stylesheet for every page.
   Lot-status colours (--avail, --resv, --sold) only ever mean lot or funnel status. */
:root {
  --paper: #ffffff;
  --grid: #e7eef6;
  --wash: #f3f7fb;
  --ink: #13315c;
  --ink-2: #4a5d78;
  --line: #c8d5e3;
  --marker: #ffd43b;
  --avail: #2f9e6e;
  --resv: #f5b800;
  --sold: #d9473f;
  --wide: "wdth" 125;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--marker); outline-offset: 3px; box-shadow: 0 0 0 5px var(--ink); border-radius: 2px; }

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

/* Type scale (1.25 ratio) */
h1, h2, h3 { font-variation-settings: var(--wide); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); font-weight: 800; max-width: 14ch; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 750; max-width: 22ch; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 64ch; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 54ch; }
.small { font-size: 0.875rem; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-word { font-variation-settings: var(--wide); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand-word span { font-weight: 500; color: var(--ink-2); }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { text-decoration: none; font-weight: 550; font-size: 0.95rem; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 4px;
  font: inherit; font-weight: 700; font-variation-settings: "wdth" 112; text-decoration: none;
  cursor: pointer; background: var(--paper); color: var(--ink);
}
.btn-primary { background: var(--marker); }
.btn-primary:hover { background: #ffcb05; }
.btn:hover { text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; border-bottom: 1px solid var(--line); }
.section-intro { margin-bottom: 40px; }
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }

.plan-panel {
  border: 1px solid var(--line); border-radius: 10px; padding: 18px;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

.legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 7px; }
.swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(19, 49, 92, 0.35); flex: none; }
.swatch.avail { background: var(--avail); }
.swatch.resv { background: var(--resv); }
.swatch.sold { background: var(--sold); }

/* The path we measure: a road with stops (a real sequence) */
.road { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; counter-reset: stop; }
.road::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 8px; background: #dde5ee; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.road li { position: relative; padding: 52px 18px 0 0; counter-increment: stop; }
.road li::before {
  content: counter(stop); position: absolute; top: 4px; left: 0; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper); border: 2px solid var(--ink); font-weight: 800;
}
.road li:last-child::before { background: var(--sold); color: #fff; border-color: var(--sold); }
.road h3 { margin-bottom: 6px; }
.road p { font-size: 0.95rem; color: var(--ink-2); }

/* Two columns that compare */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.split > div { padding: clamp(22px, 3vw, 36px); }
.split > div + div { border-left: 1px solid var(--line); background: var(--wash); }
.split ul { margin: 0; padding-left: 1.1em; }
.split li { margin-bottom: 0.45em; max-width: 52ch; }

/* Rows separated by plan lines */
.rows { border-top: 2px solid var(--ink); }
.row { display: grid; grid-template-columns: minmax(180px, 0.8fr) 2fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.row h3 { margin: 0; }
.row p { margin: 0; color: var(--ink-2); }

/* 90-day pilot phases (a sequence) */
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.phase { padding: 22px 24px; border-right: 1px solid var(--line); }
.phase:last-child { border-right: 0; }
.phase-weeks { font-weight: 700; font-variation-settings: "wdth" 112; color: var(--ink-2); font-size: 0.9rem; margin-bottom: 6px; }
.phase.on { background: var(--wash); }

/* Note boxes */
.note { border-left: 4px solid var(--marker); background: #fffbea; padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 0 0 24px; max-width: 72ch; }
.note p:last-child { margin-bottom: 0; }

/* Footer: an architectural title block */
.title-block { padding: 48px 0 56px; }
.tb { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; border: 2px solid var(--ink); border-radius: 4px; }
.tb > div { padding: 14px 16px; border-right: 1px solid var(--ink); }
.tb > div:last-child { border-right: 0; }
.tb-label { display: block; font-size: 0.78rem; color: var(--ink-2); margin-bottom: 2px; }
.tb-value { font-weight: 650; font-variation-settings: "wdth" 110; }
.tb-brand { display: flex; align-items: center; gap: 12px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font-size: 0.9rem; }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 650; font-size: 0.95rem; }
.field input, .field select, .field output {
  font: inherit; color: var(--ink); min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 6px; background: var(--paper); width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--ink); outline: 3px solid var(--marker); outline-offset: 1px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { font-size: 0.85rem; color: var(--ink-2); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 700; background: var(--wash); font-variation-settings: "wdth" 108; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }

/* Demo banner */
.demo-banner { background: var(--ink); color: #fff; font-size: 0.92rem; }
.demo-banner .wrap { padding-top: 10px; padding-bottom: 10px; }
.demo-banner a { color: #fff; }

@media (max-width: 860px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .split > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .road { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .road::before { display: none; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .phases { grid-template-columns: 1fr; }
  .phase { border-right: 0; border-bottom: 1px solid var(--line); }
  .phase:last-child { border-bottom: 0; }
  .tb { grid-template-columns: 1fr 1fr; }
  .tb > div:nth-child(2) { border-right: 0; }
  .tb > div:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav .hide-sm { display: none; }
  .nav .btn { min-height: 40px; padding: 0 14px; font-size: 0.9rem; }
  .road { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .tb { grid-template-columns: 1fr; }
  .tb > div { border-right: 0; border-bottom: 1px solid var(--ink); }
  .tb > div:last-child { border-bottom: 0; }
}

/* Small funnel on the home page */
.mini-funnel { display: grid; gap: 14px; margin-bottom: 12px; }
.mf-row { display: grid; grid-template-columns: 110px 1fr 52px; align-items: center; gap: 12px; }
.mf-bar { height: 28px; background: var(--wash); border: 1px solid var(--line); border-radius: 4px; position: relative; overflow: hidden; }
.mf-bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: var(--w); background: var(--c); }
.mf-row b { text-align: right; }

/* Page header for inner pages */
.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; max-width: 64ch; }
.prose li { margin-bottom: 0.4em; }

/* Demo project: 3D site plan */
.scene-wrap { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #e9f1f7; }
#scene { width: 100%; aspect-ratio: 16 / 9; min-height: 340px; }
#scene canvas { width: 100% !important; height: 100% !important; }
.scene-label { position: absolute; left: 0; top: 0; pointer-events: none; background: var(--paper); border: 1px solid var(--ink); border-radius: 4px; padding: 2px 8px; font-size: 0.8rem; font-weight: 650; white-space: nowrap; opacity: 0; }
.is-night .scene-label { background: var(--ink); color: #fff; border-color: #fff; }
.scene-tools { position: absolute; top: 12px; left: 12px; }
.toggle { display: inline-flex; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--paper); }
.toggle button { font: inherit; font-weight: 700; border: 0; background: transparent; color: var(--ink); padding: 0 16px; min-height: 40px; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lot-panel { position: absolute; right: 12px; top: 12px; width: min(320px, calc(100% - 24px)); background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 16px 16px 18px; box-shadow: 0 8px 24px rgba(19, 49, 92, 0.18); }
.lot-panel h3 { margin: 0 32px 10px 0; }
.lot-panel dl { margin: 0 0 14px; display: grid; gap: 8px; }
.lot-panel dl div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.lot-panel dt { color: var(--ink-2); font-size: 0.9rem; }
.lot-panel dd { margin: 0; font-weight: 650; text-align: right; }
.lot-panel .btn { width: 100%; font-size: 0.95rem; line-height: 1.25; padding: 8px 14px; text-align: center; }
.lot-close { position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.status { display: inline-block; padding: 1px 9px; border-radius: 999px; color: #fff; font-size: 0.85rem; font-weight: 700; }
.status[data-status="avail"] { background: var(--avail); }
.status[data-status="resv"] { background: var(--resv); color: var(--ink); }
.status[data-status="sold"] { background: var(--sold); }
.scene-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; margin-top: 12px; }
.scene-foot .legend, .scene-hint { margin: 0; }
.scene-fallback { padding: 24px; margin: 0; }

/* Demo project: calculator and booking */
.calc { margin-top: 20px; }
.calc-line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.calc-line.big span { font-weight: 650; }
.calc-line.big b { font-size: clamp(1.5rem, 3vw, 2rem); font-variation-settings: var(--wide); }
.chat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.form-error { color: #a8251e; font-weight: 650; margin: 0 0 12px; }
.trip-result h3:focus { outline: none; }

@media (max-width: 600px) {
  #scene { aspect-ratio: 4 / 5; }
  .lot-panel { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; }
}

/* Sample report */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 8px 0 32px; }
.kpi { padding: 18px 20px; border-right: 1px solid var(--line); display: grid; gap: 2px; }
.kpi:last-child { border-right: 0; }
.kpi-key { background: #fffbea; }
.kpi-label { font-size: 0.9rem; color: var(--ink-2); }
.kpi-value { font-size: clamp(1.5rem, 3vw, 2.1rem); font-variation-settings: var(--wide); line-height: 1.15; }
.kpi-sub { font-size: 0.88rem; color: var(--ink-2); }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.chart { margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 16px 16px 8px; }
.chart figcaption { margin-bottom: 6px; }
.chart-box { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; font-family: inherit; }
.chart rect[tabindex]:focus { outline: none; }
.chart rect[tabindex]:focus-visible { stroke: var(--marker); stroke-width: 3; }
.tip { position: absolute; transform: translate(-50%, -100%); background: var(--ink); color: #fff; font-size: 0.85rem; padding: 4px 10px; border-radius: 4px; white-space: nowrap; pointer-events: none; }
.table-toggle { margin-top: 18px; }
.table-toggle summary { cursor: pointer; font-weight: 650; margin-bottom: 12px; }
@media (max-width: 860px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .charts { grid-template-columns: 1fr; }
}
#camp-rows td:first-child { white-space: normal; min-width: 230px; }
@media (max-width: 600px) {
  .brand-word span { display: none; }
  .nav .btn { white-space: nowrap; }
  .site-head .wrap { gap: 12px; }
}
