/* BEA Solutions – стилове на сайта.
   Посока: „The place carries it“ (taste-skill). Цветовете са взети от сценичната светлина:
   топло черно, топло бяло и един кехлибарен акцент. Анимации само с transform и opacity. */

:root {
  /* Цветове */
  --bg: #0c0b0a;
  --surface: #161412;
  --surface-2: #221f1b;
  --surface-3: #2c2823;
  --ink: #efede9;
  --muted: #a9a49c;
  --accent: #f2a541;
  --accent-strong: #ffbb5e;
  --accent-ink: #160e05;
  --paper: #e9e7e3;
  --paper-ink: #13110f;
  --paper-muted: #5d564d;

  /* Шрифтове */
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mark: "Unbounded", "Onest", system-ui, sans-serif;

  /* Пет размера на текста */
  --step-small: 0.875rem;                                        /* 14px */
  --step-body: clamp(1.0625rem, 1rem + 0.15vw, 1.125rem);         /* 17–18px */
  --step-lead: clamp(1.3125rem, 1.05rem + 0.9vw, 2rem);           /* 21–32px */
  --step-head: clamp(2.25rem, 1.35rem + 2.9vw, 3.75rem);          /* 36–60px */
  --step-display: clamp(2.5rem, 0.6rem + 7vw, 9rem);               /* 40–144px */

  /* Разстояния */
  --margin: clamp(20px, 2.2vw, 32px);
  --gutter: clamp(16px, 1.7vw, 24px);
  --section: clamp(56px, 1.5rem + 5.5vw, 112px);
  --head-h: 72px;

  /* Движение */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

@media (max-width: 900px) { :root { --head-h: 64px; } }

/* ---------- Основа ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--head-h);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.55;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
p { text-wrap: pretty; }
address { font-style: normal; }
button, input, textarea, select { font: inherit; color: inherit; }
input, textarea, select { font-size: max(16px, var(--step-body)); }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

a, button, [role="button"], .chip, summary { touch-action: manipulation; }
button, .btn, .chip, summary, .card { user-select: none; -webkit-user-select: none; }

.skip {
  position: fixed; left: var(--margin); top: 8px; z-index: 100;
  padding: 12px 16px; background: var(--accent); color: var(--accent-ink);
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Места за попълване от клиента – ясно маркирани */
.fill {
  color: var(--accent);
  background: rgb(242 165 65 / 0.12);
  padding: 0 0.25em;
}

/* ---------- Бутони и връзки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px;
  font-weight: 500; font-size: var(--step-body); line-height: 1; text-decoration: none;
  border: 0; border-radius: 0; cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.btn:active { transform: scale(0.97); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: var(--surface-3); color: var(--ink); }
.btn--wide { width: 100%; }

.link {
  color: inherit; text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: 0.22em; text-decoration-thickness: 0.07em;
  transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease;
}
.link--u { text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }

@media (hover: hover) and (pointer: fine) {
  .btn--accent:hover { background: var(--accent-strong); }
  .btn--ghost:hover { background: #3a352f; }
  .link:hover { text-decoration-color: currentColor; }
}

/* ---------- Горна лента ---------- */

.head {
  position: fixed; inset: 0 0 auto; z-index: 40;
  height: var(--head-h);
  display: flex; align-items: center; gap: 32px;
  padding: 0 var(--margin);
  padding-top: env(safe-area-inset-top, 0px);
  background-color: transparent;
  transition: transform 320ms var(--ease-out), background-color 300ms ease;
}
.head.is-solid { background-color: var(--bg); }
.head.is-hidden { transform: translateY(-100%); }

.wordmark {
  font-family: var(--font-mark); font-weight: 600; font-size: var(--step-body);
  letter-spacing: -0.02em; color: var(--ink); text-decoration: none; white-space: nowrap;
  margin-right: auto;
}
.wordmark span { color: var(--muted); transition: color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .wordmark:hover span { color: var(--ink); } }

.head__nav { display: flex; gap: 28px; font-size: var(--step-body); }
.head__cta { min-height: 44px; padding: 0 20px; }

.head__menu {
  display: none; min-height: 44px; padding: 0 4px;
  background: none; border: 0; font-weight: 500; font-size: var(--step-body); cursor: pointer;
}

.menu {
  position: absolute; top: calc(100% - 4px); right: var(--margin);
  width: min(340px, calc(100vw - 2 * var(--margin)));
  padding: 16px 24px 24px;
  background: var(--surface-2);
  /* taste-skill-ignore: менюто плава над страницата, затова има сянка */
  box-shadow: 0 24px 48px -12px rgb(0 0 0 / 0.6), 0 4px 12px rgb(20 12 4 / 0.4); /* taste-skill-ignore */
  transform-origin: top right;
  transition: opacity var(--t-ui) var(--ease-out), transform var(--t-ui) var(--ease-out), visibility 0s;
}
.menu nav { display: flex; flex-direction: column; margin-bottom: 16px; }
.menu nav a { padding: 12px 0; font-size: var(--step-lead); color: var(--ink); text-decoration: none; }
.menu.is-closed {
  opacity: 0; transform: scale(0.97) translateY(-6px); pointer-events: none; visibility: hidden;
  transition: opacity 170ms var(--ease-out), transform 170ms var(--ease-out), visibility 0s linear 170ms;
}
@media (min-width: 901px) { .menu { display: none; } }

@media (max-width: 900px) {
  .head__nav { display: none; }
  .head__menu { display: block; }
}
/* На телефон бутонът за обаждане е в горната лента и тя не се скрива */
.head__call { display: none; min-height: 40px; padding: 0 14px; }
@media (max-width: 700px) {
  .head { gap: 14px; }
  .head__cta { display: none; }
  .head__call { display: inline-flex; }
  .head.is-hidden { transform: none; }
}

/* Бутон за музика: изключен по подразбиране, лентите показват дали свири */
.sound {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px;
  background: none; border: 0; color: var(--ink); font-size: var(--step-body); cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), color var(--t-hover) ease;
}
.sound[hidden] { display: none; }
.sound:active { transform: scale(0.97); }
.sound__bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.sound__bars i {
  width: 3px; height: 16px; background: var(--muted); transform-origin: 50% 100%;
  transform: scaleY(0.25); transition: transform var(--t-ui) var(--ease-out), background-color var(--t-hover) ease;
}
.sound[aria-pressed="true"] .sound__bars i { background: var(--accent); }
.sound[aria-pressed="true"] .sound__bars i:nth-child(1) { transform: scaleY(0.55); }
.sound[aria-pressed="true"] .sound__bars i:nth-child(2) { transform: scaleY(1); transition-delay: 40ms; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(3) { transform: scaleY(0.75); transition-delay: 80ms; }
@media (hover: hover) and (pointer: fine) { .sound:hover .sound__bars i { background: var(--ink); } .sound[aria-pressed="true"]:hover .sound__bars i { background: var(--accent-strong); } }
.hero__sound, .menu__sound { display: none; }
.menu__sound:not([hidden]) { display: inline-flex; margin-bottom: 8px; }
@media (max-width: 700px) {
  .head__sound { display: none; }
  .hero__sound:not([hidden]) { display: inline-flex; margin-top: 18px; margin-left: -4px; }
}
@media (max-width: 900px) and (min-width: 701px) { .head__sound { margin-right: -8px; } }

/* ---------- 1. Начало ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  padding: var(--head-h) var(--margin) 0;
  overflow: clip;
  background: #1c120a;
  view-timeline-name: --hero;
}
.hero__media { position: absolute; inset: 0; background: #1c120a url("/media/images/hero-light-poster.webp") center / cover no-repeat; }
.hero__video { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .hero__media { background-image: url("/media/images/hero-light-poster-tall.webp"); } }
/* Неутрален тъмен слой само под текста (taste-skill-ignore: скрим под текст върху видео) */
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.64) 0%, rgb(0 0 0 / 0.5) 42%, rgb(0 0 0 / 0) 78%); /* taste-skill-ignore */
}

.hero__copy {
  position: relative; z-index: 1;
  grid-column: 1 / -1; align-self: center;
  padding-bottom: 6vh;
}
.hero__title {
  font-size: var(--step-display); line-height: 1; letter-spacing: -0.035em; font-weight: 500;
}
.hero__lead { margin-top: 32px; max-width: 32ch; font-size: var(--step-lead); line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); }
.hero__place {
  position: absolute; z-index: 1; left: var(--margin); bottom: var(--margin);
  display: flex; align-items: center; gap: 10px;
  font-size: var(--step-small); color: var(--ink);
}
.hero__place::before { content: ""; width: 8px; height: 8px; background: var(--accent); }
.hero__place a { color: inherit; }

.hero__cards {
  position: absolute; z-index: 1;
  right: var(--margin); bottom: var(--margin);
  display: flex; gap: 16px;
}
.card {
  display: block; width: 210px;
  background: var(--paper); color: var(--paper-ink); text-decoration: none;
  transition: transform var(--t-press) var(--ease-out);
}
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card:active { transform: scale(0.98); }
.card__bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; padding: 0 12px; font-weight: 500; font-size: var(--step-body);
}
.card__arrow {
  width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform 300ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .card:hover .card__arrow { transform: translateX(3px); } }

/* Маскираните редове на заглавието */
.lines .line { display: block; overflow: clip; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.lines [data-line], .lines [data-line-foot] { display: block; }

@media (min-width: 701px) { .hero__title .line { white-space: nowrap; } }
@media (max-width: 700px) {
  .hero { display: block; padding-top: 0; }
  .hero__copy { position: absolute; left: var(--margin); right: var(--margin); top: 30%; padding: 0; }
  .hero__lead { margin-top: 20px; }
  .hero__media::after { background: rgb(0 0 0 / 0.42); }
  .hero__place { display: none; }
  .hero__cards {
    left: var(--margin); right: var(--margin);
    bottom: var(--margin);
    gap: 12px;
  }
  .hero__cards li { flex: 1 1 0; min-width: 0; }
  .card { width: 100%; }
  .card__bar { font-size: var(--step-small); padding: 0 10px; }
}

/* ---------- 2. Кои сме: текст вляво, голяма снимка вдясно до ръба ---------- */

.intro {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  align-items: center;
  padding: var(--section) 0 var(--section) var(--margin);
}
.intro__text { grid-column: 1 / span 6; }
.intro__title { font-size: var(--step-head); line-height: 1.02; letter-spacing: -0.03em; max-width: 13ch; }
.intro__statement { margin-top: 44px; font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.012em; max-width: 36ch; }
.intro__body { margin-top: 32px; max-width: 44ch; }
.intro__more { display: inline-block; margin-top: 32px; font-weight: 500; }
.intro__photo { grid-column: 8 / -1; height: min(88svh, 900px); overflow: clip; background: var(--surface); }
.intro__photo img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .intro { display: flex; flex-direction: column; align-items: stretch; padding: var(--section) var(--margin); }
  .intro__photo { order: -1; height: auto; aspect-ratio: 4 / 5; margin: 0 calc(-1 * var(--margin)) 48px; }
}

/* Снимката се отваря отдолу нагоре и леко се движи, докато се скролва */
@media (prefers-reduced-motion: no-preference) {
  .js .intro__photo img { clip-path: inset(0 0 100% 0); transition: clip-path 1200ms var(--ease-in-out); }
  .js .intro__photo.is-in img { clip-path: inset(0); }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .intro__photo img { animation: intro-drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    @keyframes intro-drift { from { transform: translateY(-4%) scale(1.1); } to { transform: translateY(4%) scale(1.1); } }
  }
}

/* Изречението се „пълни“ с цвят, докато минава през екрана */
[data-fill] { --fill: var(--ink); color: var(--fill); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .is-filling > span { color: color-mix(in oklab, var(--fill) 45%, transparent); animation: ink-fill linear both; animation-timeline: view(); animation-range: cover 18% cover 48%; }
    @keyframes ink-fill { to { color: var(--fill); } }
  }
}

/* ---------- 3. Проба, проба: снимката се отваря на цял екран и се приближава ---------- */

.focus { position: relative; }
/* Без JavaScript или при изключени анимации: заглавие, снимка и текст един под друг */
.focus__stage {
  display: grid; justify-items: center; gap: 24px;
  padding: var(--section) var(--margin);
}
.focus__title { display: contents; font-weight: 500; }
.focus__a, .focus__b {
  position: relative; z-index: 2; text-align: center;
  font-size: var(--step-display); line-height: 0.98; letter-spacing: -0.035em; white-space: nowrap;
}
.focus__a { order: 1; }
.focus__mask { order: 2; position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: clip; background: var(--surface); }
.focus__b { order: 3; }
.focus__cap { order: 4; max-width: 32ch; text-align: center; color: var(--ink); }
.focus__counter { position: absolute; inset: 0; }
.focus__counter picture, .focus__img { display: block; width: 100%; height: 100%; }
.focus__img { object-fit: cover; transform-origin: 50% 50%; transition: transform 1200ms var(--ease-in-out); }
.focus__shade { display: none; }

/* С JavaScript: сцената стои, снимката се отваря от прозорец до цял екран, после се приближава */
.focus.is-pinned { height: 420svh; }
.focus.is-pinned .focus__stage {
  position: sticky; top: 0; height: 100svh; overflow: clip;
  gap: 0; grid-template-rows: auto auto 1fr auto; align-items: start;
  padding: calc(var(--head-h) + 2vh) var(--margin) 6vh;
}
.focus.is-pinned .focus__mask { position: absolute; inset: 0; width: auto; aspect-ratio: auto; z-index: 0; }
.focus.is-pinned .focus__shade {
  display: block; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(rgb(0 0 0 / 0.66), rgb(0 0 0 / 0.16) 34%, rgb(0 0 0 / 0.2) 52%, rgb(0 0 0 / 0.78)); /* taste-skill-ignore */
}
.focus.is-pinned .focus__a { grid-row: 1; }
.focus.is-pinned .focus__cap { grid-row: 3; align-self: end; margin-bottom: 20px; position: relative; z-index: 2; font-size: var(--step-lead); line-height: 1.3; max-width: 30ch; }
.focus.is-pinned .focus__b { grid-row: 4; align-self: end; }
.focus.is-pinned[data-stage="1"] .focus__img { transform: scale(1.8) translate(-8%, -20%); }
.focus.is-pinned[data-stage="2"] .focus__img { transform: scale(2.6) translate(11%, 8%); }

@media (prefers-reduced-motion: no-preference) {
  .focus.is-pinned .focus__b,
  .focus.is-pinned .focus__cap {
    opacity: 0; transform: translateY(24px);
    transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-expo);
  }
  .focus.is-pinned:is([data-stage="1"], [data-stage="2"]) .focus__b { opacity: 1; transform: none; }
  .focus.is-pinned[data-stage="2"] .focus__cap { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .focus__a, .focus__b { font-size: var(--step-head); letter-spacing: -0.03em; }
}
@media (max-width: 700px) {
  .focus__mask { aspect-ratio: 4 / 5; }
  .focus.is-pinned[data-stage="1"] .focus__img { transform: scale(1.8) translate(20%, -20%); }
  .focus.is-pinned[data-stage="2"] .focus__img { transform: scale(2.6) translate(22%, 5%); }
}

/* ---------- 4. Техника ---------- */

.gear {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  padding: var(--section) var(--margin);
}
.gear__media { grid-column: 1 / span 5; grid-row: 1 / span 2; align-self: start; position: sticky; top: 12vh; }
.gear__pictures { position: relative; aspect-ratio: 4 / 5; max-height: 80svh; overflow: clip; background: var(--surface); }
.gear__pictures img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 500ms ease;
}
.gear__pictures img.is-on { opacity: 1; }

.gear__body { grid-column: 7 / span 6; grid-row: 2; }
.gear__title { grid-column: 7 / span 6; grid-row: 1; padding-top: 4vh; font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.025em; margin-bottom: 56px; }
.gear__list { display: grid; gap: 12px; }
.gear__item { padding: 18px 0 22px; outline-offset: 6px; cursor: default; }
.gear__row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.gear__name {
  font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.015em; font-weight: 500;
  color: var(--muted); transition: color var(--t-ui) ease;
}
.gear__meta { font-size: var(--step-small); color: var(--muted); white-space: nowrap; }
.gear__desc { margin-top: 10px; max-width: 40ch; color: var(--muted); font-size: var(--step-body); transition: color var(--t-ui) ease; }
.gear__item.is-active .gear__name,
.gear__item.is-active .gear__desc { color: var(--ink); }
.gear__item.is-active .gear__meta { color: var(--ink); }
.gear__thumb { display: none; }
.gear__more { margin-top: 40px; color: var(--muted); }
.gear__more .link { color: var(--ink); }

/* Без JavaScript всяка категория показва своята снимка */
html:not(.js) .gear__media { display: none; }
html:not(.js) .gear__body, html:not(.js) .gear__title { grid-column: 1 / -1; }
html:not(.js) .gear__thumb { display: block; width: min(320px, 100%); aspect-ratio: 4 / 5; object-fit: cover; margin-top: 16px; }
html:not(.js) .gear__name, html:not(.js) .gear__desc { color: var(--ink); }

@media (max-width: 900px) {
  .gear { display: block; }
  .gear__media {
    position: sticky; top: 0; z-index: 2;
    margin: 0 calc(-1 * var(--margin));
    background: var(--bg);
  }
  .gear__pictures { aspect-ratio: auto; height: 38svh; max-height: none; }
  .gear__body { padding-top: 40px; }
  .gear__title { padding-top: 0; margin-bottom: 24px; }
  .gear__item { padding: 16px 0 18px; }
}

/* ---------- 5. Как работим ---------- */

.steps { padding: var(--section) 0; }
.steps__head {
  display: flex; align-items: end; justify-content: space-between; gap: 24px;
  padding: 0 var(--margin);
}
.steps__title { font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.025em; }
.steps__btns { display: flex; gap: 8px; }
.sq {
  width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink); border: 0; cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, opacity var(--t-hover) ease;
}
.sq svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sq:active { transform: scale(0.95); }
.sq[disabled] { opacity: 0.4; cursor: default; }
@media (hover: hover) and (pointer: fine) { .sq:not([disabled]):hover { background: var(--surface-3); } }

.steps__bar { margin: 28px var(--margin) 44px; height: 6px; background: var(--surface-2); overflow: clip; }
.steps__bar span { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0.25); }

.steps__row {
  display: flex; gap: 32px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--margin);
  padding: 0 var(--margin) 8px;
  scrollbar-width: none;
}
.steps__row::-webkit-scrollbar { display: none; }
.steps__row.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.steps__row.is-dragging * { pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .steps__row { cursor: grab; } }

.step { flex: 0 0 300px; scroll-snap-align: start; display: flex; flex-direction: column; }
.step__name { font-size: var(--step-body); font-weight: 600; line-height: 1.3; }
.step__text { margin-top: 8px; color: var(--muted); font-size: var(--step-body); min-height: 4.65em; }
.step img { margin-top: var(--space, 96px); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; -webkit-user-drag: none; }

@media (max-width: 900px) { .steps__btns { display: none; } }
@media (max-width: 700px) {
  .steps__bar { margin-bottom: 32px; }
  .steps__row { gap: 16px; }
  .step { flex-basis: 72vw; }
  .step img { margin-top: calc(var(--space, 96px) * 0.45); }
}

/* ---------- 6. Събития: снимките се сменят една след друга при скрол ---------- */

.events { position: relative; background: var(--bg); }
.events__stage { position: relative; }
.events__title {
  position: absolute; z-index: 3; top: calc(var(--head-h) + 20px); left: var(--margin);
  font-size: var(--step-lead); font-weight: 400; letter-spacing: -0.01em;
}
.ev { position: relative; isolation: isolate; height: 100svh; overflow: clip; background: var(--surface); }
.ev__media { position: absolute; inset: 0; }
.ev__media picture, .ev__media img { display: block; width: 100%; height: 100%; }
.ev__media img { object-fit: cover; filter: brightness(0.8); }
/* Неутрален тъмен слой горе и долу, за да се четат заглавията */
.ev::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgb(0 0 0 / 0.5), rgb(0 0 0 / 0) 28%, rgb(0 0 0 / 0) 52%, rgb(0 0 0 / 0.62)); /* taste-skill-ignore */
}
.ev__dim { position: absolute; inset: 0; z-index: 1; background: #000; opacity: 0; pointer-events: none; }
.ev__name {
  position: absolute; z-index: 2; left: var(--margin); right: var(--margin); bottom: 7vh;
  max-width: 13ch;
  font-size: var(--step-display); line-height: 0.95; letter-spacing: -0.015em; font-weight: 500;
  text-transform: uppercase; text-wrap: balance;
}

/* С JavaScript: една сцена на цял екран, всяка следваща снимка се изкачва върху предишната */
.events.is-pinned { height: calc(100svh + 4 * 90svh); }
.events.is-pinned .events__stage { position: sticky; top: 0; height: 100svh; overflow: clip; }
.events.is-pinned .ev { position: absolute; inset: 0; height: auto; }
.events.is-pinned .ev:not(:first-of-type) { transform: translate3d(0, 100%, 0); }
.events.is-pinned .ev__name { transition: opacity 240ms var(--ease-out), transform 360ms var(--ease-out); }
.events.is-pinned .ev.is-leaving .ev__name { opacity: 0; transform: translateY(-16px); }

@media (max-width: 700px) {
  .ev__name { bottom: 6vh; max-width: none; }
}

/* ---------- 7. Сглобете си техниката ---------- */

.kit { position: relative; z-index: 1; background: var(--surface); padding: var(--section) var(--margin); }
.kit__form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.kit__ask { grid-column: 1 / span 6; }
.kit__title { font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.025em; }
.kit__lead { margin-top: 24px; max-width: 44ch; }

.kit__q { border: 0; padding: 0; margin-top: 40px; min-width: 0; }
.kit__q legend { padding: 0; margin-bottom: 14px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px;
  background: var(--surface-3); color: var(--ink); font-size: var(--step-body);
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.chip:active span { transform: scale(0.97); }
.chip input:checked + span { background: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .chip:hover input:not(:checked) + span { background: #38332d; } }

.kit__sheet {
  grid-column: 8 / -1; position: sticky; top: calc(var(--head-h) + 24px);
  background: var(--bg); padding: clamp(24px, 2.4vw, 40px);
}
.kit__sheet-title { font-size: var(--step-lead); letter-spacing: -0.015em; }
.kit__list { margin-top: 24px; display: grid; gap: 14px; min-height: 260px; align-content: start; }
.kit__list li { display: grid; grid-template-columns: 2.4ch 1fr; gap: 16px; align-items: baseline; }
.kit__qty { font-size: var(--step-lead); font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; line-height: 1; }
.kit__item { line-height: 1.35; }
.kit__item small { display: block; font-size: var(--step-small); color: var(--muted); }
.kit__note { margin-top: 20px; font-size: var(--step-small); color: var(--muted); }

.kit__fields { margin: 28px 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field span { font-size: var(--step-small); color: var(--muted); }
.field input {
  width: 100%; min-width: 0; height: 52px; padding: 0 14px; border: 0; border-radius: 0;
  background: var(--surface-2); color: var(--ink); color-scheme: dark;
}
.field input::placeholder { color: #7d776e; }
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.field.is-invalid input { outline: 2px solid #ff7a59; outline-offset: 0; }
.kit__legal { margin-top: 14px; font-size: var(--step-small); color: var(--muted); }
.kit__legal .link { color: var(--ink); }
.kit__done { margin-top: 20px; padding: 20px; background: var(--surface-2); }
.kit__done h3 { font-size: var(--step-body); }
.kit__done p { margin-top: 4px; color: var(--muted); font-size: var(--step-body); }

@media (prefers-reduced-motion: no-preference) {
  .kit__list li.is-new { animation: kit-in 420ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }
  @keyframes kit-in { from { opacity: 0; transform: translateY(8px); } }
  .kit__qty.is-changed { animation: kit-qty 360ms var(--ease-out); }
  @keyframes kit-qty { from { opacity: 0.2; transform: translateY(-6px); } }
}

@media (max-width: 900px) {
  .kit__ask, .kit__sheet { grid-column: 1 / -1; }
  .kit__sheet { position: static; margin-top: 48px; }
  .kit__fields { grid-template-columns: 1fr; }
}

/* ---------- 8. Въпроси ---------- */

.faq {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  padding: 0 var(--margin);
}
.faq__body { grid-column: 1 / span 5; padding: var(--section) 0; }
.faq__title { font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.025em; }
.faq__facts { margin-top: 32px; display: grid; gap: 6px; }
.faq__list { margin-top: 40px; display: grid; gap: 28px; }
.qa summary {
  list-style: none; cursor: pointer; position: relative;
  padding-right: 40px; font-size: var(--step-body); font-weight: 500; line-height: 1.35;
  transition: color var(--t-hover) ease;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; position: absolute; right: 6px; top: 0.35em;
  width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform var(--t-ui) var(--ease-out);
}
.qa[open] summary::after { transform: translateY(4px) rotate(-135deg); }
@media (hover: hover) and (pointer: fine) { .qa summary:hover { color: var(--accent); } }
.qa__a { margin-top: 10px; color: var(--muted); max-width: 46ch; }
@media (prefers-reduced-motion: no-preference) {
  .qa[open] .qa__a { animation: qa-in 320ms var(--ease-out); }
  @keyframes qa-in { from { opacity: 0; transform: translateY(-6px); } }
}
.faq__actions { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

.faq__media { grid-column: 7 / -1; position: relative; padding-bottom: 80px; margin-right: calc(-1 * var(--margin)); }
.faq__tall { aspect-ratio: 3 / 4; overflow: clip; }
.faq__tall img { width: 100%; height: 100%; object-fit: cover; }
.faq__small {
  position: absolute; left: -40px; bottom: 40px; width: 33%; aspect-ratio: 1; overflow: clip;
  outline: var(--gutter) solid var(--bg);
}
.faq__small img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .faq { display: flex; flex-direction: column-reverse; }
  .faq__media { margin: 0 calc(-1 * var(--margin)); padding-bottom: 0; }
  .faq__tall { aspect-ratio: 4 / 5; }
  .faq__small { left: auto; right: var(--margin); bottom: -40px; width: 38%; outline-width: 8px; }
  .faq__body { padding-top: 88px; }
  .faq__list { gap: 24px; }
  .qa summary { min-height: 44px; }
  .faq__actions .btn { width: 100%; }
}

/* ---------- 9. Контакти ---------- */

.visit { position: relative; height: 100svh; min-height: 680px; background: #12100e; }
.map { position: absolute; inset: 0; overflow: clip; }
.map__svg { width: 100%; height: 100%; }
.map__ground { fill: #12100e; }
.map__green { fill: #171913; }
.map__bldg { fill: #221e1a; }
.map__road { fill: none; stroke: #36312b; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.map__road--major { stroke: #48413a; stroke-width: 13; }
.map__target { fill: var(--accent); }
.map__door-halo { fill: rgb(243 238 230 / 0.25); }
.map__door { fill: var(--ink); }
.map__labels text { fill: #b4ab9e; font-family: var(--font); font-size: 9px; letter-spacing: 0.02em; }
.map__labels .map__door-label { fill: var(--ink); font-weight: 600; }
.map__credit {
  position: absolute; left: var(--margin); bottom: 16px;
  font-size: var(--step-small); color: var(--muted);
}
.map__credit a { color: inherit; }

.visit__card {
  position: absolute; z-index: 1; top: calc(var(--head-h) + 32px); right: 60px;
  width: 400px; padding: 32px 32px 0;
  background: var(--paper); color: var(--paper-ink);
}
.visit__title { font-size: var(--step-lead); line-height: 1.15; letter-spacing: -0.015em; font-weight: 400; }
.visit__addr { margin-top: 20px; font-size: var(--step-body); line-height: 1.5; }
.visit__hours { margin-top: 20px; display: grid; gap: 4px; font-size: var(--step-body); font-variant-numeric: tabular-nums; }
.visit__hours div { display: flex; justify-content: space-between; gap: 16px; }
.visit__hours dt { color: var(--paper-muted); }
.visit__phone { margin-top: 16px; font-weight: 500; }
.visit__btn { margin: 28px -32px 0; width: calc(100% + 64px); min-height: 56px; }
.visit .fill { color: #7a4300; background: rgb(242 165 65 / 0.28); }

@media (max-width: 700px) {
  .visit { height: auto; min-height: 0; padding-bottom: calc(var(--section) * 0.6); background: var(--bg); }
  .map { position: relative; height: 70svh; }
  .map__credit { bottom: 96px; }
  .visit__card { position: relative; top: auto; right: auto; width: auto; margin: -80px var(--margin) 0; padding: 24px 24px 0; }
  .visit__btn { margin: 24px -24px 0; width: calc(100% + 48px); }
}

/* ---------- 10. Край ---------- */

.foot {
  position: relative; min-height: 100svh; overflow: clip;
  display: grid; grid-template-rows: auto 1fr auto auto; grid-template-columns: minmax(0, 1fr);
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.foot__photo { position: absolute; inset: 0; }
.foot__photo img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.62); }
.foot__top {
  position: relative; display: flex; justify-content: space-between; gap: 32px;
  padding: 32px var(--margin);
}
.foot__nav { display: grid; gap: 6px; font-size: var(--step-body); align-content: start; }
.foot__contact { display: grid; gap: 6px; justify-items: end; text-align: right; font-size: var(--step-body); }
.foot__mark {
  position: relative; grid-row: 3; margin: 0 var(--margin);
  font-family: var(--font-mark); font-weight: 600;
  font-size: calc((100vw - 2 * var(--margin)) / 8.4);
  line-height: 0.9; letter-spacing: -0.04em; white-space: nowrap;
  color: var(--paper);
}
.foot__legal {
  position: relative; grid-row: 4; display: flex; flex-wrap: wrap; gap: 8px 28px;
  margin: 28px var(--margin) 0; font-size: var(--step-small); color: var(--ink);
}
.foot .fill { color: var(--accent-strong); }

@media (max-width: 700px) {
  .foot { min-height: 88svh; }
  .foot__top { flex-direction: column; }
  .foot__contact { justify-items: start; text-align: left; }
}

/* ---------- Движение при скрол и зареждане ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* Зареждане на първия екран – приключва до 1,2 s */
  .js .hero [data-line] { transform: translateY(105%); animation: rise-line 900ms var(--ease-expo) forwards; animation-delay: calc(120ms + var(--i) * 100ms); }
  .js .hero [data-load] { opacity: 0; transform: translateY(14px); animation: rise 600ms var(--ease-out) forwards; animation-delay: var(--d); }
  .js .hero__video { opacity: 0; transition: opacity 900ms ease; }
  .js .hero__video.is-playing { opacity: 1; }

  /* Появяване при скрол – веднъж, по реда на четене */
  .js [data-reveal] {
    opacity: 0; transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo);
    transition-delay: var(--d, 0ms);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .gear__item[data-reveal] { transition-delay: calc(var(--i, 0) * 70ms); }

  .js .shutter img { clip-path: inset(0 0 100% 0); transform: scale(1.12); transition: clip-path 1100ms var(--ease-in-out), transform 1500ms var(--ease-soft); }
  .js .shutter.is-in img { clip-path: inset(0); transform: none; }

  .js .foot__mark [data-line-foot] { transform: translateY(105%); transition: transform 1100ms var(--ease-expo); }
  .js .foot__mark.is-in [data-line-foot] { transform: none; }
}
@keyframes rise-line { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Първият екран се отдръпва, докато излиза */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero__media { animation: hero-sink linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    .hero__copy, .hero__cards { animation: hero-lift linear both; animation-timeline: --hero; animation-range: exit 0% exit 70%; }
    @keyframes hero-sink { to { transform: translateY(8%) scale(1.06); opacity: 0.55; } }
    @keyframes hero-lift { to { transform: translateY(-6%); opacity: 0; } }
  }
}

@media (prefers-reduced-motion: reduce) {
  .gear__pictures img, .focus__img { transition: none; }
}
