/* =========================================================
   HA Engineering & Contracting, Inc. — site styles
   ========================================================= */

:root {
  --brand: #064bff;          /* HA logo blue */
  --brand-bright: #4d7dff;   /* brand on dark surfaces */
  --signal: #ff6b1a;         /* safety orange, used sparingly */

  --ink: #0a0f1f;
  --ink-2: #111934;
  --ink-3: #1a2447;
  --on-ink: #eef0f7;
  --on-ink-muted: #a3aac2;
  --ink-line: rgba(255, 255, 255, .12);

  --paper: #f4f2ed;
  --paper-2: #ebe8e1;
  --card: #ffffff;
  --text: #121626;
  --text-muted: #565d72;
  --line: rgba(18, 22, 38, .12);

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 15, 31, .06), 0 12px 32px -12px rgba(10, 15, 31, .18);

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1280px;
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1326;
    --paper-2: #121a33;
    --card: #151e3a;
    --text: #e9ecf5;
    --text-muted: #9aa2bb;
    --line: rgba(255, 255, 255, .1);
    --brand: #4d7dff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --paper: #0d1326;
  --paper-2: #121a33;
  --card: #151e3a;
  --text: #e9ecf5;
  --text-muted: #9aa2bb;
  --line: rgba(255, 255, 255, .1);
  --brand: #4d7dff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--brand); color: #fff; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

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

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.on-ink .eyebrow, .hero .eyebrow { color: var(--brand-bright); }

h1, h2, h3 { font-family: var(--font-display); font-stretch: 85%; line-height: 1.02; letter-spacing: -.015em; margin: 0; }
h2.section-title { font-size: clamp(36px, 5.4vw, 68px); font-weight: 800; text-transform: uppercase; }
h2.section-title em { font-style: normal; color: var(--brand); }
.on-ink h2.section-title em { color: var(--brand-bright); }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--text-muted); max-width: 60ch; }
.on-ink .lead { color: var(--on-ink-muted); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--brand); --fg: #fff;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--bg); color: var(--fg);
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 15.5px; text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(6, 75, 255, .7); }
.btn svg { width: 18px; height: 18px; }
.btn--ghost { --bg: transparent; --fg: currentColor; border-color: currentColor; }
.btn--ghost:hover { box-shadow: none; background: rgba(255, 255, 255, .08); }
.btn--light { --bg: #fff; --fg: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 14px 0 auto; z-index: 100;
  pointer-events: none;
}
.site-header .bar {
  pointer-events: auto;
  max-width: calc(var(--maxw) - 2 * 0px);
  margin: 0 auto;
  width: calc(100% - 2 * var(--gutter));
  height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 12px 0 22px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 999px;
  box-shadow: 0 10px 40px -16px rgba(10, 15, 31, .45);
  color: #121626;
  transition: transform .35s ease;
}
.site-header.is-hidden .bar { transform: translateY(-130%); }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; font-size: 14.5px; font-weight: 500;
  padding: 8px 14px; border-radius: 999px; transition: background .2s;
}
.nav a:hover, .nav a.is-active { background: rgba(6, 75, 255, .08); color: #064bff; }
.header-cta { display: flex; align-items: center; gap: 8px; }
.header-phone {
  font-family: var(--font-mono); font-size: 13.5px; text-decoration: none;
  padding: 8px 12px; white-space: nowrap;
}
.header-cta .btn { min-height: 46px; background: #064bff; }
.menu-toggle {
  display: none; margin-left: auto;
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: #121626; color: #fff; cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle svg { width: 20px; height: 20px; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 150;
  background: var(--ink); color: var(--on-ink);
  display: flex; flex-direction: column;
  padding: 24px var(--gutter) 32px;
  transform: translateY(-100%); transition: transform .45s cubic-bezier(.7, 0, .2, 1);
  visibility: hidden;
}
.mobile-menu.is-open { transform: none; visibility: visible; }
.mobile-menu .top { display: flex; justify-content: space-between; align-items: center; }
.mobile-menu .top img { height: 36px; }
.mobile-menu nav { margin-top: 48px; display: flex; flex-direction: column; }
.mobile-menu nav a {
  font-family: var(--font-display); font-stretch: 80%; font-weight: 800; text-transform: uppercase;
  font-size: 44px; line-height: 1.15; text-decoration: none;
  border-bottom: 1px solid var(--ink-line); padding: 10px 0;
  display: flex; justify-content: space-between; align-items: baseline;
}
.mobile-menu nav a span { font-family: var(--font-mono); font-size: 13px; color: var(--on-ink-muted); font-weight: 400; }
.mobile-menu .contact-lines { margin-top: auto; font-family: var(--font-mono); font-size: 14px; color: var(--on-ink-muted); display: grid; gap: 6px; }
.mobile-menu .contact-lines a { color: var(--on-ink); text-decoration: none; }
.menu-close { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ink-line); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  background: var(--ink); color: var(--on-ink);
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; isolation: isolate;
}
.hero video, .hero .poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 15, 31, .55) 0%, rgba(10, 15, 31, .25) 35%, rgba(10, 15, 31, .92) 100%),
    linear-gradient(90deg, rgba(10, 15, 31, .85) 0%, rgba(10, 15, 31, 0) 70%);
}
.hero::after { /* blueprint grid */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.hero-inner { padding-top: calc(var(--header-h) + 72px); padding-bottom: 48px; }
.hero h1 {
  font-size: clamp(44px, 6.4vw, 100px);
  font-weight: 900; text-transform: uppercase; font-stretch: 72%;
  line-height: .92; letter-spacing: -.02em;
  max-width: 16ch;
}
.hero h1 .accent { color: var(--brand-bright); }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; transform: translateY(105%); animation: rise .9s cubic-bezier(.2, .7, .1, 1) forwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { to { transform: none; } }

.hero-bottom {
  margin-top: 40px;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: end;
}
.hero-bottom p { margin: 0 0 28px; color: var(--on-ink-muted); font-size: clamp(17px, 1.5vw, 20px); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn--ghost { color: #fff; }

.spec-card {
  justify-self: end;
  width: min(100%, 400px);
  border: 1px solid var(--ink-line);
  background: rgba(17, 25, 52, .55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-family: var(--font-mono); font-size: 13px;
}
.spec-card .row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--ink-line); }
.spec-card .row:last-child { border-bottom: 0; }
.spec-card .k { color: var(--on-ink-muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; }
.spec-card .v { text-align: right; color: #fff; }
.spec-card .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2fdc8a; margin-right: 8px; box-shadow: 0 0 0 4px rgba(47, 220, 138, .18); }

.ticker {
  border-top: 1px solid var(--ink-line);
  overflow: hidden; white-space: nowrap;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--on-ink-muted);
}
.ticker-track { display: inline-flex; gap: 48px; padding: 18px 0; animation: marquee 40s linear infinite; }
.ticker-track span::before { content: "◆"; color: var(--brand-bright); margin-right: 48px; font-size: 9px; vertical-align: 2px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .lead { margin: 0; }
.on-ink { background: var(--ink); color: var(--on-ink); }

/* ---------- Credentials ---------- */
.credentials { padding: 56px 0; border-bottom: 1px solid var(--line); }
.credentials .wrap { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; align-items: center; }
.credentials p { margin: 0; font-size: 15px; color: var(--text-muted); }
.credentials p strong { color: var(--text); display: block; font-family: var(--font-display); font-stretch: 85%; font-size: 21px; line-height: 1.2; margin-bottom: 6px; }
.logo-rail { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logo-track { display: flex; width: max-content; gap: 16px; animation: marquee 36s linear infinite; }
.logo-rail:hover .logo-track { animation-play-state: paused; }
.logo-tile {
  flex: 0 0 auto; width: 180px; height: 92px; border-radius: 14px;
  background: #fff; border: 1px solid rgba(18, 22, 38, .08);
  display: grid; place-items: center; padding: 14px 18px;
}
.logo-tile img { max-height: 60px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .78; transition: filter .3s, opacity .3s; }
.logo-tile:hover img { filter: none; opacity: 1; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-align: left; padding: 0; cursor: pointer;
  transition: transform .35s cubic-bezier(.2, .7, .1, 1), box-shadow .35s, border-color .35s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-card .media { aspect-ratio: 16 / 10; overflow: hidden; position: relative; background: var(--ink); }
.service-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .1, 1), filter .5s; filter: saturate(.85); }
.service-card:hover .media img { transform: scale(1.06); filter: saturate(1.05); }
.service-card .num {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em;
  background: rgba(10, 15, 31, .72); color: #fff; padding: 6px 10px; border-radius: 999px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.service-card .body { padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.service-card h3 { font-size: 26px; font-weight: 800; text-transform: uppercase; font-stretch: 78%; line-height: 1.02; }
.service-card p { margin: 0; color: var(--text-muted); font-size: 15.5px; }
.service-card .more {
  margin-top: auto; padding-top: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand);
}
.service-card .more svg { width: 16px; height: 16px; transition: transform .3s; }
.service-card:hover .more svg { transform: translateX(5px); }

/* ---------- Dialogs ---------- */
dialog.sheet {
  width: min(880px, calc(100% - 24px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 22px;
  background: var(--card); color: var(--text);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .6);
}
dialog.sheet::backdrop { background: rgba(6, 9, 20, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.sheet[open] { animation: sheetIn .45s cubic-bezier(.2, .7, .1, 1); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(30px) scale(.98); } }
.sheet-hero { position: relative; height: 260px; background: var(--ink); }
.sheet-hero img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.sheet-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(10, 15, 31, .9)); }
.sheet-hero h2 {
  position: absolute; left: 32px; right: 80px; bottom: 26px; z-index: 1;
  color: #fff; font-size: clamp(30px, 4.4vw, 48px); font-weight: 900; text-transform: uppercase; font-stretch: 75%;
}
.sheet-hero .num { position: absolute; left: 32px; top: 26px; z-index: 1; font-family: var(--font-mono); color: #fff; font-size: 12px; letter-spacing: .12em; }
.sheet-close {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: #121626; display: grid; place-items: center;
}
.sheet-close svg { width: 18px; height: 18px; }
.sheet-body { padding: 32px 32px 36px; }
.sheet-body h3 { font-size: 22px; font-weight: 800; text-transform: uppercase; font-stretch: 85%; margin: 28px 0 10px; display: flex; gap: 12px; align-items: baseline; }
.sheet-body h3 .n { font-family: var(--font-mono); font-size: 12px; color: var(--brand); font-weight: 500; }
.sheet-body p { color: var(--text-muted); margin: 0 0 14px; }
.sheet-body p strong { color: var(--text); }
.checklist { list-style: none; margin: 14px 0 20px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.checklist li {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px;
}
.checklist li::before {
  content: ""; flex: 0 0 18px; height: 18px; margin-top: 3px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.callout {
  margin-top: 24px; padding: 18px 20px; border-radius: 14px;
  background: var(--ink); color: var(--on-ink); font-size: 15.5px;
  display: flex; gap: 14px; align-items: flex-start;
}
.callout::before { content: "◆"; color: var(--brand-bright); font-size: 12px; margin-top: 4px; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.sheet-actions .btn--ghost { color: var(--text); }

/* ---------- Threshold checker ---------- */
.checker .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.checker .definition { margin-top: 28px; display: grid; gap: 12px; }
.def-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 18px; border: 1px solid var(--ink-line); border-radius: 14px; }
.def-item .tag { font-family: var(--font-mono); font-size: 12px; color: var(--brand-bright); padding-top: 3px; }
.def-item p { margin: 0; color: var(--on-ink-muted); font-size: 15.5px; }
.def-item p strong { color: #fff; font-weight: 600; }
.def-or { font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em; color: var(--on-ink-muted); text-align: center; }
.statute { font-family: var(--font-mono); font-size: 12px; color: var(--on-ink-muted); margin-top: 18px; }

.tool {
  background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 22px; padding: clamp(22px, 3vw, 34px);
  position: relative; overflow: hidden;
}
.tool::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 24px 24px;
}
.tool > * { position: relative; }
.tool-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-ink-muted); }
.tool-head b { color: #fff; font-weight: 500; }
.field { margin-bottom: 22px; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.field label, .field .label { font-size: 15px; font-weight: 500; }
.field output { font-family: var(--font-mono); font-size: 15px; color: #fff; background: var(--ink-3); padding: 4px 10px; border-radius: 8px; min-width: 80px; text-align: right; }
input[type="range"] { width: 100%; accent-color: var(--brand-bright); height: 28px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 12px; background: var(--ink-3); margin-bottom: 18px; }
.switch-row span small { display: block; color: var(--on-ink-muted); font-size: 13px; }
.switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, .18); transition: background .25s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .25s; }
.switch input:checked + i { background: var(--brand-bright); }
.switch input:checked + i::after { transform: translateX(22px); }
.switch input:focus-visible + i { outline: 2px solid var(--brand-bright); outline-offset: 3px; }
.assembly-fields { display: grid; gap: 0; transition: opacity .3s; }
.assembly-fields[aria-disabled="true"] { opacity: .35; pointer-events: none; }

.verdict {
  margin-top: 8px; border-radius: 16px; padding: 20px 22px;
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: center;
  background: rgba(47, 220, 138, .1); border: 1px solid rgba(47, 220, 138, .35);
  transition: background .3s, border-color .3s;
}
.verdict .icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #2fdc8a; color: var(--ink); font-weight: 800; font-family: var(--font-display); font-size: 22px; }
.verdict h4 { margin: 0; font-family: var(--font-display); font-stretch: 85%; font-size: 21px; text-transform: uppercase; }
.verdict p { margin: 4px 0 0; color: var(--on-ink-muted); font-size: 14.5px; }
.verdict.is-yes { background: rgba(255, 107, 26, .12); border-color: rgba(255, 107, 26, .45); }
.verdict.is-yes .icon { background: var(--signal); color: #fff; }
.tool .fine { font-size: 12.5px; color: var(--on-ink-muted); margin: 16px 0 0; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-statement {
  font-family: var(--font-display); font-stretch: 85%; font-weight: 700;
  font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.01em; margin: 0 0 32px;
}
.about-statement em { font-style: normal; color: var(--brand); }
.about-copy p { color: var(--text-muted); margin: 0 0 18px; }
.about-copy p:first-of-type { color: var(--text); }
.signature { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--font-display); font-stretch: 85%; font-weight: 800; font-size: 24px; text-transform: uppercase; }
.signature span { color: var(--brand); }

.collage { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 80px; gap: 14px; }
.collage figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.collage img { width: 100%; height: 100%; object-fit: cover; }
.collage .c1 { grid-column: 1 / 5; grid-row: 1 / 5; }
.collage .c2 { grid-column: 5 / 7; grid-row: 2 / 5; }
.collage .c3 { grid-column: 2 / 7; grid-row: 5 / 8; }
.team-card {
  grid-column: 1 / 4; grid-row: 6 / 9; z-index: 1; align-self: end;
  background: var(--brand); color: #fff; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: -20px;
}
.team-card .k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.team-card h3 { font-size: 26px; text-transform: uppercase; font-weight: 900; font-stretch: 75%; margin: 8px 0 8px; }
.team-card p { margin: 0; font-size: 14px; line-height: 1.5; opacity: .9; }

.stats { margin-top: clamp(64px, 9vw, 120px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: 28px 24px 0 0; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: 24px; }
.stat:last-child { border-right: 0; }
.stat .val { font-family: var(--font-display); font-stretch: 72%; font-weight: 900; font-size: clamp(52px, 7vw, 96px); line-height: 1; letter-spacing: -.03em; }
.stat .val sup { font-size: .45em; color: var(--brand); vertical-align: .9em; margin-left: 2px; }
.stat .lbl { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-top: 10px; }

/* ---------- Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 9px 16px; border-radius: 999px; cursor: pointer; font-size: 14.5px; font-weight: 500;
  display: inline-flex; gap: 8px; align-items: center; min-height: 42px;
  transition: background .2s, color .2s, border-color .2s;
}
.chip .count { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--paper); border-color: var(--text); }
.chip[aria-pressed="true"] .count { color: inherit; opacity: .7; }

.project-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.project {
  display: grid; grid-template-columns: 64px minmax(0, 220px) minmax(0, 1fr) minmax(0, 220px) 92px;
  gap: 20px; align-items: center;
  padding: 20px 4px; border-bottom: 1px solid var(--line);
  transition: background .25s, padding .25s;
}
.project:hover { background: var(--card); padding-left: 16px; padding-right: 16px; }
.project .idx { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.project .cat { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.project .title { font-family: var(--font-display); font-stretch: 88%; font-weight: 700; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.2; }
.project .loc { font-size: 14.5px; color: var(--text-muted); }
.project .thumb { width: 92px; height: 62px; border-radius: 10px; overflow: hidden; background: var(--paper-2); }
.project .thumb img { width: 100%; height: 100%; object-fit: cover; }
.project .thumb.empty { background: repeating-linear-gradient(-45deg, transparent 0 6px, var(--line) 6px 7px); }
.project[hidden] { display: none; }

.field-strip-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: clamp(64px, 8vw, 100px) 0 24px; }
.field-strip-head h3 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; text-transform: uppercase; font-stretch: 80%; }
.strip-nav { display: flex; gap: 8px; }
.strip-nav button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; }
.strip-nav svg { width: 18px; height: 18px; }
.field-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 30%); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
  scrollbar-width: thin;
}
.field-strip button {
  scroll-snap-align: start; border: 0; padding: 0; cursor: zoom-in;
  aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); position: relative;
}
.field-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.field-strip button:hover img { transform: scale(1.05); }
.field-strip figcaption {
  position: absolute; left: 10px; bottom: 10px; right: 10px;
  font-size: 12.5px; text-align: left; color: #fff; background: rgba(10, 15, 31, .7); padding: 6px 10px; border-radius: 8px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

dialog.lightbox { padding: 0; border: 0; background: transparent; width: 100%; height: 100%; max-width: 100%; max-height: 100%; }
dialog.lightbox::backdrop { background: rgba(6, 9, 20, .94); }
dialog.lightbox .lb-inner { width: 100%; height: 100%; display: grid; place-items: center; padding: 64px 16px; }
dialog.lightbox img { max-width: min(1400px, 100%); max-height: calc(100dvh - 128px); object-fit: contain; border-radius: 12px; }
dialog.lightbox .lb-btn { position: fixed; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: grid; place-items: center; }
dialog.lightbox .lb-btn svg { width: 20px; height: 20px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); color: #fff; font-family: var(--font-mono); font-size: 13px; }

/* ---------- Careers ---------- */
.careers { padding: 0 0 clamp(80px, 10vw, 140px); }
.careers-card {
  position: relative; border-radius: 28px; overflow: hidden; isolation: isolate;
  background: var(--ink); color: #fff;
  min-height: 440px; display: flex; align-items: flex-end;
  padding: clamp(28px, 5vw, 64px);
}
.careers-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.careers-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 15, 31, .95) 0%, rgba(10, 15, 31, .7) 45%, rgba(10, 15, 31, .15) 100%); }
.careers-card .content { max-width: 560px; }
.careers-card h2 { font-size: clamp(40px, 6vw, 80px); font-weight: 900; text-transform: uppercase; font-stretch: 72%; }
.careers-card h2 span { color: var(--brand-bright); }
.careers-card p { color: #cfd3e3; font-size: 18px; margin: 18px 0 28px; }

/* ---------- Contact ---------- */
.contact .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 80px); }
.contact-big {
  display: block; text-decoration: none;
  font-family: var(--font-display); font-stretch: 72%; font-weight: 900;
  font-size: clamp(42px, 6vw, 84px); line-height: 1; letter-spacing: -.02em;
  margin: 28px 0 8px; transition: color .2s;
}
.contact-big:hover { color: var(--brand-bright); }
.contact-mail { font-family: var(--font-mono); font-size: 17px; color: var(--on-ink-muted); text-decoration: none; }
.contact-mail:hover { color: #fff; }
.office { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding-top: 28px; border-top: 1px solid var(--ink-line); }
.office .k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-muted); margin-bottom: 8px; }
.office address { font-style: normal; color: #fff; }
.office a { color: var(--brand-bright); text-decoration: none; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; }
.map { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--ink-line); aspect-ratio: 16 / 9; background: var(--ink-2); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.9) invert(.92) contrast(.85) hue-rotate(180deg); }

form.contact-form { background: var(--paper); color: var(--text); border-radius: 24px; padding: clamp(22px, 3.5vw, 40px); }
.contact-form h3 { font-size: 28px; font-weight: 800; text-transform: uppercase; font-stretch: 80%; margin-bottom: 6px; }
.contact-form > p { color: var(--text-muted); margin: 0 0 24px; font-size: 15.5px; }
.topic-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; border: 0; padding: 0; }
.topic-pills legend { font-size: 14px; font-weight: 600; margin-bottom: 10px; padding: 0; }
.topic-pills label { position: relative; }
.topic-pills input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.topic-pills span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; transition: all .2s; }
.topic-pills input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.topic-pills input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.input { display: flex; flex-direction: column; gap: 6px; }
.input label { font-size: 14px; font-weight: 600; }
.input input, .input textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.input textarea { min-height: 140px; resize: vertical; }
.input input:focus, .input textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(6, 75, 255, .15); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.form-foot small { color: var(--text-muted); font-size: 13px; max-width: 34ch; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-size: 15px; display: none; }
.form-status.ok { display: block; background: rgba(47, 220, 138, .15); color: var(--text); border: 1px solid rgba(47, 220, 138, .5); }
.form-status.err { display: block; background: rgba(255, 107, 26, .12); color: var(--text); border: 1px solid rgba(255, 107, 26, .5); }

/* ---------- Footer ---------- */
.site-footer { background: #060a16; color: var(--on-ink-muted); padding: 64px 0 28px; font-size: 14.5px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-bottom: 48px; border-bottom: 1px solid var(--ink-line); }
.footer-top img { height: 44px; width: auto; margin-bottom: 18px; }
.footer-top h4 { font-family: var(--font-mono); font-weight: 500; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin: 0 0 14px; }
.footer-top ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-top a { text-decoration: none; }
.footer-top a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: 13px; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: #fff; }
.footer-word {
  font-family: var(--font-display); font-stretch: 62%; font-weight: 900; text-transform: uppercase;
  font-size: clamp(48px, 12.4vw, 172px); line-height: .8; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .14);
  margin: 40px 0 0; white-space: nowrap; overflow: hidden; user-select: none;
}

/* ---------- Floating call (mobile) ---------- */
.fab-call {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--brand); color: #fff; display: none; place-items: center;
  box-shadow: 0 14px 30px -10px rgba(6, 75, 255, .8);
}
.fab-call svg { width: 24px; height: 24px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2, .7, .1, 1), transform .9s cubic-bezier(.2, .7, .1, 1); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Legal pages ---------- */
.legal-hero { background: var(--ink); color: var(--on-ink); padding: calc(var(--header-h) + 90px) 0 64px; }
.legal-hero h1 { font-size: clamp(42px, 7vw, 92px); font-weight: 900; text-transform: uppercase; font-stretch: 72%; }
.legal-hero p { font-family: var(--font-mono); font-size: 13px; color: var(--on-ink-muted); margin: 16px 0 0; letter-spacing: .08em; }
.legal { padding: 64px 0 120px; }
.legal .wrap { max-width: 820px; }
.legal h2 { font-size: 26px; font-weight: 800; text-transform: uppercase; font-stretch: 85%; margin: 44px 0 14px; }
.legal p, .legal li { color: var(--text-muted); }
.legal strong { color: var(--text); }
.legal a { color: var(--brand); }
.legal ul { padding-left: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav { display: none; }
  .header-phone { display: none; }
  .header-cta { margin-left: auto; }
  .menu-toggle { display: inline-flex; margin-left: 0; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project { grid-template-columns: 48px minmax(0, 1fr) 92px; grid-template-areas: "idx cat thumb" "idx title thumb" "idx loc thumb"; row-gap: 4px; }
  .project .idx { grid-area: idx; align-self: start; padding-top: 2px; }
  .project .cat { grid-area: cat; }
  .project .title { grid-area: title; }
  .project .loc { grid-area: loc; }
  .project .thumb { grid-area: thumb; }
}
@media (max-width: 860px) {
  :root { --header-h: 62px; }
  .site-header { inset: 10px 0 auto; }
  .site-header .bar { padding: 0 8px 0 18px; }
  .brand img { height: 34px; }
  .header-cta .btn { display: none; }
  .hero-bottom, .section-head, .credentials .wrap, .checker .wrap, .about-grid, .contact .wrap { grid-template-columns: minmax(0, 1fr); }
  .spec-card { justify-self: start; }
  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 24px 16px 24px 0; border-bottom: 1px solid var(--line); }
  .stat + .stat { padding-left: 0; }
  .stat:nth-child(even) { padding-left: 16px; border-right: 0; }
  .checklist { grid-template-columns: minmax(0, 1fr); }
  .field-strip { grid-auto-columns: 78%; }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top > :first-child { grid-column: 1 / -1; }
  .fab-call { display: grid; }
  .sheet-hero { height: 200px; }
  .sheet-hero h2 { left: 22px; bottom: 20px; }
  .sheet-hero .num { left: 22px; }
  .sheet-body { padding: 24px 22px 28px; }
  .collage { grid-auto-rows: 56px; gap: 10px; }
  .team-card { grid-column: 1 / 5; margin-bottom: 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .office { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .project { grid-template-columns: 36px minmax(0, 1fr) 72px; gap: 12px; }
  .project .thumb { width: 72px; height: 52px; }
  .team-card { grid-column: 1 / 7; grid-row: auto; margin-top: 4px; }
  .mobile-menu nav a { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hero h1 .line > span { transform: none; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  .spec-card { font-size: 12px; padding: 14px 16px; }
  .spec-card .row { flex-direction: column; gap: 2px; }
  .spec-card .v { text-align: left; }
}
