/* ==========================================================================
   ТОВ ТК «Срібний Док» — site styles
   Strict, square, two themes (light / dark). No rounded corners anywhere.
   ========================================================================== */

:root {
  --bg: #F3F4F6;
  --bg-2: #E5E7EC;
  --surface: #FFFFFF;
  --ink: #0D0B22;
  --ink-2: #2E2C44;
  --muted: #5E6076;
  --line: rgba(13, 11, 34, .16);
  --line-2: rgba(13, 11, 34, .07);
  --brand: #2A188C;
  --brand-hover: #3A27B8;
  --brand-text: #2A188C;
  --on-brand: #FFFFFF;
  --silver: #B9BDC7;
  --steel: #8A90A0;
  --logo-ink: #0D0B22;
  --logo-fill: #2A188C;
  --shadow: 0 30px 60px -30px rgba(13, 11, 34, .35);
  --map-filter: grayscale(1) contrast(1.05);
  color-scheme: light;

  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1360px;
  --gutter: clamp(16px, 4vw, 48px);
  --hdr: 72px;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

:root[data-theme="dark"] {
  --bg: #0A0C12;
  --bg-2: #11141C;
  --surface: #151923;
  --ink: #ECEDF2;
  --ink-2: #C8CAD6;
  --muted: #8C8FA4;
  --line: rgba(236, 237, 242, .16);
  --line-2: rgba(236, 237, 242, .06);
  --brand: #3F2CD0;
  --brand-hover: #5442E6;
  --brand-text: #A398FF;
  --on-brand: #FFFFFF;
  --silver: #6E7282;
  --steel: #5A6072;
  --logo-ink: #ECEDF2;
  --logo-fill: #4632DA;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
  --map-filter: grayscale(1) invert(.92) contrast(.9);
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--brand); color: var(--on-brand); }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* ---------- column guides (blueprint feel) ---------- */
.guides {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  display: flex; justify-content: center;
}
.guides .wrap {
  height: 100%;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.guides span { border-left: 1px solid var(--line-2); }
.guides span:last-child { border-right: 1px solid var(--line-2); }
@media (max-width: 720px) { .guides .wrap { grid-template-columns: repeat(2, 1fr); } .guides span:nth-child(n+3) { display: none; } .guides span:nth-child(2) { border-right: 1px solid var(--line-2); } }

main, footer, header { position: relative; z-index: 1; }

/* ---------- typography helpers ---------- */
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); }
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--brand); flex: none; }
.h-xl { font-size: clamp(40px, 6.6vw, 128px); line-height: .92; letter-spacing: -.045em; }
.h-l { font-size: clamp(34px, 5.4vw, 84px); line-height: .98; letter-spacing: -.035em; }
.h-m { font-size: clamp(26px, 3vw, 44px); }
.h-s { font-size: clamp(18px, 1.6vw, 22px); letter-spacing: -.01em; line-height: 1.2; }
.lead { font-size: clamp(17px, 1.45vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }
.accent { color: var(--brand-text); }
.hyph { hyphens: manual; overflow-wrap: break-word; }
.hero h1.h-xl { hyphens: none; }

/* ---------- buttons ---------- */
.btn {
  --bc: var(--ink);
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  height: 56px; padding: 0 26px;
  border: 1px solid var(--bc);
  font: 600 14px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease), border-color .45s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--brand);
  transform: scaleX(0); transform-origin: right;
  transition: transform .55s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); transform-origin: left; }
.btn:hover, .btn:focus-visible { color: var(--on-brand); border-color: var(--brand); }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { color: var(--on-brand); }
.btn .sq { width: 8px; height: 8px; background: currentColor; transition: transform .45s var(--ease); }
.btn:hover .sq { transform: rotate(90deg) scale(1.3); }
.btn .arr { transition: transform .45s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- header ---------- */
.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--hdr);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  transition: transform .5s var(--ease), background-color .4s;
}
.hdr.is-hidden { transform: translateY(-100%); }
.hdr .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand .logo { width: 38px; height: 38px; }
.brand b { display: block; font: 700 15px/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; }
.brand small { display: block; margin-top: 4px; font: 500 10px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  position: relative; padding: 10px 14px;
  font: 500 13px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-2);
}
.nav a i { font-style: normal; color: var(--muted); margin-right: 6px; font-size: 10px; }
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--brand-text); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current="page"] { color: var(--ink); }
.tools { display: flex; align-items: center; gap: 8px; }
.nav + .tools { margin-left: 8px; }

.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line); transition: border-color .3s, background-color .3s;
}
.icon-btn:hover { border-color: var(--ink); }

/* theme toggle: the logo square, split */
.theme-ico { position: relative; width: 18px; height: 18px; border: 1.5px solid var(--ink); overflow: hidden; transition: transform .7s var(--ease); }
.theme-ico::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 50%; background: var(--brand); transition: width .6s var(--ease); }
:root[data-theme="dark"] .theme-ico { transform: rotate(180deg); }
.icon-btn:hover .theme-ico::after { width: 100%; }

/* language switcher */
.lang { position: relative; }
.lang-btn { width: auto; padding: 0 12px; gap: 8px; display: flex; font: 600 12px/1 var(--f-mono); letter-spacing: .1em; }
.lang-btn svg { transition: transform .3s var(--ease); }
.lang.is-open .lang-btn svg { transform: rotate(180deg); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  clip-path: inset(0 0 100% 0); transition: clip-path .45s var(--ease); visibility: hidden;
}
.lang.is-open .lang-list { clip-path: inset(0 0 0 0); visibility: visible; }
.lang-list button {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px; border-bottom: 1px solid var(--line-2);
  font: 500 14px/1 var(--f-body); text-align: left;
  transition: background-color .25s, color .25s;
}
.lang-list button:last-child { border-bottom: 0; }
.lang-list button span { font: 600 11px/1 var(--f-mono); color: var(--muted); letter-spacing: .1em; }
.lang-list button:hover { background: var(--bg-2); }
.lang-list button[aria-current="true"] { background: var(--brand); color: var(--on-brand); }
.lang-list button[aria-current="true"] span { color: var(--on-brand); }

.burger { display: none; }
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); transition: transform .4s var(--ease); }
.burger span + span { margin-top: 5px; }
.menu-open .burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* mobile menu */
.mmenu {
  position: fixed; inset: var(--hdr) 0 0 0; z-index: 49;
  background: var(--bg); display: flex; flex-direction: column;
  padding: 24px var(--gutter) 32px;
  clip-path: inset(0 0 100% 0); transition: clip-path .6s var(--ease); visibility: hidden;
}
.menu-open .mmenu { clip-path: inset(0); visibility: visible; }
.mmenu a {
  display: flex; align-items: baseline; gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font: 600 clamp(28px, 8vw, 44px)/1.1 var(--f-display); letter-spacing: -.03em;
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out);
}
.mmenu a i { font: 500 12px/1 var(--f-mono); font-style: normal; color: var(--muted); }
.menu-open .mmenu a { opacity: 1; transform: none; }
.mmenu .mmenu-foot { margin-top: auto; display: grid; gap: 6px; color: var(--muted); }

@media (max-width: 1100px) {
  .nav { display: none; }
  .burger { display: grid; }
  .tools { margin-left: auto; }
}
@media (max-width: 420px) { .brand small { display: none; } }

/* ---------- page transition: grid of squares ---------- */
.pt {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  display: grid; grid-template-columns: repeat(var(--cols, 10), 1fr); grid-auto-rows: 1fr;
}
.pt i { background: var(--brand); transform: scale(0); transition: transform .42s var(--ease); transition-delay: var(--d, 0s); }
.pt i:nth-child(odd) { background: var(--ink); }
.pt.is-on { pointer-events: all; }
.pt.is-on i { transform: scale(1.02); }
.pt.no-anim i { transition: none; }

/* ---------- preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 300; background: var(--bg);
  display: grid; place-items: center;
  transition: clip-path .9s var(--ease);
  clip-path: inset(0 0 0 0);
}
.preloader.is-done { clip-path: inset(0 0 100% 0); }
.preloader .pl-inner { display: grid; justify-items: center; gap: 28px; }
.preloader svg { width: 140px; height: 140px; overflow: visible; }
.preloader .pl-frame, .preloader .pl-stair { fill: none; stroke: var(--logo-ink); stroke-width: 1.6; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.1s var(--ease) forwards; }
.preloader .pl-stair { stroke-dasharray: 160; stroke-dashoffset: 160; animation-delay: .5s; }
.preloader .pl-fill { fill: var(--logo-fill); clip-path: inset(0 0 0 100%); animation: wipe .8s var(--ease) .35s forwards; }
.preloader .pl-text { overflow: hidden; }
.preloader .pl-text span { display: block; font: 700 18px/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase; transform: translateY(110%); animation: up .7s var(--ease-out) .9s forwards; }
.preloader .pl-bar { width: 140px; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.preloader .pl-bar::after { content: ""; position: absolute; inset: 0; background: var(--brand-text); transform: scaleX(0); transform-origin: left; animation: bar 1.5s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes up { to { transform: none; } }
@keyframes bar { to { transform: scaleX(1); } }

/* ---------- scroll progress (stepped) ---------- */
.progress { position: fixed; left: 0; top: var(--hdr); height: 3px; width: 100%; z-index: 51; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; background: var(--brand-text); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ---------- cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border: 1.5px solid var(--brand-text);
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background-color .3s, opacity .3s;
  mix-blend-mode: normal;
}
.cursor.is-hover { width: 44px; height: 44px; margin: -22px 0 0 -22px; background: color-mix(in srgb, var(--brand) 18%, transparent); }
.cursor.is-hidden { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section--tight { padding: clamp(56px, 8vw, 100px) 0; }
.section-head {
  display: grid; grid-template-columns: 1fr 2fr; gap: 24px 48px; align-items: end;
  margin-bottom: clamp(40px, 6vw, 80px);
  padding-top: 20px; border-top: 1px solid var(--line);
}
.section-head .idx { align-self: start; display: flex; gap: 16px; }
.section-head .idx b { color: var(--brand-text); font-weight: 600; }
.section-head .h-l { grid-column: 2; }
.section-head .lead { grid-column: 2; }
@media (max-width: 820px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head .h-l, .section-head .lead { grid-column: 1; }
}

/* page hero (inner pages) */
.page-hero { padding: calc(var(--hdr) + clamp(56px, 9vw, 120px)) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero .crumbs { display: flex; gap: 10px; margin-bottom: 32px; color: var(--muted); }
.page-hero .crumbs a:hover { color: var(--ink); }
.page-hero h1 { max-width: 14ch; }
.page-hero .lead { margin-top: 28px; }
.page-hero .ph-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; }
.page-hero .ph-sq { justify-self: end; width: min(260px, 40vw); aspect-ratio: 1; }
@media (max-width: 820px) { .page-hero .ph-grid { grid-template-columns: 1fr; } .page-hero .ph-sq { display: none; } }

/* ---------- reveal animations ---------- */
.rv { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--rd, 0s); }
.rv.is-in { opacity: 1; transform: none; }
.rv-line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.rv-line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease-out); transition-delay: var(--rd, 0s); }
.is-in .rv-line > span, .rv-line.is-in > span { transform: none; }
.rv-wipe { clip-path: inset(0 100% 0 0); transition: clip-path 1.2s var(--ease); transition-delay: var(--rd, 0s); }
.rv-wipe.is-in { clip-path: inset(0 0 0 0); }

/* mosaic reveal: image covered by squares that fall away in a staircase */
.mosaic { position: relative; overflow: hidden; background: var(--bg-2); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 1.8s var(--ease-out); }
.mosaic.is-in img { transform: scale(1); }
.mosaic .tiles { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--mc, 6), 1fr); grid-auto-rows: 1fr; pointer-events: none; }
.mosaic .tiles i { background: var(--bg); transition: transform .6s var(--ease); transition-delay: var(--d, 0s); transform-origin: var(--o, bottom left); }
.mosaic.is-in .tiles i { transform: scale(0); }

/* ---------- HOME: hero ---------- */
.hero {
  min-height: 100svh; padding-top: var(--hdr);
  display: grid; grid-template-rows: 1fr auto;
  position: relative; overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero .wrap.hero-main { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 4vw, 72px); align-items: center; padding-top: clamp(32px, 5vw, 64px); padding-bottom: 40px; }
.hero h1 { margin: 28px 0 32px; }
.hero h1 .rv-line:nth-child(2) > span { color: var(--brand-text); }
.hero h1 .rv-line:nth-child(3) > span { -webkit-text-stroke: 1.5px var(--ink); color: transparent; }
.hero .lead { margin-bottom: 40px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { border-top: 1px solid var(--line); }
.hero-meta .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.hero-meta .cell { padding: 18px 0; border-right: 1px solid var(--line); padding-right: 16px; display: grid; gap: 6px; }
.hero-meta .cell + .cell { padding-left: 16px; }
.hero-meta .cell:last-child { border-right: 0; }
.hero-meta b { font: 600 13px/1.2 var(--f-mono); letter-spacing: .04em; }
.hero-meta .scroll-ind { display: flex; align-items: center; gap: 10px; }
.hero-meta .scroll-ind i { width: 10px; height: 10px; background: var(--brand-text); animation: hop 1.6s var(--ease) infinite; }
@keyframes hop { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(4px) rotate(90deg); } }
@media (max-width: 900px) {
  .hero .wrap.hero-main { grid-template-columns: 1fr; }
  .hero-meta .wrap { grid-template-columns: 1fr 1fr; }
  .hero-meta .cell:nth-child(2) { border-right: 0; }
  .hero-meta .cell:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line); }
  .hero-meta .cell:nth-child(4) { border-top: 1px solid var(--line); }
}

/* pixel logo: the logo built from squares */
.pixlogo-wrap { position: relative; width: 100%; max-width: 560px; justify-self: end; }
.pixlogo-wrap .tag { position: absolute; font: 500 10px/1 var(--f-mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.pixlogo-wrap .tag.t1 { top: -22px; left: 0; }
.pixlogo-wrap .tag.t2 { bottom: -22px; right: 0; }
.pixlogo-wrap .tag.t3 { top: 50%; right: -14px; transform: rotate(90deg) translate(-50%, -100%); transform-origin: right top; }
.pixlogo {
  --n: 20;
  display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px;
  aspect-ratio: 1; width: 100%; cursor: crosshair; user-select: none;
}
.pixlogo i {
  position: relative; display: block;
  transform: scale(var(--s, 1)) translate(var(--tx, 0px), var(--ty, 0px));
  transition: transform .5s var(--ease-out), background-color .4s, opacity .4s;
  opacity: 0;
}
.pixlogo.is-built i { opacity: 1; }
.pixlogo i.e { background: transparent; outline: 1px solid var(--line-2); outline-offset: -1px; }
.pixlogo i.f { background: var(--logo-fill); }
.pixlogo i.l { background: var(--logo-ink); }
.pixlogo i.b { background: var(--logo-ink); }
.pixlogo i.hot { background: var(--brand-hover); }
.pixlogo i.e.hot { background: color-mix(in srgb, var(--brand) 22%, transparent); }
@media (max-width: 900px) { .pixlogo-wrap { justify-self: center; max-width: 440px; margin-top: 24px; } .pixlogo-wrap .tag.t3 { display: none; } }

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; background: var(--ink); color: var(--bg); }
.marquee-track { display: flex; width: max-content; animation: marq 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display: inline-flex; align-items: center; gap: 32px; padding: 22px 16px; font: 600 clamp(18px, 2vw, 28px)/1 var(--f-display); letter-spacing: -.01em; white-space: nowrap; text-transform: uppercase; }
.marquee-track span::after { content: ""; width: 14px; height: 14px; background: var(--brand-hover); margin-left: 16px; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- about split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.split .mosaic { aspect-ratio: 4 / 5; }
.split .txt { display: grid; gap: 24px; }
.split .txt p { color: var(--ink-2); }
.facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); margin-top: 16px; }
.facts li { padding: 20px 16px 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.facts li:nth-child(odd) { border-right: 1px solid var(--line); }
.facts li:nth-child(even) { padding-left: 16px; }
.facts b { font: 600 clamp(18px, 1.7vw, 24px)/1.15 var(--f-display); letter-spacing: -.02em; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split .mosaic { aspect-ratio: 4 / 3; } }

/* ---------- service tiles ---------- */
.tiles-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tile {
  position: relative; aspect-ratio: 1; padding: clamp(18px, 2vw, 28px);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; isolation: isolate;
  transition: color .5s var(--ease);
}
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--brand);
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  transition: clip-path .7s var(--ease);
}
.tile:hover { color: var(--on-brand); }
.tile:hover::before { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.tile .num { font: 500 12px/1 var(--f-mono); letter-spacing: .1em; opacity: .7; display: flex; justify-content: space-between; }
.tile h3 { font-size: clamp(17px, 1.5vw, 22px); line-height: 1.15; letter-spacing: -.015em; hyphens: manual; overflow-wrap: break-word; }
.tile p { font-size: 14px; line-height: 1.5; opacity: .75; margin-top: 10px; max-height: 0; overflow: hidden; transition: max-height .6s var(--ease), opacity .4s; }
.tile:hover p { max-height: 8em; }
.tile svg.ico { width: 56px; height: 56px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.tile svg.ico .anim { stroke-dasharray: 200; stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease); }
.tile:hover svg.ico .anim { animation: redraw 1.2s var(--ease); }
@keyframes redraw { from { stroke-dashoffset: 200; } to { stroke-dashoffset: 0; } }
@media (max-width: 1100px) { .tiles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tiles-grid { grid-template-columns: 1fr; } .tile { aspect-ratio: auto; min-height: 220px; gap: 24px; } .tile p { max-height: none; } }

/* ---------- process staircase ---------- */
.stairs { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; gap: 0; min-height: 520px; }
.step {
  position: relative; border: 1px solid var(--line); border-right: 0;
  padding: 22px 18px; background: var(--surface);
  height: calc(var(--h) * 1%);
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 1s var(--ease); transition-delay: var(--rd, 0s);
}
.step:last-child { border-right: 1px solid var(--line); background: var(--brand); color: var(--on-brand); }
.stairs.is-in .step { transform: none; }
.step .no { font: 700 clamp(40px, 4.4vw, 64px)/1 var(--f-display); letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1px var(--ink); }
.step:last-child .no { -webkit-text-stroke-color: var(--on-brand); }
.step h3 { font-size: clamp(16px, 1.35vw, 20px); line-height: 1.15; margin-bottom: 8px; hyphens: manual; overflow-wrap: break-word; }
.step p { font-size: 14px; line-height: 1.5; opacity: .78; }
.step > * { opacity: 0; transition: opacity .6s; transition-delay: calc(var(--rd, 0s) + .6s); }
.stairs.is-in .step > * { opacity: 1; }
@media (max-width: 900px) {
  .stairs { grid-template-columns: 1fr; min-height: 0; }
  .step { height: auto; border-right: 1px solid var(--line); border-bottom: 0; margin-left: calc((var(--i) * 6%)); transform: scaleX(0); transform-origin: left; }
  .step:last-child { border-bottom: 1px solid var(--line); }
}

/* ---------- horizontal projects showcase ---------- */
.hscroll { position: relative; }
.hscroll-sticky { position: sticky; top: var(--hdr); height: calc(100svh - var(--hdr)); overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hscroll-track { display: flex; gap: 24px; padding: 0 var(--gutter); will-change: transform; }
.hcard { flex: none; width: min(70vw, 820px); display: grid; gap: 16px; }
.hcard .ph { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.hcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter .6s; filter: grayscale(.35); }
.hcard:hover .ph img { transform: scale(1.05); filter: none; }
.hcard .ph .num { position: absolute; left: 0; top: 0; padding: 10px 14px; background: var(--bg); font: 600 12px/1 var(--f-mono); letter-spacing: .1em; }
.hcard .meta { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.hcard h3 { font-size: clamp(18px, 1.8vw, 26px); line-height: 1.15; max-width: 30ch; }
.hcard .place { color: var(--muted); white-space: nowrap; }
.hcard.end { width: min(46vw, 480px); display: grid; place-content: center; aspect-ratio: auto; border: 1px solid var(--line); padding: 40px; gap: 24px; align-self: stretch; }
.hscroll-bar { margin: 32px var(--gutter) 0; height: 2px; background: var(--line); position: relative; }
.hscroll-bar i { position: absolute; inset: 0; background: var(--brand-text); transform-origin: left; transform: scaleX(var(--p, 0)); }
@media (max-width: 900px) {
  .hscroll { height: auto !important; }
  .hscroll-sticky { position: static; height: auto; }
  .hscroll-track { overflow-x: auto; scroll-snap-type: x mandatory; transform: none !important; padding-bottom: 12px; }
  .hcard { width: 84vw; scroll-snap-align: start; }
  .hcard.end { width: 84vw; }
  .hcard .meta { flex-direction: column; gap: 8px; }
  .hscroll-bar { display: none; }
}

/* ---------- CTA block ---------- */
.cta-block { position: relative; background: var(--brand); color: var(--on-brand); overflow: hidden; }
.cta-block .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(64px, 9vw, 120px); }
.cta-block .eyebrow { color: rgba(255,255,255,.7); }
.cta-block .eyebrow::before { background: #fff; }
.cta-block h2 { margin-top: 20px; }
.cta-block .btn { --bc: #fff; color: #fff; }
.cta-block .btn::before { background: #fff; }
.cta-block .btn:hover { color: var(--brand); border-color: #fff; }
.cta-block .contacts-mini { display: grid; gap: 4px; }
.cta-block .contacts-mini a { font: 600 clamp(18px, 2vw, 26px)/1.3 var(--f-display); letter-spacing: -.02em; }
.cta-block .contacts-mini a:hover { text-decoration: underline; text-underline-offset: 6px; }
.cta-sq { position: absolute; inset: 0; pointer-events: none; display: grid; grid-template-columns: repeat(12, 1fr); opacity: .16; }
.cta-sq i { border-right: 1px solid #fff; }
.cta-steps { position: absolute; right: 0; bottom: 0; width: min(46vw, 520px); aspect-ratio: 1; pointer-events: none; opacity: .14; }
@media (max-width: 820px) { .cta-block .wrap { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.ftr { border-top: 1px solid var(--line); padding: 64px 0 28px; background: var(--bg); }
.ftr-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.ftr h4 { font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.ftr li + li { margin-top: 8px; }
.ftr a:hover { color: var(--brand-text); }
.ftr .big-name { margin-top: 64px; font: 700 min(8.4vw, 124px)/.85 var(--f-display); letter-spacing: -.06em; text-transform: uppercase; white-space: nowrap; color: transparent; -webkit-text-stroke: 1px var(--line); user-select: none; overflow: hidden; }
.ftr .big-name span { display: inline-block; transition: color .5s, -webkit-text-stroke-color .5s; }
.ftr .big-name span:hover { color: var(--brand); -webkit-text-stroke-color: var(--brand); }
.ftr-bot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; margin-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }
.to-top { display: inline-flex; gap: 8px; align-items: center; }
@media (max-width: 900px) { .ftr-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ftr-top { grid-template-columns: 1fr; } }

/* ---------- SERVICES page ---------- */
.svc-layout { display: grid; grid-template-columns: 280px 1fr; gap: clamp(32px, 5vw, 80px); }
.svc-index { position: sticky; top: calc(var(--hdr) + 32px); align-self: start; display: grid; }
.svc-index a { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); transition: color .3s, padding .4s var(--ease); }
.svc-index a i { font: 500 11px/1.6 var(--f-mono); font-style: normal; }
.svc-index a.is-active { color: var(--ink); padding-left: 12px; box-shadow: inset 3px 0 0 var(--brand-text); }
.svc { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px; padding: 48px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--hdr) + 24px); }
.svc:first-child { border-top: 0; padding-top: 0; }
.svc .svc-h { grid-column: 1 / -1; display: flex; gap: 24px; align-items: baseline; }
.svc .svc-h .no { font: 700 clamp(48px, 6vw, 96px)/.8 var(--f-display); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px var(--ink); flex: none; }
.svc .svc-h h2 { font-size: clamp(24px, 3vw, 42px); hyphens: manual; overflow-wrap: break-word; }
.svc .desc { color: var(--ink-2); }
.svc .incl { display: grid; gap: 0; border-top: 1px solid var(--line); align-self: start; }
.svc .incl li { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.svc .incl li::before { content: ""; width: 7px; height: 7px; background: var(--brand-text); flex: none; transform: translateY(-2px); }
.svc .svc-media { grid-column: 1 / -1; display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.svc .svc-media .mosaic { aspect-ratio: 16 / 9; }
.svc .svc-media .mosaic:nth-child(2) { aspect-ratio: auto; }
.svc .svc-media.single { grid-template-columns: 1fr; }
@media (max-width: 1000px) { .svc-layout { grid-template-columns: 1fr; } .svc-index { display: none; } }
@media (max-width: 720px) { .svc { grid-template-columns: 1fr; } .svc .svc-media { grid-template-columns: 1fr; } .svc .svc-media .mosaic:nth-child(2) { aspect-ratio: 16/9; } }

/* ---------- PROJECTS page ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filters button { position: relative; height: 44px; padding: 0 18px; border: 1px solid var(--line); font: 500 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; transition: border-color .3s, background-color .35s, color .35s; }
.filters button sup { font-size: 9px; margin-left: 4px; color: var(--muted); }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filters button[aria-pressed="true"] sup { color: inherit; opacity: .6; }
.pgrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.pcard { grid-column: span 6; display: grid; gap: 14px; text-align: left; cursor: pointer; transition: opacity .5s var(--ease), transform .6s var(--ease); }
.pcard:nth-child(3n+1) { grid-column: span 7; }
.pcard:nth-child(3n+2) { grid-column: span 5; }
.pcard:nth-child(3n) { grid-column: span 12; }
.pcard:nth-child(3n) .ph { aspect-ratio: 21 / 9; }
.pcard.is-hidden { display: none; }
.pcard .ph { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter .6s; filter: grayscale(.3); }
.pcard:hover .ph img { transform: scale(1.05); filter: none; }
.pcard .ph .badge { position: absolute; left: 0; top: 0; display: flex; }
.pcard .ph .badge span { padding: 8px 12px; background: var(--bg); font: 600 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.pcard .ph .badge span + span { background: var(--brand); color: var(--on-brand); }
.pcard .ph .open { position: absolute; right: 0; bottom: 0; width: 56px; height: 56px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); transform: translate(100%, 100%); transition: transform .5s var(--ease); }
.pcard:hover .ph .open { transform: none; }
.pcard h3 { font-size: clamp(18px, 1.7vw, 24px); line-height: 1.2; letter-spacing: -.015em; }
.pcard .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); }
@media (max-width: 820px) { .pcard, .pcard:nth-child(n) { grid-column: span 12; } .pcard:nth-child(3n) .ph { aspect-ratio: 4/3; } }

/* placeholder art for projects without photos */
.ph-art { position: absolute; inset: 0; display: grid; place-items: center; background:
  linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 32px 32px,
  linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 32px 32px, var(--bg-2); }
.ph-art svg { width: 30%; max-width: 180px; opacity: .9; }
.ph-art span { position: absolute; bottom: 14px; right: 14px; color: var(--muted); }

/* project modal */
.pmodal { position: fixed; inset: 0; z-index: 120; display: grid; visibility: hidden; }
.pmodal.is-open { visibility: visible; }
.pmodal .scrim { position: absolute; inset: 0; background: rgba(5, 5, 12, .6); opacity: 0; transition: opacity .5s; }
.pmodal.is-open .scrim { opacity: 1; }
.pmodal .sheet {
  position: relative; margin-left: auto; width: min(980px, 100%); height: 100%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .7s var(--ease);
}
.pmodal.is-open .sheet { transform: none; }
.pmodal .sheet-top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter); background: var(--bg); border-bottom: 1px solid var(--line); }
.pmodal .sheet-body { padding: 32px var(--gutter) 64px; display: grid; gap: 32px; }
.pmodal h2 { font-size: clamp(26px, 3.4vw, 48px); line-height: 1.04; }
.pmodal .old-name { color: var(--muted); font-size: 14px; margin-top: 12px; }
.pmodal .specs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.pmodal .specs div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.pmodal .specs div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.pmodal .specs b { font-weight: 600; }
.pmodal .gal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pmodal .gal button { position: relative; overflow: hidden; aspect-ratio: 1; grid-column: span 2; background: var(--bg-2); }
.pmodal .gal button:first-child { grid-column: span 6; aspect-ratio: 16 / 9; }
.pmodal .gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.pmodal .gal button:hover img { transform: scale(1.06); }
.pmodal .works li { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.pmodal .works li::before { content: ""; width: 7px; height: 7px; background: var(--brand-text); flex: none; transform: translateY(-2px); }
.pmodal .credit { font-size: 12px; color: var(--muted); }
.pmodal .credit a { text-decoration: underline; }
@media (max-width: 620px) { .pmodal .specs { grid-template-columns: 1fr; } .pmodal .specs div + div { padding-left: 0; border-left: 0; } .pmodal .gal button { grid-column: span 3; } }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 150; background: rgba(5, 5, 12, .96); color: #fff; display: grid; grid-template-rows: auto 1fr auto; visibility: hidden; opacity: 0; transition: opacity .35s, visibility 0s .35s; }
.lb.is-open { visibility: visible; opacity: 1; transition: opacity .35s; }
.lb-top, .lb-bot { display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter); gap: 16px; }
.lb-stage { position: relative; display: grid; place-items: center; overflow: hidden; padding: 0 var(--gutter); }
.lb-stage img { max-width: 100%; max-height: calc(100svh - 150px); object-fit: contain; clip-path: inset(0); transition: clip-path .6s var(--ease); }
.lb-stage img.is-swap { clip-path: inset(0 0 0 100%); transition: none; }
.lb .icon-btn { border-color: rgba(255,255,255,.3); color: #fff; }
.lb .icon-btn:hover { border-color: #fff; }
.lb-cap { font-size: 14px; opacity: .8; }

/* ---------- TEAM page ---------- */
.director { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.photo-slot {
  position: relative; aspect-ratio: 4 / 5; background: var(--bg-2);
  display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line);
}
.photo-slot::before, .photo-slot::after { content: ""; position: absolute; background: var(--line); }
.photo-slot::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.photo-slot::after { top: 50%; left: 0; right: 0; height: 1px; }
.photo-slot .corner { position: absolute; width: 22px; height: 22px; border: 2px solid var(--ink); }
.photo-slot .corner.c1 { left: 14px; top: 14px; border-right: 0; border-bottom: 0; }
.photo-slot .corner.c2 { right: 14px; top: 14px; border-left: 0; border-bottom: 0; }
.photo-slot .corner.c3 { left: 14px; bottom: 14px; border-right: 0; border-top: 0; }
.photo-slot .corner.c4 { right: 14px; bottom: 14px; border-left: 0; border-top: 0; }
.photo-slot .label { position: relative; z-index: 1; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.photo-slot .scan { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--brand) 14%, transparent), transparent); animation: scan 4s var(--ease) infinite; }
@keyframes scan { 0% { top: -30%; } 100% { top: 100%; } }
.director .role { color: var(--brand-text); }
.director h2 { margin: 16px 0 24px; }
.director blockquote { margin: 0; padding: 24px 0 0 24px; border-left: 3px solid var(--brand-text); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--ink-2); }
.director .contacts-line { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 820px) { .director { grid-template-columns: 1fr; } .director .photo-slot { max-width: 420px; } }

.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 16px; }
.person { display: grid; gap: 14px; }
.person .photo-slot { aspect-ratio: 1; }
.person .photo-slot .label { font-size: 10px; }
.person h3 { font-size: 17px; letter-spacing: -.01em; }
.person p { font-size: 14px; color: var(--muted); }
@media (max-width: 1000px) { .people { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .people { grid-template-columns: repeat(2, 1fr); } }

.values { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.value { padding: 32px 28px 32px 0; border-bottom: 1px solid var(--line); display: grid; gap: 14px; align-content: start; }
.value + .value { padding-left: 28px; border-left: 1px solid var(--line); }
.value .vsq { width: 44px; height: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.value .vsq i { background: var(--line); transition: background-color .4s, transform .5s var(--ease); }
.value:hover .vsq i { background: var(--brand-text); }
.value:hover .vsq i:nth-child(1) { transform: translate(-4px, -4px); }
.value:hover .vsq i:nth-child(2) { transform: translate(4px, -4px); }
.value:hover .vsq i:nth-child(3) { transform: translate(-4px, 4px); }
.value:hover .vsq i:nth-child(4) { transform: translate(4px, 4px); }
.value p { color: var(--ink-2); }
@media (max-width: 820px) { .values { grid-template-columns: 1fr; } .value + .value { padding-left: 0; border-left: 0; } }

.crews { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.crew { padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 40px; transition: background-color .4s; }
.crew:hover { background: var(--surface); }
.crew .mono { color: var(--muted); }
.crew h3 { font-size: 18px; line-height: 1.2; hyphens: manual; }

.join { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: end; padding: clamp(32px, 5vw, 64px); border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; }
.join::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; background: var(--brand); transform: rotate(45deg); opacity: .9; transition: transform 1s var(--ease); }
.join:hover::after { transform: rotate(135deg); }
.join > * { position: relative; z-index: 1; }
@media (max-width: 820px) { .join { grid-template-columns: 1fr; } }

/* ---------- CONTACTS page ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.bizcard-wrap { perspective: 1200px; }
.bizcard {
  position: relative; aspect-ratio: 1.75; background: #FFFFFF; color: #0D0B22;
  border: 1px solid rgba(13,11,34,.18); box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 36px);
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center; text-align: center;
  transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .2s ease-out;
}
.bizcard img, .bizcard svg.logo { width: clamp(44px, 7vw, 72px); height: auto; aspect-ratio: 1; transform: translateZ(40px); }
.bizcard .bc-name { transform: translateZ(30px); align-self: center; font: 700 clamp(14px, 1.7vw, 20px)/1.2 var(--f-display); letter-spacing: .02em; }
.bizcard .bc-rule { width: 100%; height: 1px; background: #0D0B22; margin: 8px 0; }
.bizcard .bc-info { transform: translateZ(20px); font-size: clamp(11px, 1.15vw, 14px); line-height: 1.5; }
.bizcard .bc-info b { font-weight: 700; }
.bizcard::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.55), transparent 50%); mix-blend-mode: overlay; }
.bizcard-hint { margin-top: 14px; color: var(--muted); text-align: center; }

.clist { display: grid; border-top: 1px solid var(--line); }
.citem { display: grid; grid-template-columns: 140px 1fr auto; gap: 16px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.citem .k { color: var(--muted); }
.citem .v { font: 600 clamp(15px, 1.3vw, 18px)/1.4 var(--f-display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.citem .v a:hover { color: var(--brand-text); }
.copy-btn { height: 36px; padding: 0 12px; border: 1px solid var(--line); font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; transition: border-color .3s, background-color .3s, color .3s; white-space: nowrap; }
.copy-btn:hover { border-color: var(--ink); }
.copy-btn.is-done { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .citem { grid-template-columns: 1fr auto; } .citem .k { grid-column: 1 / -1; } }

.map { position: relative; aspect-ratio: 21 / 9; border: 1px solid var(--line); overflow: hidden; background: var(--bg-2); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: var(--map-filter); }
.map .pin { position: absolute; left: 0; top: 0; padding: 12px 16px; background: var(--brand); color: var(--on-brand); display: grid; gap: 4px; z-index: 1; }
.map .coords { position: absolute; right: 0; bottom: 0; padding: 10px 14px; background: var(--bg); z-index: 1; }
@media (max-width: 720px) { .map { aspect-ratio: 4 / 5; } }

.form { display: grid; gap: 0; border-top: 1px solid var(--line); }
.field { position: relative; border-bottom: 1px solid var(--line); }
.field label { position: absolute; left: 0; top: 22px; color: var(--muted); pointer-events: none; transition: transform .35s var(--ease), font-size .35s var(--ease), color .3s; transform-origin: left; }
.field input, .field textarea { width: 100%; padding: 30px 0 12px; background: transparent; border: 0; outline: 0; font-size: 18px; resize: vertical; }
.field textarea { min-height: 140px; }
.field::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand-text); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.field:focus-within::after { transform: scaleX(1); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-16px) scale(.72); color: var(--brand-text); }
.form-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-top: 24px; }
.form-note { font-size: 13px; color: var(--muted); max-width: 40ch; }

/* social */
.social { display: flex; gap: 8px; flex-wrap: wrap; }
.social a { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border: 1px solid var(--line); font: 500 12px/1 var(--f-mono); letter-spacing: .06em; transition: border-color .3s, background-color .3s, color .3s; }
.social a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.social svg { width: 16px; height: 16px; }

/* 404 */
.nf { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--hdr) var(--gutter) 40px; }
.nf .h-xl { -webkit-text-stroke: 1.5px var(--ink); color: transparent; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; }
  .rv, .rv-line > span, .step { opacity: 1; transform: none; }
}

/* theme switch via View Transitions: square wipe from the toggle */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ==========================================================================
   NAV AS A STEEL I‑BEAM (desktop): flanges top/bottom, stiffener plates
   between items, bolts at the joints. Hover pours blue up from the bottom.
   ========================================================================== */
.nav {
  position: relative; gap: 0; height: 46px; align-items: stretch;
  border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink);
  border-left: 2px solid var(--ink); border-right: 2px solid var(--ink);
  background:
    linear-gradient(90deg, transparent 0 100%),
    repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 6px);
}
.nav a { display: flex; align-items: center; padding: 0 14px; isolation: isolate; transition: color .35s var(--ease); }
.nav a + a { border-left: 2px solid var(--ink); }
.nav a::before {
  content: ""; position: absolute; left: 5px; top: 4px; width: 4px; height: 4px; background: var(--steel);
  box-shadow: 0 26px 0 var(--steel), calc(100% + 0px) 0 0 transparent;
}
.nav a::after {
  left: 0; right: 0; top: 0; bottom: 0; height: auto; z-index: -1;
  background: var(--brand); transform: scaleY(0); transform-origin: bottom;
  transition: transform .45s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleY(1); transform-origin: bottom; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--on-brand); }
.nav a:hover i, .nav a[aria-current="page"] i { color: rgba(255,255,255,.7); }
.nav a:hover { animation: sag .5s var(--ease-out); }
@keyframes sag { 40% { transform: translateY(2px); } }

/* ==========================================================================
   MOBILE MENU AS A BUILDING: each link is a storey, ground floor first,
   built bottom‑up when the menu opens. Current page has its lights on.
   ========================================================================== */
.mmenu { padding-top: 16px; }
.mbuilding { display: flex; flex-direction: column-reverse; margin: auto 0 0; border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); position: relative; }
.mbuilding::before { content: ""; position: absolute; left: -10px; right: -10px; top: -3px; height: 3px; background: var(--ink); }
.mbuilding::after { content: ""; position: absolute; right: 18%; top: -46px; width: 2px; height: 43px; background: var(--ink); box-shadow: -60px 0 0 transparent; }
.mroof-flag { position: absolute; right: calc(18% - 18px); top: -46px; width: 18px; height: 12px; background: var(--brand); animation: flag 2s ease-in-out infinite; transform-origin: right; }
@keyframes flag { 50% { transform: scaleX(.75) skewY(6deg); } }
.mmenu .mbuilding a {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 16px;
  border-bottom: 0; border-top: 3px solid var(--ink);
  font-size: clamp(22px, 6.4vw, 34px);
  transform: translateY(30px); opacity: 0;
}
.mmenu .mbuilding a:first-child { border-bottom: 3px solid var(--ink); }
.mmenu .mbuilding a::after {
  content: ""; margin-left: auto; width: 70px; height: 20px; flex: none;
  background: repeating-linear-gradient(90deg, var(--silver) 0 14px, transparent 14px 20px);
  transition: background .3s;
}
.mmenu .mbuilding a[aria-current="page"]::after, .mmenu .mbuilding a:active::after { background: repeating-linear-gradient(90deg, var(--brand-text) 0 14px, transparent 14px 20px); }
.mmenu .mbuilding a[aria-current="page"] { color: var(--brand-text); }
.menu-open .mmenu .mbuilding a { transform: none; opacity: 1; }
.mground { height: 18px; margin: 0 -10px; background: repeating-linear-gradient(45deg, var(--line) 0 2px, transparent 2px 8px); border-top: 3px solid var(--ink); }
.mmenu .mmenu-foot { margin-top: 20px; }
.mmenu .mmenu-foot a { font: 500 13px/1.6 var(--f-mono); letter-spacing: .04em; text-transform: none; padding: 0; border: 0; opacity: 1; transform: none; display: block; }

/* ==========================================================================
   I‑beam section divider
   ========================================================================== */
.beam { position: relative; height: 22px; margin: 0; border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); background: repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 2px), var(--ink) calc(12.5% - 2px) 12.5%); opacity: .9; }
.beam::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.beam .load { position: absolute; top: -4px; bottom: -4px; width: 12.5%; background: var(--brand); transform: translateX(calc(var(--bp, 0) * 700%)); transition: transform .3s linear; }

/* ==========================================================================
   HOME: family teaser
   ========================================================================== */
.family { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.family .gens-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; align-items: end; }
.family .gens-mini div { border: 2px solid var(--ink); border-right: 0; display: grid; place-items: center; font: 700 clamp(28px, 4vw, 56px)/1 var(--f-display); position: relative; transition: background-color .5s, color .5s; }
.family .gens-mini div:last-child { border-right: 2px solid var(--ink); }
.family .gens-mini div:nth-child(1) { height: 120px; }
.family .gens-mini div:nth-child(2) { height: 240px; background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.family .gens-mini div span { position: absolute; bottom: 10px; left: 10px; font: 500 10px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.family .gens-mini div:hover { background: var(--ink); color: var(--bg); }

/* ==========================================================================
   HISTORY page
   ========================================================================== */
.name-tiles { display: flex; flex-wrap: wrap; gap: 14px; align-content: start; }
.name-tiles .word { display: flex; gap: 6px; }
.name-tiles .word > span { width: clamp(34px, 4.4vw, 78px); aspect-ratio: 1; display: grid; place-items: center; border: 2px solid var(--ink); font: 700 clamp(18px, 2.6vw, 44px)/1 var(--f-display); transform: rotateX(90deg); transform-origin: bottom; transition: transform .8s var(--ease-out), background-color .4s, color .4s; transition-delay: var(--rd, 0s); }
.name-tiles .word--b > span { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.name-tiles .gap { border: 0; width: clamp(10px, 2vw, 24px); }
.name-tiles.is-in .word > span { transform: none; }
.name-tiles .word > span:hover { background: var(--ink); color: var(--bg); }

.hist-layout { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: clamp(32px, 6vw, 96px); }
.building-col { position: sticky; top: calc(var(--hdr) + 32px); align-self: start; height: calc(100svh - var(--hdr) - 64px); display: flex; flex-direction: column; justify-content: flex-end; }
#building { display: flex; flex-direction: column; width: 100%; }
#building .roof { height: 48px; position: relative; }
#building .roof::before { content: ""; position: absolute; left: 20%; bottom: 0; width: 3px; height: 120%; background: var(--ink); }
#building .roof::after { content: ""; position: absolute; left: 20%; top: -12%; width: 75%; height: 3px; background: var(--ink); }
.floor { position: relative; height: clamp(54px, 8vh, 80px); margin: 0 6%; border: 2px dashed var(--line); border-bottom: 0; display: flex; align-items: center; gap: 8%; padding: 0 10% 0 14%; transition: border-color .5s, background-color .5s, transform .6s var(--ease); }
.floor > span.mono { position: absolute; left: 6px; top: 6px; font-size: 10px; color: var(--muted); }
.floor .win { flex: 1; height: 38%; background: transparent; border: 1px dashed var(--line); transition: background-color .5s, border-color .5s; }
.floor em { position: absolute; right: -6%; transform: translateX(100%); font: 500 11px/1 var(--f-mono); font-style: normal; color: var(--muted); white-space: nowrap; opacity: 0; transition: opacity .4s; }
.floor.is-built { border: 2px solid var(--ink); border-bottom: 0; background: var(--surface); }
.floor.is-built .win { background: var(--silver); border-color: transparent; }
.floor.is-current .win { background: var(--brand-text); }
.floor.is-current em { opacity: 1; color: var(--brand-text); }
.floor.is-current { transform: translateX(6px); }
#building .ground { height: 24px; border-top: 3px solid var(--ink); background: repeating-linear-gradient(45deg, var(--line) 0 2px, transparent 2px 9px); }
.chapter { padding: 14vh 0; border-bottom: 1px solid var(--line); opacity: .32; transition: opacity .6s; display: grid; gap: 20px; }
.chapter:first-child { padding-top: 0; }
.chapter.is-active { opacity: 1; }
.chapter .ch-head { display: flex; justify-content: space-between; gap: 16px; }
.chapter .ch-year { color: var(--brand-text); font-size: 14px; }
.chapter .ch-photo .photo-slot { aspect-ratio: 16 / 9; max-width: 560px; }
@media (max-width: 900px) {
  .hist-layout { grid-template-columns: 1fr; }
  .building-col { display: none; }
  .chapter { opacity: 1; padding: 48px 0; }
}

.gens { display: grid; gap: 0; position: relative; }
.gen { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; padding: 40px 0; border-top: 1px solid var(--line); position: relative; }
.gen::before { content: ""; position: absolute; left: 0; top: -1px; width: 48px; height: 3px; background: var(--brand-text); }
.gen-label { display: grid; gap: 12px; align-content: start; }
.gen-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.gp { display: grid; gap: 8px; }
.gp .photo-slot { aspect-ratio: 1; }
.gp .photo-slot .label { font-size: 9px; }
.gp b { font-size: 15px; }
@media (max-width: 720px) { .gen { grid-template-columns: 1fr; } }

/* ==========================================================================
   SERVICES: concrete calculator
   ========================================================================== */
.calc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border: 2px solid var(--ink); background: var(--surface); }
.calc-in { padding: clamp(24px, 3vw, 40px); display: grid; gap: 20px; align-content: start; border-right: 2px solid var(--ink); }
.calc-row { display: grid; grid-template-columns: 1fr 120px; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.calc-row label { font-size: 15px; }
.calc-row input { width: 100%; height: 48px; padding: 0 12px; border: 1px solid var(--line); background: var(--bg); font: 600 18px/1 var(--f-mono); text-align: right; }
.calc-row input:focus { outline: 2px solid var(--brand-text); outline-offset: -2px; }
.calc-out { padding: clamp(24px, 3vw, 40px); display: grid; gap: 16px; align-content: space-between; background: var(--brand); color: var(--on-brand); }
.calc-out .big { font: 700 clamp(48px, 7vw, 104px)/.9 var(--f-display); letter-spacing: -.05em; }
.calc-out .big small { font-size: .3em; letter-spacing: 0; margin-left: 8px; }
.calc-cubes { display: flex; flex-wrap: wrap; gap: 4px; min-height: 40px; align-content: flex-start; }
.calc-cubes i { width: 16px; height: 16px; background: #fff; animation: pop .35s var(--ease-out) backwards; }
.calc-cubes b { align-self: center; margin-left: 4px; }
@keyframes pop { from { transform: scale(0); } }
.calc-note { font-size: 13px; opacity: .8; }
@media (max-width: 820px) { .calc { grid-template-columns: 1fr; } .calc-in { border-right: 0; border-bottom: 2px solid var(--ink); } }

/* ==========================================================================
   Footer legal row, easter egg crane
   ========================================================================== */
.ftr-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 20px; margin-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }
.ftr-legal a, .ftr-legal button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; transition: color .3s; }
.ftr-legal a:hover, .ftr-legal button:hover { color: var(--brand-text); }
.ftr-bot { border-top: 0; margin-top: 0; }
.crane-egg { width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); border: 1px dashed transparent; transition: color .3s, border-color .3s, transform .5s var(--ease); }
.crane-egg:hover { color: var(--brand-text); border-color: var(--line); transform: rotate(-8deg); }

/* ==========================================================================
   Cookie banner: a square card that slides up from the corner
   ========================================================================== */
.cookie {
  position: fixed; left: 16px; bottom: 16px; z-index: 140; width: min(440px, calc(100% - 32px));
  background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow);
  display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 20px;
  transform: translateY(calc(100% + 32px)); transition: transform .7s var(--ease);
}
.cookie.is-open { transform: none; }
.cookie-sq { width: 28px; height: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.cookie-sq i { background: var(--line); }
.cookie-sq i:nth-child(2), .cookie-sq i:nth-child(4) { background: var(--brand); }
.cookie-body { display: grid; gap: 8px; }
.cookie-body b { font: 600 15px/1.2 var(--f-display); }
.cookie-body p { font-size: 14px; color: var(--ink-2); }
.cookie-body p a { text-decoration: underline; text-underline-offset: 3px; }
.cookie-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cookie-btns .btn { height: 44px; padding: 0 16px; font-size: 12px; }
@media (max-width: 520px) { .cookie { grid-template-columns: 1fr; left: 8px; bottom: 8px; width: calc(100% - 16px); } .cookie-sq { display: none; } .cookie-btns .btn { flex: 1; justify-content: center; } }

/* map consent gate */
.map-gate { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; text-align: center;
  background: linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 32px 32px, var(--bg-2); }
.map-gate[hidden] { display: none; }
.map-gate p { max-width: 46ch; color: var(--muted); font-size: 14px; }
.map-gate .pinsq { width: 22px; height: 22px; background: var(--brand); transform: rotate(45deg); animation: hop 1.6s var(--ease) infinite; }

/* ==========================================================================
   Feedback form: topic chips + conditional fields + status
   ========================================================================== */
.topics { border: 0; margin: 0 0 8px; padding: 0; display: grid; gap: 14px; }
.topics legend { padding: 0; margin-bottom: 14px; color: var(--muted); }
#topics { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border: 1px solid var(--line); font: 500 13px/1 var(--f-mono); letter-spacing: .04em; transition: border-color .3s, background-color .35s, color .35s; }
.chip span i { width: 10px; height: 10px; border: 1.5px solid currentColor; transition: background-color .3s, transform .4s var(--ease); }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip input:checked + span i { background: currentColor; transform: rotate(45deg); }
.chip input:focus-visible + span { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.form-row[hidden], .field[hidden] { display: none; }
@media (max-width: 720px) { .form-row { grid-template-columns: 1fr; } }
.field.req label::after { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--brand-text); margin-left: 8px; vertical-align: middle; }
.msg-hint { font-size: 13px; color: var(--muted); padding: 10px 0 0; min-height: 2.6em; }
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 18px 0 4px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.consent input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border: 1.5px solid var(--ink); background: transparent; display: grid; place-items: center; cursor: pointer; }
.consent input::after { content: ""; width: 10px; height: 10px; background: var(--brand-text); transform: scale(0); transition: transform .3s var(--ease); }
.consent input:checked::after { transform: scale(1); }
.consent a { text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 14px; min-height: 1.5em; }
.form-status.is-ok { color: var(--brand-text); }
.form-status.is-err { color: #C8372D; }
.form-status a { text-decoration: underline; }
.btn.is-busy .sq { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form.is-sent { animation: sent 1.2s var(--ease); }
@keyframes sent { 30% { box-shadow: inset 0 3px 0 var(--brand-text); } }
.contacts-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ==========================================================================
   Legal pages
   ========================================================================== */
.legal-wrap { display: grid; grid-template-columns: 280px 1fr; gap: clamp(32px, 6vw, 96px); }
.legal-toc { position: sticky; top: calc(var(--hdr) + 32px); align-self: start; display: grid; }
.legal-toc > span { padding-bottom: 8px; }
.legal-toc a { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); transition: color .3s, padding .4s var(--ease); }
.legal-toc a i { font: 500 11px/1.6 var(--f-mono); font-style: normal; }
.legal-toc a:hover, .legal-toc a[aria-current="page"] { color: var(--ink); padding-left: 8px; box-shadow: inset 3px 0 0 var(--brand-text); }
.legal-body { display: grid; gap: 40px; max-width: 78ch; }
.legal-body section { display: grid; gap: 14px; scroll-margin-top: calc(var(--hdr) + 24px); padding-top: 24px; border-top: 1px solid var(--line); }
.legal-body h2 { display: flex; gap: 14px; align-items: baseline; }
.legal-body p { color: var(--ink-2); }
.legal-table { overflow-x: auto; border: 1px solid var(--line); }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.legal-table th, .legal-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-table th { font: 500 11px/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); }
.legal-table tr:last-child td { border-bottom: 0; }
@media (max-width: 900px) { .legal-wrap { grid-template-columns: 1fr; } .legal-toc { position: static; } }

/* ==========================================================================
   Easter egg game modal
   ========================================================================== */
.game { position: fixed; inset: 0; z-index: 180; display: grid; place-items: center; padding: 16px; background: rgba(5, 5, 12, .7); backdrop-filter: blur(6px); visibility: hidden; opacity: 0; transition: opacity .35s, visibility 0s .35s; }
.game.is-open { visibility: visible; opacity: 1; transition: opacity .35s; }
.game-box { width: min(520px, 100%); height: min(760px, calc(100svh - 32px)); background: var(--bg); border: 2px solid var(--ink); display: grid; grid-template-rows: auto 1fr; transform: translateY(24px) scale(.98); transition: transform .5s var(--ease-out); }
.game.is-open .game-box { transform: none; }
.game-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; border-bottom: 2px solid var(--ink); }
.game-top b { display: block; font: 700 18px/1.1 var(--f-display); }
.game-top .game-sub { color: var(--muted); font-size: 10px; }
.game-stage { position: relative; overflow: hidden; touch-action: manipulation; user-select: none; cursor: pointer; }
.game-stage canvas { display: block; width: 100%; height: 100%; }
.game-hud { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; pointer-events: none; }
.game-hud span { padding: 6px 10px; background: var(--bg); border: 1px solid var(--line); }
.game-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; background: color-mix(in srgb, var(--bg) 82%, transparent); opacity: 0; visibility: hidden; transition: opacity .4s; }
.game-msg.is-on { opacity: 1; visibility: visible; }
.game-msg b { font: 700 clamp(24px, 6vw, 34px)/1.1 var(--f-display); letter-spacing: -.02em; }
.game-msg .mono { color: var(--muted); max-width: 34ch; text-transform: none; letter-spacing: .02em; font-size: 13px; line-height: 1.5; }
.game-pop { position: absolute; left: 50%; top: 30%; transform: translate(-50%, 0); padding: 8px 14px; background: var(--brand); color: var(--on-brand); opacity: 0; pointer-events: none; }
.game-pop.is-on { animation: popup 1s var(--ease-out); }
@keyframes popup { 0% { opacity: 0; transform: translate(-50%, 10px); } 20% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -30px); } }

/* footer mini map */
.ftr-map { display: grid; gap: 8px; margin-top: 16px; }
.ftr-map-art { position: relative; display: block; width: 100%; max-width: 260px; aspect-ratio: 16 / 9; border: 1px solid var(--line); overflow: hidden;
  background:
    linear-gradient(90deg, transparent 47%, var(--silver) 47% 53%, transparent 53%) 0 0 / 100% 100%,
    linear-gradient(0deg, transparent 58%, var(--silver) 58% 62%, transparent 62%) 0 0 / 100% 100%,
    linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 16px 16px, var(--bg-2); }
.ftr-map-art i { position: absolute; left: 50%; top: 40%; width: 14px; height: 14px; margin: -7px; background: var(--brand); transform: rotate(45deg); animation: hop 1.6s var(--ease) infinite; z-index: 1; }
.ftr-map-art iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: var(--map-filter); pointer-events: none; }
.ftr-map-art:has(iframe) i { display: none; }
.ftr-map .mono { transition: color .3s; }
.ftr-map:hover .mono { color: var(--brand-text); }
.ftr-map:hover .ftr-map-art { border-color: var(--brand-text); }

#calc-mix { font-size: 22px; margin-left: 6px; }
@media (max-width: 520px) {
  .hdr .wrap { gap: 10px; }
  .tools { gap: 6px; }
  .icon-btn { width: 40px; height: 40px; }
  .lang-btn { padding: 0 8px; }
  .brand b { font-size: 13px; }
  .brand .logo { width: 32px; height: 32px; }
}

/* Long German/French compounds: let the browser hyphenate properly instead of breaking anywhere */
:root:not([lang="uk"]) h1, :root:not([lang="uk"]) h2, :root:not([lang="uk"]) h3 { hyphens: auto; -webkit-hyphens: auto; }

/* crews: 3×2 grid so long trade names never spill into the next cell */
.crews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.crew { min-width: 0; }
.crew h3 { overflow-wrap: break-word; }
@media (max-width: 900px) { .crews { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .crews { grid-template-columns: 1fr; } }

/* 30 years stamp next to the pixel logo */
.anniv {
  position: absolute; z-index: 2; left: -28px; bottom: 14%;
  width: clamp(96px, 9vw, 128px); aspect-ratio: 1;
  display: grid; place-content: center; justify-items: center; gap: 2px;
  background: var(--brand); color: var(--on-brand); text-align: center;
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-8deg); transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
  animation: annivIn 1s var(--ease-out) 1.2s backwards;
}
.anniv b { font: 700 clamp(36px, 3.6vw, 52px)/.9 var(--f-display); letter-spacing: -.04em; }
.anniv span { font: 600 13px/1 var(--f-display); text-transform: lowercase; }
.anniv i { font-style: normal; font-size: 9px; letter-spacing: .1em; opacity: .75; margin-top: 4px; }
.anniv em { font-style: normal; }
.pixlogo-wrap:hover .anniv { transform: rotate(0deg) translate(-4px, -4px); box-shadow: 12px 12px 0 var(--ink); }
@keyframes annivIn { from { transform: rotate(-30deg) scale(0); } }
@media (max-width: 900px) { .anniv { left: -8px; } }

/* years counter: bold number, quieter "since" part, no separator */
[data-years] small { font: 500 12px/1.2 var(--f-mono); color: var(--muted); margin-left: 6px; letter-spacing: .02em; }

/* separator: a small square from the company mark instead of a middle dot */
.sep { display: inline-block; width: 5px; height: 5px; margin: 0 .55em; background: var(--brand-text); vertical-align: middle; transform: translateY(-1px); flex: none; }
.cta-block .sep { background: #fff; }

[data-years] small { margin-left: 0; }

/* push pin next to "Base", like a note pinned to a board */
.pin-label { display: inline-flex; align-items: center; gap: 6px; }
.pin-label svg { width: 13px; height: 13px; color: var(--brand-text); transform: rotate(-12deg); transform-origin: 70% 30%; transition: transform .4s var(--ease-out); flex: none; }
.hero-meta .cell:hover .pin-label svg { animation: pinWiggle .6s var(--ease-out); }
@keyframes pinWiggle { 30% { transform: rotate(8deg); } 60% { transform: rotate(-20deg); } 100% { transform: rotate(-12deg); } }
.hero-meta a.cell--map { transition: background-color .3s; }
.hero-meta a.cell--map:hover b { color: var(--brand-text); }
.hero-meta a.cell--map:hover .pin-label svg { animation: pinWiggle .6s var(--ease-out); }
/* pin sits to the right of the "Base" label */
.pin-label svg { order: 2; }

/* hide the system cursor where the square cursor is active (mouse devices only) */
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor *, html.has-cursor *::before, html.has-cursor *::after { cursor: none !important; }
  html.has-cursor input:not([type="checkbox"]):not([type="radio"]), html.has-cursor textarea { cursor: text !important; }
}

/* cursor on blue / dark fills turns white */
.cursor.is-light { border-color: #fff; }
.cursor.is-light.is-hover { background: rgba(255, 255, 255, .22); }

/* hero outlined word: each letter fills with brand blue on hover, like the footer name */
[data-letters] > span { display: inline-block; transition: color .5s, -webkit-text-stroke-color .5s; }
[data-letters] > span:hover { color: var(--brand); -webkit-text-stroke-color: var(--brand); }
[data-letters] { white-space: nowrap; }

/* contact form: clearly visible boxed fields */
.form { border-top: 0; gap: 12px; }
.form-row { gap: 12px 16px; }
.field { border: 1.5px solid var(--line); background: var(--surface); padding: 0 16px; transition: border-color .3s, box-shadow .3s; }
.field:hover { border-color: var(--ink-2); }
.field:focus-within { border-color: var(--brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.field::after { display: none; }
.field label { left: 16px; top: 20px; color: var(--ink-2); }
.field input, .field textarea { padding: 28px 0 12px; }
.msg-hint { padding: 0 2px; min-height: 0; }
.consent { padding-top: 6px; }
/* "since 1996" looks the same as "30 years" */
[data-years] small { font: inherit; color: inherit; letter-spacing: inherit; margin: 0; }

/* ==========================================================================
   Home: rebuild teaser (Danish flag drawn with squares)
   ========================================================================== */
.rebuild-teaser { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(20px, 3vw, 40px); align-items: center; padding: clamp(24px, 3vw, 40px); border: 2px solid var(--ink); background: var(--surface); position: relative; overflow: hidden; transition: border-color .4s, transform .5s var(--ease-out); }
.rebuild-teaser:hover { border-color: var(--brand-text); transform: translateY(-3px); }
.rt-flag { position: relative; width: clamp(72px, 8vw, 104px); aspect-ratio: 37 / 28; background: #C8102E; flex: none; }
.rt-flag i { position: absolute; background: #fff; }
.rt-flag i:first-child { left: 32%; top: 0; bottom: 0; width: 11%; }
.rt-flag i:last-child { top: 43%; left: 0; right: 0; height: 14%; }
.rt-body { display: grid; gap: 10px; }
.rt-body b { font-size: clamp(20px, 2.2vw, 30px); }
@media (max-width: 820px) { .rebuild-teaser { grid-template-columns: 1fr; } }

/* Rebuild page */
.facts3 { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); }
.fact { padding: 28px 24px 28px 0; display: grid; gap: 14px; align-content: start; border-bottom: 1px solid var(--line); }
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact .accent { font-size: 13px; }
.fact p { font-size: 17px; color: var(--ink-2); }
.fact a { font-size: 11px; justify-self: start; transition: color .3s; }
.fact a:hover { color: var(--brand-text); }
@media (max-width: 820px) { .facts3 { grid-template-columns: 1fr; } .fact + .fact { padding-left: 0; border-left: 0; } }
.values--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .values--4 { grid-template-columns: repeat(2, 1fr); } .values--4 .value:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 620px) { .values--4 { grid-template-columns: 1fr; } .values--4 .value + .value { padding-left: 0; border-left: 0; } }
.formats { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); counter-reset: none; }
.formats li { display: flex; gap: 20px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); font: 600 clamp(18px, 1.8vw, 24px)/1.25 var(--f-display); letter-spacing: -.015em; transition: padding .4s var(--ease), color .3s; }
.formats li .mono { color: var(--brand-text); font-size: 12px; }
.formats li:hover { padding-left: 12px; color: var(--brand-text); }

/* ==========================================================================
   Contact form: three steps
   ========================================================================== */
.wsteps { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 0; }
.wsteps li { display: flex; align-items: flex-end; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-right: 0; color: var(--muted); font-size: 14px; transition: background-color .4s, color .4s, border-color .4s; }
.wsteps li:last-child { border-right: 1.5px solid var(--line); }
.wsteps li:nth-child(1) { height: 52px; } .wsteps li:nth-child(2) { height: 68px; } .wsteps li:nth-child(3) { height: 84px; }
.wsteps li i { font: 500 11px/1 var(--f-mono); font-style: normal; }
.wsteps li.is-done { color: var(--ink); background: var(--bg-2); }
.wsteps li.is-current { color: var(--on-brand); background: var(--brand); border-color: var(--brand); }
.wstep { display: grid; gap: 12px; }
.wstep[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip--multi input:checked + span i { transform: none; }
.wnav { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; }
.field.is-invalid, .consent.is-invalid input { border-color: #C8372D; }
.field.is-invalid { box-shadow: 0 0 0 3px rgba(200, 55, 45, .15); }

/* Requisites + documents */
.req-wrap { display: grid; gap: 24px; }
.req-wrap .v small { font-family: var(--f-mono); font-size: 12px; }
.req-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.docs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.doc .photo-slot { aspect-ratio: 3 / 4; }
.doc--cta { display: grid; place-items: center; border: 1.5px dashed var(--line); aspect-ratio: 3 / 4; }
@media (max-width: 820px) { .docs { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   Company profile page (screen + print / PDF)
   ========================================================================== */
.profile-bar { padding: calc(var(--hdr) + 24px) 0 0; }
.profile-bar .wrap { display: flex; justify-content: flex-end; gap: 12px; }
.profile { max-width: 900px; margin: 32px auto 80px; padding: 0 var(--gutter); display: grid; gap: 40px; }
.pf-cover { display: grid; grid-template-columns: 120px 1fr 140px; gap: 32px; align-items: center; padding-bottom: 32px; border-bottom: 2px solid var(--ink); }
.pf-logo svg { width: 120px; height: 120px; }
.pf-cover h1 { margin: 10px 0 14px; }
.pf-cover .lead { font-size: 16px; }
.pf-years { aspect-ratio: 1; background: var(--brand); color: var(--on-brand); display: grid; place-content: center; justify-items: center; text-align: center; }
.pf-years b { font: 700 52px/.9 var(--f-display); }
.pf-years span { font: 600 14px/1.2 var(--f-display); }
.pf-years i { font-style: normal; font-size: 10px; opacity: .8; margin-top: 4px; }
.pf-sec { display: grid; gap: 12px; }
.pf-sec h2 { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pf-sec p { color: var(--ink-2); font-size: 15px; }
.pf-services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.pf-services li { display: grid; grid-template-columns: 28px 1fr; gap: 2px 8px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.pf-services li .mono { grid-row: span 2; color: var(--brand-text); font-size: 11px; }
.pf-services li b { font-size: 14px; }
.pf-services li span:last-child { color: var(--muted); }
.pf-projects { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pf-projects figure { margin: 0; display: grid; gap: 8px; }
.pf-projects img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.pf-projects figcaption { display: grid; gap: 2px; font-size: 13px; }
.pf-two { grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .pf-cover { grid-template-columns: 80px 1fr; } .pf-years { display: none; } .pf-services, .pf-projects, .pf-two { grid-template-columns: 1fr; } }

@page { size: A4; margin: 14mm; }
@media print {
  :root { --bg: #fff; --surface: #fff; --bg-2: #f1f2f5; --ink: #0D0B22; --ink-2: #2E2C44; --muted: #5E6076; --line: rgba(13,11,34,.18); --line-2: rgba(13,11,34,.08); --brand: #2A188C; --brand-text: #2A188C; --logo-ink: #0D0B22; --logo-fill: #2A188C; }
  body { background: #fff; color: #0D0B22; font-size: 12pt; }
  .hdr, .mmenu, .ftr, .guides, .cursor, .progress, .pt, .cookie, .profile-bar, .preloader, .skip, .lb, .pmodal, .game { display: none !important; }
  .profile { margin: 0; padding: 0; max-width: none; gap: 22px; }
  .rv, .rv-line > span, .mosaic img { opacity: 1 !important; transform: none !important; }
  .pf-break { break-before: page; }
  .pf-sec, .pf-projects figure, .pf-services li { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; transition: none !important; }
}
/* page hero logo square: reveal on load (it's always in the first screen) */
.page-hero .ph-sq.rv-wipe { clip-path: inset(0 0 0 0); animation: phWipe 1.2s var(--ease) .35s backwards; }
@keyframes phWipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* facts grid: long German/Danish words must not widen the page on phones */
.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts li { min-width: 0; }
.facts b { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; } .facts li:nth-child(odd) { border-right: 0; } .facts li:nth-child(even) { padding-left: 0; } }

/* services: number + long title must fit on phones */
.svc, .svc > * { min-width: 0; }
.svc .svc-h h2 { min-width: 0; overflow-wrap: break-word; }
@media (max-width: 520px) {
  .svc .svc-h { flex-direction: column; gap: 8px; }
  .svc .svc-h .no { font-size: 56px; }
}

/* buttons never squeeze their label; button rows wrap instead */
.btn { white-space: nowrap; flex-shrink: 0; }
.profile-bar .wrap, .wnav, .cta-block .wrap > div, .contacts-line { flex-wrap: wrap; }

/* legal tables become stacked cards on phones */
@media (max-width: 620px) {
  .legal-table { overflow: visible; border: 0; }
  .legal-table table { min-width: 0; }
  .legal-table thead { display: none; }
  .legal-table tr { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .legal-table td { padding: 0; border: 0; }
  .legal-table td:first-child { font-weight: 600; color: var(--brand-text); }
}

/* buttons: one line where there is room, wrap gracefully on phones */
.btn { max-width: 100%; }
@media (max-width: 520px) {
  .btn { white-space: normal; height: auto; min-height: 52px; padding: 12px 18px; line-height: 1.25; text-align: left; flex-shrink: 1; }
}
/* requisites / contact rows: long values must wrap inside their column */
.citem { grid-template-columns: 140px minmax(0, 1fr) auto; }
.citem > * { min-width: 0; }
.citem .v { overflow-wrap: anywhere; }
@media (max-width: 520px) { .citem { grid-template-columns: minmax(0, 1fr) auto; } .citem .k { overflow-wrap: anywhere; } }
.map-gate { padding: 20px; }
.map-gate p { max-width: 100%; }

/* scroll progress follows the header: when the header slides away it sits at the very top */
.progress { transition: top .5s var(--ease); }
.hdr.is-hidden ~ .progress { top: 0; }

/* service tiles: smaller title so long words fit whole; proper hyphenation as a fallback */
.tile h3 { font-size: clamp(15px, 1.15vw, 19px); hyphens: auto; -webkit-hyphens: auto; overflow-wrap: normal; word-break: normal; }
.tile h3 { font-size: clamp(14px, 1.05vw, 18px); hyphens: manual; -webkit-hyphens: manual; }
:root:not([lang="uk"]) .tile h3 { hyphens: auto; -webkit-hyphens: auto; }

/* process stairs: minimum heights keep the staircase, but a step grows if its text needs room */
@media (min-width: 901px) {
  .step { height: auto; min-height: calc(var(--h) * 5.6px); }
}
.rt-body b { font-family: var(--f-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.12; }

/* Clean outline text: the variable font has overlapping contours, so a plain text-stroke shows
   inner lines. Fill with the background colour and paint the stroke underneath instead. */
.hero h1 .rv-line:nth-child(3) > span { color: var(--bg); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.ftr .big-name { color: var(--bg); -webkit-text-stroke: 2px var(--line); paint-order: stroke fill; }
.step .no { color: var(--surface); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.step:last-child .no { color: var(--brand); -webkit-text-stroke-color: var(--on-brand); }
.svc .svc-h .no { color: var(--bg); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.nf .h-xl { color: var(--bg); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
[data-letters] > span:hover, .ftr .big-name span:hover { color: var(--brand); -webkit-text-stroke-color: var(--brand); }
.pcard { align-content: start; align-self: start; }
.pmodal .specs { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Wipe reveal, robust version: the element itself stays visible (so IntersectionObserver
   always sees it); a background-coloured cover slides away instead of clipping the element. */
.rv-wipe { clip-path: none !important; position: relative; }
.rv-wipe::after { content: ""; position: absolute; inset: 0; z-index: 5; background: var(--bg); transform-origin: right; transform: scaleX(1); transition: transform 1.2s var(--ease); transition-delay: var(--rd, 0s); pointer-events: none; }
.rv-wipe.is-in::after { transform: scaleX(0); }
.page-hero .ph-sq.rv-wipe { animation: none; }
.page-hero .ph-sq.rv-wipe::after { animation: coverAway 1.2s var(--ease) .35s forwards; transition: none; }
@keyframes coverAway { to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .rv-wipe::after { display: none; } }
.map .pin, .map .coords { z-index: 3; }
