/* Midway Real Estate & Builders — see design/COMMIT-SHEET.md */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;

  --paper: oklch(0.975 0 0);
  --concrete: oklch(0.925 0 0);
  --ink: oklch(0.27 0.006 60);
  --ink-soft: oklch(0.4 0.006 60);
  --rule: oklch(0.27 0.006 60 / 0.2);
  --gold: oklch(0.78 0.125 80);
  --gold-deep: oklch(0.58 0.11 70);
  --gold-pale: oklch(0.86 0.09 85);
  --on-ink: oklch(0.96 0 0);
  --on-ink-soft: oklch(0.82 0.004 60);

  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;

  --fs-hero: clamp(2.3rem, 1.25rem + 4.4vw, 5.1rem);
  --fs-h2: clamp(1.85rem, 1.2rem + 2.6vw, 3.5rem);
  --fs-h3: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --fs-small: 0.9rem;
  --fs-label: 0.8125rem;

  --gutter: clamp(1rem, 0.5rem + 2.4vw, 3rem);
  --max: 78rem;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-inout: cubic-bezier(0.77, 0, 0.175, 1);

  --bar-h: 0px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--fs-body);
  font-optical-sizing: auto;
  line-height: 1.5;
  overflow-x: hidden;
  overflow-x: clip;
  padding-bottom: var(--bar-h);
}

img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
.nowrap { white-space: nowrap; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--ink); color: var(--on-ink);
  padding: 0.75rem 1rem; font-family: var(--display); text-decoration: none;
}
.skip:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.h2 {
  font-family: var(--display);
  font-size: var(--fs-h2);
  font-weight: 780;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 650;
  font-stretch: 100%;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-line { background: transparent; color: var(--ink); }
.btn-gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
@media (hover: hover) and (pointer: fine) {
  .btn-ink:hover { background: oklch(0.36 0.006 60); }
  .btn-line:hover { background: var(--ink); color: var(--on-ink); }
  .btn-gold:hover { background: var(--gold-pale); border-color: var(--gold-pale); }
}

/* ---------- masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.65rem var(--gutter);
  padding-top: max(0.65rem, env(safe-area-inset-top));
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 0.6rem;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
  min-height: 44px;
}
.brand-mark { grid-row: 1 / 3; width: 2.4rem; height: auto; fill: var(--gold-deep); }
.brand-name {
  font-family: var(--display); font-weight: 850; font-stretch: 125%;
  font-size: 1.2rem; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase;
}
.brand-sub {
  font-family: var(--display); font-stretch: 85%; font-weight: 550;
  font-size: 0.72rem; letter-spacing: 0.04em; line-height: 1.2; color: var(--ink-soft);
}

.nav ul { display: flex; gap: 0.25rem; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.7rem;
  font-family: var(--display); font-stretch: 92%; font-weight: 560; font-size: 0.95rem;
  text-decoration: none;
  background-image: linear-gradient(var(--gold-deep), var(--gold-deep));
  background-size: 0 2px; background-position: 0.7rem calc(100% - 9px); background-repeat: no-repeat;
  transition: background-size 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { background-size: calc(100% - 1.4rem) 2px; }
}
.masthead-call {
  font-family: var(--display); font-weight: 700; font-stretch: 100%;
  font-variant-numeric: tabular-nums;
  text-decoration: none; white-space: nowrap;
  border: 1.5px solid var(--ink); padding: 0.55rem 0.9rem; min-height: 44px;
  display: inline-flex; align-items: center;
}
.menu-btn {
  display: none;
  min-height: 44px; min-width: 44px; padding: 0 1rem;
  font-family: var(--display); font-weight: 650;
  background: transparent; border: 1.5px solid var(--ink); border-radius: 0;
  cursor: pointer;
}

@media (max-width: 62rem) {
  .nav { display: none; }
}
@media (max-width: 44rem) {
  .masthead-call { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .brand-sub { font-size: 0.66rem; }
}
@media (min-width: 44.01rem) and (max-width: 62rem) {
  .menu-btn { display: inline-flex; align-items: center; }
}

/* menu dialog */
.menu {
  margin: 0; padding: 0;
  width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh;
  border: 0;
  background: var(--ink); color: var(--on-ink);
  padding: max(1rem, env(safe-area-inset-top)) var(--gutter) max(1.5rem, env(safe-area-inset-bottom));
}
.menu[open] { display: flex; flex-direction: column; animation: menu-in 240ms var(--ease-out); }
.menu::backdrop { background: oklch(0.27 0.006 60 / 0.4); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
.menu-close-row { display: flex; justify-content: flex-end; }
.menu-close {
  min-height: 44px; padding: 0 1rem;
  font-family: var(--display); font-weight: 650;
  background: transparent; border: 1.5px solid var(--on-ink); color: var(--on-ink); border-radius: 0;
}
.menu-links { margin-top: 2rem; }
.menu-links a {
  display: block; padding: 0.7rem 0;
  font-family: var(--display); font-weight: 760; font-stretch: 112%;
  font-size: clamp(1.6rem, 1.2rem + 3vw, 2.4rem);
  text-decoration: none;
  border-bottom: 1px solid oklch(0.96 0 0 / 0.14);
}
.menu-foot { margin-top: auto; color: var(--on-ink-soft); font-size: var(--fs-small); padding-top: 2rem; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 13fr);
  align-items: end;
  column-gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) 0;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
}
.hero-copy { padding-bottom: clamp(2.5rem, 5vw, 4.5rem); align-self: center; }
.hero-title {
  font-family: var(--display);
  font-size: var(--fs-hero);
  font-weight: 820;
  font-stretch: 118%;
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 14ch;
}
.hero-lede { margin-top: 1.5rem; max-width: 38rem; color: var(--ink-soft); font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.hero-drawing { margin: 0; align-self: end; }
.hero-drawing figcaption {
  font-family: var(--display); font-stretch: 85%; font-size: var(--fs-label);
  color: var(--ink-soft); margin: 0.5rem 0 0.9rem; text-align: right;
}
.hero-drawing figcaption { order: -1; }
.hero-drawing { display: flex; flex-direction: column; }

.ground {
  grid-column: 1 / -1;
  height: 16px;
  margin-inline: calc((100% - 100vw) / 2);
  border-top: 1.5px solid var(--ink);
  background: repeating-linear-gradient(-45deg, var(--rule) 0 1px, transparent 1px 7px);
}

/* drawings (shared) */
.elev { width: 100%; height: auto; overflow: visible; }
.elev .draw * , .elev .line {
  fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke;
  stroke-linejoin: round; stroke-linecap: round;
}
.elev .dim * { stroke: var(--ink-soft); stroke-width: 1; }
.dim-label {
  font-family: var(--display); font-stretch: 85%; font-size: 15px; font-weight: 600;
  fill: var(--ink-soft);
  paint-order: stroke; stroke: var(--paper); stroke-width: 8px;
}
.roof { fill: var(--gold); stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

/* line-draw: only with JS + motion allowed; without it, drawings are simply complete */
@media (prefers-reduced-motion: no-preference) {
  .js .hero .draw * {
    stroke-dasharray: 1 1;
    stroke-dashoffset: 1;
    animation: draw 1100ms var(--ease-out) forwards;
    animation-delay: calc(250ms + var(--d) * 260ms);
  }
  .js .hero .roof { opacity: 0; transform: translateY(-6px); animation: settle 520ms var(--ease-out) 1500ms forwards; }
  .js .hero .dim-label { opacity: 0; animation: fade 400ms ease 1400ms forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes settle { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- reveals (family 2: headings rise + unblur) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(10px); filter: blur(4px);
    transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out), filter 520ms var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; filter: none; }

  /* family 3: list rows slide from the left, staggered */
  .js .stagger > li { opacity: 0; transform: translateX(-14px);
    transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 40ms); }
  .js .stagger.is-in > li { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 0; transition: opacity 300ms ease; }
  .js .reveal.is-in { opacity: 1; }
}

/* ---------- societies ---------- */
.societies { padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(3rem, 7vw, 6rem); }
.societies .h2 { max-width: 17ch; }
.soc-intro { margin-top: 1.25rem; max-width: 40rem; color: var(--ink-soft); }
.soc-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1.5px solid var(--ink);
}
.soc { padding-top: 1.5rem; }
.soc p { max-width: 34rem; }
.soc p + p { margin-top: 0.8rem; }
.soc-name {
  font-family: var(--display); font-weight: 850; font-stretch: 125%;
  font-size: clamp(2.6rem, 1.6rem + 4.5vw, 5.5rem); line-height: 0.9; letter-spacing: -0.02em;
}
.soc-place {
  font-family: var(--display); font-stretch: 85%; font-weight: 600; font-size: var(--fs-small);
  color: var(--ink-soft); margin: 0.6rem 0 1.1rem;
}
.soc-bahria { border-left: 1px solid var(--rule); padding-left: clamp(1.5rem, 4vw, 4rem); }
.soc-note { padding: 1rem 1.1rem; background: var(--concrete); }
.soc-note strong { font-weight: 650; }

/* ---------- plot ruler (signature, gold drench) ---------- */
.plots {
  background: var(--gold);
  color: var(--ink);
  padding: clamp(3.5rem, 8vw, 7rem) 0;
  overflow: clip;
}
.plots-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 4vw, 4rem);
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  align-items: start;
}
.plots-title { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4.4rem); font-stretch: 118%; max-width: 11ch; }
.plots-lede { margin-top: 1.1rem; max-width: 30rem; }

.sizes { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.75rem; }
.sizes label, .chips label { position: relative; cursor: pointer; }
.sizes input, .chips input {
  position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer;
}
.sizes span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
  font-family: var(--display); font-weight: 680; font-stretch: 100%; font-size: 0.98rem;
  border: 1.5px solid var(--ink);
  transition: background-color 140ms ease, color 140ms ease;
}
.sizes input:checked + span { background: var(--ink); color: var(--gold); }
.sizes input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .sizes label:hover span { background: oklch(0.27 0.006 60 / 0.1); }
  .sizes label:hover input:checked + span { background: var(--ink); }
}

.house-toggle {
  display: inline-flex; align-items: center; gap: 0.75rem;
  margin-top: 1.25rem; min-height: 44px; cursor: pointer;
  font-family: var(--display); font-weight: 600; font-stretch: 100%; font-size: 0.98rem;
  position: relative;
}
.house-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch {
  width: 2.75rem; height: 1.5rem; border: 1.5px solid var(--ink); position: relative; flex: none;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: calc(1.5rem - 7px); height: calc(1.5rem - 7px); background: var(--ink);
  transition: transform 180ms var(--ease-out);
}
.house-toggle input:checked + .switch { background: var(--ink); }
.house-toggle input:checked + .switch::after { background: var(--gold); transform: translateX(1.25rem); }
.house-toggle input:focus-visible + .switch { outline: 2px solid var(--ink); outline-offset: 3px; }

.readout {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem 1.5rem;
  margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1.5px solid var(--ink);
}
.readout .wide { grid-column: 1 / -1; }
.readout dt { font-family: var(--display); font-stretch: 85%; font-weight: 600; font-size: var(--fs-label); }
.readout dd {
  margin: 0.15rem 0 0;
  font-family: var(--display); font-weight: 720; font-stretch: 105%;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem); line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.plots-fine { margin: 1rem 0 1.5rem; font-size: var(--fs-small); max-width: 30rem; }

.plots-drawing { position: relative; }
.plan {
  width: 100%; height: auto; overflow: visible;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
@media (min-width: 64rem) {
  /* grid break: the drawing runs off the right edge of the viewport */
  .plots-drawing { margin-right: calc(-1 * (100vw - min(100vw - 2 * var(--gutter), var(--max))) / 2); }
  .plan { width: calc(100% + 4rem); }
}
.plan .road { fill: var(--ink); }
.plan .road-mid { stroke: var(--gold); stroke-width: 1.2; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; }
.plan .road-label { fill: var(--gold); font-family: var(--display); font-weight: 700; font-stretch: 125%; letter-spacing: 0.3em; }
.plan .ghost { fill: none; stroke: var(--ink); stroke-opacity: 0.35; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; transition: stroke-opacity 160ms ease; }
.plan .ghost.is-hot { stroke-opacity: 0.9; }
.plan .plot { fill: var(--paper); stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.plan .lawn { fill: url(#grass); stroke: none; }
.plan .grass-dot { fill: var(--gold-deep); }
.plan .house { fill: url(#hatch); stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.plan .hatch-line { stroke: var(--ink); stroke-opacity: 0.4; stroke-width: 0.35; }
.plan .porch { fill: var(--paper); stroke: var(--ink); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.plan .lawn, .plan .house, .plan .porch { transition: opacity 260ms ease; }
.plan:not(.has-house) .lawn, .plan:not(.has-house) .house, .plan:not(.has-house) .porch { opacity: 0; }
.plan .pdim line { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plan .ptext { fill: var(--ink); font-family: var(--display); font-weight: 680; font-stretch: 100%; }
.plan .ruler line { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plan .ruler text { fill: var(--ink); font-family: var(--display); font-stretch: 85%; font-weight: 600; }
.plan .ruler .tick-on { stroke-width: 2.5; }
.plan .car rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.plan .car line { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plan .handle { cursor: grab; touch-action: none; }
.plan .car { transition: transform 600ms var(--ease-inout); } /* on-screen morph: road to porch */
@media (prefers-reduced-motion: reduce) { .plan .car { transition: none; } }
.plan .handle-hit { fill: transparent; }
.plan .handle-dot { fill: var(--ink); stroke: var(--paper); stroke-width: 2; vector-effect: non-scaling-stroke; }
.plan.dragging .handle { cursor: grabbing; }
@media (prefers-reduced-motion: no-preference) {
  .js .plan .handle-dot { animation: nudge 2.4s var(--ease-inout) 1.2s 3; transform-box: fill-box; transform-origin: center; }
}
@keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: scale(1.5); } }

.plan-key { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.75rem; font-size: var(--fs-small); }
.key-car { width: 1.6rem; height: 0.65rem; border: 1.2px solid var(--ink); border-radius: 3px; background: var(--paper); }

/* ---------- services (the one dark band) ---------- */
.services {
  background: var(--ink); color: var(--on-ink);
  padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.svc-title { max-width: 22ch; }
.svc-title span { color: var(--gold); display: block; }
.svc-cols {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.svc-head {
  font-family: var(--display); font-weight: 600; font-stretch: 85%;
  font-size: var(--fs-small); color: var(--gold);
  padding-bottom: 0.75rem; border-bottom: 1.5px solid var(--gold);
}
.svc-list li {
  display: grid; grid-template-columns: minmax(8rem, 2fr) 3fr; gap: 0.25rem 1.5rem;
  padding: 1.35rem 0; border-bottom: 1px solid oklch(0.96 0 0 / 0.14);
}
.svc-list h4 {
  font-family: var(--display); font-weight: 720; font-stretch: 108%;
  font-size: var(--fs-h3); line-height: 1.15;
}
.svc-list p { color: var(--on-ink-soft); font-size: 1.02rem; }

.abroad {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto; align-items: center;
  gap: 1rem clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1.5px solid var(--gold);
}
.abroad h3 {
  font-family: var(--display); font-weight: 800; font-stretch: 120%;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1; color: var(--gold);
}
.abroad p { color: var(--on-ink-soft); max-width: 40rem; }

/* ---------- how we build ---------- */
.build { padding: clamp(3.5rem, 9vw, 7.5rem) 0; }
.build-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.build .h2 { max-width: 14ch; }
.stages { margin-top: 2rem; border-top: 1.5px solid var(--ink); counter-reset: none; }
.stages button {
  display: flex; align-items: baseline; gap: 1rem; width: 100%;
  min-height: 3.25rem; padding: 0.7rem 0;
  background: none; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0;
  text-align: left; cursor: pointer;
  font-family: var(--display); font-stretch: 105%; font-weight: 600;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  color: var(--ink-soft);
  transition: color 140ms ease;
}
.st-n {
  font-variant-numeric: tabular-nums; font-weight: 800; font-stretch: 100%;
  width: 1.75rem; height: 1.75rem; flex: none;
  display: inline-grid; place-items: center;
  border: 1.5px solid currentColor; font-size: 0.9rem; transform: translateY(-1px);
}
.stages button[aria-selected="true"] { color: var(--ink); font-weight: 760; }
.stages button[aria-selected="true"] .st-n { background: var(--gold); border-color: var(--ink); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .stages button:hover { color: var(--ink); }
}
.stage-panel { margin-top: 1.25rem; min-height: 5.5rem; max-width: 34rem; }
.build-drawing { margin: 0; }

.stages-svg .ground-line { stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.stages-svg .peg { fill: none; stroke: var(--gold-deep); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.stages-svg .dash { fill: none; stroke: var(--ink-soft); stroke-width: 1.2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.stages-svg .concrete { fill: oklch(0.8 0 0); stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.stages-svg .brick { fill: url(#brick); stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.stages-svg .plaster { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.stages-svg .glass { fill: oklch(0.88 0.02 230); stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.stages-svg .s2, .stages-svg .s3, .stages-svg .s4, .stages-svg .s5 { opacity: 0; transition: opacity 320ms ease; }
.stages-svg[data-stage="2"] .s2,
.stages-svg[data-stage="3"] .s3,
.stages-svg[data-stage="4"] .s3, .stages-svg[data-stage="4"] .s4,
.stages-svg[data-stage="5"] .s3, .stages-svg[data-stage="5"] .s4, .stages-svg[data-stage="5"] .s5 { opacity: 1; }
.stages-svg[data-stage="1"] .peg, .stages-svg[data-stage="1"] .dash { opacity: 1; }

/* ---------- enquiry composer ---------- */
.enquire {
  background: var(--concrete);
  padding: clamp(3.5rem, 9vw, 7rem) 0;
  border-top: 1.5px solid var(--ink);
}
.enq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.enq-head { position: sticky; top: 6rem; }
.enq-head .h2 { max-width: 13ch; }
.enq-head p { margin-top: 1.1rem; color: var(--ink-soft); max-width: 26rem; }

.composer { display: grid; gap: 1.6rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips legend, .field label {
  font-family: var(--display); font-stretch: 85%; font-weight: 650; font-size: var(--fs-label);
  margin-bottom: 0.6rem; padding: 0;
}
.chips legend { float: left; width: 100%; }
.chips span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
  font-family: var(--display); font-weight: 600; font-stretch: 98%; font-size: 0.97rem;
  background: var(--paper); border: 1.5px solid var(--ink);
  transition: background-color 140ms ease, color 140ms ease;
}
.chips input:checked + span { background: var(--ink); color: var(--on-ink); }
.chips input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .chips label:hover input:not(:checked) + span { background: oklch(0.97 0.03 85); }
}

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-wide { grid-column: 1 / -1; }
.field label { display: block; }
.field .opt { font-weight: 450; color: var(--ink-soft); margin-left: 0.25rem; }
.field input, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.7rem 0.85rem;
  font-size: 1.0625rem; /* ≥16px stops iOS zoom on focus */
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 0;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 4.5rem; }
.field input::placeholder, .field textarea::placeholder { color: oklch(0.45 0.006 60); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 0; }

.slip {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 1.1rem 1.25rem 1.25rem;
  position: relative;
}
.slip::before {
  content: ""; position: absolute; left: -1.5px; right: -1.5px; top: -1.5px; height: 6px; background: var(--gold);
}
.slip-label { font-family: var(--display); font-stretch: 85%; font-weight: 650; font-size: var(--fs-label); color: var(--ink-soft); margin-top: 0.25rem; }
.slip-text { margin-top: 0.4rem; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.45; font-style: italic; }

.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.copy-state { font-family: var(--display); font-size: var(--fs-small); font-weight: 600; }

/* ---------- visit ---------- */
.visit { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.visit-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.address {
  font-style: normal;
  font-family: var(--display); font-weight: 780; font-stretch: 112%;
  font-size: clamp(1.45rem, 1.05rem + 1.7vw, 2.5rem); line-height: 1.1; letter-spacing: -0.015em;
}
.address span { display: block; }
.address span:first-child { color: var(--gold-deep); }
.urdu {
  margin-top: 1.75rem;
  font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Noto Naskh Arabic", serif;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); line-height: 2.1;
  text-align: left;
}
.urdu-gloss { color: var(--ink-soft); font-size: var(--fs-small); font-style: italic; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.map { aspect-ratio: 4 / 3; border: 1.5px solid var(--ink); background: var(--concrete); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.85) contrast(1.05); }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--on-ink); padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.footer-mark { width: 3.25rem; fill: var(--gold); margin-bottom: 1rem; }
.footer-name { font-family: var(--display); font-weight: 800; font-stretch: 115%; font-size: 1.25rem; margin-bottom: 0.4rem; }
.footer-brand p:last-child { color: var(--on-ink-soft); max-width: 26rem; }
.footer h2 { font-family: var(--display); font-stretch: 85%; font-weight: 650; font-size: var(--fs-label); color: var(--gold); margin-bottom: 0.6rem; }
.footer li a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-family: var(--display); font-weight: 560; }
@media (hover: hover) and (pointer: fine) {
  .footer li a:hover { color: var(--gold); }
}
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid oklch(0.96 0 0 / 0.14);
  color: var(--on-ink-soft); font-size: var(--fs-small);
}

/* ---------- thumb bar (phones) ---------- */
.thumbbar { display: none; }
@media (max-width: 44rem) {
  :root { --bar-h: calc(3.5rem + env(safe-area-inset-bottom)); }
  .thumbbar {
    position: fixed; z-index: 15; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--ink); color: var(--on-ink);
    border-top: 1.5px solid var(--gold);
  }
  .thumbbar a {
    display: grid; place-items: center; min-height: 3.5rem;
    font-family: var(--display); font-weight: 680; font-stretch: 100%; font-size: 0.98rem;
    text-decoration: none;
  }
  .thumbbar a + a { border-left: 1px solid oklch(0.96 0 0 / 0.16); }
  .thumbbar a:active { background: oklch(0.36 0.006 60); }
}

/* ---------- layout states ---------- */
@media (max-width: 64rem) {
  .plots-inner { grid-template-columns: 1fr; }
  .plots-copy { display: grid; grid-template-columns: 1fr; }
  .plots-drawing { margin-top: 0.5rem; }
  .build-grid { grid-template-columns: 1fr; }
  .build-drawing { max-width: 40rem; }
  .enq-grid { grid-template-columns: 1fr; }
  .enq-head { position: static; }
  .abroad { grid-template-columns: 1fr; justify-items: start; }
}
@media (max-width: 56rem) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 2rem; }
  .hero-drawing { max-width: 34rem; justify-self: end; width: 100%; }
  .svc-cols { grid-template-columns: 1fr; }
  .visit-grid { grid-template-columns: 1fr; }
}
@media (max-width: 64rem) {
  /* phones and tablets: the drawing sits right under the question, so every tap on a size is visible */
  .plots-inner { gap: 0; }
  .plots-copy { display: contents; }
  .plots-title, .plots-lede { order: -2; }
  .plots-drawing { order: -1; margin: 1.5rem 0 0.5rem; }
}
@media (max-width: 44rem) {
  .soc-grid { grid-template-columns: 1fr; gap: 0; }
  .soc-bahria { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); margin-top: 2rem; }
  .svc-list li { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .hero-actions .btn { flex: 1 1 100%; }
  .send-row .btn { flex: 1 1 100%; }
  .readout { grid-template-columns: 1fr; gap: 0.75rem; }
}

@media print {
  .masthead, .thumbbar, .map, .composer { display: none; }
  body { padding: 0; }
}
