/* =========================================================
   R.B.N. Construction — main stylesheet (v3 · light theme)
   Built by UIDD (Software Solutions)
   1 Tokens · 2 Base · 3 Layout · 4 Components · 5 Header/Footer
   6 Home · 7 3D engine · 8 Inner pages · 9 Forms · 10 Motion · 11 Utilities
   ========================================================= */

/* 1 ─ Tokens ------------------------------------------------ */
:root {
  /* Surfaces: tonal light steps, never one flat white */
  --white: #FFFFFF;
  --paper: #FAFAF8;        /* page base */
  --mist: #F2F4F5;         /* cool light grey */
  --concrete: #EBEDEB;     /* soft concrete */
  --stone: #F6F5F1;        /* warm architectural off-white */
  --blueprint-tint: #EDF2F6;

  /* Ink */
  --ink: #1B2632;          /* headings, anchors */
  --text: #36424E;         /* body */
  --steel: #5C6975;        /* secondary text (AA on all surfaces) */
  --blueprint: #2F5577;    /* drawing lines, links */
  --charcoal: #1E2933;     /* footer only */

  /* Brand accent — softened hi-vis amber */
  --hivis: #EBA600;
  --hivis-deep: #CF9000;
  --hivis-text: #8F6100;   /* amber as text on light (AA) */
  --hivis-tint: #FDF4DE;
  --on-accent: #1B2632;    /* text on amber, both themes */
  --header-bg: rgba(255, 255, 255, .86);
  --bar-bg: rgba(255, 255, 255, .96);
  --sheet-bg: #F8FAFB;
  --sheet-line: rgba(47, 85, 119, .08);
  --sheet-line-fine: rgba(47, 85, 119, .035);
  --sheet-frame: rgba(47, 85, 119, .18);
  --hero-glow: rgba(237, 242, 246, .95);
  --page-glow: rgba(253, 244, 222, .8);
  --planner-line: #D6E1EA;
  --field-hover: #AEB7B5;
  --b3d-ground: rgba(234, 240, 245, .85);
  --b3d-ground-line: rgba(47, 85, 119, .16);
  --b3d-ground-edge: rgba(47, 85, 119, .3);
  --b3d-ghost: rgba(47, 85, 119, .5);
  --b3d-ghost-fill: rgba(47, 85, 119, .03);
  --label-bg: rgba(255, 255, 255, .92);
  color-scheme: light;

  --line: #E2E5E4;
  --line-strong: #CDD3D2;
  --ok: #1F7A4D;
  --err: #B3261E;

  /* Type */
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-xl: clamp(1.4rem, 1.15rem + 1vw, 1.75rem);
  --fs-2xl: clamp(1.95rem, 1.3rem + 2.4vw, 3rem);
  --fs-3xl: clamp(2.5rem, 1.5rem + 3.9vw, 4.75rem);

  /* Space & shape */
  --gutter: clamp(1.25rem, 4vw, 5rem);
  --max: 1760px;              /* wide grid: content edges sit ~4vw from the viewport */
  --section: clamp(4.5rem, 3rem + 5.5vw, 8rem);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(27, 38, 50, .05), 0 1px 1px rgba(27, 38, 50, .03);
  --shadow-md: 0 1px 2px rgba(27, 38, 50, .04), 0 14px 34px -16px rgba(27, 38, 50, .22);
  --shadow-lg: 0 2px 4px rgba(27, 38, 50, .04), 0 30px 60px -28px rgba(27, 38, 50, .30);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 76px;
  --grid-line: rgba(47, 85, 119, .07);
}

/* 2 ─ Base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: 1.65;
  color: var(--text); background: var(--paper); text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.1; font-weight: 750; letter-spacing: -.02em; color: var(--ink); font-stretch: 104%; }
h1 { font-size: var(--fs-3xl); letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: var(--fs-2xl); letter-spacing: -.028em; }
h3 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.01em; font-stretch: 100%; }
p { margin: 0 0 1em; max-width: 68ch; }
ul, ol { padding-left: 1.2em; }
::selection { background: var(--hivis); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--hivis); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200; background: var(--ink); color: var(--white);
  padding: .75rem 1rem; font-weight: 700; text-decoration: none; border-radius: var(--r-sm);
}
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }

/* 3 ─ Layout ------------------------------------------------ */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); background: var(--paper); }
.section--white { background: var(--white); }
.section--mist { background: var(--mist); }
.section--concrete { background: var(--concrete); }
.section--stone { background: var(--stone); }
.section--grid {
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--stone);
}
.section-head { display: grid; gap: 1rem 3rem; align-items: end; margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }
.section-head h2 { margin-bottom: 0; }
.section-head p { color: var(--steel); margin: 0; }
@media (min-width: 900px) { .section-head { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }

/* Eyebrow: small uppercase label (used once per section) */
.kicker {
  display: inline-flex; align-items: center; gap: .65rem; margin-bottom: 1rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--hivis-text);
}
.kicker::before { content: ""; width: 24px; height: 2px; background: var(--hivis); }

.grid-2 { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; } }

/* 4 ─ Components -------------------------------------------- */
.btn {
  --bg: var(--hivis); --fg: var(--on-accent); --bd: var(--hivis);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .85rem 1.5rem; background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  border-radius: var(--r-sm); font-weight: 700; font-size: var(--fs-sm); letter-spacing: .01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { --bg: var(--hivis-deep); --bd: var(--hivis-deep); box-shadow: 0 8px 18px -10px rgba(207, 144, 0, .7); }
.btn:active { transform: translateY(1px); }
.btn--ghost { --bg: var(--white); --fg: var(--ink); --bd: var(--line-strong); }
.btn--ghost:hover { --bg: var(--white); --bd: var(--ink); box-shadow: var(--shadow-sm); }
.btn--dark { --bg: var(--ink); --fg: var(--white); --bd: var(--ink); }
.btn--dark:hover { --bg: #2B3A49; --bd: #2B3A49; box-shadow: 0 8px 18px -10px rgba(27, 38, 50, .6); }
.btn--wa { --bg: #1F9D55; --fg: #FFFFFF; --bd: #1F9D55; }
.btn--wa:hover { --bg: #188247; --bd: #188247; box-shadow: none; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

.link {
  font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: .3em; text-decoration-color: var(--hivis);
}
.link:hover { text-decoration-color: var(--ink); }
.arrow-link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: var(--fs-sm); color: var(--ink); text-decoration: none; }
.arrow-link svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.arrow-link:hover svg, a:hover .arrow-link svg { transform: translateX(4px); }

.chip {
  display: inline-block; padding: .28rem .65rem; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600;
  color: var(--blueprint); background: var(--blueprint-tint);
}
.placeholder { background: repeating-linear-gradient(-45deg, rgba(235,166,0,.18) 0 6px, rgba(235,166,0,.07) 6px 12px); border-radius: 3px; padding: 0 .25em; }

.media { position: relative; overflow: hidden; background: var(--blueprint-tint); border-radius: var(--r-md); aspect-ratio: 4 / 3; }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }

/* 5 ─ Header / Footer --------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: var(--header-bg); color: var(--ink);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line); transition: box-shadow .25s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -18px rgba(27, 38, 50, .35); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; margin-right: auto; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-text { display: grid; line-height: 1.05; }
.brand-text b { font-size: 1.15rem; font-stretch: 112%; letter-spacing: .02em; font-weight: 800; color: var(--ink); }
.brand-text small { font-size: .72rem; color: var(--steel); font-weight: 500; letter-spacing: .04em; }
.nav-list { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: .55rem .75rem; text-decoration: none; font-size: var(--fs-sm); font-weight: 600;
  color: var(--text); border-radius: var(--r-sm); position: relative; transition: color .2s, background .2s;
}
.nav-list a:hover { color: var(--ink); background: var(--mist); }
.nav-list a[aria-current="page"] { color: var(--ink); }
.nav-list a[aria-current="page"]::after { content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .15rem; height: 2px; background: var(--hivis); border-radius: 2px; }
.header-phone { display: none; align-items: center; gap: .45rem; font-weight: 700; font-size: var(--fs-sm); text-decoration: none; color: var(--ink); }
.header-phone svg { width: 16px; height: 16px; color: var(--hivis-deep); }
.header-cta { min-height: 44px; padding: .6rem 1.1rem; }
.menu-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; background: var(--white);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; color: var(--ink);
}
.menu-toggle svg { width: 22px; height: 22px; }
.primary-nav { display: none; }
@media (min-width: 1100px) { .primary-nav { display: block; } .menu-toggle { display: none; } }
@media (min-width: 1280px) { .header-phone { display: inline-flex; } }

.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99; background: var(--white); color: var(--ink);
  padding: 1rem var(--gutter) 6rem; overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-nav ul { list-style: none; margin: 0 0 2rem; padding: 0; }
.mobile-nav li + li { border-top: 1px solid var(--line); }
.mobile-nav a.m-link { display: flex; justify-content: space-between; padding: 1rem 0; font-size: 1.3rem; font-weight: 700; text-decoration: none; }
.mobile-nav a[aria-current="page"] { color: var(--hivis-text); }
.mobile-nav .btn { width: 100%; margin-bottom: .75rem; }
body.nav-open { overflow: hidden; }

.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-template-columns: 1fr 1fr 1.3fr;
  background: var(--bar-bg); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -18px rgba(27,38,50,.4);
  padding-bottom: env(safe-area-inset-bottom); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.action-bar a { display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 58px; color: var(--ink); font-weight: 700; font-size: var(--fs-sm); text-decoration: none; }
.action-bar a + a { border-left: 1px solid var(--line); }
.action-bar a.is-primary { background: var(--hivis); border-left: 0; color: var(--on-accent); }
.action-bar svg { width: 18px; height: 18px; }
.action-bar a:nth-child(2) svg { color: #1F9D55; }
body { padding-bottom: 58px; }
@media (min-width: 900px) { .action-bar { display: none; } body { padding-bottom: 0; } }

.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 90; display: none; width: 56px; height: 56px; border-radius: 50%;
  background: #1F9D55; color: #FFFFFF; place-items: center; box-shadow: 0 12px 28px -12px rgba(31,157,85,.7); transition: transform .2s var(--ease);
}
.wa-float:hover { transform: translateY(-2px); }
.wa-float svg { width: 28px; height: 28px; }
@media (min-width: 900px) { .wa-float { display: grid; } }

/* Footer: the one dark anchor */
.site-footer { background: var(--charcoal); color: #B5C0CA; padding-top: clamp(3.5rem, 2rem + 4vw, 5.5rem); font-size: var(--fs-sm); }
.site-footer .brand-text b { color: #FFFFFF; }
.site-footer .brand-text small { color: #9AA7B3; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #FFFFFF; text-decoration: underline; }
.footer-grid { display: grid; gap: 2.5rem; padding-bottom: 3rem; }
.footer-grid h2 { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: #FFFFFF; font-stretch: 100%; margin-bottom: 1.1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-about p { max-width: 36ch; }
.footer-contact li { display: grid; grid-template-columns: 20px 1fr; gap: .6rem; }
.footer-contact svg { width: 18px; height: 18px; margin-top: .2rem; color: var(--hivis); }
.site-footer .placeholder { color: #E8D9B5; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(255,255,255,.1); padding-block: 1.5rem; font-size: var(--fs-xs); }
.footer-bottom nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; } }

/* 6 ─ Home -------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 78% 40%, var(--hero-glow), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero-inner { position: relative; display: grid; gap: clamp(2rem, 1rem + 3vw, 3.5rem); align-items: center; padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(4rem, 3rem + 3vw, 6rem); }
.hero h1 { max-width: 13ch; margin-bottom: 1.4rem; }
.hero-lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: var(--text); max-width: 46ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.75rem; margin-top: 2rem; font-size: var(--fs-sm); color: var(--steel); }
.hero-meta a { color: var(--ink); font-weight: 700; text-decoration: none; }
.hero-meta span { display: inline-flex; align-items: center; gap: .5rem; }
.hero-meta svg { width: 16px; height: 16px; color: var(--hivis-deep); }
@media (min-width: 1000px) { .hero-inner { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }

/* Drawing sheet: frames the 3D model like an architectural drawing */
.sheet { position: relative; background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.sheet-canvas {
  position: relative;
  background:
    linear-gradient(var(--sheet-line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--sheet-line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(var(--sheet-line-fine) 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(90deg, var(--sheet-line-fine) 1px, transparent 1px) 0 0 / 8px 8px,
    var(--sheet-bg);
}
.sheet-canvas::before { content: ""; position: absolute; inset: 12px; border: 1px solid var(--sheet-frame); border-radius: 6px; pointer-events: none; z-index: 1; }
.sheet-block { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: .85rem 1rem; border-top: 1px solid var(--line-strong); }
.sheet-title { margin: 0; font-size: var(--fs-xs); font-weight: 700; color: var(--ink); text-align: right; line-height: 1.3; }
.sheet-title span { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); font-weight: 700; }
@media (max-width: 1535px) { .sheet-title { display: none; } }

/* Brand mark colours (light header / dark footer) */
.brand-mark .bm-1 { fill: var(--ink); }
.brand-mark .bm-2 { fill: #7B8B99; }
.site-footer .brand-mark .bm-1 { fill: #E5E8E6; }
.site-footer .brand-mark .bm-2 { fill: #9FB2C4; }

/* Facts strip */
.facts-wrap { margin-top: calc(-1 * clamp(2rem, 1.5rem + 2vw, 3rem)); position: relative; z-index: 3; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); overflow: hidden; margin: 0; }
.fact { padding: 1.25rem 1.4rem 1.4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact dt { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); font-weight: 700; margin-bottom: .4rem; }
.fact dd { margin: 0; font-weight: 750; font-size: var(--fs-lg); color: var(--ink); }
.fact:last-child { grid-column: 1 / -1; border-right: 0; }
@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(5, 1fr); }
  .fact { border-bottom: 0; }
  .fact:last-child { grid-column: auto; }
}

/* Service cards */
.service-grid { display: grid; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 680px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .service-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.service-card {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.service-card .media { border-radius: 0; aspect-ratio: 16 / 9; }
.service-card-body { position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 2.25rem 1.5rem 1.5rem; flex: 1; }
.service-icon {
  position: absolute; top: -26px; left: 1.5rem; width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); box-shadow: var(--shadow-sm);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.service-icon svg { width: 26px; height: 26px; }
.service-card h3 { font-size: var(--fs-xl); margin: 0; font-stretch: 104%; }
.service-card p { color: var(--steel); margin: 0 0 .75rem; font-size: var(--fs-sm); }
.service-card .arrow-link { margin-top: auto; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.service-card:hover .media img { transform: scale(1.05); }
.service-card:hover .service-icon { background: var(--hivis); border-color: var(--hivis); color: var(--on-accent); }

/* Project cards */
.project-grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) {
  .project-grid--feature { grid-template-columns: 1.4fr 1fr; }
  .project-grid--feature .project-card:first-child { grid-row: span 2; }
  .project-grid--feature .project-card:first-child .media { aspect-ratio: auto; flex: 1; min-height: 360px; }
  .project-grid--all { grid-template-columns: repeat(3, 1fr); }
}
.project-card {
  display: flex; flex-direction: column; text-decoration: none; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.project-card .media { border-radius: 0; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.project-card:hover .media img { transform: scale(1.05); }
.project-body { padding: 1.25rem 1.4rem 1.4rem; display: grid; gap: .45rem; }
.project-body h3 { margin: 0; font-size: var(--fs-lg); }
.project-body p { margin: 0; color: var(--steel); font-size: var(--fs-sm); }
.project-top { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.project-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: var(--fs-sm); color: var(--steel); }
.status { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: var(--fs-xs); color: var(--ok); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--ongoing { color: var(--hivis-text); }
.project-card[hidden] { display: none; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter-btn {
  min-height: 44px; padding: .5rem 1.1rem; border: 1px solid var(--line-strong); background: var(--white);
  border-radius: 999px; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; color: var(--text); transition: all .2s var(--ease);
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.empty-state { padding: 3rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--steel); background: var(--white); }

/* Process: sticky drawing + timeline */
.build { display: grid; gap: 2rem; }
.build-stage { position: sticky; top: calc(var(--header-h) + 12px); z-index: 2; }
.build-stage .sheet-canvas { height: 42vh; min-height: 280px; }
.build-steps { list-style: none; margin: 0; padding: 0 0 0 0; position: relative; }
.build-steps::before { content: ""; position: absolute; left: 21px; top: 1.5rem; bottom: 1.5rem; width: 2px; background: var(--line-strong); }
.build-track { position: relative; }
.build-progress { z-index: 1; position: absolute; left: 21px; top: 1.5rem; width: 2px; height: 0; background: var(--hivis); transition: height .5s var(--ease); }
.build-step { position: relative; padding: 1.5rem 0 1.5rem 4.25rem; }
.build-step-no {
  position: absolute; z-index: 2; left: 0; top: 1.35rem; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); border: 2px solid var(--line-strong); font-weight: 800; font-size: var(--fs-sm); color: var(--steel);
  transition: background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.build-step-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.25rem 1.4rem; transition: box-shadow .35s var(--ease), border-color .35s var(--ease); }
.build-step h3 { font-size: var(--fs-lg); margin-bottom: .35rem; }
.build-step p { color: var(--steel); margin: 0; font-size: var(--fs-sm); }
.build-step .chip { margin-bottom: .6rem; }
.build-step.is-done .build-step-no { background: var(--hivis-tint); border-color: var(--hivis); color: var(--hivis-text); }
.build-step.is-active .build-step-no { background: var(--hivis); border-color: var(--hivis); color: var(--on-accent); }
.build-step.is-active .build-step-card { box-shadow: var(--shadow-md); border-color: var(--line-strong); }
@media (min-width: 1000px) {
  .build { grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: start; }
  .build-stage { top: calc(var(--header-h) + 32px); }
  .build-stage .sheet-canvas { height: min(560px, calc(100vh - var(--header-h) - 160px)); }
  .build-step { padding-block: 12vh; }
  .build-step-no { top: calc(12vh - .15rem); }
  .build-step:first-child { padding-top: 2rem; }
  .build-step:first-child .build-step-no { top: 1.85rem; }
}

/* Trust indicators */
.commit-grid { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .commit-grid { grid-template-columns: 1fr 1fr; } }
.commit-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.commit-card h3 { margin: 1rem 0 .35rem; }
.commit-card p { margin: 0; color: var(--steel); font-size: var(--fs-sm); }
.icon-tile { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--hivis-tint); color: var(--hivis-text); }
.icon-tile svg { width: 26px; height: 26px; }

/* Planner */
.planner { display: grid; gap: 2rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, .8rem + 2vw, 2.5rem); box-shadow: var(--shadow-md); }
@media (min-width: 1000px) { .planner { grid-template-columns: 1.25fr .75fr; gap: 3rem; } }
.planner-out {
  border-radius: var(--r-md); padding: 1.75rem; display: flex; flex-direction: column; gap: 1.1rem;
  border: 1px solid var(--planner-line);
  background:
    linear-gradient(var(--sheet-line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--sheet-line) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--blueprint-tint);
}
.planner-out dl { margin: 0; display: grid; gap: 1.1rem; }
.planner-out dt { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); font-weight: 700; }
.planner-out dd { margin: 0; font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem); font-weight: 800; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.planner-out .sqm dd { font-size: var(--fs-xl); color: var(--blueprint); }
.planner-out .note { font-size: var(--fs-xs); color: var(--steel); margin: 0; padding-top: 1rem; border-top: 1px solid var(--planner-line); }
.planner-out .btn { margin-top: auto; }

/* Testimonial */
.quote-card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.75rem, 1rem + 3vw, 3rem); box-shadow: var(--shadow-sm); }
.quote-card::before { content: "\201C"; position: absolute; top: .25rem; left: 1.4rem; font-size: 5rem; line-height: 1; font-weight: 800; color: var(--hivis); }
.quote-card blockquote { margin: 1.5rem 0 1rem; font-size: var(--fs-xl); font-weight: 600; line-height: 1.4; color: var(--ink); max-width: 42ch; }
.quote-card figcaption { color: var(--steel); font-size: var(--fs-sm); }

/* CTA panel (light, framed — not a full-bleed banner) */
.cta-band { background: var(--paper); padding-block: clamp(3rem, 2rem + 3vw, 5rem); }
.cta-panel {
  position: relative; overflow: hidden; display: grid; gap: 2rem; align-items: center;
  padding: clamp(1.75rem, 1rem + 3vw, 3.5rem); border-radius: var(--r-lg); border: 1px solid var(--line);
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--stone);
}
.cta-panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--hivis); }
.cta-panel h2 { margin: 0 0 .5rem; max-width: 20ch; }
.cta-panel p { margin: 0; color: var(--steel); }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (min-width: 1000px) { .cta-panel { grid-template-columns: 1fr auto; } }

/* 7 ─ 3D engine (building3d.js) — light drawing theme ---------- */
.b3d {
  position: relative; width: 100%; height: 100%; min-height: 300px;
  perspective: 1400px; perspective-origin: 50% 35%;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; overflow: hidden; outline-offset: -4px;
}
.b3d:active { cursor: grabbing; }
.b3d-hero { height: clamp(340px, 42vw, 540px); }
.b3d-world { position: absolute; left: 52%; top: 64%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.b3d-box { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transition: transform .9s var(--ease), opacity .6s var(--ease); }
.b3d-face { position: absolute; left: 0; top: 0; backface-visibility: hidden; transition: background-color .6s var(--ease), border-color .6s var(--ease), opacity .6s var(--ease); }

.m-concrete .f { background: #D3D9DD; } .m-concrete .s { background: #BAC3C9; } .m-concrete .t { background: #E5E9EC; }
.m-column .f { background: #C7CED3; } .m-column .s { background: #A8B2BA; } .m-column .t { background: #DCE1E4; }
.m-glass .f { background: linear-gradient(90deg, rgba(150,190,222,.95) 0 92%, #4E6F8E 92% 100%) 0 0 / 24px 100%, #8DB3D3; }
.m-glass .s { background: linear-gradient(90deg, rgba(120,163,198,.95) 0 92%, #46637F 92% 100%) 0 0 / 24px 100%, #7299BB; }
.m-glass .t { background: #E5E9EC; }
.m-plaster .f { background: #FFFFFF; } .m-plaster .s { background: #E2E7EA; } .m-plaster .t { background: #F6F8F9; }
.m-plaster .b3d-face { box-shadow: inset 0 0 0 1px rgba(47,85,119,.12); }
.m-roof .f { background: #46525E; } .m-roof .s { background: #36414C; } .m-roof .t { background: #56636F; }
.m-amber .f { background: #EBA600; } .m-amber .s { background: #CF9000; } .m-amber .t { background: #FFC233; }
.m-tree .f { background: #5E9A6B; } .m-tree .s { background: #4A8257; } .m-tree .t { background: #74B081; }
.m-ground .t {
  background:
    linear-gradient(var(--b3d-ground-line) 1px, transparent 1px) 0 0 / 10% 10%,
    linear-gradient(90deg, var(--b3d-ground-line) 1px, transparent 1px) 0 0 / 10% 10%,
    var(--b3d-ground);
  border: 1px solid var(--b3d-ground-edge);
}
.m-ground .f, .m-ground .s { display: none; }
.m-scaffold .b3d-face { background: linear-gradient(rgba(207,144,0,.85) 2px, transparent 2px) 0 0 / 100% 25%, linear-gradient(90deg, rgba(207,144,0,.85) 2px, transparent 2px) 0 0 / 20% 100%; }
.m-scaffold .t { display: none; }
.b3d-box.is-ghost .b3d-face { background: var(--b3d-ghost-fill) !important; border: 1px dashed var(--b3d-ghost); box-shadow: none; }
.b3d-box.is-ghost.m-scaffold, .b3d-box.is-ghost.m-tree { opacity: 0; }
.b3d-box.is-gone { opacity: 0; pointer-events: none; }

.b3d-ui { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.stage-tabs { display: flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; background: var(--white); }
.stage-tab {
  min-height: 38px; padding: .35rem .75rem; background: transparent; color: var(--text); border: 0; cursor: pointer;
  font-size: var(--fs-xs); font-weight: 700; border-right: 1px solid var(--line); transition: background .2s;
}
.stage-tab:last-child { border-right: 0; }
.stage-tab:hover { background: var(--mist); }
.stage-tab[aria-pressed="true"] { background: var(--hivis); color: var(--on-accent); }
.b3d-hint { font-size: var(--fs-xs); color: var(--steel); display: inline-flex; align-items: center; gap: .4rem; }
.b3d-hint svg { width: 16px; height: 16px; }
.b3d-label {
  position: absolute; left: 1.5rem; top: 1.5rem; z-index: 2; font-size: var(--fs-xs); color: var(--text); font-weight: 600;
  background: var(--label-bg); border: 1px solid var(--line-strong); padding: .35rem .7rem; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.b3d-label b { color: var(--hivis-text); }

/* 8 ─ Inner pages ------------------------------------------- */
.page-hero {
  position: relative; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 50% 90% at 90% 0%, var(--page-glow), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--mist);
  padding-block: clamp(2.5rem, 1.75rem + 3.5vw, 5rem) clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}
.page-hero h1 { font-size: clamp(2.2rem, 1.4rem + 3.2vw, 4rem); max-width: 18ch; }
.page-hero p { color: var(--text); font-size: var(--fs-lg); max-width: 58ch; margin: 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 1.5rem; font-size: var(--fs-sm); color: var(--steel); }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }
.breadcrumb a { text-decoration: none; color: var(--blueprint); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

.prose { max-width: 72ch; }
.prose h2 { font-size: var(--fs-xl); margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose li { margin-bottom: .4rem; }
.prose a { font-weight: 600; color: var(--blueprint); }
.prose .media { border: 1px solid var(--line); }

.info-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.info-table th, .info-table td { text-align: left; padding: .85rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }
.info-table th { width: 42%; color: var(--steel); font-weight: 600; padding-right: 1rem; }
.info-table td { font-weight: 600; color: var(--ink); }

.aside-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.75rem; box-shadow: var(--shadow-md); }
.aside-card h2, .aside-card h3 { font-size: var(--fs-lg); font-stretch: 100%; }
.layout-aside { display: grid; gap: 3rem; }
@media (min-width: 1000px) {
  .layout-aside { grid-template-columns: minmax(0, 1fr) 360px; gap: 4.5rem; }
  .layout-aside > aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
}

.check-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .7rem; }
.check-list li { display: grid; grid-template-columns: 24px 1fr; gap: .6rem; }
.check-list li::before {
  content: ""; width: 20px; height: 20px; margin-top: .2rem; border-radius: 50%; background: var(--hivis-tint);
  box-shadow: inset 0 0 0 1.5px var(--hivis);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%238F6100' d='M9.5 15.6 5.9 12l-1.4 1.4 5 5L19.5 8.4 18.1 7z'/%3E%3C/svg%3E");
  background-size: 14px; background-position: center; background-repeat: no-repeat;
}

.case-steps { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .case-steps { grid-template-columns: repeat(3, 1fr); } }
.case-steps article { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--hivis); border-radius: var(--r-md); padding: 1.5rem; }
.case-steps p { color: var(--steel); margin: 0; }

.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--r-md); }
.gallery .media { aspect-ratio: 1; border: 1px solid var(--line); }
.gallery button:hover img { transform: scale(1.05); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); width: 100%; }
.lightbox::backdrop { background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox img { width: 100%; border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
.lightbox-close { position: absolute; top: .75rem; right: .75rem; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.lightbox-close svg { width: 20px; height: 20px; }

.team-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.team-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.team-card .media { aspect-ratio: 4 / 5; border-radius: 0; background: var(--concrete); }
.team-card h3, .team-card p { padding-inline: 1.25rem; }
.team-card h3 { margin: 1rem 0 .15rem; }
.team-card p { color: var(--steel); font-size: var(--fs-sm); margin: 0 0 1.25rem; }

.job-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.job { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.5rem; display: grid; gap: .75rem 2rem; box-shadow: var(--shadow-sm); }
@media (min-width: 800px) { .job { grid-template-columns: 1fr auto; align-items: center; } }
.job h3 { margin-bottom: .4rem; }

.post-grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { display: flex; flex-direction: column; text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.post-card .media { aspect-ratio: 16 / 10; border-radius: 0; }
.post-body { padding: 1.25rem 1.4rem 1.5rem; display: grid; gap: .5rem; }
.post-body h3 { margin: 0; }
.post-body p { margin: 0; color: var(--steel); font-size: var(--fs-sm); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card:hover .media img { transform: scale(1.05); }
.post-card time { font-size: var(--fs-xs); color: var(--steel); font-weight: 600; }

.accordion { display: grid; gap: .75rem; }
.accordion details { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); transition: box-shadow .25s; }
.accordion details[open] { box-shadow: var(--shadow-md); }
.accordion summary { list-style: none; cursor: pointer; padding: 1.2rem 3.25rem 1.2rem 1.4rem; font-weight: 700; font-size: var(--fs-md); color: var(--ink); position: relative; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; position: absolute; right: 1.4rem; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .25s var(--ease); }
.accordion details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.accordion .acc-body { padding: 0 1.4rem 1.25rem; color: var(--steel); }

.map-frame { border: 1px solid var(--line); width: 100%; height: 380px; border-radius: var(--r-lg); background: var(--concrete); }
.contact-cards { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.contact-cards > * { background: var(--white); padding: 1.15rem 1.4rem; display: grid; grid-template-columns: 40px 1fr; gap: 1rem; align-items: center; text-decoration: none; }
.contact-cards svg { width: 40px; height: 40px; padding: 9px; border-radius: 10px; background: var(--hivis-tint); color: var(--hivis-text); }
.contact-cards small { display: block; color: var(--steel); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.contact-cards strong { font-size: var(--fs-md); color: var(--ink); }
a.contact-cards-link:hover { background: var(--stone); }

.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.error-code { font-size: clamp(6rem, 4rem + 12vw, 13rem); font-weight: 900; font-stretch: 120%; line-height: .9; color: transparent; -webkit-text-stroke: 2px var(--hivis); margin: 0; }

/* 9 ─ Forms ------------------------------------------------- */
.form { display: grid; gap: 1.25rem; }
.form-row { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .45rem; align-content: start; }
.field label, .field legend { font-weight: 700; font-size: var(--fs-sm); color: var(--ink); }
.field .opt { font-weight: 500; color: var(--steel); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: .75rem .95rem; background: var(--white); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); transition: border-color .2s, box-shadow .2s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--field-hover); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(235,166,0,.25); }
.field [aria-invalid="true"] { border-color: var(--err); }
.field-error { color: var(--err); font-size: var(--fs-xs); font-weight: 600; margin: 0; }
.field-hint { color: var(--steel); font-size: var(--fs-xs); margin: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, .8rem + 2vw, 2.5rem); box-shadow: var(--shadow-md); }

.choice-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span {
  display: flex; align-items: center; height: 100%; min-height: 56px; padding: .75rem 1rem; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); font-weight: 600; font-size: var(--fs-sm); background: var(--white); cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s;
}
.choice span:hover { border-color: var(--ink); }
.choice input:checked + span { border-color: var(--hivis); background: var(--hivis-tint); box-shadow: inset 0 0 0 1px var(--hivis); color: var(--ink); }
.choice input:focus-visible + span { outline: 3px solid var(--hivis); outline-offset: 2px; }

.form-status { padding: 1rem 1.25rem; border-radius: var(--r-sm); font-weight: 600; font-size: var(--fs-sm); }
.form-status:empty { display: none; }
.form-status.is-success { background: #E3F2EA; color: var(--ok); }
.form-status.is-error { background: #FBE9E8; color: var(--err); }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.steps-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0 0 2rem; list-style: none; padding: 0; }
.steps-nav li { border-top: 4px solid var(--line); padding-top: .6rem; font-size: var(--fs-xs); font-weight: 700; color: var(--steel); border-radius: 2px; }
.steps-nav li.is-done, .steps-nav li.is-current { border-color: var(--hivis); color: var(--ink); }
.form-step[hidden] { display: none; }
.step-actions { display: flex; justify-content: space-between; gap: .75rem; margin-top: .5rem; }

/* 10 ─ Motion ----------------------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* 11 ─ Utilities & small screens ---------------------------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; } .mb-2 { margin-bottom: 2rem; }
.text-steel { color: var(--steel); }
.stack > * + * { margin-top: 1rem; }

@media (max-width: 559px) {
  .header-cta { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .cta-actions .btn { flex: 1 1 100%; }
  .stage-tabs { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; }
  .stage-tab { padding: .35rem .15rem; font-size: .66rem; }
  .b3d-hint { display: none; }
  .step-actions .btn { padding-inline: 1.1rem; }
}
@media (max-width: 999px) { .b3d-hero { height: 320px; } }

@media print {
  .site-header, .site-footer, .action-bar, .wa-float, .cta-band, .b3d { display: none !important; }
  body { padding: 0; background: #fff; }
}
.service-card .media { aspect-ratio: 16 / 10; }
.service-card .media img, .project-card .media img { object-position: 50% 40%; }
@media (min-width: 1100px) { .project-grid--feature .project-card:not(:first-child) .media { aspect-ratio: 16 / 9; } }


/* =========================================================
   12 ─ Dark theme  (html[data-theme="dark"])
   Same components, remapped tokens. Toggle: assets/js/theme.js + main.js
   ========================================================= */
[data-theme="dark"] {
  color-scheme: dark;
  --white: #16212C;          /* surface (cards, inputs) */
  --paper: #0E1720;          /* page base */
  --mist: #121C26;
  --concrete: #17222D;
  --stone: #131D27;
  --blueprint-tint: #1A2A3A;
  --ink: #EEF2F5;            /* headings */
  --text: #C3CED8;
  --steel: #93A2B0;
  --blueprint: #8DB4D8;
  --charcoal: #09111A;
  --hivis: #EBA600;
  --hivis-deep: #F5B934;     /* hover goes lighter on dark */
  --hivis-text: #F2B630;
  --hivis-tint: rgba(235, 166, 0, .14);
  --line: #243242;
  --line-strong: #324458;
  --grid-line: rgba(141, 180, 216, .07);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 60px -28px rgba(0, 0, 0, .8);
  --header-bg: rgba(14, 23, 32, .86);
  --bar-bg: rgba(14, 23, 32, .96);
  --sheet-bg: #10304F;       /* the original drafting-board blue */
  --sheet-line: rgba(190, 214, 238, .12);
  --sheet-line-fine: rgba(190, 214, 238, .05);
  --sheet-frame: rgba(190, 214, 238, .22);
  --hero-glow: rgba(22, 62, 100, .55);
  --page-glow: rgba(235, 166, 0, .08);
  --planner-line: #2C4158;
  --field-hover: #4A5E74;
  --b3d-ground: rgba(16, 48, 79, .6);
  --b3d-ground-line: rgba(190, 214, 238, .18);
  --b3d-ground-edge: rgba(190, 214, 238, .35);
  --b3d-ghost: rgba(190, 214, 238, .55);
  --b3d-ghost-fill: rgba(190, 214, 238, .04);
  --label-bg: rgba(11, 26, 43, .8);
}
[data-theme="dark"] .m-plaster .f { background: #EDE9E1; }
[data-theme="dark"] .m-plaster .s { background: #D3CEC4; }
[data-theme="dark"] .m-plaster .b3d-face { box-shadow: none; }
[data-theme="dark"] .media { background: #1A2A3A; }
[data-theme="dark"] .media img { filter: brightness(.86) saturate(.95); }
[data-theme="dark"] .form-status.is-success { background: rgba(31, 122, 77, .18); color: #7FD4A6; }
[data-theme="dark"] .form-status.is-error { background: rgba(179, 38, 30, .18); color: #F2A19B; }
[data-theme="dark"] .field-error { color: #F2A19B; }
[data-theme="dark"] .field [aria-invalid="true"] { border-color: #E5766E; }
[data-theme="dark"] .status { color: #6FCB98; }
[data-theme="dark"] .placeholder { background: repeating-linear-gradient(-45deg, rgba(235,166,0,.22) 0 6px, rgba(235,166,0,.1) 6px 12px); }
[data-theme="dark"] .brand-mark .bm-2 { fill: #9FB2C4; }
[data-theme="dark"] .site-footer { border-top: 1px solid var(--line); }
[data-theme="dark"] .error-code { -webkit-text-stroke-color: var(--hivis); }

/* Smooth colour change when switching (not on first paint) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .3s ease, border-color .3s ease, color .3s ease, fill .3s ease !important;
}

/* Theme toggle button */
.theme-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; cursor: pointer;
  background: var(--white); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color .2s, background .2s;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* =========================================================
   13 ─ CMS components (v4)
   ========================================================= */
@media (min-width: 900px) { .facts { grid-template-columns: repeat(var(--cols, 5), 1fr); } }
.facts .fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 900px) { .facts .fact:last-child:nth-child(odd) { grid-column: auto; } }
.mt-1 { margin-top: 1rem; }
.grid-2--top { align-items: start; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.brand-logo { flex: none; width: auto; height: 46px; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.25);  }

/* Dropdown navigation */
.nav-list .has-sub { position: relative; }
.sub-nav { position: absolute; top: 100%; left: 0; min-width: 220px; list-style: none; margin: 0; padding: .4rem; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s; z-index: 5; }
.has-sub:hover .sub-nav, .has-sub:focus-within .sub-nav { opacity: 1; visibility: visible; transform: none; }
.sub-nav a { display: block; padding: .55rem .75rem; }
.mobile-nav a.m-sub { font-size: 1.05rem; padding: .5rem 0 .5rem 1rem; font-weight: 600; color: var(--text); }

.social-links { list-style: none; display: flex; gap: .5rem; padding: 0; margin: 1rem 0 0; }
.social-links a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); }
.social-links a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.social-links svg { width: 18px; height: 18px; }

/* Hero photo variant */
.hero-photo { overflow: hidden; }
.hero-photo img { width: 100%; height: clamp(320px, 42vw, 560px); object-fit: cover; }

/* Testimonials */
.testimonial-grid { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .testimonial-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.rating { color: var(--hivis); letter-spacing: .1em; margin: 1.25rem 0 0; font-size: 1.1rem; }
.rating-off { color: var(--line-strong); }
.quote-person { display: flex; align-items: center; gap: .85rem; }
.quote-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.quote-person strong { color: var(--ink); }

/* Blog */
.blog-tools { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.blog-tools .filters { margin: 0; }
.search-field { position: relative; flex: 1 1 280px; max-width: 420px; }
.search-field svg { position: absolute; left: .9rem; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--steel); }
.search-field input { padding-left: 2.6rem; }
a.filter-btn { display: inline-flex; align-items: center; text-decoration: none; }
.filter-btn .count { margin-left: .4rem; font-size: var(--fs-xs); opacity: .7; }
.post-feature { display: grid; gap: 0; text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; transition: box-shadow .35s var(--ease); }
.post-feature .media { border-radius: 0; aspect-ratio: 16 / 9; }
.post-feature-body { padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); display: grid; gap: .75rem; align-content: center; }
.post-feature-body h2 { margin: 0; font-size: var(--fs-xl); }
.post-feature-body p { margin: 0; color: var(--steel); }
.post-feature:hover { box-shadow: var(--shadow-md); }
.post-feature:hover img { transform: scale(1.04); }
@media (min-width: 900px) { .post-feature { grid-template-columns: 1.2fr 1fr; } .post-feature .media { aspect-ratio: auto; min-height: 340px; } }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tag-cloud a.chip { text-decoration: none; }
.tag-cloud a.chip:hover { background: var(--hivis-tint); color: var(--hivis-text); }
.post-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: 1.25rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 2rem 0 1rem; }
.share a, .share button { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .75rem; border: 1px solid var(--line-strong);
  border-radius: 999px; background: var(--white); color: var(--ink); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; text-decoration: none; }
.share svg { width: 16px; height: 16px; }
.share a:hover, .share button:hover { border-color: var(--ink); }

.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 2.5rem 0 0; justify-content: center; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .5rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--white); color: var(--ink); text-decoration: none; font-weight: 700; }
.pagination span[aria-current] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pagination a:hover { border-color: var(--ink); }
.pagination svg { width: 18px; height: 18px; }

/* Project timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; position: relative; }
.timeline li { display: grid; gap: .1rem; padding-left: 1.75rem; position: relative; font-size: var(--fs-sm); }
.timeline li::before { content: ""; position: absolute; left: 0; top: .3rem; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--hivis); background: var(--white); }
.timeline li.is-done::before { background: var(--hivis); }
.timeline li + li::after { content: ""; position: absolute; left: 5px; top: -1.1rem; height: 1.3rem; width: 2px; background: var(--line-strong); }
.timeline span { color: var(--steel); font-size: var(--fs-xs); }
.timeline strong { color: var(--ink); }

/* Gallery + lightbox navigation */
.gallery-item { margin: 0; }
.gallery-item figcaption { font-size: var(--fs-xs); color: var(--steel); margin-top: .4rem; }
.lightbox figure { margin: 0; }
.lightbox-caption { text-align: center; color: var(--ink); margin-top: .75rem; font-weight: 600; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--white); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); color: var(--ink); z-index: 2; }
.lightbox-nav svg { width: 22px; height: 22px; }
.lightbox-prev { left: .75rem; } .lightbox-next { right: .75rem; }
.lightbox-nav[hidden] { display: none; }

/* Team extras */
.team-bio { font-size: var(--fs-sm); color: var(--text) !important; }
.team-links { display: flex; gap: .5rem; }
.team-links a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--mist); color: var(--ink); }
.team-links svg { width: 16px; height: 16px; }
.faq-group { font-size: var(--fs-lg); margin: 2rem 0 1rem; }
.faq-group:first-child { margin-top: 0; }

/* 404 */
.search-404 { display: flex; gap: .5rem; max-width: 460px; margin: 1.5rem auto; }
.search-404 input { flex: 1; min-height: 52px; padding: .75rem .95rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--white); color: var(--ink); }
.suggest-404 { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center; margin-top: 2rem; }

/* =========================================================
   14 ─ v5: floor-area planner (Sri Lanka + international)
   ========================================================= */
.choice-grid--2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.choice--stack span { flex-direction: column; align-items: flex-start; gap: .15rem; }
.choice--stack small { font-weight: 500; color: var(--steel); font-size: var(--fs-xs); }
.check-line { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
.check-line input { width: 20px; height: 20px; accent-color: var(--hivis); }
.planner-more { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .25rem 1rem; background: var(--paper); }
.planner-more summary { cursor: pointer; padding: .7rem 0; font-weight: 700; font-size: var(--fs-sm); color: var(--ink); list-style: none; }
.planner-more summary::-webkit-details-marker { display: none; }
.planner-more summary::after { content: " +"; color: var(--hivis-text); }
.planner-more[open] summary::after { content: " −"; }
.planner-more[open] { padding-bottom: 1rem; }
.planner-more .form-row + .form-row { margin-top: 1rem; }
.planner-alt { margin: .25rem 0 0; font-weight: 600; color: var(--blueprint); }
.planner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--planner-line); }
.planner-grid dd { font-size: var(--fs-lg) !important; }
.planner-error { margin: 0; padding: .6rem .8rem; border-radius: var(--r-sm); background: #FBE9E8; color: var(--err); font-size: var(--fs-sm); font-weight: 600; }
.planner-out .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
[hidden] { display: none !important; }

/* =========================================================
   15 ─ Cross-browser fallbacks (Safari 14+, iOS Safari 14+, Firefox, Chromium)
   ========================================================= */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .lightbox::backdrop { background: rgba(250, 250, 248, .94); }
  [data-theme="dark"] .lightbox::backdrop { background: rgba(14, 23, 32, .94); }
}
@supports not (aspect-ratio: 1 / 1) {
  .media { height: 0; padding-top: 75%; }
  .media > img { position: absolute; inset: 0; top: 0; left: 0; }
  .service-card .media, .post-card .media { padding-top: 62.5%; }
  .gallery .media { padding-top: 100%; }
  .team-card .media { padding-top: 125%; }
}
@supports not (inset: 0) {
  .mobile-nav { top: var(--header-h); right: 0; bottom: 0; left: 0; }
}
input, select, textarea, button { -webkit-appearance: none; appearance: none; border-radius: var(--r-sm); }
input[type="checkbox"], input[type="radio"] { -webkit-appearance: auto; appearance: auto; }
select { 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='none' stroke='%235C6975' stroke-width='1.6' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem !important; }
input[type="date"] { min-height: 52px; line-height: 1.2; }
input[type="number"] { -moz-appearance: textfield; }
@media (hover: none) { .service-card:hover, .project-card:hover, .post-card:hover { transform: none; } }
.price-note { margin: 0 0 1rem; padding: .7rem .9rem; border-left: 3px solid var(--hivis); background: var(--paper); font-weight: 700; font-size: var(--fs-sm); color: var(--ink); }
.error-title { font-size: var(--fs-2xl); }
.error-text { margin-inline: auto; }
.error-actions { justify-content: center; }
/* Business hours table (contact page) */
.hours-table { border-collapse: collapse; margin-top: .35rem; font-size: var(--fs-sm); width: 100%; max-width: 360px; }
.hours-table th { text-align: left; font-weight: 600; padding: .2rem 1.25rem .2rem 0; color: var(--ink); white-space: nowrap; }
.hours-table td { padding: .2rem 0; color: var(--steel); }
.hours-table tr.is-today th, .hours-table tr.is-today td { color: var(--ink); font-weight: 700; }
.hours-table tr.is-closed td { color: var(--steel); font-style: italic; }
.hours-now { font-weight: 700; color: var(--err); }
.hours-now.is-open { color: #1F7A4D; }
