/* Smarthomes & Kitchens — colours taken from the company logo */
:root {
  --ground: #F4F6F9;
  --surface: #FFFFFF;
  --ink: #111418;          /* logo lettering */
  --muted: #535C68;
  --line: #D9DEE5;
  --navy: #13305E;         /* logo dark roof + ground line */
  --blue: #1B4584;         /* logo light roof */
  --grey: #D0D0D0;         /* logo roof shadow */
  --accent: var(--blue);
  --accent-ink: #FFFFFF;
  --tag: #2F62B0;
  --band: var(--navy);
  --band-ink: #F4F6F9;
  --band-muted: #AFBCD2;
  --plan-bg: #13305E;
  --plan-line: rgba(255,255,255,.88);
  --plan-faint: rgba(255,255,255,.2);
  --ok: #1D6B45;
  --display: "Lexend", "Century Gothic", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0E1420; --surface: #151D2B; --ink: #E8ECF2; --muted: #9AA6B8; --line: #263247;
    --accent: #7FA6E8; --accent-ink: #0B1220; --tag: #8FB2EE; --grey: #56606E;
    --band: #0A1A36; --band-ink: #E8ECF2; --band-muted: #93A3BF;
    --plan-bg: #102447; --ok: #6FCB9C;
  }
}
:root[data-theme="dark"] {
  --ground: #0E1420; --surface: #151D2B; --ink: #E8ECF2; --muted: #9AA6B8; --line: #263247;
  --accent: #7FA6E8; --accent-ink: #0B1220; --tag: #8FB2EE; --grey: #56606E;
  --band: #0A1A36; --band-ink: #E8ECF2; --band-muted: #93A3BF;
  --plan-bg: #102447; --ok: #6FCB9C;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1160px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--tag); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.08; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 700; letter-spacing: -.015em; }
h3 { font-size: 1.22rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
.label { font: 500 .76rem/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

/* Header */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 50px; height: auto; }
.brand-name { font: 700 1.02rem/1.05 var(--display); text-transform: uppercase; letter-spacing: .07em; }
.brand-name small { display: block; font: 600 .66rem/1.5 var(--display); letter-spacing: .12em; color: var(--muted); }
nav.links { display: flex; gap: 22px; align-items: center; font-size: .95rem; }
nav.links a { text-decoration: none; color: var(--muted); }
nav.links a:hover, nav.links a[aria-current="page"] { color: var(--ink); }
nav.links a[aria-current="page"] { box-shadow: 0 2px 0 var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; background: var(--accent); color: var(--accent-ink) !important; font: 600 .95rem/1 var(--body); text-decoration: none; border: 0; cursor: pointer; transition: transform .15s, filter .15s; box-shadow: none !important; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 1.5px var(--ink) !important; }
@media (max-width: 820px) { nav.links a.hide-sm { display: none; } .brand-name small { display: none; } }
@media (max-width: 420px) { .brand-name { font-size: .88rem; } nav.links { gap: 14px; } .btn.sm-tight { padding: 10px 12px; } }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 84px) clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.8vw, 4.4rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-top: 22px; font-size: 1.14rem; color: var(--muted); max-width: 34em; }
.hero .cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero .label { margin-bottom: 18px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

.plan { background: var(--plan-bg); padding: 18px; margin: 0; }
.plan svg { display: block; width: 100%; height: auto; }
.plan .sheet { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--plan-faint); font: 500 .7rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--plan-line); }
.plan text { font-family: var(--mono); fill: var(--plan-line); }

/* Sections */
section { padding-block: clamp(56px, 8vw, 100px); }
section + section { border-top: 1px solid var(--line); }
.head { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 48px; align-items: end; margin-bottom: 40px; }
.head p { color: var(--muted); max-width: 36em; }
.head .label { margin-bottom: 12px; }
@media (max-width: 760px) { .head { grid-template-columns: 1fr; } }

.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service { background: var(--surface); padding: clamp(24px, 3vw, 36px); display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; }
.service .code { font: 500 .75rem/1 var(--mono); color: var(--tag); letter-spacing: .08em; }
.service p { color: var(--muted); }
.chips { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font: 500 .76rem/1 var(--mono); padding: 7px 10px; border: 1px solid var(--line); }
@media (max-width: 700px) { .services { grid-template-columns: 1fr; } }

/* Turnkey band */
.band { background: var(--band); color: var(--band-ink); }
.band .head p, .band .label { color: var(--band-muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; }
.steps li { counter-increment: s; padding: 22px 20px 0 0; border-top: 2px solid color-mix(in srgb, var(--band-ink) 25%, var(--band)); position: relative; }
.steps li::before { content: "Stage " counter(s); display: block; font: 500 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--band-muted); margin-bottom: 14px; }
.steps li::after { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; background: var(--band-ink); }
.steps h3 { margin-bottom: 8px; }
.steps p { font-size: .95rem; color: var(--band-muted); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); row-gap: 32px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Kitchens split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.split > div { background: var(--surface); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; }
dl.facts { margin: 8px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; font-size: .95rem; }
dl.facts dt { font: 500 .74rem/1.7 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
dl.facts dd { margin: 0; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 480px) { dl.facts { grid-template-columns: 1fr; gap: 2px 0; } dl.facts dd { margin-bottom: 10px; } }

/* Why */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.why div { border-left: 2px solid var(--accent); padding-left: 18px; }
.why h3 { margin-bottom: 8px; }
.why p { color: var(--muted); font-size: .98rem; }
@media (max-width: 760px) { .why { grid-template-columns: 1fr; } }

/* Project cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(19,48,94,.45); }
.card .media { position: relative; aspect-ratio: 4 / 3; background: var(--plan-bg); overflow: hidden; }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .media img { transform: scale(1.03); }
.card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 500 .72rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card p { color: var(--muted); font-size: .95rem; }
.card .foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .88rem; color: var(--muted); }
.status { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; font: 600 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: var(--surface); color: var(--ink); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.status.in_progress::before { background: #E0A100; box-shadow: 0 0 0 3px rgba(224,161,0,.25); }
.progress { height: 6px; background: var(--line); position: relative; overflow: hidden; }
.progress > span { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--plan-line); }
.placeholder svg { width: 38%; opacity: .55; }
.empty { padding: 40px; border: 1px dashed var(--line); text-align: center; color: var(--muted); }
.more-link { margin-top: 28px; display: flex; justify-content: flex-end; }

/* Projects page */
.page-head { padding-block: clamp(40px, 6vw, 72px) 28px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.03em; margin-top: 10px; }
.page-head p { margin-top: 14px; color: var(--muted); max-width: 40em; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tabs a { text-decoration: none; padding: 10px 16px; border: 1px solid var(--line); font-weight: 500; font-size: .95rem; background: var(--surface); }
.tabs a span { font: 500 .78rem/1 var(--mono); color: var(--muted); margin-left: 6px; }
.tabs a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tabs a[aria-current="page"] span { color: #AFBCD2; }
.list-section { padding-block: 16px 72px; border-top: 0; }
.group-title { display: flex; align-items: baseline; gap: 12px; margin: 36px 0 18px; }
.group-title:first-child { margin-top: 8px; }

/* Project detail */
.p-hero { padding-block: clamp(32px, 5vw, 56px) 0; border-top: 0; }
.crumbs { font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.p-title { display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: end; margin-top: 14px; }
.p-title h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); letter-spacing: -.03em; }
.p-title p { color: var(--muted); margin-top: 12px; max-width: 42em; font-size: 1.08rem; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); background: var(--surface); font: 600 .75rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.badge.in_progress::before { background: #E0A100; }
@media (max-width: 640px) { .p-title { grid-template-columns: 1fr; } .p-title .badge { justify-self: start; } }
.p-cover { margin-top: 28px; aspect-ratio: 16 / 8; background: var(--plan-bg); overflow: hidden; }
.p-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .p-cover { aspect-ratio: 4 / 3; } }
.p-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: clamp(28px, 5vw, 64px); padding-block: 40px 16px; }
@media (max-width: 860px) { .p-body { grid-template-columns: 1fr; } }
.prose { display: grid; gap: 16px; max-width: 65ch; }
.prose h2 { font-size: 1.4rem; margin-top: 12px; }
.scope { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.scope li { padding-left: 22px; position: relative; }
.scope li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 2px; background: var(--accent); }
.sheet-box { background: var(--surface); border: 1px solid var(--line); padding: 22px; align-self: start; display: grid; gap: 16px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 92px); }
.sheet-box .progress { height: 8px; }
.sheet-box .pct { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 16px; }
.gallery button { padding: 0; border: 0; background: var(--plan-bg); cursor: zoom-in; aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.04); }
.timeline { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.timeline time { font: 500 .8rem/1.6 var(--mono); color: var(--muted); }
@media (max-width: 480px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(8,14,26,.9); }
dialog.lightbox img { max-height: 82vh; width: auto; margin-inline: auto; }
dialog.lightbox .lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #E8ECF2; padding: 10px 2px 0; font-size: .92rem; }
dialog.lightbox button { background: rgba(255,255,255,.12); color: #fff; border: 0; padding: 9px 14px; cursor: pointer; font: inherit; }
dialog.lightbox .lb-nav { display: flex; gap: 6px; }

/* Contact */
.contact .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 64px); }
.contact-info { display: flex; flex-direction: column; gap: 22px; }
.contact-info p { color: var(--muted); }
.contact-info dl { margin: 0; display: grid; gap: 14px; }
.contact-info dd { margin: 2px 0 0; font-weight: 500; }
.contact-info dd a { text-decoration: none; }
form.quote { background: var(--surface); border: 1px solid var(--line); padding: clamp(20px, 3vw, 32px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; }
form.quote .full { grid-column: 1 / -1; }
label.f { display: grid; gap: 6px; font: 500 .74rem/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
input, select, textarea { font: 400 1rem/1.4 var(--body); color: var(--ink); background: var(--ground); border: 1px solid var(--line); padding: 11px 12px; width: 100%; border-radius: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { min-height: 120px; resize: vertical; }
form.quote .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { grid-column: 1 / -1; padding: 12px 14px; font-size: .95rem; border-left: 3px solid var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.notice.error { border-color: #B3261E; background: color-mix(in srgb, #B3261E 10%, transparent); }
@media (max-width: 860px) { .contact .wrap { grid-template-columns: 1fr; } }
@media (max-width: 520px) { form.quote { grid-template-columns: 1fr; } }

.cta-band { background: var(--band); color: var(--band-ink); }
.cta-band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.cta-band p { color: var(--band-muted); margin-top: 6px; }
.cta-band .btn { background: var(--band-ink); color: var(--navy) !important; }

footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: .88rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer a { color: var(--muted); }
.preview-bar { background: #E0A100; color: #111; text-align: center; padding: 8px 16px; font-size: .9rem; }

/* Hero with background video (shown when public/assets/hero.mp4 exists) */
.hero.has-video { position: relative; overflow: hidden; min-height: min(78vh, 720px); display: flex; align-items: flex-end; color: #fff; background: #0A1A36; }
.hero.has-video .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.has-video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,26,54,.15) 0%, rgba(10,26,54,.35) 45%, rgba(10,26,54,.88) 100%); }
.hero.has-video .wrap { position: relative; z-index: 1; grid-template-columns: 1fr; width: 100%; }
.hero.has-video .wrap > div { max-width: 44rem; }
.hero.has-video .label, .hero.has-video .lede { color: #D4DDEC; }
.hero.has-video h1 em { color: #9FC0F5; }
.hero.has-video .btn { background: #fff; color: #13305E !important; }
.hero.has-video .btn.ghost { background: transparent; color: #fff !important; box-shadow: inset 0 0 0 1.5px #fff !important; }
.video-toggle { position: absolute; right: 16px; bottom: 16px; z-index: 2; background: rgba(10,26,54,.6); color: #fff; border: 1px solid rgba(255,255,255,.35); padding: 8px 12px; font: 500 .75rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
