/* ============================================================
   ROMAN MARCHYSHAK · 3D VISUALIZER — site styles
   Brand: Render Blue #0E5AE9 · Concrete #6F6F6F · Bahnschrift
   ============================================================ */

@font-face {
  font-family: "BahnCond";
  src: url("../fonts/bahn_cond_bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "BahnSemi";
  src: url("../fonts/bahn_semicond_reg.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #0f1114;
  --ink-2: #14161a;
  --panel: #191d22;
  --line-d: rgba(255, 255, 255, 0.09);
  --paper: #f6f7f9;
  --white: #ffffff;
  --text-d: #e8eaee;
  --text-dim: #9ba1a9;
  --text-l: #1b1e23;
  --text-l2: #5c6167;
  --line-l: #dfe3e8;
  --blue: #0e5ae9;
  --blue-deep: #0a46b8;
  --blue-soft: #8fb1f3;
  --tint: #e8effd;
  --concrete: #6f6f6f;

  --disp: "BahnCond", "Arial Narrow", Arial, sans-serif;
  --label: "BahnSemi", "Segoe UI", Arial, sans-serif;
  --body: "Segoe UI", -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", ui-monospace, monospace;

  --pad: clamp(20px, 4vw, 56px);
  --max: 1500px;
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  background: var(--ink);
  color: var(--text-d);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* height:auto so width/height attributes only set the aspect ratio (no CLS),
   never a fixed pixel height — object-fit blocks below override where needed */
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }

::selection { background: var(--blue); color: #fff; }

/* ---------- type helpers ---------- */
.disp {
  font-family: var(--disp);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.005em;
}
.label {
  font-family: var(--label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; }
.blue { color: var(--blue); }

.container { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }

/* ---------- chips / codes ---------- */
.chip {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 6px;
  font-family: var(--label);
  font-size: 11.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  background: var(--blue);
  color: #fff;
  white-space: nowrap;
}
.chip.tint { background: rgba(14, 90, 233, 0.14); color: var(--blue-soft); }
.chip.ghost { background: none; box-shadow: inset 0 0 0 1px var(--line-d); color: var(--text-dim); }
.light .chip.tint { background: var(--tint); color: var(--blue-deep); }
.light .chip.ghost { box-shadow: inset 0 0 0 1px var(--line-l); color: var(--text-l2); }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 30px;
  border-radius: 10px;
  font-family: var(--label);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.5s var(--ease), background 0.3s, color 0.3s, box-shadow 0.3s;
  will-change: transform;
}
.btn .arr { transition: transform 0.4s var(--ease); }
.btn:hover .arr { transform: translateX(5px); }
.btn.solid { background: var(--blue); color: #fff; }
.btn.solid:hover { background: var(--blue-deep); }
.btn.line { box-shadow: inset 0 0 0 1.5px var(--line-d); color: var(--text-d); }
.btn.line:hover { box-shadow: inset 0 0 0 1.5px var(--blue); color: #fff; }
.light .btn.line { box-shadow: inset 0 0 0 1.5px var(--line-l); color: var(--text-l); }
.light .btn.line:hover { box-shadow: inset 0 0 0 1.5px var(--blue); color: var(--blue-deep); }

/* ---------- viewport brackets (always blue — one consistent element) ---------- */
.frame { position: relative; }
.frame .bk {
  position: absolute;
  width: clamp(20px, 2.2vw, 34px);
  height: clamp(20px, 2.2vw, 34px);
  border: 0 solid var(--blue);
  z-index: 3;
  pointer-events: none;
}
.frame .bk.tl { top: 14px; left: 14px; border-top-width: 3px; border-left-width: 3px; }
.frame .bk.tr { top: 14px; right: 14px; border-top-width: 3px; border-right-width: 3px; }
.frame .bk.bl { bottom: 14px; left: 14px; border-bottom-width: 3px; border-left-width: 3px; }
.frame .bk.br { bottom: 14px; right: 14px; border-bottom-width: 3px; border-right-width: 3px; }
.frame.bk-sm .bk { width: 18px; height: 18px; }
.frame.bk-sm .bk.tl { top: 10px; left: 10px; }
.frame.bk-sm .bk.tr { top: 10px; right: 10px; }
.frame.bk-sm .bk.bl { bottom: 10px; left: 10px; }
.frame.bk-sm .bk.br { bottom: 10px; right: 10px; }

/* ---------- preloader ---------- */
#pre {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 26px;
  transition: transform 0.9s var(--ease);
}
#pre.done { transform: translateY(-101%); }
#pre .pre-mono {
  width: 84px;
  height: 84px;
  position: relative;
  display: grid;
  place-items: center;
}
#pre .pre-mono span {
  font-family: var(--disp);
  font-size: 34px;
  color: #fff;
  letter-spacing: 0.02em;
}
#pre .pre-mono i {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid var(--blue);
}
#pre .pre-mono i:nth-child(1) { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; }
#pre .pre-mono i:nth-child(2) { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; }
#pre .pre-mono i:nth-child(3) { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; }
#pre .pre-mono i:nth-child(4) { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; }
#pre .pre-num { font-family: var(--mono); font-size: 14px; color: var(--text-dim); letter-spacing: 0.2em; }

/* ---------- page fade ---------- */
#fade {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
body.leaving #fade { opacity: 1; pointer-events: all; }

/* ---------- cursor ---------- */
.cur-dot, .cur-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 300;
}
.cur-dot { width: 6px; height: 6px; background: var(--blue); }
.cur-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(14, 90, 233, 0.65);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}
body.cur-big .cur-ring { width: 66px; height: 66px; border-color: rgba(14, 90, 233, 1); }
@media (hover: none), (pointer: coarse) { .cur-dot, .cur-ring { display: none; } }

/* ---------- nav ---------- */
nav#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
nav#nav.scrolled {
  background: rgba(15, 17, 20, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line-d);
}
.nav-in {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand svg { width: 38px; height: 38px; }
.brand .bn {
  font-family: var(--disp);
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
}
.brand .bn em { font-style: normal; color: var(--blue); }
.brand .br { font-family: var(--mono); font-size: 10px; color: var(--text-dim); letter-spacing: 0.18em; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-family: var(--label);
  font-size: 12.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.on { color: #fff; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--blue);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover::after, .nav-links a.on::after { width: 100%; }
.nav-cta { display: inline-flex; }
.burger {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 130;
}
.burger i, .burger i::before, .burger i::after {
  content: "";
  position: absolute;
  display: block;
  left: 10px;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform 0.4s var(--ease), top 0.4s var(--ease), opacity 0.3s;
}
.burger i { top: 21px; }
.burger i::before { left: 0; top: -7px; }
.burger i::after { left: 0; top: 7px; }
body.menu-open nav#nav { z-index: 140; background: transparent; box-shadow: none; backdrop-filter: none; }
body.menu-open .burger i { background: transparent; }
body.menu-open .burger i::before { top: 0; transform: rotate(45deg); }
body.menu-open .burger i::after { top: 0; transform: rotate(-45deg); }

#menu {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--ink-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.65s var(--ease);
}
body.menu-open #menu { clip-path: inset(0 0 0 0); }
#menu a.m-link {
  font-family: var(--disp);
  font-size: clamp(44px, 9vw, 92px);
  text-transform: uppercase;
  color: var(--text-d);
  line-height: 1.06;
  display: flex;
  align-items: baseline;
  gap: 18px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.3s;
}
body.menu-open #menu a.m-link { opacity: 1; transform: none; }
#menu a.m-link:hover { color: var(--blue); }
#menu a.m-link .mono { color: var(--text-dim); }
#menu .m-foot { margin-top: 48px; display: flex; gap: 26px; color: var(--text-dim); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: clip;
  perspective: 1100px;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  transform-origin: 50% 100%;
  will-change: transform;
}
.hero-media video, .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* hero video rotation stack */
.hero-media video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero-media video.on { opacity: 1; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 17, 20, 0.55) 0%, rgba(15, 17, 20, 0.15) 35%, rgba(15, 17, 20, 0.82) 88%),
    linear-gradient(90deg, rgba(15, 17, 20, 0.4), transparent 45%);
}
.hero-in { position: relative; z-index: 2; padding-bottom: 46px; }
.hero-top { margin-bottom: 26px; }
.hero-kicker { display: flex; align-items: center; gap: 14px; color: var(--blue-soft); margin-bottom: 22px; }
.hero-kicker .rule { width: 56px; height: 2px; background: var(--blue); }
.hero h1 {
  font-family: var(--disp);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(58px, 11.5vw, 172px);
  line-height: 0.88;
  color: #fff;
}
.hero h1 .l2 { color: var(--blue); display: inline-block; }
.hero-sub {
  max-width: 560px;
  color: rgba(233, 235, 239, 0.85);
  font-size: clamp(15px, 1.3vw, 18px);
  margin-top: 26px;
}
.hero-cta { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }
.hero-hud {
  margin-top: 52px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.scroll-hint {
  position: absolute;
  right: var(--pad);
  bottom: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
}
.scroll-hint::after {
  content: "";
  width: 1px;
  height: 54px;
  background: linear-gradient(var(--blue), transparent);
  animation: drip 2s var(--ease) infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: top; }
  56% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- marquee ---------- */
.marquee {
  border-block: 1px solid var(--line-d);
  overflow: clip;
  padding: 18px 0;
  background: var(--ink-2);
}
.marquee .track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: mq 30s linear infinite;
}
.marquee span {
  font-family: var(--disp);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 64px;
  white-space: nowrap;
}
.marquee span::after { content: "·"; color: var(--blue); }
@keyframes mq { to { transform: translateX(-50%); } }

/* ---------- section heads ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(36px, 5vw, 64px); flex-wrap: wrap; }
.sec-head .eyebrow { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 13px; color: var(--blue); letter-spacing: 0.14em; margin-bottom: 16px; }
.sec-head h2 {
  font-family: var(--disp);
  text-transform: uppercase;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.92;
  color: #fff;
}
.light .sec-head h2 { color: var(--text-l); }

/* ---------- deck (3D scroll work) ---------- */
#deck { position: relative; }
.deck-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: clip;
  perspective: 1200px;
  transform-style: preserve-3d;
}
.deck-card {
  position: absolute;
  inset: 0;
  will-change: transform, filter, opacity;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  box-shadow: 0 -34px 80px rgba(0, 0, 0, 0.45);
  border-radius: 20px 20px 0 0;
}
.deck-card .dc-media { position: absolute; inset: 0; overflow: clip; border-radius: 20px 20px 0 0; }
.deck-card .dc-media img, .deck-card .dc-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.deck-card .dc-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 17, 20, 0.35), transparent 30%, rgba(15, 17, 20, 0.78) 88%);
}
.dc-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 var(--pad) 54px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  z-index: 2;
}
.dc-title {
  font-family: var(--disp);
  font-size: clamp(38px, 5.6vw, 86px);
  text-transform: uppercase;
  color: #fff;
  line-height: 0.94;
}
.dc-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.dc-loc { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); letter-spacing: 0.14em; text-transform: uppercase; }
.dc-idx {
  position: absolute;
  top: calc(var(--nav-h) + 18px);
  right: var(--pad);
  font-family: var(--mono);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.2em;
  z-index: 2;
}
.dc-view {
  position: absolute;
  inset: 0;
  z-index: 4;
}

/* ---------- light slice sections ---------- */
.slice { position: relative; background: var(--paper); color: var(--text-l); }
.slice.light { padding-top: clamp(70px, 9vw, 130px); }
.slice.light::before {
  /* cheap diagonal cap instead of clipping the whole section */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-3.4vw + 1px);
  height: 3.4vw;
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}
.slice .dots {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 520px;
  background-image: radial-gradient(circle, rgba(27, 30, 35, 0.09) 1.3px, transparent 1.4px);
  background-size: 34px 34px;
  pointer-events: none;
}
section { padding-block: clamp(70px, 9vw, 130px); position: relative; }
section.tight { padding-block: clamp(50px, 6vw, 90px); }

/* ---------- services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.svc {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line-l);
  border-radius: 16px;
  padding: 34px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  overflow: clip;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.3s;
}
.svc:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(20, 22, 26, 0.11);
  border-color: rgba(14, 90, 233, 0.35);
}
.svc .num { font-family: var(--mono); font-size: 13px; color: var(--blue); letter-spacing: 0.12em; }
.svc h3 { font-family: var(--disp); font-size: clamp(26px, 2.6vw, 38px); text-transform: uppercase; color: var(--text-l); line-height: 0.95; }
.svc p { color: var(--text-l2); font-size: 15px; max-width: 46ch; }
.svc .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.svc::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -46px;
  width: 130px;
  height: 130px;
  border: 3px solid var(--tint);
  border-radius: 50%;
  transition: border-color 0.4s, transform 0.6s var(--ease);
}
.svc:hover::after { border-color: var(--blue); transform: scale(1.12); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat { border-top: 2px solid var(--line-l); padding-top: 18px; }
.stat b {
  display: block;
  font-family: var(--disp);
  font-size: clamp(34px, 4.1vw, 66px);
  color: var(--text-l);
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat b i { font-style: normal; color: var(--blue); }
.stat b span { font: inherit; color: inherit; letter-spacing: inherit; }
.stat > span { color: var(--text-l2); font-family: var(--label); font-size: 12px; letter-spacing: 0.13em; text-transform: uppercase; }

/* ---------- about teaser ---------- */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.about-photo {
  position: relative;
  display: grid;
  place-items: end center;
  isolation: isolate;
}
.about-photo.with-ring::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  width: min(82%, 430px);
  aspect-ratio: 1;
  border: clamp(10px, 1.3vw, 18px) solid var(--blue);
  border-radius: 50%;
  z-index: -1;
}
.about-photo .ring { display: none; }
.about-photo img { width: min(88%, 480px); filter: grayscale(1) contrast(1.05); }
.about-copy h2 { font-family: var(--disp); text-transform: uppercase; font-size: clamp(38px, 4.6vw, 66px); line-height: 0.94; color: var(--text-l); margin-bottom: 22px; }
.about-copy p { color: var(--text-l2); max-width: 56ch; margin-bottom: 14px; }
.fact-row { display: flex; gap: 34px; margin: 26px 0 30px; flex-wrap: wrap; }
.fact b { font-family: var(--disp); font-size: 30px; color: var(--text-l); display: block; line-height: 1; }
.fact span { font-family: var(--mono); font-size: 11.5px; color: var(--text-l2); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- process ---------- */
.proc { display: grid; gap: 0; }
.proc-row {
  display: grid;
  grid-template-columns: 90px 1fr 1.4fr;
  gap: 26px;
  padding: 30px 0;
  border-top: 1px solid var(--line-l);
  align-items: baseline;
}
.proc-row:last-child { border-bottom: 1px solid var(--line-l); }
.proc-row .p-num { font-family: var(--mono); color: var(--blue); font-size: 15px; }
.proc-row h3 { font-family: var(--disp); text-transform: uppercase; font-size: clamp(24px, 2.6vw, 40px); color: var(--text-l); line-height: 0.95; }
.proc-row p { color: var(--text-l2); max-width: 60ch; }

/* ---------- big CTA / footer ---------- */
.cta-big { background: var(--ink); position: relative; overflow: clip; }
.cta-big .dots-d {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 420px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1.3px, transparent 1.4px);
  background-size: 40px 40px;
  pointer-events: none;
}
.cta-big h2 {
  font-family: var(--disp);
  text-transform: uppercase;
  font-size: clamp(52px, 9.4vw, 150px);
  line-height: 0.9;
  color: #fff;
}
.cta-big h2 .l2 { color: var(--blue); }
.cta-sub { color: var(--text-dim); margin-top: 20px; max-width: 52ch; }
.cta-row { display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; }

footer { background: var(--ink); border-top: 1px solid var(--line-d); padding: 44px 0; }
.foot-in { display: flex; justify-content: space-between; gap: 22px; flex-wrap: wrap; align-items: center; }
.foot-in .mono { color: var(--text-dim); }
.foot-links { display: flex; gap: 24px; }
.foot-links a { color: var(--text-dim); font-family: var(--label); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; transition: color 0.3s; }
.foot-links a:hover { color: #fff; }

/* ---------- work grid page ---------- */
.page-head { padding-top: calc(var(--nav-h) + clamp(50px, 8vw, 110px)); }
.page-head h1 {
  font-family: var(--disp);
  text-transform: uppercase;
  font-size: clamp(52px, 10vw, 150px);
  line-height: 0.9;
  color: #fff;
}
.page-head h1 .l2 { color: var(--blue); }
.page-head .lead { color: var(--text-dim); max-width: 60ch; margin-top: 20px; font-size: 17px; }
.filters { display: flex; gap: 10px; margin-top: 34px; flex-wrap: wrap; }
.f-chip {
  padding: 9px 18px;
  border-radius: 999px;
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
  box-shadow: inset 0 0 0 1.2px var(--line-d);
  transition: all 0.3s;
}
.f-chip:hover { color: #fff; }
.f-chip.on { background: var(--blue); color: #fff; box-shadow: none; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 44px);
  padding-block: clamp(40px, 6vw, 80px);
}
.wcard { display: block; transform-style: preserve-3d; will-change: transform; }
.wcard.hidden { display: none; }
.wcard .w-media {
  position: relative;
  overflow: clip;
  border-radius: 14px;
  aspect-ratio: 16/9;
  background: var(--panel);
}
.wcard .w-media img { width: 100%; height: 100%; transition: transform 0.9s var(--ease); }
.wcard:hover .w-media img { transform: scale(1.045); }
.wcard .w-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 17, 20, 0.55));
  opacity: 0;
  transition: opacity 0.4s;
}
.wcard:hover .w-media::after { opacity: 1; }
.w-info { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 18px 4px 0; }
.w-info h3 { font-family: var(--disp); font-size: clamp(22px, 2.4vw, 34px); text-transform: uppercase; color: #fff; line-height: 1; }
.w-info .mono { color: var(--text-dim); }
.w-tags { display: flex; gap: 8px; padding: 10px 4px 0; }

/* ---------- case page ---------- */
.case-hero { position: relative; height: 86svh; min-height: 520px; overflow: clip; }
.case-hero video, .case-hero img { width: 100%; height: 100%; object-fit: cover; }
.case-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 17, 20, 0.5), transparent 35%, rgba(15, 17, 20, 0.86));
}
.case-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding-bottom: 44px;
}
.case-title h1 { font-family: var(--disp); text-transform: uppercase; font-size: clamp(44px, 8vw, 120px); line-height: 0.9; color: #fff; }
.case-title .mono { color: var(--text-dim); display: block; margin-bottom: 14px; }
.case-meta { border-block: 1px solid var(--line-d); background: var(--ink-2); }
.case-meta .cm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-block: 26px; }
.cm b { font-family: var(--label); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-soft); display: block; margin-bottom: 6px; }
.cm span { color: var(--text-d); font-size: 15px; }
.case-body { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(26px, 5vw, 80px); }
.case-body h2 { font-family: var(--disp); text-transform: uppercase; font-size: clamp(30px, 3.6vw, 54px); color: #fff; line-height: 0.94; }
.case-body p { color: var(--text-dim); margin-bottom: 14px; }

/* technical brief panel */
.tech-brief {
  margin-top: 26px;
  border: 1px solid var(--line-d);
  border-radius: 14px;
  background: var(--ink-2);
  padding: 24px 26px;
}
.tech-brief .tb-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.tech-brief .tb-head b { font-family: var(--disp); text-transform: uppercase; font-size: 21px; color: #fff; letter-spacing: 0.03em; }
.tech-brief ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tech-brief li { display: grid; grid-template-columns: 150px 1fr; gap: 14px; font-size: 14.5px; color: var(--text-d); }
.tech-brief li b { font-family: var(--label); font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--blue-soft); font-weight: 500; padding-top: 2px; }

/* placeholder tiles (plans / drawings / clay) */
.ph-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2.4vw, 36px); }
.ph-tile {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 14px;
  border: 1.5px dashed rgba(143, 177, 243, 0.4);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.06) 1.2px, transparent 1.4px) 0 0 / 30px 30px,
    var(--ink-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 20px;
}
.ph-tile svg { width: 44px; height: 44px; stroke: var(--blue-soft); opacity: 0.9; }
.ph-tile b { font-family: var(--label); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-d); font-weight: 500; }
.ph-tile span { font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); letter-spacing: 0.08em; max-width: 34ch; }

/* final gallery — strict 16:9 / 9:16, uncropped */
.case-gallery { display: grid; gap: clamp(18px, 2.6vw, 40px); padding-bottom: clamp(30px, 4vw, 60px); }
.case-gallery figure { position: relative; border-radius: 14px; overflow: clip; margin: 0; }
.case-gallery figure.port { width: min(64%, 620px, calc(82svh * 9 / 16)); margin-inline: auto; }
.case-gallery img, .case-gallery video { width: 100%; display: block; }
.case-gallery figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 16px 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  background: linear-gradient(transparent, rgba(15, 17, 20, 0.7));
  z-index: 2;
}

/* dark section head + process on dark */
.on-dark .sec-head h2 { color: #fff; }
.proc.on-dark .proc-row { border-color: var(--line-d); }
.proc.on-dark .proc-row h3 { color: #fff; }
.proc.on-dark .proc-row p { color: var(--text-dim); }
.proc-wrap { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.proc-side { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 12px; }
.proc-side .side-cap { font-family: var(--mono); font-size: 12px; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }
.proc-side figure { margin: 0; border-radius: 14px; overflow: clip; }
.proc-side figure img { width: 100%; display: block; }
@media (max-width: 1000px) {
  .proc-wrap { grid-template-columns: 1fr; }
  .proc-side { position: static; }
}
.next-proj { display: block; position: relative; border-top: 1px solid var(--line-d); overflow: clip; }
.next-in { display: flex; align-items: center; justify-content: space-between; gap: 26px; padding-block: 44px; }
.next-in .np-label { font-family: var(--mono); color: var(--text-dim); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 12px; }
.next-in h2 { font-family: var(--disp); text-transform: uppercase; font-size: clamp(36px, 5.4vw, 84px); color: #fff; line-height: 0.92; transition: color 0.3s; }
.next-proj:hover h2 { color: var(--blue); }
.next-in img { width: clamp(160px, 22vw, 320px); border-radius: 12px; aspect-ratio: 16/10; object-fit: cover; }

/* ---------- reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal="clip"] { transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1s var(--ease), opacity 0.6s; }
[data-reveal="clip"].in { clip-path: inset(0 0 -8% 0); }

/* ---------- faq ---------- */
.faq details { border-top: 1px solid var(--line-l); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line-l); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  font-family: var(--disp);
  text-transform: uppercase;
  font-size: clamp(19px, 2vw, 28px);
  color: var(--text-l);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.2em; transition: transform 0.3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-l2); padding-top: 14px; max-width: 72ch; }

/* ---------- contact ---------- */
.contact-hero { padding-top: calc(var(--nav-h) + clamp(50px, 8vw, 110px)); }
.big-mail {
  display: inline-block;
  font-family: var(--disp);
  text-transform: uppercase;
  font-size: clamp(26px, 4.4vw, 66px);
  color: #fff;
  line-height: 1;
  border-bottom: 3px solid var(--blue);
  padding-bottom: 8px;
  transition: color 0.3s;
  overflow-wrap: anywhere;
}
.big-mail:hover { color: var(--blue); }
.c-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: clamp(40px, 6vw, 80px); }
.c-tile { border: 1px solid var(--line-d); border-radius: 14px; padding: 26px; background: var(--ink-2); }
.c-tile b { font-family: var(--label); letter-spacing: 0.15em; text-transform: uppercase; font-size: 11.5px; color: var(--blue-soft); display: block; margin-bottom: 12px; }
.c-tile a, .c-tile span { color: var(--text-d); font-size: 15.5px; }
.c-tile a:hover { color: var(--blue-soft); }

/* ---------- services mini-grid ---------- */
.svc-mini {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.sm-item {
  background: var(--white);
  border: 1px solid var(--line-l);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.sm-item:hover { border-color: rgba(14, 90, 233, 0.4); transform: translateY(-3px); }
.sm-item b { font-family: var(--disp); text-transform: uppercase; font-size: 18px; color: var(--text-l); display: block; letter-spacing: 0.02em; }
.sm-item span { color: var(--text-l2); font-size: 13.5px; }

/* ---------- review checkpoints in process ---------- */
.proc-row.rev .p-num { background: var(--blue); color: #fff; border-radius: 6px; padding: 3px 9px; }
.proc-row.rev h3 { color: var(--blue-deep); }

/* ---------- plans figures ---------- */
.plan-fig { margin: 0; border-radius: 14px; overflow: clip; background: #fff; }
.plan-fig img { width: 100%; display: block; }
.plan-fig figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(transparent, rgba(15, 17, 20, 0.65));
  z-index: 2;
}

/* ---------- contact form ---------- */
.form-wrap {
  margin-top: clamp(50px, 7vw, 90px);
  border: 1px solid var(--line-d);
  border-radius: 16px;
  background: var(--ink-2);
  padding: clamp(22px, 3.4vw, 44px);
}
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f-field { display: block; margin-bottom: 16px; }
.f-field > span {
  display: block;
  font-family: var(--label);
  font-size: 11.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 8px;
}
.f-field input[type="text"], .f-field input[type="email"], .f-field textarea {
  width: 100%;
  background: var(--ink);
  border: 1.5px solid var(--line-d);
  border-radius: 10px;
  color: var(--text-d);
  font: 15px/1.5 var(--body);
  padding: 13px 15px;
  transition: border-color 0.3s;
}
.f-field textarea { resize: vertical; min-height: 130px; }
.f-field input:focus, .f-field textarea:focus { outline: none; border-color: var(--blue); }
.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.f-file-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--ink);
  border: 1.5px dashed rgba(143, 177, 243, 0.4);
  border-radius: 10px;
}
.f-file-row .btn { padding: 11px 20px; font-size: 12px; }
.f-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.f-list .fchip {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-d);
  background: rgba(14, 90, 233, 0.14);
  border-radius: 6px;
  padding: 5px 10px;
}
.f-error { color: #ff7a7a; font-size: 13.5px; min-height: 20px; margin-top: 6px; }
.f-ok { color: #63d68f; font-size: 14px; margin-top: 12px; }

/* ---------- gallery ---------- */
.gal { display: flex; gap: clamp(12px, 1.6vw, 22px); padding-block: clamp(30px, 4vw, 50px); }
.gal-col { flex: 1; display: flex; flex-direction: column; gap: clamp(12px, 1.6vw, 22px); min-width: 0; }
.gal-item {
  border-radius: 12px;
  overflow: clip;
  cursor: zoom-in;
  background: var(--panel);
  position: relative;
}
.gal-item img {
  width: 100%;
  display: block;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s var(--ease);
}
.gal-item.ld img { opacity: 1; transform: none; }
.gal-item:hover img { transform: scale(1.035); }

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(10, 12, 15, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
#lightbox button {
  position: absolute;
  color: rgba(255, 255, 255, 0.85);
  font-size: 34px;
  line-height: 1;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.3s, color 0.3s;
}
#lightbox button:hover { background: var(--blue); color: #fff; }
#lightbox .lb-close { top: 22px; right: 22px; }
#lightbox .lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
#lightbox .lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: block; }
  .svc-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { order: -1; max-width: 420px; margin-inline: auto; }
  .proc-row { grid-template-columns: 60px 1fr; }
  .proc-row p { grid-column: 2; }
  .work-grid { grid-template-columns: 1fr; }
  .case-meta .cm-grid { grid-template-columns: repeat(2, 1fr); }
  .case-body { grid-template-columns: 1fr; }
  .ph-grid { grid-template-columns: 1fr; }
  .case-gallery figure.port { width: min(86%, 560px, calc(82svh * 9 / 16)); }
  .tech-brief li { grid-template-columns: 118px 1fr; }
  .svc-mini { grid-template-columns: 1fr; }
  .f-row { grid-template-columns: 1fr; }
  #lightbox .lb-prev, #lightbox .lb-next { width: 44px; height: 44px; font-size: 26px; }
  .c-grid { grid-template-columns: 1fr; }
  .dc-info { flex-direction: column; align-items: flex-start; }
  .dc-meta { align-items: flex-start; }
  .scroll-hint { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .marquee .track { animation: none; }
}
