/* MDS Display — "night storefront": dark glass panels, pixel-grid texture, spec data set in mono.
   Dark-first; light theme mirrors via prefers-color-scheme / data-theme. */
:root {
  --bg: #0b0e13;
  --surface: #121821;
  --surface-2: #19212d;
  --line: #263142;
  --fg: #e9eef5;
  --muted: #93a1b4;
  --accent: #4d8dff;      /* MDS brand blue, lifted for dark ground */
  --brand: #0055e4;
  --logo: #ffffff;
  --accent-ink: #04121f;
  --warm: #ffb547;        /* amber pixel */
  --wa: #25d366;
  --wa-ink: #062b14;
  --grid: rgba(77,141,255,.07);
  --shadow: 0 20px 60px rgba(0,0,0,.45);
  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 10px;
  --wrap: 1180px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f7fa; --surface: #ffffff; --surface-2: #eef2f7; --line: #d7dee8;
    --fg: #0e1621; --muted: #546274; --accent: #0055e4; --accent-ink: #ffffff; --logo: #0055e4;
    --warm: #b86e00; --wa: #1fae55; --wa-ink: #ffffff; --grid: rgba(0,85,228,.06);
    --shadow: 0 18px 50px rgba(14,22,33,.12); color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f7fa; --surface: #ffffff; --surface-2: #eef2f7; --line: #d7dee8;
  --fg: #0e1621; --muted: #546274; --accent: #0055e4; --accent-ink: #ffffff; --logo: #0055e4;
  --warm: #b86e00; --wa: #1fae55; --wa-ink: #ffffff; --grid: rgba(0,85,228,.06);
  --shadow: 0 18px 50px rgba(14,22,33,.12); color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *{animation:none!important;transition:none!important} }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.65 var(--f-body); overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); font-weight: 800; font-stretch: 112%; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 750; font-stretch: 108%; }
h3 { font-size: 1.18rem; font-weight: 700; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.eyebrow { font: 600 .74rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--warm); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 12px; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font: 800 1.05rem/1 var(--f-display); font-stretch: 115%; letter-spacing: .02em; }
.brand > span { white-space: nowrap; }
@media (max-width: 420px) { .brand small { display: none !important; } }
.brand small { display: block; font: 500 .62rem/1.2 var(--f-mono); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-top: 3px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; gap: 4px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { color: var(--fg); text-decoration: none; font-size: .9rem; padding: 8px 9px; white-space: nowrap; border-radius: 6px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--surface-2); }
.nav-cta { display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 8px; padding: 8px 10px; font: inherit; cursor: pointer; }
.theme-btn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; display: grid; place-items: center; }
@media (max-width: 1120px) {
  .menu-btn { display: block; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; margin: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-cta .btn-wa span { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem/1 var(--f-body); padding: 13px 20px; border-radius: 999px; text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--fg); background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.btn-sm { padding: 9px 14px; font-size: .86rem; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-block: 72px 64px; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-visual { position: relative; aspect-ratio: 4 / 3.4; max-width: 100%; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--bg)); overflow: hidden; box-shadow: var(--shadow); }
.hero-visual canvas { width: 100%; height: 100%; }
.hero-visual figcaption { position: absolute; left: 14px; bottom: 12px; right: 14px; display: flex; justify-content: space-between; gap: 10px; font: 500 .72rem/1.3 var(--f-mono); color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 26px; padding: 0; margin: 4px 0 0; list-style: none; }
.facts li { font: 500 .82rem/1.3 var(--f-mono); color: var(--muted); }
.facts b { color: var(--fg); font-weight: 600; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; padding-block: 44px 40px; gap: 32px; } }

/* Page hero (inner pages) */
.page-hero { border-bottom: 1px solid var(--line); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
.page-hero .wrap { padding-block: 40px 48px; display: grid; gap: 18px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; font: 500 .78rem/1.4 var(--f-mono); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--fg); }

/* Sections */
.section { padding-block: 72px; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 760px; }
.alt { background: var(--surface); }

/* Answer box: short, quotable summary for search & AI engines */
.answer { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); border-radius: 8px; padding: 18px 20px; max-width: 820px; }
.answer > strong { display: block; font: 600 .72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

/* Product cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--fg); transition: border-color .15s ease, transform .15s ease; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-art { aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.card-art svg { width: 100%; height: 100%; }
.card-body { padding: 18px 18px 20px; display: grid; gap: 8px; align-content: start; }
.card-body p { color: var(--muted); font-size: .94rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { font: 500 .72rem/1 var(--f-mono); padding: 6px 8px; border-radius: 4px; background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); }

/* Spec table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.spec { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
table.spec caption { text-align: left; padding: 14px 16px; font: 600 .74rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
table.spec th, table.spec td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec thead th { font: 600 .78rem/1.2 var(--f-mono); color: var(--muted); background: var(--surface-2); }
table.spec tbody th { font-weight: 600; white-space: nowrap; }
table.spec td { font-family: var(--f-mono); font-size: .84rem; font-variant-numeric: tabular-nums; }
table.spec tr:last-child > * { border-bottom: 0; }

/* Two column prose */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.prose { display: grid; gap: 16px; max-width: 68ch; }
.prose h2 { margin-top: 18px; }
.prose h3 { margin-top: 8px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* Feature list */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--bg); padding: 24px 22px; display: grid; gap: 8px; align-content: start; }
.alt .feature { background: var(--surface); }
.feature .k { font: 600 1.7rem/1 var(--f-display); font-stretch: 110%; color: var(--accent); }
.feature p { color: var(--muted); font-size: .94rem; }

/* Process steps (a real sequence) */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: s; border-top: 2px solid var(--accent); padding-top: 14px; display: grid; gap: 6px; }
.steps li::before { content: "Step " counter(s); font: 600 .72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.steps p { color: var(--muted); font-size: .94rem; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
@media (max-width: 760px) { .projects { grid-template-columns: 1fr; } }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; }
.project .card-art { aspect-ratio: 21/9; }
.project-body { padding: 18px 20px 20px; display: grid; gap: 8px; }
.project dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 6px 0 0; font-size: .88rem; }
.project dt { font: 500 .74rem/1.6 var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.project dd { margin: 0; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 18px 18px; color: var(--muted); display: grid; gap: 10px; }

/* CTA band */
.cta-band { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 36px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 20px 20px; }
.cta-band > div { display: grid; gap: 10px; min-width: 0; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; padding: 26px 20px; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 14px; align-content: start; }
.contact-card dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; }
.contact-card dt { font: 500 .76rem/1.7 var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.contact-card dd { margin: 0; overflow-wrap: anywhere; }
form.quote { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .86rem; font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; width: 100%; }
.field textarea { min-height: 110px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 0; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-block: 48px 28px; }
.foot h3 { font: 600 .74rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; }
.foot a { color: var(--fg); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot address { font-style: normal; font-size: .9rem; color: var(--muted); display: grid; gap: 6px; }
.legal { border-top: 1px solid var(--line); padding-block: 18px; font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
@media (max-width: 860px) { .foot { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot { grid-template-columns: 1fr; } }

/* ============ Chat assistant ============ */
.chat-launch {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--wa); color: var(--wa-ink); font: 600 .95rem/1 var(--f-body); box-shadow: var(--shadow);
}
.chat-launch svg { width: 22px; height: 22px; }
.chat-launch .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .7; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: .25 } 50% { opacity: .9 } }
.chat-nudge { position: fixed; right: 18px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 60; max-width: 260px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 12px 12px 4px 12px; padding: 12px 34px 12px 14px; font-size: .9rem; box-shadow: var(--shadow); cursor: pointer; }
.chat-nudge button { position: absolute; top: 6px; right: 6px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 4px; }
.chat-panel {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  width: min(390px, calc(100vw - 24px)); height: min(620px, calc(100dvh - 40px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  display: grid; grid-template-rows: auto 1fr auto; overflow: hidden;
}
@media (max-width: 520px) { .chat-panel { right: 12px; left: 12px; width: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); height: min(640px, calc(100dvh - 24px - env(safe-area-inset-top, 0px))); } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 .9rem/1 var(--f-display); position: relative; flex: none; }
.avatar::after { content: ""; position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--wa); border: 2px solid var(--surface-2); }
.chat-head .who { display: grid; gap: 2px; min-width: 0; }
.chat-head .who b { font-size: .95rem; }
.chat-head .who span { font-size: .76rem; color: var(--muted); }
.chat-close { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.chat-close:hover { background: var(--line); color: var(--fg); }
.chat-log { overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: .92rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.msg.bot { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.me { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.typing { display: flex; gap: 4px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: pulse 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .2s } .msg.typing i:nth-child(3) { animation-delay: .4s }
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 100%; }
.quick button { font: 500 .84rem/1.2 var(--f-body); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; }
.quick button:hover { background: var(--accent); color: var(--accent-ink); }
.summary { align-self: stretch; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg); display: grid; gap: 10px; font-size: .86rem; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.summary dt { color: var(--muted); font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.summary dd { margin: 0; overflow-wrap: anywhere; }
.summary .btn { width: 100%; }
.summary .alt-contact { font-size: .78rem; color: var(--muted); }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-input input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; }
.chat-input button { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center; }
.chat-input button svg { width: 18px; height: 18px; }
.chat-foot-note { font-size: .7rem; color: var(--muted); text-align: center; padding: 0 10px 8px; background: var(--surface); }

/* Calculator */
.calc { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; justify-self: start; }
.seg button { font: 600 .84rem/1 var(--f-body); border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.layout-wrap { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.layout-wrap svg { width: 100%; height: auto; }
dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
dl.kv dt { font: 500 .74rem/1.9 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
dl.kv dd { margin: 0; font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: .95rem; }
dl.kv dd.big { font: 700 1.3rem/1.3 var(--f-display); font-stretch: 108%; color: var(--accent); }

/* Video */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.video { margin: 0; display: grid; gap: 10px; }
.video figcaption { display: grid; gap: 2px; font-size: .92rem; }
.yt { position: relative; display: block; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: rgba(0,0,0,.72); }
.yt .play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt:hover .play { background: #e00; }
.videos:has(.vertical) { grid-template-columns: repeat(auto-fit, minmax(220px, 300px)); }
.video.vertical .yt { aspect-ratio: 9/16; }
.video-split { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 48px; align-items: center; }
.video-split .videos { display: block; }
.video-split .video figcaption { display: none; }
@media (max-width: 760px) { .video-split { grid-template-columns: 1fr; gap: 24px; } .video-split .videos { max-width: 320px; } }
.video-split.n2 { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); }
.video-split.n2 .videos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .video-split.n2 { grid-template-columns: 1fr; } .video-split.n2 .videos { max-width: 100%; } }

/* Brand logo: white on dark, brand blue on light */
.brand-logo { display: block; width: 78px; height: auto; flex: none; }
.logo-blue { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .logo-white { display: none; } :root:not([data-theme="dark"]) .logo-blue { display: block; } }
:root[data-theme="light"] .logo-white { display: none; }
:root[data-theme="light"] .logo-blue { display: block; }
:root[data-theme="dark"] .logo-blue { display: none; }
:root[data-theme="dark"] .logo-white { display: block; }
.brand-tag { font: 500 .62rem/1.35 var(--f-mono); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; border-left: 1px solid var(--line); padding-left: 10px; }
@media (max-width: 420px) { .brand-tag { display: none; } }
.site-footer .brand-logo { width: 96px; }

/* Hero photo (replaces the canvas demo until a hero video is available) */
.hero-visual { aspect-ratio: 16 / 10; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual figcaption { left: 0; right: 0; bottom: 0; padding: 28px 14px 10px; color: #e9eef5; background: linear-gradient(transparent, rgba(0,0,0,.65)); flex-wrap: wrap; }

/* Zoomable photos, thumbnails and lightbox */
a.zoom { display: block; width: 100%; height: 100%; cursor: zoom-in; position: relative; }
a.zoom::after { content: "⤢"; position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; font-size: 15px; opacity: .85; }
.thumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.thumbs a { width: 72px; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs span { font-size: .78rem; }
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(4,6,10,.92); display: grid; grid-template-rows: 1fr auto; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.lb img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; border-radius: 6px; align-self: center; }
.lb .cap { color: #dfe6ef; font-size: .9rem; text-align: center; padding-top: 12px; max-width: 70ch; margin: 0 auto; }
.lb button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }
.lb .x { top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; }
.lb .prev { left: 12px; top: 50%; } .lb .next { right: 12px; top: 50%; }
.project { grid-template-columns: minmax(0, 1fr); }
.project .card-art { overflow: hidden; }
.project .card-art > svg, .project .card-art img { width: 100%; height: 100%; object-fit: cover; }
.lb img { max-height: calc(100dvh - 110px); width: auto; }
.projects { align-items: start; }
