/* ==========================================================================
   IPS — Building Services & Materials
   Design system + components (home + project page)
   Brand: #202d47 / #47546d / #818b9c, bg tints of #a8afba, rare orange accents
   Type: Mersad (Georgian + Latin text), Montserrat (Latin display/labels)
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face { font-family: "Mersad"; src: url("../fonts/Mersad-Thin.woff2") format("woff2"), url("../fonts/Mersad-Thin.otf") format("opentype"); font-weight: 100; font-display: swap; }
@font-face { font-family: "Mersad"; src: url("../fonts/Mersad-ExtraLight.woff2") format("woff2"), url("../fonts/Mersad-ExtraLight.otf") format("opentype"); font-weight: 200; font-display: swap; }
@font-face { font-family: "Mersad"; src: url("../fonts/Mersad-Light.woff2") format("woff2"), url("../fonts/Mersad-Light.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Mersad"; src: url("../fonts/Mersad-Regular.woff2") format("woff2"), url("../fonts/Mersad-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mersad"; src: url("../fonts/Mersad-Medium.woff2") format("woff2"), url("../fonts/Mersad-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Mersad"; src: url("../fonts/Mersad-SemiBold.woff2") format("woff2"), url("../fonts/Mersad-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Mersad"; src: url("../fonts/Mersad-Bold.woff2") format("woff2"), url("../fonts/Mersad-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-ExtraLight.woff2") format("woff2"), url("../fonts/Montserrat-ExtraLight.ttf") format("truetype"); font-weight: 200; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Light.woff2") format("woff2"), url("../fonts/Montserrat-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Regular.woff2") format("woff2"), url("../fonts/Montserrat-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Medium.woff2") format("woff2"), url("../fonts/Montserrat-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-SemiBold.woff2") format("woff2"), url("../fonts/Montserrat-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Bold.woff2") format("woff2"), url("../fonts/Montserrat-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-ExtraBold.woff2") format("woff2"), url("../fonts/Montserrat-ExtraBold.otf") format("opentype"); font-weight: 800; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --ink: #202d47;          /* s — solutions */
  --slate: #47546d;        /* p — products */
  --steel: #818b9c;        /* i — ideas */
  --mist: #a8afba;
  --mist-2: #c9ced6;
  --mist-3: #e3e6ea;
  --paper: #f1f2f4;        /* page background */
  --paper-2: #f7f8f9;
  --white: #ffffff;
  --accent: #ff7212;       /* details only */
  --accent-2: #ff9e10;
  --accent-3: #ff4115;

  --text: var(--ink);
  --text-2: #5b667c;
  --text-3: #8c95a5;
  --line: rgba(32, 45, 71, .14);
  --line-2: rgba(32, 45, 71, .08);
  --line-inv: rgba(255, 255, 255, .14);

  --f-text: "Mersad", "Montserrat", system-ui, sans-serif;
  --f-latin: "Montserrat", "Mersad", system-ui, sans-serif;

  --pad: clamp(16px, 2.6vw, 40px);
  --gap: clamp(10px, 1.1vw, 16px);
  --radius: 6px;
  --header-h: 76px;

  --ease: cubic-bezier(.22, 1, .36, 1);       /* soft out (quint-ish) */
  --ease-io: cubic-bezier(.65, 0, .35, 1);    /* in-out for curtains */
  --ease-soft: cubic-bezier(.33, 1, .68, 1);
  --t-fast: .45s;
  --t-med: .8s;
  --t-slow: 1.25s;
  --t-xslow: 1.6s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--f-text); font-weight: 300; font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--ink); color: var(--white); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type scale ---------- */
.t-mega   { font-weight: 700; font-size: clamp(48px, 9.4vw, 168px); line-height: .9; letter-spacing: -.01em; }
.t-display{ font-weight: 600; font-size: clamp(36px, 5.6vw, 96px); line-height: .98; letter-spacing: -.005em; }
.t-h1     { font-weight: 500; font-size: clamp(32px, 4.2vw, 68px); line-height: 1.04; letter-spacing: -.01em; }
.t-h2     { font-weight: 500; font-size: clamp(28px, 3.2vw, 52px); line-height: 1.08; letter-spacing: -.01em; }
.t-h3     { font-weight: 500; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.18; }
.t-h4     { font-weight: 500; font-size: clamp(18px, 1.35vw, 22px); line-height: 1.3; }
.t-lead   { font-weight: 300; font-size: clamp(20px, 2.1vw, 34px); line-height: 1.28; letter-spacing: -.005em; }
.t-body   { font-weight: 300; font-size: clamp(15px, 1.05vw, 17px); line-height: 1.65; }
.t-small  { font-weight: 400; font-size: 13px; line-height: 1.5; }
.t-label  { font-family: var(--f-latin); font-weight: 500; font-size: 11px; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; }
.t-label--ka { font-family: var(--f-text); letter-spacing: .04em; font-size: 12px; }
.t-num    { font-family: var(--f-latin); font-weight: 200; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.c-2 { color: var(--text-2); }
.c-3 { color: var(--text-3); }

/* Section label — tiny parallelogram marker + uppercase label (gorazd/brandbook) */
.marker { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); }
.marker::before {
  content: ""; width: 9px; height: 11px; flex: none; background: var(--accent);
  clip-path: polygon(0 0, 100% 28%, 100% 100%, 0 72%);
}
.marker--light { color: rgba(255,255,255,.7); }
.sup { font-family: var(--f-latin); font-weight: 400; font-size: .32em; vertical-align: super; letter-spacing: .02em; margin-left: .25em; color: var(--text-3); }

/* ---------- Layout ---------- */
.wrap { padding-left: var(--pad); padding-right: var(--pad); }
.section { position: relative; padding-top: clamp(88px, 11vw, 180px); padding-bottom: clamp(88px, 11vw, 180px); }
.section--tight { padding-top: clamp(64px, 7vw, 120px); padding-bottom: clamp(64px, 7vw, 120px); }
.section--dark { background: var(--ink); color: var(--white); }
.section--dark .c-2 { color: rgba(255,255,255,.66); }
.section--dark .c-3 { color: rgba(255,255,255,.45); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.hair { height: 1px; background: var(--line); border: 0; margin: 0; }
.section--dark .hair { background: var(--line-inv); }
.sec-head { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); align-items: end; margin-bottom: clamp(36px, 4.5vw, 72px); }
.sec-head__title { grid-column: 1 / span 8; }
.sec-head__aside { grid-column: 9 / span 4; justify-self: end; text-align: right; max-width: 380px; }
.sec-head .marker { display: flex; margin-bottom: 22px; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: 52px; padding: 0 26px; border-radius: 2px; overflow: hidden; isolation: isolate;
  font-family: var(--f-text); font-weight: 500; font-size: 14px; letter-spacing: .02em; white-space: nowrap;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.btn::before { /* fill sweep */
  content: ""; position: absolute; inset: 0; z-index: -1; transform: translateY(101%);
  transition: transform .6s var(--ease); border-radius: inherit;
}
.btn:hover::before { transform: translateY(0); }
.btn .arr { width: 14px; height: 14px; flex: none; transition: transform .6s var(--ease); }
.btn:hover .arr { transform: translate(3px, -3px); }
.btn:hover .arr--down { transform: translateY(3px); }
.btn:hover .arr--right { transform: translateX(4px); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink::before { background: var(--slate); }
.btn--white { background: var(--white); color: var(--ink); }
.btn--white::before { background: var(--mist-3); }
.btn--line { border: 1px solid currentColor; }
.btn--line::before { background: var(--ink); }
.btn--line:hover { color: var(--white); border-color: var(--ink); }
.btn--line-light { border: 1px solid rgba(255,255,255,.55); color: var(--white); }
.btn--line-light::before { background: var(--white); }
.btn--line-light:hover { color: var(--ink); border-color: var(--white); }
.btn--sm { height: 42px; padding: 0 18px; font-size: 13px; }
.btn--block { width: 100%; }

.link-u { position: relative; display: inline-block; }
.link-u::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease);
}
.link-u:hover::after, .link-u.is-active::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--header-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--pad);
  color: var(--ink); transition: transform .7s var(--ease), color .5s var(--ease), background-color .5s var(--ease);
}
.header::before { /* frosted background, appears after hero */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: rgba(241, 242, 244, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-2); transition: opacity .5s var(--ease);
}
.header.is-solid::before { opacity: 1; }
.header.is-hidden { transform: translateY(-100%); }
.header--on-dark:not(.is-solid) { color: var(--white); }
.header__logo { display: flex; align-items: center; gap: 12px; flex: none; }
.header__logo .logo-symbol { width: 54px; height: auto; }
.header__logo .logo-text { font-weight: 500; font-size: 11px; line-height: 1.25; letter-spacing: .01em; max-width: 128px; opacity: .9; }
.header__meta { display: flex; align-items: center; gap: 18px; font-family: var(--f-latin); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; opacity: .78; }
.header__meta .dot { width: 6px; height: 6px; border-radius: 50%; background: #3fbf6f; box-shadow: 0 0 0 3px rgba(63,191,111,.18); }
.header__meta .clock { font-variant-numeric: tabular-nums; }
.header__nav { margin-left: auto; display: flex; align-items: center; gap: clamp(14px, 1.6vw, 28px); font-size: 14px; font-weight: 400; }
.header__nav a { padding: 6px 0; }
.header__tools { display: flex; align-items: center; gap: 14px; }
.lang { display: inline-flex; gap: 2px; font-family: var(--f-latin); font-size: 11px; font-weight: 600; letter-spacing: .1em; }
.lang a, .lang button { display: inline-block; padding: 6px 7px; opacity: .45; transition: opacity .3s; }
.lang a.is-active, .lang a:hover, .lang button.is-active, .lang button:hover { opacity: 1; }
.burger { display: none; width: 44px; height: 44px; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .6s var(--ease), opacity .3s; }
.burger span:nth-child(1) { top: 17px; } .burger span:nth-child(2) { top: 26px; }
.menu-open .burger span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* Mobile menu */
.mmenu {
  position: fixed; inset: 0; z-index: 55; background: var(--ink); color: var(--white);
  padding: calc(var(--header-h) + 24px) var(--pad) 32px; display: flex; flex-direction: column;
  clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--ease-io); visibility: hidden;
}
.menu-open .mmenu { clip-path: inset(0 0 0 0); visibility: visible; }
.mmenu__list a { display: block; font-weight: 600; font-size: clamp(34px, 9vw, 56px); line-height: 1.12; padding: 6px 0; overflow: hidden; }
.mmenu__list a span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); }
.menu-open .mmenu__list a span { transform: none; }
.mmenu__foot { margin-top: auto; display: grid; gap: 8px; color: rgba(255,255,255,.7); font-size: 14px; }
.menu-open .header { color: var(--white) !important; }
.menu-open .header::before { opacity: 0 !important; }

/* ---------- Page transition / intro curtain ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; display: grid; place-items: center;
  background: var(--ink); clip-path: inset(0 0 100% 0);
}
.curtain__logo { width: 120px; opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .8s var(--ease); }
.curtain.is-cover { clip-path: inset(0 0 0 0); }
.curtain.is-cover .curtain__logo { opacity: 1; transform: none; }
.curtain.is-in { animation: curtainIn .75s var(--ease-io) forwards; pointer-events: all; }
.curtain.is-out { animation: curtainOut .95s var(--ease-io) forwards; }
.curtain.is-out .curtain__logo { opacity: 0; transform: translateY(-14px); transition-duration: .45s; }
@keyframes curtainIn { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes curtainOut { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 100% 0); } }

/* ---------- Reveal system (progressive enhancement: only when html.js) ---------- */
.js [data-reveal="fade"] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal="fade"].is-in { opacity: 1; transform: none; }
.js [data-reveal="soft"] { opacity: 0; transition: opacity var(--t-xslow) var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal="soft"].is-in { opacity: 1; }
.js [data-reveal="line"] { transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal="line"].is-in { transform: scaleX(1); }

/* split words: each word rises from its own mask, delay is set per line by JS */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; padding-top: .06em; margin-top: -.06em; }
.split .wi { display: inline-block; will-change: transform; }
.js .split:not(.is-in) .wi { transform: translate3d(0, 112%, 0); }
.js .split .wi { transition: transform 1.15s var(--ease); transition-delay: var(--d, 0s); }

/* image mask reveal */
.js [data-reveal="img"] { clip-path: inset(8% 6% 8% 6% round var(--radius)); transition: clip-path 1.5s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal="img"] img, .js [data-reveal="img"] video { transform: scale(1.16); transition: transform 1.9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal="img"].is-in { clip-path: inset(0 0 0 0 round var(--radius)); }
.js [data-reveal="img"].is-in img, .js [data-reveal="img"].is-in video { transform: scale(1); }

/* scrubbed word highlight (statement) */
.scrub .w { transition: opacity .35s linear, color .35s linear; }
.js .scrub .w { opacity: .16; }
.js .scrub .w.on { opacity: 1; }

/* ---------- Media frames ---------- */
.media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--mist-3); }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.ratio-43 { aspect-ratio: 4 / 3; } .ratio-34 { aspect-ratio: 3 / 4; } .ratio-169 { aspect-ratio: 16 / 9; } .ratio-11 { aspect-ratio: 1; } .ratio-54 { aspect-ratio: 5 / 4; } .ratio-45 { aspect-ratio: 4 / 5; } .ratio-32 { aspect-ratio: 3 / 2; } .ratio-219 { aspect-ratio: 21 / 9; }
img[data-src] { opacity: 0; transition: opacity .9s var(--ease); }
img.is-loaded { opacity: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; height: calc(var(--vh, 1vh) * 100); min-height: 640px; padding: 10px; }
.hero__frame { position: relative; height: 100%; border-radius: var(--radius); overflow: hidden; background: var(--ink); color: var(--white); isolation: isolate; }
.hero__slides { position: absolute; inset: 0; z-index: -2; will-change: transform; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s var(--ease-soft); }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 9s linear; }
.hero__slide.is-active img { transform: scale(1.0); }
.hero__frame::after { /* legibility gradient */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,28,45,.55) 0%, rgba(20,28,45,0) 26%, rgba(20,28,45,0) 46%, rgba(20,28,45,.72) 100%);
}
.hero__index { text-align: right; font-family: var(--f-latin); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; line-height: 1.7; }
.hero__bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--pad) 18px; }
.hero__title { font-weight: 700; font-size: clamp(46px, 8.6vw, 156px); line-height: .9; letter-spacing: -.005em; text-transform: none; }
.hero__title .row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 0 clamp(16px, 2vw, 32px); }
.hero__caption { font-weight: 400; font-size: clamp(14px, 1.15vw, 18px); line-height: 1.3; max-width: 340px; padding-bottom: .55em; opacity: .92; }
.hero__bar { margin-top: clamp(16px, 2vw, 28px); display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: stretch; }
.hero__cta { height: 48px; border: 1px solid rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 13px; letter-spacing: .02em; transition: background-color .6s var(--ease), color .6s var(--ease); }
.hero__cta:hover { background: var(--white); color: var(--ink); }
.hero__dots { display: flex; gap: 6px; align-items: center; }
.hero__dot { position: relative; width: 58px; height: 48px; display: flex; flex-direction: column; justify-content: center; gap: 8px; text-align: left; font-family: var(--f-latin); font-size: 10px; letter-spacing: .1em; opacity: .6; transition: opacity .4s; }
.hero__dot.is-active, .hero__dot:hover { opacity: 1; }
.hero__dot i { position: relative; display: block; height: 2px; background: rgba(255,255,255,.28); overflow: hidden; }
.hero__dot i::after { content: ""; position: absolute; inset: 0; background: var(--white); transform: scaleX(0); transform-origin: left; }
.hero__dot.is-active i::after { animation: dotFill var(--slide-dur, 6.5s) linear forwards; }
@keyframes dotFill { to { transform: scaleX(1); } }
.hero__last {
  position: absolute; right: var(--pad); bottom: calc(18px + 48px + clamp(16px, 2vw, 28px) + 14px);
  display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: center; width: 290px; padding: 8px; border-radius: 4px;
  background: rgba(255,255,255,.1); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background-color .5s var(--ease);
}
.hero__last:hover { background: rgba(255,255,255,.2); }
.hero__last .media { aspect-ratio: 4/3; border-radius: 3px; }
.hero__last small { display: block; font-family: var(--f-latin); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: 4px; }
.hero__last strong { display: block; font-weight: 500; font-size: 14px; line-height: 1.25; }

/* ---------- Statement + numbers (gorazd) ---------- */
.statement { text-align: center; }
.statement .marker { justify-content: center; margin-bottom: 28px; }
.statement__text { max-width: 1180px; margin: 0 auto; }
.stats { margin-top: clamp(64px, 8vw, 128px); border-top: 1px solid var(--line); }
.stat { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); align-items: start; padding: clamp(18px, 2vw, 28px) 0; border-bottom: 1px solid var(--line); }
.stat__label { grid-column: 1 / span 3; padding-top: .9em; }
.stat__value { grid-column: 4 / span 6; text-align: center; font-size: clamp(64px, 10vw, 176px); line-height: .92; }
.stat__value .unit { font-size: .32em; margin-left: .12em; font-weight: 300; letter-spacing: 0; }
.stat__note { grid-column: 10 / span 3; text-align: right; padding-top: .9em; max-width: 280px; justify-self: end; }

/* ---------- i·p·s assembly (sticky, scrubbed) ---------- */
.ips { background: var(--ink); color: var(--white); overflow: clip; }
.ips__track { position: relative; height: calc(var(--vh, 1vh) * 320); }
.ips__sticky { position: sticky; top: 0; height: calc(var(--vh, 1vh) * 100); display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); align-items: center; padding: 0 var(--pad); }
.ips__bg { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.ips__head { position: absolute; top: calc(var(--header-h) + 20px); left: var(--pad); right: var(--pad); display: flex; justify-content: space-between; gap: 20px; }
.ips__stage { grid-column: 1 / span 7; position: relative; height: min(calc(var(--vh, 1vh) * 64), 640px); display: grid; place-items: center; }
.ips__stage svg { width: min(88%, 720px); height: auto; overflow: visible; }
.ips__piece { transform-box: view-box; will-change: transform, opacity; }
.ips__steps { grid-column: 8 / span 5; position: relative; height: min(calc(var(--vh, 1vh) * 56), 520px); }
.ips__step { position: absolute; inset: auto 0 0 0; top: 50%; transform: translateY(-50%); opacity: 0; pointer-events: none; transition: opacity .7s var(--ease), transform .9s var(--ease); }
.ips__step.is-active { opacity: 1; pointer-events: auto; }
.ips__step.is-before { transform: translateY(calc(-50% - 36px)); }
.ips__step.is-after { transform: translateY(calc(-50% + 36px)); }
.ips__letter { font-family: var(--f-latin); font-weight: 800; font-size: clamp(96px, 12vw, 200px); line-height: .8; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.45); margin-bottom: 18px; }
.ips__step h3 { margin-bottom: 18px; }
.ips__step p { color: rgba(255,255,255,.72); max-width: 460px; }
.ips__step ul { margin-top: 22px; display: grid; gap: 0; border-top: 1px solid var(--line-inv); max-width: 460px; }
.ips__step li { padding: 11px 0; border-bottom: 1px solid var(--line-inv); font-size: 14px; color: rgba(255,255,255,.8); display: flex; gap: 14px; }
.ips__step li span { font-family: var(--f-latin); font-size: 11px; color: rgba(255,255,255,.4); padding-top: 3px; }
.ips__progress { position: absolute; left: var(--pad); right: var(--pad); bottom: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ips__progress div { font-family: var(--f-latin); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); transition: color .5s; }
.ips__progress div.is-active { color: var(--white); }
.ips__progress i { display: block; height: 1px; background: var(--line-inv); margin-bottom: 10px; position: relative; overflow: hidden; }
.ips__progress i b { position: absolute; inset: 0; background: var(--white); transform-origin: left; transform: scaleX(0); }

/* ---------- Directions (expanding panels) ---------- */
.dirs { display: flex; gap: var(--gap); height: clamp(560px, calc(var(--vh, 1vh) * 72), 780px); }
.dir {
  position: relative; flex: 1 1 0; min-width: 0; border-radius: var(--radius); overflow: hidden; color: var(--white); isolation: isolate;
  transition: flex-grow 1.1s var(--ease);
}
.dirs:hover .dir { flex-grow: .78; }
.dirs .dir:hover, .dirs .dir.is-open { flex-grow: 1.9; }
.dir__img { position: absolute; inset: 0; z-index: -2; }
.dir__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.6s var(--ease); }
.dir:hover .dir__img img { transform: scale(1); }
.dir::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,28,45,.25) 0%, rgba(20,28,45,.05) 35%, rgba(20,28,45,.86) 100%); transition: opacity .8s var(--ease); }
.dir__top { position: absolute; top: 22px; left: 22px; right: 22px; display: flex; justify-content: space-between; align-items: center; }
.dir__icon { width: 46px; height: 46px; }
.dir__num { font-family: var(--f-latin); font-size: 11px; letter-spacing: .14em; opacity: .8; }
.dir__body { position: absolute; left: 22px; right: 22px; bottom: 22px; }
.dir__title { font-weight: 600; font-size: clamp(30px, 2.8vw, 48px); line-height: 1; margin-bottom: 14px; }
.dir__text { max-width: 440px; font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.82); }
.dir__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 1s var(--ease), opacity .8s var(--ease); opacity: 0; }
.dir:hover .dir__more, .dir.is-open .dir__more { grid-template-rows: 1fr; opacity: 1; }
.dir__more > div { overflow: hidden; }
.dir__list { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 18px; max-width: 520px; }
.dir__list li { font-size: 12.5px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.3); border-radius: 2px; white-space: nowrap; }
.dir__link { margin-top: 20px; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }

/* ---------- Process rows (laconistiq) ---------- */
.rows { border-top: 1px solid var(--line); }
.row-item { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); padding: clamp(22px, 2.6vw, 40px) 0; border-bottom: 1px solid var(--line); align-items: start; position: relative; }
.row-item::before { content: ""; position: absolute; inset: 0 calc(var(--pad) * -1); background: var(--white); z-index: -1; opacity: 0; transition: opacity .7s var(--ease); }
.row-item:hover::before { opacity: 1; }
.row-item__num { grid-column: 1 / span 2; font-family: var(--f-latin); font-weight: 300; font-size: clamp(22px, 2vw, 32px); line-height: 1; }
.row-item__title { grid-column: 3 / span 4; }
.row-item__text { grid-column: 7 / span 3; color: var(--text-2); }
.row-item__img { grid-column: 11 / span 2; aspect-ratio: 1; border-radius: 4px; overflow: hidden; background: var(--mist-3); }
.row-item__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.4s var(--ease); }
.row-item:hover .row-item__img img { transform: scale(1.12); }

/* ---------- Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter { height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 2px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease); }
.filter sup { font-family: var(--f-latin); font-size: 10px; opacity: .6; }
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pgrid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); row-gap: clamp(40px, 5vw, 80px); }
.pcard { display: block; position: relative; }
.pcard .media { margin-bottom: 16px; }
.pcard .media img { transition: transform 1.4s var(--ease), opacity .9s var(--ease); }
.pcard:hover .media img { transform: scale(1.045); }
.pcard__meta { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; color: var(--text-3); }
.pcard__meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.pcard__title { font-weight: 500; font-size: clamp(19px, 1.5vw, 25px); line-height: 1.22; max-width: 560px; transition: color .4s; }
.pcard:hover .pcard__title { color: var(--slate); }
.pcard__arrow { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; background: var(--white); display: grid; place-items: center; opacity: 0; transform: scale(.6) rotate(-45deg); transition: opacity .5s var(--ease), transform .7s var(--ease); z-index: 2; }
.pcard:hover .pcard__arrow { opacity: 1; transform: none; }
.pcard__arrow svg { width: 14px; height: 14px; }
.pcard.is-hidden { display: none; }
/* asymmetric spans set by JS: .span-7 .span-5 .span-6 .span-4 .span-8 */
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.off-1 { margin-top: clamp(40px, 8vw, 140px); }
.pmore { margin-top: clamp(48px, 6vw, 96px); display: flex; justify-content: center; }

/* projects without photos — typographic index */
.pindex { margin-top: clamp(64px, 8vw, 120px); }
.pindex__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.pindex__list { border-top: 1px solid var(--line); columns: 2; column-gap: calc(var(--gap) * 3); }
.pindex__item { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); break-inside: avoid; font-size: 15px; transition: padding-left .6s var(--ease), color .4s; }
.pindex__item:hover { padding-left: 10px; color: var(--slate); }
.pindex__item span:last-child { color: var(--text-3); font-size: 13px; }

/* ---------- Brands (index with floating preview) ---------- */
.bindex { border-top: 1px solid var(--line); }
.brow { border-bottom: 1px solid var(--line); }
.brow__btn { width: 100%; display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); align-items: center; padding: clamp(14px, 1.5vw, 22px) 0; text-align: left; position: relative; }
.brow__name { grid-column: 1 / span 4; font-family: var(--f-latin); font-weight: 500; font-size: clamp(20px, 2.1vw, 36px); letter-spacing: -.01em; line-height: 1.05; transition: transform .7s var(--ease), color .4s; }
.brow__btn:hover .brow__name { transform: translateX(12px); }
.brow__country { grid-column: 5 / span 2; color: var(--text-2); font-size: 14px; }
.brow__year { grid-column: 7 / span 1; font-family: var(--f-latin); font-size: 13px; color: var(--text-3); }
.brow__prod { grid-column: 8 / span 4; color: var(--text-2); font-size: 14px; line-height: 1.4; }
.brow__plus { grid-column: 12 / span 1; justify-self: end; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; position: relative; transition: transform .7s var(--ease), background-color .4s, border-color .4s; }
.brow__plus::before, .brow__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1px; background: currentColor; transform: translate(-50%, -50%); }
.brow__plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .6s var(--ease); }
.brow.is-open .brow__plus { background: var(--ink); color: var(--white); border-color: var(--ink); }
.brow.is-open .brow__plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.brow__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .9s var(--ease); }
.brow.is-open .brow__panel { grid-template-rows: 1fr; }
.brow__panel > div { overflow: hidden; }
.brow__inner { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); padding: 0 0 28px; }
.brow__desc { grid-column: 5 / span 5; color: var(--text-2); font-size: 15px; line-height: 1.65; }
.brow__site { grid-column: 11 / span 2; justify-self: end; align-self: end; font-size: 13px; }
.brow__thumb { grid-column: 1 / span 3; aspect-ratio: 4/3; border-radius: 4px; overflow: hidden; display: none; }
.preview {
  position: fixed; left: 0; top: 0; z-index: 40; width: 300px; aspect-ratio: 4/5; border-radius: 4px; overflow: hidden; pointer-events: none;
  opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.86); transition: opacity .45s var(--ease), transform .6s var(--ease) ; background: var(--mist-3);
  box-shadow: 0 30px 60px -20px rgba(20,28,45,.35);
}
.preview.is-on { opacity: 1; }
.preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease); }
.preview img.is-cur { opacity: 1; }

/* ---------- CTA band (laconistiq) ---------- */
.cta-band { position: relative; padding: 10px; }
.cta-band__frame { position: relative; min-height: clamp(520px, calc(var(--vh, 1vh) * 82), 860px); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; text-align: center; color: var(--white); isolation: isolate; }
.cta-band__frame img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; z-index: -2; will-change: transform; }
.cta-band__frame::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(20,28,45,.48); }
.cta-band__title { position: relative; max-width: 980px; padding: 0 var(--pad); }
.cta-band__lines { position: absolute; left: 0; right: 0; top: 50%; height: 1px; z-index: -1; display: flex; justify-content: space-between; pointer-events: none; }
.cta-band__lines i { width: 22%; height: 1px; background: rgba(255,255,255,.4); }
.cta-band .btn { margin-top: 36px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
.footer__top { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); padding-top: clamp(80px, 9vw, 140px); padding-bottom: clamp(56px, 6vw, 96px); border-bottom: 1px solid var(--line-inv); }
.footer__cta { grid-column: 1 / span 7; }
.footer__cta p { margin-top: 20px; max-width: 520px; color: rgba(255,255,255,.66); }
.footer__cta .btn { margin-top: 34px; }
.footer__contacts { grid-column: 9 / span 4; align-self: end; }
.crow { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-inv); font-size: 14px; }
.crow:first-child { border-top: 1px solid var(--line-inv); }
.crow span:first-child { font-family: var(--f-latin); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); padding-top: 3px; }
.crow a:hover { color: var(--accent-2); }
.footer__cols { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); padding-top: 40px; padding-bottom: 32px; }
.footer__col { grid-column: span 3; display: grid; align-content: start; gap: 9px; font-size: 14px; color: rgba(255,255,255,.78); }
.footer__col h4 { font-family: var(--f-latin); font-weight: 500; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: 8px; }
.footer__col a { width: fit-content; }
.footer__giant { position: relative; padding: 0 var(--pad); margin-top: 10px; }
.footer__giant svg { width: 100%; height: auto; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding: 18px var(--pad) 22px; font-family: var(--f-latin); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.45); }

/* ---------- Drawer (contact) ---------- */
.drawer { position: fixed; inset: 0; z-index: 90; visibility: hidden; }
.drawer__shade { position: absolute; inset: 0; background: rgba(20,28,45,.45); opacity: 0; transition: opacity .7s var(--ease); }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--paper); color: var(--ink); transform: translateX(102%); transition: transform .95s var(--ease); display: flex; flex-direction: column; overflow-y: auto; }
.drawer.is-open { visibility: visible; }
.drawer.is-open .drawer__shade { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.drawer__close { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); position: relative; transition: transform .6s var(--ease), background-color .4s; }
.drawer__close:hover { transform: rotate(90deg); background: var(--white); }
.drawer__close::before, .drawer__close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1px; background: currentColor; transform: translate(-50%,-50%) rotate(45deg); }
.drawer__close::after { transform: translate(-50%,-50%) rotate(-45deg); }
.drawer__body { padding: 32px 28px 40px; }
.form { display: grid; gap: 14px; margin-top: 28px; }
.field { position: relative; }
.field input, .field textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 22px 0 10px; font-size: 16px; font-weight: 400; outline: none; transition: border-color .4s; border-radius: 0; resize: none; }
.field textarea { min-height: 110px; }
.field label { position: absolute; left: 0; top: 22px; color: var(--text-3); font-size: 15px; pointer-events: none; transition: transform .5s var(--ease), font-size .5s var(--ease), color .4s; transform-origin: left top; }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field input:focus + label, .field input:not(:placeholder-shown) + label, .field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-18px); font-size: 12px; color: var(--text-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; height: 38px; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 2px; font-size: 14px; cursor: pointer; transition: background-color .4s, color .4s, border-color .4s; }
.chip input:checked + span { background: var(--ink); color: var(--white); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form__note { font-size: 12.5px; color: var(--text-3); }
.form__ok { display: none; padding: 26px 0; }
.form.is-sent > *:not(.form__ok) { display: none; }
.form.is-sent .form__ok { display: block; }

/* ---------- Cursor bubble ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; background: var(--white); color: var(--ink); display: grid; place-items: center; font-size: 13px; font-weight: 500; transform: scale(0); transition: transform .55s var(--ease); will-change: transform; }
.cursor.is-on { transform: scale(1); }
.cursor span { opacity: 0; transition: opacity .3s; }
.cursor.is-on span { opacity: 1; transition-delay: .12s; }
@media (hover: none) { .cursor, .preview { display: none !important; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.marquee__track { display: inline-flex; gap: 48px; animation: marq 46s linear infinite; padding-right: 48px; }
.marquee__track span { display: inline-flex; align-items: center; gap: 48px; font-weight: 500; font-size: clamp(22px, 2.4vw, 40px); }
.marquee__track span::after { content: ""; width: 14px; height: 17px; background: var(--steel); clip-path: polygon(0 0, 100% 28%, 100% 100%, 0 72%); }
@keyframes marq { to { transform: translateX(-50%); } }

/* ==========================================================================
   Project page
   ========================================================================== */
.phero { padding-top: calc(var(--header-h) + clamp(24px, 4vw, 64px)); }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--text-3); font-size: 13px; margin-bottom: clamp(28px, 4vw, 56px); }
.crumbs a:hover { color: var(--ink); }
.crumbs i { width: 12px; height: 1px; background: currentColor; opacity: .5; }
.phero__grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); align-items: end; }
.phero__titlewrap { grid-column: 1 / span 9; }
.phero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tag { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 6px; border: 1px solid var(--line); border-radius: 2px; font-size: 13px; }
.tag img { width: 22px; height: 22px; }
.tag--plain { padding: 0 12px; }
.phero__title { font-weight: 700; font-size: clamp(42px, 7.4vw, 132px); line-height: .92; letter-spacing: -.005em; overflow-wrap: anywhere; }
.phero__lead { grid-column: 10 / span 3; color: var(--text-2); font-size: 15px; line-height: 1.6; padding-bottom: 8px; }
.pcover { margin-top: clamp(32px, 4vw, 64px); padding: 0 10px; }
.pcover .media { height: min(calc(var(--vh, 1vh) * 86), 980px); min-height: 420px; }
.pcover .media img { will-change: transform; }

.facts { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact { padding: 22px 0 26px; border-right: 1px solid var(--line); padding-right: 18px; }
.fact:last-child { border-right: 0; }
.fact__label { display: block; margin-bottom: 14px; color: var(--text-3); }
.fact__value { font-size: 16px; font-weight: 400; line-height: 1.45; }
.fact--big .fact__value { font-family: var(--f-latin); font-weight: 200; font-size: clamp(44px, 4.6vw, 80px); line-height: .95; letter-spacing: -.02em; }
.fact--big .fact__value small { font-size: .34em; font-weight: 300; margin-left: .15em; letter-spacing: 0; }

.about { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); }
.about__label { grid-column: 1 / span 3; }
.about__label .sticky { position: sticky; top: calc(var(--header-h) + 24px); }
.about__text { grid-column: 4 / span 8; }
.about__text p + p { margin-top: 1em; }

.mats { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); row-gap: 48px; }
.mats__col { grid-column: span 6; }
.mats__col h3 { margin-bottom: 22px; display: flex; align-items: baseline; gap: 10px; }
.mlist { border-top: 1px solid var(--line); }
.mlist li { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 400; }
.mlist li span:first-child { font-family: var(--f-latin); font-size: 12px; color: var(--text-3); padding-top: 4px; }

.bcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--gap); }
.bcard { background: var(--white); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.bcard .media { aspect-ratio: 16/10; border-radius: 0; }
.bcard .media img { transition: transform 1.4s var(--ease); }
.bcard:hover .media img { transform: scale(1.05); }
.bcard__body { padding: 20px 20px 22px; display: grid; gap: 10px; }
.bcard__name { font-family: var(--f-latin); font-weight: 600; font-size: 22px; letter-spacing: -.01em; }
.bcard__meta { display: flex; gap: 10px; color: var(--text-3); font-size: 13px; }
.bcard__text { font-size: 14px; color: var(--text-2); line-height: 1.6; }

.services { border-top: 1px solid var(--line); }
.service { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); padding: clamp(20px, 2.4vw, 34px) 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.service__num { grid-column: 1 / span 2; font-family: var(--f-latin); font-weight: 200; font-size: clamp(36px, 3.6vw, 60px); line-height: .9; color: var(--steel); }
.service__text { grid-column: 3 / span 8; font-size: clamp(18px, 1.6vw, 26px); font-weight: 400; line-height: 1.35; }

.gallery { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: var(--gap); }
.gallery .g { position: relative; cursor: zoom-in; }
.gallery .g .media { height: 100%; }
.gallery .g img { transition: transform 1.4s var(--ease); }
.gallery .g:hover img { transform: scale(1.04); }
.g--full { grid-column: span 12; aspect-ratio: 21/9; }
.g--wide { grid-column: span 8; aspect-ratio: 3/2; }
.g--tall { grid-column: span 4; }
.g--half { grid-column: span 6; aspect-ratio: 4/3; }
.g--third { grid-column: span 4; aspect-ratio: 4/5; }

.next { position: relative; display: block; padding: 10px; }
.next__frame { position: relative; height: clamp(420px, calc(var(--vh, 1vh) * 70), 760px); border-radius: var(--radius); overflow: hidden; color: var(--white); isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(20px, 2.6vw, 40px); }
.next__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.08); transition: transform 1.8s var(--ease); }
.next:hover .next__frame img { transform: scale(1); }
.next__frame::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,28,45,.35), rgba(20,28,45,.15) 40%, rgba(20,28,45,.75)); }
.next__title { font-weight: 700; font-size: clamp(40px, 6.6vw, 120px); line-height: .92; }
.next__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.next__go { width: clamp(64px, 6vw, 96px); height: clamp(64px, 6vw, 96px); border-radius: 50%; border: 1px solid rgba(255,255,255,.5); display: grid; place-items: center; flex: none; transition: background-color .6s var(--ease), color .6s var(--ease), transform .8s var(--ease); }
.next:hover .next__go { background: var(--white); color: var(--ink); transform: rotate(-45deg); }
.next__go svg { width: 22px; height: 22px; }

.similar { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--gap); }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 95; background: rgba(14,20,33,.96); color: var(--white); display: grid; grid-template-rows: auto 1fr auto; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s .6s; }
.lb.is-open { opacity: 1; visibility: visible; transition: opacity .6s var(--ease); }
.lb__top, .lb__bot { display: flex; justify-content: space-between; align-items: center; padding: 18px var(--pad); font-family: var(--f-latin); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.lb__stage { position: relative; overflow: hidden; display: grid; place-items: center; padding: 0 var(--pad); }
.lb__img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 3px; opacity: 0; transform: scale(.97); transition: opacity .6s var(--ease), transform .9s var(--ease); }
.lb__img.is-in { opacity: 1; transform: none; }
.lb__nav { display: flex; gap: 8px; }
.lb__btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); display: grid; place-items: center; transition: background-color .4s, color .4s; }
.lb__btn:hover { background: var(--white); color: var(--ink); }
.lb__btn svg { width: 16px; height: 16px; }

/* Empty-state for projects without photos */
.noimg { display: grid; place-items: center; background: var(--mist-3); color: var(--steel); }
.noimg svg { width: 38%; opacity: .55; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .header__meta { display: none; }
  .header__nav { gap: 16px; font-size: 13.5px; }
  .stat__label { grid-column: 1 / span 4; }
  .stat__value { grid-column: 5 / span 8; text-align: right; }
  .stat__note { display: none; }
  .row-item__title { grid-column: 3 / span 5; }
  .row-item__text { grid-column: 8 / span 3; }
  .row-item__img { grid-column: 11 / span 2; }
  .brow__country { grid-column: 5 / span 3; }
  .brow__year { display: none; }
}
@media (max-width: 1024px) {
  :root { --header-h: 66px; }
  .header__nav, .header__cta { display: none; }
  .burger { display: block; }
  .header__tools { margin-left: auto; }
  .sec-head__title { grid-column: 1 / -1; }
  .sec-head__aside { grid-column: 1 / -1; justify-self: start; text-align: left; margin-top: 22px; }
  .ips__stage { grid-column: 1 / -1; height: calc(var(--vh, 1vh) * 46); align-self: start; margin-top: calc(var(--header-h) + 60px); }
  .ips__steps { grid-column: 1 / -1; height: calc(var(--vh, 1vh) * 40); align-self: start; }
  .ips__letter { display: none; }
  .ips__sticky { align-items: start; }
  .dirs { flex-direction: column; height: auto; }
  .dir { flex: none; height: 520px; }
  .dirs:hover .dir, .dirs .dir:hover { flex-grow: 0; }
  .dir__more { grid-template-rows: 1fr; opacity: 1; }
  .row-item__num { grid-column: 1 / span 2; }
  .row-item__title { grid-column: 3 / span 10; }
  .row-item__text { grid-column: 3 / span 7; margin-top: 12px; }
  .row-item__img { grid-column: 10 / span 3; margin-top: 12px; }
  .brow__name { grid-column: 1 / span 6; }
  .brow__country { grid-column: 7 / span 5; }
  .brow__prod { display: none; }
  .brow__desc { grid-column: 1 / span 11; }
  .brow__site { grid-column: 1 / -1; justify-self: start; margin-top: 14px; }
  .brow__thumb { display: block; margin-bottom: 18px; grid-column: 1 / span 6; }
  .footer__cta { grid-column: 1 / -1; }
  .footer__contacts { grid-column: 1 / -1; margin-top: 48px; }
  .footer__col { grid-column: span 6; margin-bottom: 28px; }
  .phero__titlewrap { grid-column: 1 / -1; }
  .phero__lead { grid-column: 1 / span 8; margin-top: 26px; }
  .facts { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .fact { grid-column: auto !important; border-right: 0; border-bottom: 1px solid var(--line); }
  .fact--big { grid-column: 1 / -1 !important; }
  .about__label { grid-column: 1 / -1; margin-bottom: 24px; }
  .about__text { grid-column: 1 / -1; }
  .mats__col { grid-column: 1 / -1; }
  .similar { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .similar > :nth-child(3) { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .hero { padding: 6px; }
  .hero__last { display: none; }
  .hero__bar { grid-template-columns: 1fr; }
  .hero__dots { display: none; }
  .hero__index { display: none; }
  .header__logo .logo-text { display: none; }
  .stat { grid-template-columns: 1fr; }
  .stat__label, .stat__value { grid-column: 1 / -1; text-align: left; }
  .stat__value { margin-top: 10px; }
  .pgrid { row-gap: 44px; }
  .pgrid > * { grid-column: 1 / -1 !important; margin-top: 0 !important; }
  .pindex__list { columns: 1; }
  .row-item__text { grid-column: 3 / span 10; }
  .row-item__img { display: none; }
  .brow__country { display: none; }
  .brow__name { grid-column: 1 / span 10; }
  .cta-band { padding: 6px; }
  .cta-band__lines { display: none; }
  /* footer on phones: the logo line on top, then two columns (company | directions + social) */
  .footer__cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; row-gap: 30px; padding-top: 34px; padding-bottom: 12px; }
  .footer__col { grid-column: auto; margin-bottom: 0; }
  .footer__col:nth-child(1) { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; }
  .footer__col:nth-child(1) > a { flex: none; width: 64px !important; }
  .footer__col:nth-child(1) p { margin-top: 0 !important; font-size: 13px; line-height: 1.45; }
  .footer__col:nth-child(2) { grid-column: 1; grid-row: 2 / span 2; }
  .footer__col:nth-child(3) { grid-column: 2; grid-row: 2; }
  .footer__col:nth-child(4) { grid-column: 2; grid-row: 3; }
  .footer__col a { padding: 3px 0; }
  .crow { grid-template-columns: 90px 1fr; }
  .footer__bottom { flex-direction: column; }
  .gallery > * { grid-column: 1 / -1 !important; aspect-ratio: 4/3 !important; }
  .service__num { grid-column: 1 / span 3; }
  .service__text { grid-column: 4 / span 9; }
  .similar { grid-template-columns: 1fr; }
  .similar > :nth-child(3) { display: block; }
  .phero__lead { grid-column: 1 / -1; }
  .pcover { padding: 0 6px; }
  .pcover .media { height: calc(var(--vh, 1vh) * 62); }
  .next { padding: 6px; }
  .facts { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js .split .wi, .js .scrub .w { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .js [data-reveal="img"] img { transform: none !important; }
  .marquee__track { animation: none; }
  .ips__track { height: auto; }
  .ips__sticky { position: relative; height: auto; padding-top: 120px; padding-bottom: 120px; }
}
