/* Invictus Architects, демо
   Посока: „Името като монумент“ (taste-skill). Цветовете: пясък, мастило, един оранжев акцент.
   Сцените при скролване важат само под html.motion (добавя се от JS, ако няма prefers-reduced-motion). */

/* ---------- Шрифт: Commissioner, с българските форми (lang="bg") ---------- */
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/commissioner-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/commissioner-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/commissioner-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/commissioner-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/commissioner-cyrillic-800-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/commissioner-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Токени ---------- */
:root {
  --bg: #d9d4cd;          /* пясък и сол */
  --surface: #cdc6be;     /* една стъпка по-тъмно */
  --field: #f0efed;       /* поле за почивка: неутрално, не кремаво */
  --ink: #0e1215;
  --ink-2: #191e22;
  --muted: #4a4540;
  --on-ink: #e8e6e3;
  --on-ink-muted: #aaa39a;
  --accent: #ff7a1f;
  --accent-ink: #0e1215;
  --fill: #ffd6b8;        /* място за попълване */

  --m: clamp(20px, 1.75vw, 28px);
  --g: clamp(12px, 1.4vw, 24px);
  --bar-h: 64px;

  --t-mon: calc((100vw - 2 * var(--m)) / 7.9);
  --t-display: clamp(3.25rem, 10vw, 9.5rem);
  --t-head: clamp(2.25rem, 1.15rem + 4vw, 5.25rem);
  --t-lead: clamp(1.375rem, 1rem + 1.15vw, 2.125rem);
  --t-body: clamp(1.125rem, 1rem + 0.22vw, 1.1875rem);
  --t-small: 0.9375rem;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ---------- Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--t-body)/1.5 "Commissioner", system-ui, sans-serif; letter-spacing: -0.01em;
  font-kerning: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent; overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; } /* секция, към която води котва: фокусът е там, но без рамка около цялата секция */
::selection { background: var(--ink); color: var(--bg); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -100px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 12px 16px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.mon, .display, .head { font-weight: 800; letter-spacing: -0.05em; line-height: 0.88; font-kerning: normal; }
.display { font-size: var(--t-display); }
.head { font-size: var(--t-head); letter-spacing: -0.04em; line-height: 0.95; }

/* Място за попълване и примерно съдържание: ясно маркирано */
.fill {
  background: var(--fill); color: var(--ink); padding: 0.05em 0.3em; font-weight: 600;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; font-style: normal;
}
.fill--quiet { font-weight: 400; }

/* Бутони: плътни, прави ъгли */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 48px; padding: 0 22px; font-weight: 600; font-size: var(--t-body); line-height: 1;
  text-decoration: none; background: var(--ink); color: var(--bg); white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink-2); }
  .btn--accent:hover { background: #ff8a3a; }
}
.link { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.22em; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .link { transition: text-underline-offset 200ms var(--ease-out); } .link:hover { text-underline-offset: 0.34em; } }

/* ---------- Лента с навигация ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--bar-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--m);
  color: var(--field); transition: transform 420ms var(--ease-drawer), background-color 300ms ease, color 300ms ease;
}
.bar__mark { display: none; font-weight: 800; font-size: var(--t-body); letter-spacing: -0.04em; text-decoration: none; }
.bar__nav { display: flex; gap: 28px; margin-left: auto; }
.bar__nav a, .bar__menu { font-weight: 600; font-size: var(--t-small); text-decoration: none; padding: 10px 0; position: relative; }
.bar__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 260ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .bar__nav a:hover::after { transform: scaleX(1); transform-origin: left; } }
.bar__call { min-height: 40px; padding: 0 16px; font-size: var(--t-small); background: var(--field); color: var(--ink); }
.bar__menu { display: none; }
.bar.is-solid { background: var(--bg); color: var(--ink); }
.bar.is-solid .bar__mark, .bar.is-dark .bar__mark { display: block; }
.bar.is-solid .bar__call { background: var(--ink); color: var(--bg); }
.bar.is-dark { background: var(--ink); color: var(--on-ink); }
.bar.is-dark .bar__call { background: var(--accent); color: var(--accent-ink); }
.bar.is-hidden { transform: translateY(-100%); }

/* Меню на телефон */
.menu {
  position: fixed; inset: 0; z-index: 60; background: var(--ink); color: var(--on-ink);
  display: flex; flex-direction: column; padding: calc(var(--bar-h) + 24px) var(--m) calc(112px + env(safe-area-inset-bottom));
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 380ms var(--ease-drawer), visibility 0s linear 380ms;
}
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 420ms var(--ease-drawer), visibility 0s; }
.menu__links a { display: block; font-weight: 800; font-size: clamp(2.75rem, 13vw, 4.5rem); letter-spacing: -0.05em; line-height: 1.02; text-decoration: none; padding: 4px 0; }
.menu__meta { margin-top: auto; display: grid; gap: 6px; color: var(--on-ink-muted); }
.menu__meta a { color: var(--on-ink); font-weight: 600; }
.menu__close { position: absolute; top: 0; right: var(--m); height: var(--bar-h); font-weight: 600; font-size: var(--t-small); }


/* ---------- 1. Начало: името под снимката ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; background: var(--bg); }
.hero__stage { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.hero__media { position: absolute; inset: 0; background: #8f8a84; overflow: hidden; pointer-events: none; }
.hero__poster, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__video { opacity: 0; transition: opacity 900ms ease; }
.hero__video.is-playing { opacity: 1; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(8, 10, 12, 0.42) 0, rgba(8, 10, 12, 0) 22%), linear-gradient(to top, rgba(8, 10, 12, 0.62) 0%, rgba(8, 10, 12, 0.22) 40%, rgba(8, 10, 12, 0) 62%); } /* taste-skill-ignore: неутрален скрим под менюто и текста върху видео */
@media (max-width: 760px) { .hero__scrim { background: linear-gradient(to bottom, rgba(8, 10, 12, 0.45) 0, rgba(8, 10, 12, 0) 18%), linear-gradient(to top, rgba(8, 10, 12, 0.8) 0%, rgba(8, 10, 12, 0.52) 46%, rgba(8, 10, 12, 0) 76%); } } /* taste-skill-ignore: неутрален скрим под текста върху видео */
.hero__copy { position: absolute; left: var(--m); right: var(--m); bottom: calc(var(--t-mon) * 0.75 + 52px); display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.hero__lede { max-width: 31ch; font-size: max(18px, var(--t-body)); font-weight: 600; line-height: 1.4; }
.hero__name { position: absolute; left: var(--m); bottom: calc(var(--m) - var(--t-mon) * 0.1); font-size: var(--t-mon); white-space: nowrap; line-height: 0.88; transform-origin: 0 100%; }
.hero__name .l2::before { content: " "; }
.hero__front { position: absolute; inset: 0; color: var(--field); }
/* Каменната „завеса“ отдолу: плъзга се с transform, а мастиленият слой вътре се движи обратно и стои на място */
.hero__curtain { position: absolute; inset: 0; background: var(--ink); transform: translateY(58%); }

/* Сцена: видеото е на цял екран, после завесата се вдига и името става мастилено */
.motion .hero { height: 160svh; }
.motion .hero__stage { position: sticky; top: 0; }
.motion .hero__scrim { display: block; }
.motion .hero__curtain { transform: translateY(100%); }

/* ---------- 2. Интро: изречение вдясно, сама снимка ---------- */
.intro { position: relative; background: var(--bg); }
.intro__stage { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); padding: clamp(96px, 14vh, 160px) var(--m) clamp(96px, 12vh, 160px); }
.intro__text { grid-column: 6 / 13; grid-row: 1; align-self: end; font-size: var(--t-lead); line-height: 1.22; letter-spacing: -0.02em; font-weight: 400; text-indent: 3em; max-width: 24em; }
.intro__photo { grid-column: 1 / 5; grid-row: 1 / span 2; aspect-ratio: 1; overflow: hidden; background: var(--surface); width: min(100%, 58svh); }
.intro__photo img { width: 100%; height: 100%; object-fit: cover; }
.intro__note { grid-column: 6 / 9; grid-row: 2; align-self: start; margin-top: 28px; max-width: 30ch; font-size: var(--t-small); line-height: 1.45; color: var(--ink); }
.intro__full { display: none; }

.motion .intro { height: 260svh; }
.motion .intro__stage { position: sticky; top: 0; height: 100svh; min-height: 560px; align-content: center; padding-block: 0; overflow: hidden; }
.motion .intro__photo { visibility: hidden; }
.motion .intro__full { display: block; position: absolute; inset: 0; z-index: 2; transform-origin: 0 0; will-change: transform, clip-path; }
.intro__full img { width: 100%; height: 100%; object-fit: cover; }
.intro__cap { position: absolute; left: var(--m); bottom: var(--m); z-index: 3; color: var(--field); font-size: var(--t-small); font-weight: 600; opacity: 0; display: none; }
.motion .intro__cap { display: block; }

/* ---------- 3. Проекти: огромно заглавие и неравна стена ---------- */
.work { background: var(--ink); color: var(--on-ink); padding: clamp(120px, 16vh, 200px) var(--m) clamp(120px, 14vh, 200px); position: relative; z-index: 3; }
.work__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.work__title { font-size: var(--t-display); }
.work__note { max-width: 30ch; text-align: right; color: var(--on-ink); font-size: var(--t-body); padding-bottom: 0.4em; }
.work__note .fill { display: inline-block; margin-bottom: 6px; }
.wall { display: grid; gap: 8px; }
.wall__row { display: flex; gap: 8px; height: var(--h); }
.tile { flex: var(--r) 1 0; min-width: 0; display: flex; flex-direction: column; transition: opacity 320ms ease; }
.tile a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.tile__img { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--ink-2); }
.tile__img img { position: absolute; left: 0; top: -6%; width: 100%; height: 112%; max-width: none; object-fit: cover; }
.tile__cap { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-size: var(--t-small); font-weight: 600; min-height: 34px; }
.tile__cap .fill { font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  .wall:has(.tile:hover) .tile:not(:hover) { opacity: 0.45; }
}

/* ---------- 4. Услуги: плакат на оранжево поле ---------- */
.services { background: var(--accent); color: var(--ink); padding: 80px var(--m); overflow: hidden; position: relative; z-index: 3; }
.services__title { font-size: var(--t-small); }
.poster__item { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.poster__word { font-size: var(--t-display); font-weight: 800; letter-spacing: -0.05em; line-height: 0.92; white-space: nowrap; transition: color 240ms ease; }
.poster__detail { font-size: var(--t-body); font-weight: 600; text-align: right; max-width: 22ch; line-height: 1.3; }
@media (hover: hover) and (pointer: fine) { .poster__item:hover .poster__word { color: var(--field); } }

/* ---------- 5. Как работим: по един глагол ---------- */
.process { position: relative; z-index: 3; background: var(--ink); color: var(--field); }
.process__title { position: absolute; z-index: 4; top: clamp(24px, 4vh, 40px); left: var(--m); font-size: var(--t-head); }
.panel { position: relative; z-index: 0; isolation: isolate; height: 100svh; min-height: 560px; overflow: clip; }
.motion .panel { height: 130svh; }
.panel__img { position: absolute; inset: 0; overflow: hidden; }
.panel__img img { width: 100%; height: 100%; object-fit: cover; }
/* Затъмняване със слой вместо filter: brightness(0.68) дава същия цвят, а filter при движение тежи на слаб телефон */
.panel__img::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32); } /* taste-skill-ignore: неутрално затъмняване на снимка */
.panel__wordwrap { position: sticky; top: 0; z-index: 1; height: 100svh; min-height: 560px; display: flex; align-items: center; justify-content: center; }
.panel__text { z-index: 2; }
.panel__word { font-size: var(--t-mon); font-weight: 800; letter-spacing: -0.05em; line-height: 0.88; white-space: nowrap; color: var(--field); }
.panel__text { position: absolute; left: 0; bottom: 0; max-width: min(520px, 100%); padding: 56px var(--m) var(--m); font-size: var(--t-body); line-height: 1.45; font-weight: 600; background: linear-gradient(to top right, rgba(8,10,12,0.72), rgba(8,10,12,0.35) 55%, rgba(8,10,12,0) 80%); } /* taste-skill-ignore: неутрален скрим под текст върху снимка */
.panel__text .fill { font-weight: 600; }

/* ---------- 6. Светлината ---------- */
.light { position: relative; z-index: 3; background: var(--field); }
.light__film { position: relative; height: 78svh; min-height: 480px; overflow: hidden; background: #3b3d3e; }
.light__film video, .light__film img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.light__film video { opacity: 0; transition: opacity 900ms ease; }
.light__film video.is-playing { opacity: 1; }
.light__title { position: absolute; left: var(--m); bottom: calc(var(--m) - 0.1em); color: var(--field); font-size: var(--t-mon); }
.light__body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: 48px; min-height: 100svh; padding: clamp(40px, 7vh, 80px) var(--m); align-items: center; }
.light__copy { grid-column: 1 / 6; display: grid; gap: 28px; }
.light__lead { font-size: var(--t-lead); line-height: 1.22; letter-spacing: -0.02em; }
.facts { font-size: var(--t-body); line-height: 1.5; max-width: 40ch; }
.facts b { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.light__body-text { max-width: 44ch; }
.light__now { font-weight: 600; max-width: 40ch; }
.study { grid-column: 6 / 13; background: var(--bg); display: grid; }
/* Схемата е толкова висока, колкото позволява екранът: текстът, датите и часът се събират на един екран */
.study__svg { width: 100%; height: clamp(260px, calc(100svh - 370px), 620px); touch-action: pan-y; }
.study__controls { display: grid; gap: 16px; padding: 20px 24px 24px; background: var(--surface); }
.study__dates { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; background: var(--bg); font-weight: 600; font-size: var(--t-small); transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out); }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
@media (hover: hover) and (pointer: fine) { .chip:not([aria-pressed="true"]):hover { background: var(--field); } }
.study__time { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; font-weight: 600; }
.study__time output { font-size: var(--t-lead); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; min-width: 4.2ch; text-align: right; }
.study__cap { padding: 14px 24px 0; font-size: var(--t-small); color: var(--ink); max-width: 64ch; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: var(--bg); }
input[type="range"]::-moz-range-track { height: 6px; background: var(--bg); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--accent); transition: transform 160ms var(--ease-out); }
input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--accent); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }

/* ---------- 7. Студиото: „Отсрещният бряг“ ---------- */
.studio { position: relative; z-index: 3; background: var(--bg); min-height: 100svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: 40px; align-content: center; align-items: end; padding: clamp(72px, 10vh, 120px) var(--m); }
.studio__copy { grid-column: 1 / 6; display: grid; gap: 28px; align-content: end; }
.studio__title { font-size: var(--t-display); }
.studio__lead { font-size: var(--t-lead); line-height: 1.22; letter-spacing: -0.02em; max-width: 22ch; }
.studio__story { font-size: var(--t-body); line-height: 1.5; max-width: 40ch; }
.studio__team { grid-column: 7 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: var(--g); }
.person__img { height: min(64svh, 38vw); background: var(--surface); display: grid; place-items: start; padding: 20px; text-align: left; }
.person__name { margin-top: 12px; font-weight: 600; }

/* ---------- 8. Контакт: адресът на големи редове ---------- */
.contact { position: relative; z-index: 3; background: var(--field); }
.contact__title { padding: clamp(120px, 15vh, 200px) var(--m) 40px; }
.rows > * { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; min-height: clamp(84px, 11vw, 150px); padding: 0 var(--m) clamp(14px, 1.6vw, 24px); font-size: var(--t-head); font-weight: 800; letter-spacing: -0.04em; line-height: 1; text-decoration: none; }
.rows > *:nth-child(odd) { background: var(--bg); }
.rows > *:nth-child(even) { background: var(--surface); }
.rows a { transition: background-color 240ms ease, color 240ms ease; }
@media (hover: hover) and (pointer: fine) { .rows a:hover { background: var(--ink); color: var(--bg); } }
.row__go { flex: none; width: 0.6em; height: 0.6em; align-self: center; transition: transform 260ms var(--ease-out); }
.row__go svg { width: 100%; height: 100%; }
@media (hover: hover) and (pointer: fine) { .rows a:hover .row__go { transform: translate(6px, -6px); } }
.rows .fill { font-size: 0.55em; letter-spacing: -0.02em; vertical-align: middle; }
.row--greet { background: var(--accent) !important; color: var(--accent-ink); }
.row__arrow { display: inline-grid; place-items: center; width: 0.9em; height: 0.9em; border-radius: 50%; background: var(--ink); color: var(--accent); margin-left: 0.3em; transition: transform 240ms var(--ease-out); }
.row__arrow svg { width: 46%; height: 46%; }
@media (hover: hover) and (pointer: fine) { .row--greet:hover { background: var(--ink) !important; color: var(--accent); } .row--greet:hover .row__arrow { transform: translateX(8px); background: var(--accent); color: var(--ink); } }

/* ---------- 9. Финал: покана над отрязаното име ---------- */
.footer { position: relative; z-index: 3; background: var(--ink); color: var(--on-ink); min-height: 100svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); grid-template-rows: auto 1fr auto auto; padding: clamp(96px, 14vh, 160px) var(--m) 0; overflow: hidden; }
.footer__invite { grid-column: 1 / 8; display: grid; gap: 32px; justify-items: start; }
.footer__invite h2 { font-size: var(--t-head); }
.footer__links { grid-column: 10 / 13; display: grid; gap: 10px; align-content: start; font-weight: 600; }
.footer__links a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer__links a:hover { text-decoration: underline; text-underline-offset: 0.2em; } }
.footer__legal { grid-column: 1 / 13; grid-row: 3; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 48px 0 20px; font-size: var(--t-small); color: var(--on-ink-muted); }
.footer__legal a { color: var(--on-ink); padding-block: 4px; }
.footer__name { grid-column: 1 / 13; grid-row: 4; font-size: var(--t-mon); white-space: nowrap; margin-bottom: var(--m); transform-origin: 50% 100%; }

/* ---------- Страница на проект ---------- */
.p-hero { position: relative; height: 92svh; min-height: 560px; overflow: hidden; background: var(--ink); color: var(--field); }
.p-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-hero__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 10, 12, 0.6), rgba(8, 10, 12, 0) 55%); } /* taste-skill-ignore: неутрален скрим под заглавие върху снимка */
.p-hero__text { position: absolute; left: var(--m); right: var(--m); bottom: calc(var(--m) + 8px); display: grid; gap: 20px; justify-items: start; }
.p-hero h1 { font-size: min(var(--t-display), calc((100vw - 2 * var(--m)) / (var(--fit, 1) * 0.6))); }
.p-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 32px var(--g); padding: 48px var(--m) 56px; background: var(--surface); }
.p-facts dt { font-size: var(--t-small); color: var(--muted); font-weight: 600; }
.p-facts dd { margin-top: 6px; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.p-facts .fill { font-size: 0.9em; }
.p-story { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: 32px; padding: clamp(112px, 14vh, 180px) var(--m); }
.p-story h2 { grid-column: 1 / 6; }
.p-story__text { grid-column: 7 / 13; display: grid; gap: 22px; font-size: var(--t-lead); line-height: 1.24; letter-spacing: -0.02em; }
.p-story__text .p-story__small { font-size: var(--t-body); line-height: 1.5; letter-spacing: -0.01em; max-width: 46ch; color: var(--ink); }
.p-gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; padding: 0 var(--m) clamp(112px, 14vh, 180px); align-items: start; }
.p-gallery figure { overflow: hidden; background: var(--surface); }
.p-gallery figure:nth-child(1) { grid-column: 1 / 8; aspect-ratio: 4 / 3; }
.p-gallery figure:nth-child(2) { grid-column: 8 / 13; aspect-ratio: 4 / 5; margin-top: 18vh; }
.p-gallery figure:nth-child(3) { grid-column: 3 / 11; aspect-ratio: 16 / 9; margin-top: 8px; }
.p-gallery img { width: 100%; height: 100%; object-fit: cover; }
.p-next { display: grid; gap: 20px; background: var(--accent); color: var(--ink); padding: clamp(112px, 14vh, 180px) var(--m); text-decoration: none; }
.p-next strong { font-size: min(var(--t-display), calc((100vw - 2 * var(--m)) / (var(--fit, 1) * 0.6))); font-weight: 800; letter-spacing: -0.05em; line-height: 0.9; }
.p-next > span { font-weight: 600; font-size: 1.125rem; }
.p-next > span span { display: inline-block; transition: transform 260ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .p-next:hover > span span { transform: translateX(8px); } }
.footer--short { min-height: 88svh; }
.sub main { padding-top: 0; }

/* Страницата със снимките */
.credits { padding: calc(var(--bar-h) + 96px) var(--m) 120px; display: grid; gap: 40px; }
.credits__lead { max-width: 60ch; font-size: var(--t-lead); line-height: 1.25; letter-spacing: -0.02em; }
.credits__table { overflow-x: auto; }
.credits table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 720px; }
.credits th { text-align: left; font-weight: 600; color: var(--muted); padding: 0 16px 12px 0; }
.credits td { vertical-align: top; padding: 14px 16px 14px 0; border-top: 1px solid var(--surface); }
.credits td img { width: 120px; height: auto; }
.credits .muted { color: var(--muted); font-size: var(--t-small); }

/* Страница 404 */
.nf { min-height: 100svh; display: grid; align-content: center; justify-items: start; gap: 28px; padding: calc(var(--bar-h) + 64px) var(--m) 96px; }
.nf__code { font-size: var(--t-mon); color: var(--accent); }
.nf__lead { font-size: var(--t-lead); line-height: 1.25; letter-spacing: -0.02em; max-width: 26ch; }
.nf__links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Влизане на частите (само с JS и движение) ---------- */
.motion [data-rise] { will-change: transform, opacity; }

/* ---------- Таблет ---------- */
@media (max-width: 1024px) {
  .studio__copy, .studio__team { grid-column: 1 / 13; }
  .study__svg { height: auto; aspect-ratio: 4 / 3; }
  .person__img { height: auto; aspect-ratio: 4 / 5; }
  .footer { min-height: 0; }
  .footer__legal { padding-top: 160px; }
  .poster__item { flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 22px; }
  .poster__detail { text-align: left; }
  .light__copy { grid-column: 1 / 13; grid-template-columns: 1fr 1fr; align-items: start; }
  .light__heading { grid-column: 1; grid-row: 1; }
  .light__lead { grid-column: 1; grid-row: 2; }
  .light__body-text { grid-column: 2; grid-row: 1; }
  .light__copy .facts { grid-column: 2; grid-row: 2; }
  .light__now { grid-column: 2; grid-row: 3; }
  .study { grid-column: 1 / 13; }
}

/* ---------- Телефон: своя композиция ---------- */
@media (max-width: 760px) {
  :root { --t-mon: calc((100vw - 2 * var(--m)) / 5.1); --t-display: calc((100vw - 2 * var(--m)) / 7.3); --bar-h: 56px; }
  /* На телефон бутонът за обаждане е в лентата, а лентата не се скрива: винаги видим, без да лежи върху съдържанието */
  .bar { gap: 14px; }
  .bar__nav { display: none; }
  .bar__call, .bar.is-solid .bar__call, .bar.is-dark .bar__call { margin-left: auto; min-height: 40px; padding: 0 14px; background: var(--accent); color: var(--accent-ink); }
  .bar__menu { display: block; }
  .bar.is-hidden { transform: none; }

  .hero__curtain { transform: translateY(50%); }
  .hero__name { bottom: calc(var(--m) - var(--t-mon) * 0.08); line-height: 0.86; }
  .hero__name .l2 { display: block; }
  .hero__name .l2::before { content: none; }
  .hero__copy { bottom: calc(var(--t-mon) * 1.86 + 40px); flex-direction: column; align-items: flex-start; gap: 16px; }


  .intro__stage { grid-template-columns: 1fr 1fr; padding: 96px var(--m); row-gap: 40px; }
  .intro__text { grid-column: 1 / 3; text-indent: 0; font-size: 1.375rem; }
  .intro__photo { grid-column: 2; grid-row: 2; aspect-ratio: 4 / 5; margin: 0 0 0 auto; width: 100%; }
  .intro__note { grid-column: 1; grid-row: 2; padding-right: 8px; align-self: end; margin-top: 0; }
  .motion .intro { height: 220svh; }

  .work { padding: 96px var(--m) 112px; }
  .work__head { flex-direction: column; align-items: flex-start; gap: 16px; }

  .work__note { text-align: left; }
  .wall__row { height: auto; display: grid; grid-template-columns: 62fr 38fr; }
  .wall__row:nth-child(odd) { grid-template-columns: 38fr 62fr; }
  .tile { height: 236px; }
  .tile--wide { grid-column: 1 / -1; height: 280px; }
  .tile__cap { flex-direction: column; gap: 4px; padding-top: 8px; min-height: 0; }
  .tile__cap .fill { align-self: flex-start; font-size: 0.8125rem; }
  .tile--wide .tile__cap { flex-direction: row; justify-content: space-between; }

  .services { padding: 72px var(--m); }
  .poster__item { flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 22px; }
  .poster__detail { text-align: left; font-size: var(--t-small); }

  .process__title { top: 20px; }
  .panel__text { max-width: none; right: 0; padding-top: 72px; background: linear-gradient(to top, rgba(8,10,12,0.78), rgba(8,10,12,0.4) 60%, rgba(8,10,12,0)); } /* taste-skill-ignore: неутрален скрим под текст върху снимка */

  .light__film { height: 62svh; }
  .light__title { font-size: var(--t-display); }
  .light__body { padding: 72px var(--m) 96px; row-gap: 40px; }
  .light__copy { grid-template-columns: 1fr; }
  .light__copy > * { grid-column: auto !important; grid-row: auto !important; }

  .study { margin: 0 calc(var(--m) * -1); }
  .study__controls { padding: 16px var(--m) 20px; }
  .study__cap { padding: 12px var(--m) 0; }

  .studio { grid-template-columns: 1fr; padding: 88px var(--m); min-height: 0; }
  .studio__copy, .studio__team { grid-column: auto; }
  .studio__team { gap: 12px; }

  .contact__title { padding: 88px var(--m) 24px; }
  .rows > * { font-size: var(--t-head); min-height: 84px; padding-bottom: 14px; }
  .row--greet { min-height: 96px !important; }
  .row__arrow { width: 56px; height: 56px; margin-left: auto; }
  .row__pre { display: none; }

  .footer { grid-template-rows: auto auto 1fr auto auto; padding-top: 88px; min-height: 88svh; }
  .footer__invite { grid-column: 1 / 13; }
  .footer__invite h2 { font-size: var(--t-head); }
  .footer__invite .btn { width: 100%; }
  .footer__links { grid-column: 1 / 13; grid-row: 2; display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 40px; }
  .footer__legal { grid-row: 4; padding-bottom: 16px; }
  .footer__name { grid-row: 5; line-height: 0.86; }
  .footer__name .l2 { display: block; }

  .p-hero { height: 78svh; }
  .p-facts { grid-template-columns: 1fr 1fr; gap: 24px 16px; padding: 32px var(--m) 40px; }
  .p-story { grid-template-columns: 1fr; padding: 88px var(--m); }
  .p-story h2, .p-story__text { grid-column: auto; }
  .p-gallery { grid-template-columns: 1fr; gap: 8px; padding-bottom: 88px; }
  .p-gallery figure:nth-child(n) { grid-column: auto; margin-top: 0; }
  .p-gallery figure:nth-child(2) { width: 72%; justify-self: end; }
  .p-next { padding: 88px var(--m) 96px; }
  .p-next strong { font-size: min(12vw, calc((100vw - 2 * var(--m)) / (var(--fit, 1) * 0.6))); }
  .credits { padding-top: calc(var(--bar-h) + 56px); }
}

/* Без движение: всичко е видимо, нищо не се закача и не се плъзга */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
