/* =========================================================
   Никола Захариев — nzahariev.com
   Един общ CSS за двете страници (index.html + istoriya.html).

   Ред във файла:
     1. ОБЩО      — токени, основа, типография, бутони, лента и меню,
                    тестето от карти, долен колонтитул, движение
     2. НАЧАЛНА   — само секциите на index.html (корица, за мен, …)
     3. ИСТОРИЯ   — заглавие, съдържание, главите, снимките, lightbox

   Посока „Cinema · цветна снимка“: почти черно, един корал,
   който спори с розовия костюм, и винен блок за цитата.
   ========================================================= */


/* =========================================================
   1. ОБЩО
   ========================================================= */

/* ---------- Токени ---------- */
:root {
  --ink: #0b0b0c;
  --ink-2: #111113;
  --ink-3: #151517;
  --paper: #f1eee8;
  --mute: #a5a29c;          /* върху --ink: 7.9:1 */
  --dim: #8a8781;           /* върху --ink: 5.5:1 — само за плейсхолдъри/дребни бележки */
  --line: rgba(241, 238, 232, 0.16);
  --line-strong: rgba(241, 238, 232, 0.42);
  --accent: #e8604c;        /* корал — по-наситената сянка на розовия костюм */
  --on-accent: #0b0b0c;     /* мастило върху корал: 5.82:1 */
  --accent-glow: rgba(232, 96, 76, 0.55);
  --accent-deep: #4e1318;   /* вино: хартия върху него 12.68:1 */
  --blush: #f3c9bd;         /* цветът на костюма — дребен текст върху виното (9.72:1) */

  --serif: "Noto Serif Display", "Times New Roman", Georgia, serif;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --pad: clamp(56px, 5.6vw, 84px);
  --max: 1320px;
  --bar-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  /* сянка за текст върху снимка — пази контраста и при светли петна */
  --on-photo: 0 1px 2px rgba(0, 0, 0, 0.45), 0 0 18px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

/* ---------- Основа ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* котви и фокус с Tab не застават под фиксираната лента */
  scroll-padding-top: calc(var(--bar-h) + 8px);
  background: var(--ink);
}

html,
body {
  overflow-x: hidden;   /* резерва за стари браузъри */
  overflow-x: clip;     /* clip не създава скрол-контейнер → sticky работи */
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Филмово зърно — едва доловимо, над всичко */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 4px;
}

.skip {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Типография и общи блокове ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: var(--pad) var(--gutter);
}

.eyebrow,
.kicker,
.label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* „01 ——— За мен“ — номер на секция с линия */
.kicker {
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--mute);
  margin-bottom: clamp(32px, 4vw, 56px);
}
.kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  transform: translateY(-4px);
}
.kicker__n {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0;
  color: var(--accent);
}

/* Едро серифно заглавие — общо за двете страници */
.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 104px);
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* ---------- Бутони ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn--solid { background: var(--accent); color: var(--on-accent); }
.btn--solid:hover { background: var(--paper); color: var(--ink); }
.btn--line { border-color: var(--line-strong); color: var(--paper); }
.btn--line:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- Лента горе ---------- */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--bar-h);
  padding: 0 var(--gutter);
}
/* Плътен фон, щом страницата се скролне */
.bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: rgba(11, 11, 12, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.bar.is-stuck::before { opacity: 1; }

.bar__mark {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.bar__nav { display: none; }

.bar__end {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang { display: flex; }
.lang__btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  background: none;
  border: 0;
  color: var(--mute);
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: color 0.3s;
}
.lang__btn.is-active {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--accent);
}
.lang__btn:hover { color: var(--paper); }

.bar__menu {
  min-height: 44px;
  padding: 0 18px;
  background: rgba(11, 11, 12, 0.35);
  border: 1px solid var(--line-strong);
  color: var(--paper);
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Текстът на лентата върху снимка (преди да е залепнала) */
.bar:not(.is-stuck) .bar__mark,
.bar:not(.is-stuck) .lang__btn,
.bar:not(.is-stuck) .bar__menu { text-shadow: var(--on-photo); }

/* Мобилно меню — цял екран */
@media (max-width: 1039px) {
  .bar__nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 96px var(--gutter) 48px;
    background: var(--ink);
    opacity: 0;
    visibility: hidden;
    overflow-y: auto;
    transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
  }
  .bar__nav a {
    display: flex;
    align-items: center;
    min-height: 60px;
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(34px, 9vw, 52px);
    line-height: 1.1;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
  }
  html.menu-open .bar__nav {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s var(--ease), visibility 0s;
  }
  html.menu-open { overflow: hidden; }
  html.menu-open .bar .bar__mark,
  html.menu-open .bar .lang__btn,
  html.menu-open .bar .bar__menu { text-shadow: none; }
}
@media (max-width: 1039px) and (max-height: 520px) {
  .bar__nav a { min-height: 48px; font-size: 30px; }
}

@media (min-width: 1040px) {
  :root { --bar-h: 84px; }
  .bar__menu { display: none; }
  .bar__nav {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.4vw, 40px);
    margin-left: auto;
  }
  .bar__nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--paper);
    text-decoration: none;
    transition: color 0.3s;
  }
  .bar:not(.is-stuck) .bar__nav a { text-shadow: var(--on-photo); }
  .bar__nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.45s var(--ease);
  }
  .bar__nav a:hover::after,
  .bar__nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
  .bar__end { margin-left: 12px; }
}

/* ---------- Тестето: картите се застъпват при скрол ----------
   cinema.js слага html.is-stack и --stick на всяка карта. */
.deck { position: relative; }

.card {
  position: relative;
  background: var(--ink);
  border-top: 1px solid var(--line);
}
html.is-stack .card {
  position: sticky;
  top: var(--stick, 0px);
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.32);
}
/* С клавиатура (cinema.js слага html.kbd при Tab) картите не се застъпват —
   иначе фокусът може да падне върху бутон, скрит под следващата карта. */
html.kbd.is-stack .card { position: relative; top: auto; }

/* Затъмняване на картата, която се покрива от следващата */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  background: #000;
  opacity: calc(var(--cover, 0) * 0.72);
  pointer-events: none;
}

/* ---------- Долен колонтитул ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  margin-top: clamp(48px, 5vw, 72px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--mute);
}
.foot__tag { font-family: var(--serif); font-style: italic; font-size: 15px; }
.foot__top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--paper);
  letter-spacing: 0.08em;
}

/* ---------- Движение (само ако е позволено) ----------
   [data-reveal] се появява при скрол; без JS или при
   prefers-reduced-motion всичко си стои видимо. */
@media (prefers-reduced-motion: no-preference) {
  html.is-motion [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  }
  html.is-motion [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
}

@keyframes cin-settle {
  from { transform: scale(1.08); opacity: 0.2; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes cin-rise {
  from { transform: translateY(34px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes cin-pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%, 100% { box-shadow: 0 0 0 12px rgba(232, 96, 76, 0); }
}

/* ---------- Без JavaScript ----------
   Лентата е плътна (няма кой да слага .is-stuck), менюто е ред от връзки,
   бутоните за език и броячът на дни (би остарял) се скриват. */
@media (scripting: none) {
  .bar::before { opacity: 1; }
  .bar .lang,
  .hyrox .clock { display: none; }
}
@media (scripting: none) and (max-width: 1039px) {
  .bar__menu { display: none; }
  .bar__nav {
    position: static;
    z-index: auto;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: row;
    justify-content: flex-start;
    gap: 20px;
    padding: 0;
    background: none;
    opacity: 1;
    visibility: visible;
    overflow-x: auto;
    scrollbar-width: none;
    transition: none;
  }
  .bar__nav a {
    min-height: 44px;
    font: 500 12px/1 var(--sans);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* =========================================================
   2. НАЧАЛНА (index.html)
   ========================================================= */

/* ---------- 00 · Корица ----------
   Телефон и изправен таблет: снимката е на цял екран, текстът отдолу.
   Широк или легнал екран (≥1040, или ≥760 и по-широк от 5:4):
   снимката е вдясно (60%), името и бутоните — вляво. */
.cover {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  max-height: 1180px;
  padding: 92px var(--gutter) 28px;
  overflow: hidden;
  border-top: 0;
  isolation: isolate;
}
.cover__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.cover__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 0%;
}
.cover__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 11, 12, 0.78) 0%, rgba(11, 11, 12, 0.5) 12%, rgba(11, 11, 12, 0) 26%),
    linear-gradient(0deg, var(--ink) 6%, rgba(11, 11, 12, 0.94) 30%, rgba(11, 11, 12, 0.35) 52%, rgba(11, 11, 12, 0) 66%);
}

.cover__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.cover__top .eyebrow { color: var(--paper); text-shadow: var(--on-photo); }
.cover__issue {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--paper);
  white-space: nowrap;
  text-shadow: var(--on-photo);
}

.cover__name {
  grid-row: 3;
  margin: 0 0 22px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 19.5vw, 210px);
  line-height: 0.86;
  letter-spacing: -0.035em;
  /* тъмен ореол: фамилията минава върху светлия костюм — пази ≥ 3:1 (едър текст) */
  text-shadow: 0 0 1px rgba(11, 11, 12, 0.7), 0 0 3px rgba(11, 11, 12, 0.55), 0 2px 26px rgba(11, 11, 12, 0.5);
}
.cover__name span { display: block; }
.cover__last {
  font-style: italic;
  padding-left: 0.42em;
}

.cover__foot { grid-row: 4; }
.cover__lead {
  max-width: 34ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--paper);
}
.cover__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.cover__actions .btn {
  flex: 1 1 140px;
  padding: 0 14px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.cover__actions .btn--line { background: rgba(11, 11, 12, 0.3); }
.cover__actions .btn--line:hover { background: var(--paper); }

.cover__now {
  position: absolute;
  right: var(--gutter);
  bottom: 36px;
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-decoration: none;
  color: var(--paper);
  text-shadow: var(--on-photo);
}
.cover__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
}

@media (max-width: 759px) {
  .cover__top { flex-direction: column; gap: 6px; }
  .cover__top .eyebrow { font-size: 11.5px; letter-spacing: 0.16em; }
}
/* нисък екран (телефон или лаптоп): под името остават само трите реда; подзаглавието се крие */
@media (max-height: 760px) {
  .cover__lead > span:last-child { display: block; }
}
@media (max-width: 759px) and (max-height: 700px) {
  .cover { padding-top: 84px; }
  .cover__name { font-size: clamp(52px, 16vw, 120px); margin-bottom: 16px; }
  .cover__actions { margin-top: 16px; }
}

@media (min-width: 760px) {
  .cover__actions .btn { flex: 0 0 auto; padding: 0 28px; letter-spacing: 0.14em; }
  .cover__now { display: inline-flex; }
}

/* Изправен таблет (760–1039, портрет): снимката остава на цял екран */
@media (min-width: 760px) and (max-width: 1039px) and (max-aspect-ratio: 5/4) {
  .cover { padding-top: 104px; padding-bottom: 40px; }
  .cover__media img { object-position: 56% 0%; }
  .cover__name { font-size: clamp(96px, 17vw, 176px); margin-bottom: 28px; }
}

/* Разделена корица: широк екран и легнал таблет / нисък лаптоп */
@media (min-width: 1040px), (min-width: 760px) and (min-aspect-ratio: 5/4) {
  .cover {
    padding: calc(var(--bar-h) + 36px) var(--gutter) 44px;
    min-height: 540px;
  }
  .cover__media {
    left: auto;
    width: 60%;
  }
  .cover__media img { object-position: 50% 8%; }
  .cover__veil {
    background:
      linear-gradient(90deg, var(--ink) 40%, rgba(11, 11, 12, 0.6) 48%, rgba(11, 11, 12, 0) 62%),
      linear-gradient(270deg, rgba(11, 11, 12, 0.72) 0%, rgba(11, 11, 12, 0) 34%),
      linear-gradient(0deg, rgba(11, 11, 12, 0.85) 0%, rgba(11, 11, 12, 0) 34%),
      linear-gradient(180deg, rgba(11, 11, 12, 0.82) 0%, rgba(11, 11, 12, 0.45) 11%, rgba(11, 11, 12, 0) 24%);
  }
  /* Името свършва преди светлия костюм (≈ 49% от ширината):
     отстъп 0.5em + „Захариев“ ≈ 4.4em ≤ 0.47 × ширината. */
  .cover__name {
    font-size: clamp(72px, min(9.4vw, 22vh), 200px);
    font-size: clamp(72px, min(9.4vw, 22svh), 200px);
    /* ≥ 0.2em: опашката на „р“ не опира в бутона */
    margin-bottom: max(clamp(24px, 4svh, 40px), 0.2em);
  }
  .cover__last { padding-left: 0.5em; }
  .cover__foot {
    display: flex;
    align-items: flex-end;
    gap: 40px;
  }
  .cover__lead { font-size: 17px; max-width: 52ch; }
  .cover__actions { margin-top: 0; flex-wrap: nowrap; }
  /* до 1200 px долу няма място за „Сега“ — качва се горе вдясно */
  .cover__now { top: calc(var(--bar-h) + 70px); bottom: auto; left: var(--gutter); right: auto; }
}
@media (min-width: 1200px) {
  .cover__now { top: auto; bottom: 44px; left: auto; right: var(--gutter); }
}
/* Нисък екран (≤ 680) в разделен изглед: по-стегнато */
@media (min-width: 760px) and (max-height: 680px) and (min-aspect-ratio: 5/4) {
  .cover { padding-top: calc(var(--bar-h) + 16px); padding-bottom: 28px; }
  .cover__now { top: calc(var(--bar-h) + 40px); }
}

@media (prefers-reduced-motion: no-preference) {
  .cover__media img { animation: cin-settle 2.6s var(--ease) both; }
  .cover__name span,
  .cover__top,
  .cover__foot,
  .cover__now { animation: cin-rise 1.4s var(--ease) both; }
  .cover__first { animation-delay: 0.15s !important; }
  .cover__last { animation-delay: 0.3s !important; }
  .cover__foot { animation-delay: 0.5s !important; }
  .cover__now { animation-delay: 0.7s !important; }
  .cover__dot { animation: cin-pulse 2.8s ease-out 3; }
}

/* ---------- 01 · За мен ---------- */
.about { background: var(--ink-2); }

.about__grid {
  display: grid;
  gap: 40px;
}
.about__pull {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 4.4vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.about__pull span { display: block; }
.about__pull span:last-child { color: var(--accent); font-style: italic; }
.about__body p {
  color: var(--mute);
  font-size: 16.5px;
  line-height: 1.7;
  max-width: 58ch;
}
.about__body p + p { margin-top: 18px; }
.about__body .about__lede {
  color: var(--paper);
  font-size: 18px;
  line-height: 1.6;
}
.about__body .about__coda {
  margin-top: 24px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 24px;
  line-height: 1.3;
  color: var(--paper);
}

.vitals { border-top: 1px solid var(--line); }
.vitals__row {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.vitals dt {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  padding-top: 3px;
}
.vitals dd { font-size: 15px; color: var(--paper); }

@media (min-width: 900px) {
  /* лява колона: цитатът и данните; дясна: текстът */
  .about__grid {
    grid-template-columns: 7fr 5fr;
    grid-template-areas: "pull body" "photo body" "vitals body";
    grid-template-rows: auto auto 1fr;
    column-gap: clamp(48px, 7vw, 120px);
    row-gap: 44px;
    align-items: start;
  }
  .about__pull { grid-area: pull; }
  .about__body { grid-area: body; }
  .vitals { grid-area: vitals; align-self: end; }
}

/* ---------- Кампания: цитат във винен блок ---------- */
.campaign {
  display: grid;
  overflow: hidden;
  isolation: isolate;
}
.campaign__media {
  position: relative;
  height: min(64vh, 540px);
  height: min(64svh, 540px);
  min-height: 400px;
  overflow: hidden;
}
.campaign__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.campaign__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 11, 12, 0.5) 0%, rgba(11, 11, 12, 0) 26%);
}
.campaign__block {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: -96px 0 0 var(--gutter);
  padding: 32px 26px 36px;
  background: var(--accent-deep);
  color: var(--paper);
  border-top: 3px solid var(--accent);
}
.campaign__kicker,
.campaign__by {
  color: var(--blush);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.campaign__quote p span { display: block; }
.campaign__quote p span:last-child { font-style: italic; }
.campaign__text {
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--blush);
}
.campaign__quote p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(32px, 9vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

@media (min-width: 900px) {
  /* Блокът е в потока: ако цитатът е по-висок, секцията расте, вместо да го реже */
  .campaign {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    min-height: clamp(560px, 80vh, 720px);
    min-height: clamp(560px, 80svh, 720px);
  }
  .campaign__media {
    position: absolute;
    inset: 0 auto 0 0;
    width: 60%;
    height: 100%;
    min-height: 0;
  }
  .campaign__block {
    width: 52%;
    min-height: calc(clamp(560px, 80vh, 720px) * 0.8);
    min-height: calc(clamp(560px, 80svh, 720px) * 0.8);
    margin: 0;
    padding: clamp(40px, 4.4vw, 72px);
    justify-content: space-between;
  }
  /* по кутията, не по екрана: 92px само когато има място */
  .campaign__quote p {
    font-size: clamp(36px, min(5vw, 8.4vh), 80px);
    font-size: clamp(36px, min(5vw, 8.4svh), 80px);
  }
}

/* ---------- 02 · История (тийзър) ---------- */
.story { background: var(--ink-3); }

.story__grid {
  display: grid;
  gap: 48px;
}
.story__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(44px, 6vw, 100px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.story__lead {
  margin: 24px 0 32px;
  max-width: 36ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--mute);
}
.story__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}

.toc a {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: baseline;
  gap: 14px;
  min-height: 52px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.toc__n {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--accent);
}
.toc__t {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.15;
  transition: transform 0.5s var(--ease);
}
.toc__y {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.toc a:hover .toc__t { transform: translateX(10px); font-style: italic; }

@media (min-width: 900px) {
  .story__grid {
    grid-template-columns: 5fr 6fr;
    gap: clamp(56px, 8vw, 140px);
    align-items: end;
  }
}

/* ---------- 03 · HYROX ---------- */
.hyrox { background: var(--ink); }

.hyrox__top {
  display: grid;
  gap: 28px;
  align-items: end;
}
.hyrox__pull {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(42px, 6.2vw, 108px);
  line-height: 0.98;
  letter-spacing: -0.028em;
  max-width: 18ch;
  text-wrap: balance;
}
.clock {
  display: flex;
  align-items: baseline;
  gap: 16px;
  border-top: 1px solid var(--line-strong);
  padding-top: 16px;
}
.clock__num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(96px, 11.5vw, 184px);
  line-height: 0.78;
  letter-spacing: -0.05em;
  font-variant-numeric: lining-nums tabular-nums;
}
.clock__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
  max-width: 9ch;
}

.hyrox__pull span { display: block; }
.hyrox__pull span:last-child { color: var(--accent); font-style: italic; }

/* Текстът на секцията: водещ абзац, мисъл в курсив, кратка бележка за Гент */
.hyrox__copy {
  display: grid;
  gap: 24px;
  margin-top: clamp(40px, 5vw, 72px);
}
.hyrox__lead {
  max-width: 56ch;
  font-size: 18px;
  line-height: 1.65;
  color: var(--paper);
}
.hyrox__p2 {
  max-width: 56ch;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--mute);
}
.hyrox__p3 {
  padding-left: 20px;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.hyrox__p4 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}
@media (min-width: 900px) {
  .hyrox__copy {
    grid-template-columns: 6fr 5fr;
    grid-template-areas: "lead quote" "more quote" "next next";
    align-items: start;
    column-gap: clamp(48px, 7vw, 120px);
    row-gap: 24px;
  }
  .hyrox__lead { grid-area: lead; }
  .hyrox__p2 { grid-area: more; }
  .hyrox__p3 { grid-area: quote; align-self: center; padding-left: 28px; }
  .hyrox__p4 { grid-area: next; margin-top: 16px; }
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 44px;
  border-top: 1px solid var(--line-strong);
}
.facts__item {
  padding: 16px 16px 18px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 8px;
}
.facts dd {
  text-wrap: balance;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.2;
}
.facts__item--goal {
  grid-column: 1 / -1;
  padding: 20px 22px 22px;
  background: var(--accent);
  color: var(--on-accent);
  border-bottom: 0;
}
.facts__item--goal dt { color: var(--on-accent); }
.facts__sub {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--mute);
}
.facts__item--goal dd {
  font-variant-numeric: lining-nums tabular-nums;
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 300;
  font-style: italic;
}

/* Свиваема част „Какво е HYROX“ (общ стил за <details class="more">) */
.more {
  margin-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--line-strong);
}
.more__sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
  border-bottom: 1px solid var(--line);
}
.more__sum::-webkit-details-marker { display: none; }
.more__icon {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: transform 0.5s var(--ease), background-color 0.3s;
}
.more__icon::before,
.more__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.more__icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: opacity 0.3s; }
.more[open] .more__icon { transform: rotate(180deg); }
.more[open] .more__icon::after { opacity: 0; }
.more__sum:hover .more__icon { background: var(--paper); color: var(--ink); }

.hyrox__grid {
  display: grid;
  gap: 40px;
  margin-top: 36px;
}
.hyrox__what p {
  color: var(--mute);
  font-size: 16.5px;
  line-height: 1.7;
  max-width: 52ch;
}
.hyrox__what p + p { margin-top: 16px; }
.hyrox__what .hyrox__run {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 28px;
  color: var(--mute);
}
.hyrox__run strong {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(52px, 5.4vw, 84px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--paper);
}

.stations { border-top: 1px solid var(--line-strong); }
.stations li {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-areas: "n name" "n spec";
  column-gap: 12px;
  row-gap: 2px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.stations__n {
  grid-area: n;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--mute);
  padding-top: 3px;
}
.stations b {
  grid-area: name;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.25;
}
.stations__s {
  grid-area: spec;
  font-size: 14px;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.hyrox__note {
  margin-top: 28px;
  font-size: 13.5px;
  color: var(--mute);
  max-width: 70ch;
}

@media (min-width: 640px) {
  .stations li {
    grid-template-columns: 40px 1fr auto;
    grid-template-areas: "n name spec";
    align-items: baseline;
  }
  .stations__s { text-align: right; }
}

@media (min-width: 900px) {
  .hyrox__top { grid-template-columns: 1fr auto; gap: 64px; }
  .clock { border-top: 0; padding-top: 0; flex-direction: column; align-items: flex-end; gap: 14px; }
  .clock__label { max-width: none; }
  .facts { grid-template-columns: repeat(4, 1fr) 1.3fr; }
  .facts__item { border-bottom: 0; }
  .facts__item + .facts__item { padding-left: 20px; border-left: 1px solid var(--line); }
  .facts__item--goal { grid-column: auto; border-left: 0 !important; padding: 18px 22px 20px; }
  .hyrox__grid { grid-template-columns: 5fr 7fr; gap: clamp(48px, 7vw, 120px); margin-top: 40px; }
}

/* ---------- Какво ме движи (вътре в „За мен“) ---------- */
.principles {
  display: grid;
  gap: 0;
  margin-top: clamp(40px, 5vw, 72px);
}
.principle {
  padding: 24px 0 28px;
  border-top: 1px solid var(--line-strong);
}
.principle__key {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--mute);
}
.principle__n {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  letter-spacing: 0;
  color: var(--accent);
  min-width: 1.6em;
}
.principle h3 {
  margin: 18px 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.principle p:last-child {
  color: var(--mute);
  font-size: 16px;
  line-height: 1.7;
  max-width: 40ch;
}

.strip {
  height: clamp(180px, 20vw, 280px);
  overflow: hidden;
}
.strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

@media (min-width: 900px) {
  .principles { grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3.4vw, 56px); }
}

/* ---------- 05 · Аз мога ---------- */
.poem { background: var(--ink); }
.poem__grid {
  display: grid;
  gap: 40px;
}
.poem__head .kicker { margin-bottom: 32px; }
.poem__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(72px, 11vw, 180px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
html[lang="en"] .poem__title { font-size: clamp(46px, 6vw, 96px); line-height: 0.98; }
.poem__credit {
  margin-top: 24px;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--mute);
}
.poem__body {
  display: grid;
  gap: 28px;
}
.poem__body p {
  white-space: pre-line;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(17px, 1.6vw, 23px);
  line-height: 1.5;
  color: var(--paper);
}
.poem__body .poem__last { font-style: italic; }

.poem__toggle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  margin-top: 20px;
  padding: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--accent);
  color: var(--paper);
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}
.poem__toggle::after {
  content: "+";
  content: "+" / "";
  font: 300 22px/1 var(--serif);
  color: var(--accent);
  transition: transform 0.4s var(--ease);
}
.poem__toggle[aria-expanded="true"]::after { transform: rotate(45deg); }

/* Телефон и изправен таблет: само последният куплет, докато не се отвори.
   (cinema.js слага .has-poem-toggle — без JS се вижда цялото.) */
@media (max-width: 899px) {
  html.has-poem-toggle .poem:not(.is-open) .poem__body > p:not(.poem__last) { display: none; }
  html.has-poem-toggle .poem:not(.is-open) .poem__last::before {
    content: "";
    display: block;
    width: 40px;
    height: 1px;
    margin-bottom: 20px;
    background: var(--line-strong);
  }
}

/* Широк екран: заглавието горе, четирите куплета в две колони */
@media (min-width: 900px) {
  .poem__toggle { display: none !important; }
  .poem__grid { gap: clamp(40px, 5vw, 72px); }
  .poem__head {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: end;
    column-gap: clamp(40px, 6vw, 96px);
  }
  .poem__head .kicker { grid-column: 1 / -1; }
  .poem__credit { margin: 0 0 12px; }
  .poem__body {
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(40px, 6vw, 96px);
    row-gap: 36px;
  }
}

/* ---------- 06 · Контакти ---------- */
.contact { background: var(--ink-3); }
.contact .wrap { padding-bottom: 24px; }

.contact__line {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5.6vw, 96px);
  line-height: 1;
  letter-spacing: -0.028em;
  max-width: 20ch;
  text-wrap: balance;
}
.contact__grid {
  display: grid;
  gap: 56px;
  margin-top: clamp(48px, 6vw, 88px);
}
.contact__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 10px;
}
.contact__email {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 4px 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(24px, 6.4vw, 40px);
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
  text-decoration-color: var(--accent);
  overflow-wrap: anywhere;
}
.contact__email:hover { text-decoration-color: var(--paper); }
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  margin-top: 20px;
}
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
}
.socials a::after { content: "↗"; content: "↗" / ""; color: var(--mute); transition: transform 0.4s var(--ease); }
.socials a:hover::after { transform: translate(3px, -3px); color: var(--paper); }

.inquiry { position: relative; display: grid; gap: 24px; }
.inquiry__grid { display: grid; gap: 24px; }
.inquiry__field { display: grid; gap: 6px; }
.inquiry__label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.inquiry__input {
  width: 100%;
  min-height: 52px;
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--paper);
  font: 300 20px/1.4 var(--serif);
  transition: border-color 0.3s;
}
.inquiry__input::placeholder { color: var(--dim); opacity: 1; }
.inquiry__input:focus { outline: none; border-bottom-color: var(--accent); }
.inquiry__input:focus-visible { outline: none; box-shadow: 0 1px 0 0 var(--accent); }
.inquiry__textarea { resize: vertical; min-height: 112px; }
.inquiry__honey {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.inquiry__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
.inquiry__submit { min-width: 180px; }
.inquiry__submit:disabled { opacity: 0.6; cursor: progress; }
.inquiry__status { font-size: 14px; color: var(--mute); }
.inquiry__status.is-ok { color: var(--paper); }
.inquiry__status.is-err { color: #ff9b8a; }

@media (min-width: 900px) {
  .contact__grid { grid-template-columns: 5fr 7fr; gap: clamp(48px, 7vw, 120px); }
  /* имейлът — на един ред в тясната колона */
  .contact__email { font-size: clamp(24px, 2.8vw, 40px); white-space: nowrap; }
  .inquiry__grid { grid-template-columns: 1fr 1fr; }
}


/* ---------- Корица: послание в три нива ----------
   1) два едри курсивни реда — вторият в корал; 2) дребен надпис + ред в
   безсерифен; 3) приглушен ред за HYROX и автоматизациите. */
.cover__lead {
  display: grid;
  max-width: 44ch;
}
.cover__line {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(25px, 7.3vw, 40px);
  line-height: 1.06;
  text-shadow: var(--on-photo);
  letter-spacing: -0.02em;
}
.cover__line--b { color: var(--accent); margin-bottom: 18px; }
.cover__kick,
.cover__rest,
.cover__train { text-shadow: var(--on-photo); }
.cover__kick {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
}
.cover__rest {
  display: block;
  margin-top: 6px;
  max-width: 34ch;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--paper);
}
.cover__train {
  display: block;
  margin-top: 12px;
  max-width: 40ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--mute);
}
@media (min-width: 760px) {
  .cover__lead { max-width: 52ch; }
  .cover__line { font-size: clamp(32px, 3.3vw, 52px); }
  .cover__line--b { margin-bottom: 22px; }
  .cover__rest { font-size: 16.5px; }
}

/* Седмичното обобщение от Strava (официален уиджет, 300×160) */
.proof {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}
.week {
  display: grid;
  gap: 14px;
  max-width: 300px;
}
.proof__photo,
.about__photo { position: relative; }
.proof__photo img,
.about__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.04);
}
.proof__photo { max-width: 300px; }
.proof__photo figcaption,
.about__photo figcaption {
  margin-top: 10px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
@media (min-width: 720px) {
  .proof { grid-template-columns: 300px 300px; gap: 40px; align-items: start; }
}
.about__photo { max-width: 340px; }
@media (min-width: 900px) {
  .about__photo { grid-area: photo; }
}
.story { position: relative; overflow: hidden; isolation: isolate; }
.story__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
  filter: grayscale(1) contrast(1.05);
  opacity: 0.34;
}
.story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(21,21,23,0.96) 0%, rgba(21,21,23,0.78) 55%, rgba(21,21,23,0.5) 100%);
}
.week__cap { display: grid; gap: 4px; }
.week__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}
.week__note { font-size: 14px; color: var(--mute); line-height: 1.5; }
.week__frame {
  display: block;
  max-width: 100%;
  border: 0;
  background: transparent;
}

/* Връзка към живото класиране на HYROX в деня на състезанието */
.hyrox__live {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  font-size: 14px;
}
.hyrox__live a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--accent);
}
.hyrox__live a:hover { text-decoration-color: var(--paper); }
.hyrox__live .cover__dot { flex: 0 0 auto; }

/* ---------- HYROX: станция №4 води към рекорда ---------- */
.stations li.is-mark .stations__n { color: var(--accent); }
.stations li.is-mark b { font-style: italic; }
.stations__tag {
  display: inline-block;
  margin: -12px 0 -12px 10px;
  padding: 12px 0;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.stations__tag:hover { color: var(--paper); }

/* ---------- Станция №4 · рекордът ---------- */
.record { background: var(--ink-2); }
.record__grid {
  display: grid;
  gap: 48px;
}
.record__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5.4vw, 96px);
  line-height: 1;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.record__title span,
.record__title em { display: block; }
.record__title em { color: var(--accent); }
.record__lead {
  margin-top: clamp(28px, 3vw, 44px);
  max-width: 56ch;
  font-size: 17.5px;
  line-height: 1.7;
}
.record__note {
  margin-top: 16px;
  max-width: 56ch;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--mute);
}
.record__mark {
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
}
.record__label,
.auto__label,
.about__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}
.record__time {
  margin: 12px 0 10px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(76px, 9vw, 150px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums tabular-nums;
}
.record__who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 18px;
  font-size: 14px;
  color: var(--mute);
}
.record__who a,
.record__follow {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--accent);
}
.record__who a:hover,
.record__follow:hover { text-decoration-color: var(--paper); }

.steps {
  margin-top: 28px;
  border-top: 1px solid var(--line-strong);
}
.steps li {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.steps__n {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--mute);
}
.steps__t {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.25;
}
.steps__s {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.steps li.is-now .steps__n,
.steps li.is-now .steps__s { color: var(--accent); }
.steps li.is-now .steps__s::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}
.record__follow {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (min-width: 900px) {
  .record__grid {
    grid-template-columns: 7fr 5fr;
    gap: clamp(48px, 7vw, 120px);
    align-items: start;
  }
}

/* ---------- 02 · Автоматизации ---------- */
.auto { background: var(--ink); }
.auto__top {
  display: grid;
  gap: 28px;
}
.auto__pull {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(32px, 3.9vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.auto__pull span { display: block; }
.auto__pull span:last-child { color: var(--accent); font-style: italic; }
.auto__lead {
  display: grid;
  gap: 18px;
  max-width: 54ch;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--mute);
}
.auto__lede {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-wrap: balance;
}
.auto__grid {
  display: grid;
  gap: 48px;
  margin-top: clamp(44px, 5vw, 80px);
}
.auto__label { padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); }

.jobs li {
  display: grid;
  gap: 2px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.jobs b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
}
.jobs span {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--mute);
}

.auto__how {
  display: grid;
  gap: 32px;
  margin-top: clamp(48px, 5vw, 80px);
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}
.how {
  display: grid;
  gap: 16px;
}
.how li {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: baseline;
  gap: 12px;
}
.how__n {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--accent);
}
.how p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 21px;
  line-height: 1.35;
}
.auto__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

@media (min-width: 640px) {
  .jobs li {
    grid-template-columns: 150px 1fr;
    align-items: baseline;
    gap: 20px;
  }
}
@media (min-width: 900px) {
  .auto__top {
    grid-template-columns: 7fr 5fr;
    gap: clamp(48px, 7vw, 120px);
    align-items: start;
  }
  .auto__how {
    grid-template-columns: 7fr 5fr;
    gap: clamp(48px, 7vw, 120px);
    align-items: end;
  }
  .how { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .how li { grid-template-columns: none; gap: 10px; }
}

/* ---------- За мен: трите принципа под текста ---------- */
.about__label {
  margin-top: 0;
  padding-bottom: 14px;
}
.wrap--after-strip { padding-top: clamp(40px, 5vw, 72px); }
.about .strip { margin-top: clamp(48px, 5vw, 80px); }
.about .principles { margin-top: 0; }

/* ---------- 04 · История: заглавие + бутон ---------- */
.story__intro .story__lead { margin: 0 0 28px; }
@media (min-width: 900px) {
  .story__grid { grid-template-columns: 7fr 5fr; }
}

/* ---------- Формата: тема и бележка за данните ---------- */
.inquiry__select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 32px;
  cursor: pointer;
  background:
    linear-gradient(45deg, transparent 50%, var(--mute) 50%) calc(100% - 14px) 55% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--mute) 50%, transparent 50%) calc(100% - 8px) 55% / 6px 6px no-repeat;
}
.inquiry__select option {
  background: var(--ink-3);
  color: var(--paper);
  font: 400 16px/1.4 var(--sans);
}
.inquiry__privacy {
  max-width: 62ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--mute);
}


/* ---------- Телефон: по-стегнат ритъм (страницата ≤ ~7000 px) ---------- */
@media (max-width: 759px) {
  :root { --pad: 48px; }
  .kicker { margin-bottom: 24px; }

  .clock__num { font-size: 84px; }
  .poem__title { font-size: 64px; }
  .poem__head .kicker { margin-bottom: 24px; }
  .poem__credit { margin-top: 18px; }

  .about__body p { font-size: 16px; }
  .about__body .about__lede { font-size: 17px; }
  .vitals__row { grid-template-columns: 108px 1fr; gap: 12px; padding: 10px 0; }

  .campaign__media { height: min(50svh, 420px); min-height: 340px; }

  .hyrox__lead { font-size: 17px; line-height: 1.6; }
  .facts__item { padding: 13px 12px 14px 0; }
  .facts dt { margin-bottom: 4px; }
  .facts dd { font-size: 19px; }
  .facts__item--goal { padding: 16px 18px 18px; }

  /* трите принципа — хоризонтална лента с плъзгане */
  .principles {
    display: flex;
    gap: 12px;
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--gutter);
    scrollbar-width: none;
  }
  .principles::-webkit-scrollbar { display: none; }
  .principle {
    flex: 0 0 84%;
    scroll-snap-align: start;
    padding: 22px 20px 24px;
    background: var(--ink-3);
    border-top: 2px solid var(--accent);
  }
  .principle h3 { margin: 14px 0 10px; font-size: 25px; }
  .principle p:last-child { font-size: 15.5px; line-height: 1.65; }

  .inquiry__textarea { height: 100px; min-height: 0; }
  .inquiry, .inquiry__grid { gap: 20px; }
  .contact__grid { gap: 40px; margin-top: 36px; }
  .foot { margin-top: 36px; gap: 0 20px; }
  .foot__tag { order: 3; flex-basis: 100%; }

  .about__grid { gap: 24px; }

  .hyrox__top { gap: 22px; }
  .hyrox__copy { margin-top: 30px; gap: 20px; }
  .facts { margin-top: 30px; }
  .more { margin-top: 24px; }

  /* нови секции */
  .record__time { font-size: 76px; }
  .record__lead { font-size: 16.5px; line-height: 1.65; }
  .record__grid { gap: 36px; }
  .auto__lead { font-size: 16px; }
  .auto__grid { gap: 36px; }
  .how p { font-size: 18px; }
  .how { gap: 12px; }
  .jobs li { padding: 12px 0; }
  .jobs b { font-size: 20px; }
  .jobs span { font-size: 14.5px; line-height: 1.5; }
  .auto__how { gap: 26px; padding-top: 22px; }
  .about__label { margin-top: 44px; }

  /* съдържанието на историята — в две колони */
  .story__grid { gap: 32px; }
  .toc { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .toc a {
    grid-template-columns: 26px 1fr;
    grid-template-areas: "n t" "n y";
    row-gap: 4px;
    column-gap: 8px;
    min-height: 0;
    height: 100%;
    padding: 14px 0 13px;
  }
  .toc__n { grid-area: n; font-size: 15px; }
  .toc__t { grid-area: t; font-size: 18px; }
  .toc__y { grid-area: y; font-size: 11px; }
}


/* =========================================================
   3. ИСТОРИЯ (istoriya.html)
   ========================================================= */
/* ===== ИСТОРИЯ ===== */
/* Страницата на историята: заглавие + съдържание, после 14 глави
   като филмови „карти“ — номер и година вляво (лепнат), текстът в
   средата (≤ 68 знака на ред), снимките вдясно: водеща + умалени копия.
   На телефон всичко е в една колона. */

.page-story { --read: #dcd8d1; }   /* текст за четене върху --ink: 13.4:1 */

/* ---------- Заглавие на страницата ---------- */
.pagehead .wrap {
  padding-top: calc(var(--bar-h) + clamp(40px, 6vw, 96px));
  padding-bottom: clamp(48px, 6vw, 96px);
}
.pagehead__grid {
  display: grid;
  gap: 40px;
}
.pagehead__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(54px, 8.2vw, 140px);
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.pagehead__lead {
  margin-top: clamp(24px, 3vw, 36px);
  max-width: 38ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--mute);
}
/* 2008 ——— 2026 */
.pagehead__span {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 420px;
  margin-top: clamp(28px, 4vw, 48px);
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--accent);
  font-variant-numeric: lining-nums;
}
.pagehead__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--line-strong));
}

/* Съдържанието: свито на телефон/таблет, отворено на широк екран */
.chapters { margin-top: 0; }
.chapters .toc a { min-height: 48px; padding: 11px 0; }
.chapters .toc__t { font-size: clamp(19px, 1.7vw, 24px); }

@media (min-width: 1040px) {
  .pagehead__grid {
    grid-template-columns: 5fr 6fr;
    gap: clamp(56px, 7vw, 120px);
    align-items: start;
  }
  .pagehead__intro { position: sticky; top: calc(var(--bar-h) + 32px); }
}

/* ---------- Главите ---------- */
.chapters-wrap { border-top: 1px solid var(--line); }
.chapters-wrap > .wrap { padding-top: 0; padding-bottom: 0; }

.timeline { counter-reset: ch; }

.tl {
  position: relative;
  counter-increment: ch;
  display: grid;
  gap: 18px;
  padding: clamp(48px, 6vw, 104px) 0;
  border-top: 1px solid var(--line);
}
.tl:first-child { border-top: 0; }
/* коралова линия, която се „изтегля“, щом главата е прочетена (script.js: .is-past) */
.tl::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: min(100%, 320px);
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease);
}
.tl:first-child::before { display: none; }
.tl.is-past::before { transform: scaleX(1); }

/* Номер на главата (брояч) + година */
.tl__year {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 54px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums;
  color: var(--paper);
}
.tl__year::before {
  content: counter(ch, decimal-leading-zero);
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0;
  color: var(--accent);
}
/* „Училище“ / „Напред“ — дума вместо година */
.tl__year[data-bg] {
  font-style: italic;
  font-size: 32px;
  letter-spacing: 0.01em;
}
.tl__year[data-bg]::before { font-style: italic; }

.tl__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.tl__body > p {
  margin-top: 18px;
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--read);
  text-wrap: pretty;
}
/* Буквица само в първата глава */
.tl:first-child .tl__body > p::first-letter {
  float: left;
  margin: 6px 12px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 4.6em;
  line-height: 0.8;
  color: var(--accent);
}

/* ---------- Снимки: водеща + умалени копия ---------- */
.tl__media {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 28px;
}
.tl__media-item {
  position: relative;
  display: block;
  width: 100%;
  min-width: 44px;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  background: var(--ink-3);
  border: 0;
  cursor: zoom-in;
}
.tl__media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
  transition: transform 0.8s var(--ease), filter 0.5s var(--ease);
}
.tl__media-item::after {   /* тънка рамка, коралова при посочване */
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(241, 238, 232, 0.08);
  pointer-events: none;
  transition: border-color 0.3s;
}
.tl__media-item:hover::after { border-color: var(--accent); }
.tl__media-item:hover img { filter: none; }
.tl__media-item:focus-visible { outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .tl__media-item:hover img { transform: scale(1.05); }
}

/* Водещата снимка — в естествените си пропорции, с таван на височината */
.tl__media-item:first-child {
  grid-column: 1 / -1;
  aspect-ratio: auto;
}
.tl__media-item:first-child img {
  height: auto;
  max-height: min(68vh, 460px);
  max-height: min(68svh, 460px);
  object-position: 50% 30%;
}
.tl__media-item:first-child:only-child img { max-height: min(78svh, 560px); }

/* Видео: коралов бутон „▶“ */
.tl__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding-left: 3px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  line-height: 1;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: background-color 0.3s;
}
.tl__media-item:first-child .tl__play { width: 76px; height: 76px; font-size: 22px; padding-left: 5px; }
.tl__media-item--video:hover .tl__play { background: var(--paper); }

/* ---------- Глава 13: писмото „Dear football…“ (свиваемо) ---------- */
.tl__body > .letter { max-width: 68ch; margin-top: 28px; }
.letter__body { padding-bottom: 8px; }
.letter__part {
  padding: 26px 0 28px;
  border-bottom: 1px solid var(--line);
}
.letter__n {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
  font-variant-numeric: lining-nums;
}
.letter__part p:not(.letter__n) {
  margin-top: 12px;
  white-space: pre-line;   /* кратките редове — един под друг, както в писмото */
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--read, var(--paper));
}
.letter__part p.letter__big {
  margin-top: 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-wrap: balance;
}
.letter__part p.letter__big--em { font-style: italic; font-weight: 300; }
.letter__src {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 18px;
  padding-top: 16px;
  font-size: 13.5px;
  color: var(--mute);
}
.letter__src a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--accent);
}
@media (min-width: 1100px) {
  /* глава 13 има два абзаца + писмото: снимките заемат всички редове,
     а последният (празен) ред поема остатъка — без дупка между абзаците */
  .tl__body:has(> .letter) { grid-template-rows: auto auto auto auto 1fr; }
  .tl__body:has(> .letter) > .tl__media { grid-row: 1 / span 5; }
  .tl__body > .letter { grid-column: 1; }
}

/* ---------- Последната глава: „Напред“ във винения блок ---------- */
.tl--next {
  margin: clamp(24px, 3vw, 40px) calc(var(--gutter) * -1) 0;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  background: var(--accent-deep);
  border-top: 3px solid var(--accent);
}
.tl--next::before { display: none; }
.tl--next .tl__year { color: var(--blush); }
.tl--next .tl__year::before { color: var(--blush); }
.tl--next .tl__body > p { color: var(--paper); }
.tl--next .tl__body > .tl__coda {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(243, 201, 189, 0.35);
  max-width: 34ch;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--paper);
}

/* ---------- Край: обратно + колонтитул ---------- */
.journey__end { border-top: 1px solid var(--line); }
.journey__end .wrap { padding-bottom: 24px; }
.backlink {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.backlink .btn { flex: 1 1 220px; }

/* ---------- Таблет и нагоре: номер/година вляво, лепнат ---------- */
@media (min-width: 760px) {
  .tl {
    grid-template-columns: clamp(150px, 20%, 240px) minmax(0, 1fr);
    column-gap: clamp(28px, 4vw, 64px);
    align-items: start;
  }
  .tl__year {
    position: sticky;
    top: calc(var(--bar-h) + 28px);
    flex-direction: column;
    gap: 12px;
    font-size: clamp(56px, 5.4vw, 88px);
  }
  .tl__year[data-bg] { font-size: clamp(28px, 2.6vw, 38px); }
  .tl__media { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tl__body > p { font-size: 17px; }
  .backlink .btn { flex: 0 0 auto; }
}

/* ---------- Широк екран: година | текст | снимки ---------- */
@media (min-width: 1100px) {
  .tl { grid-template-columns: minmax(170px, 2fr) minmax(0, 9.6fr); }
  .tl__body {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 4.2fr);
    grid-template-rows: auto 1fr;   /* по-високите снимки не разтягат реда на заглавието */
    column-gap: clamp(40px, 4.4vw, 72px);
    align-items: start;
  }
  .tl__title,
  .tl__body > p { grid-column: 1; }
  .tl__body > p { font-size: 17.5px; }
  .tl__media {
    grid-column: 2;
    grid-row: 1 / span 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0;
    position: sticky;
    top: calc(var(--bar-h) + 28px);
  }
  .tl__media-item:first-child img { max-height: min(62vh, 520px); max-height: min(62svh, 520px); }
  .tl__media-item:first-child:only-child img { max-height: min(72svh, 620px); }
}

/* ---------- Телефон ---------- */
@media (max-width: 759px) {
  .pagehead__lead { font-size: 17px; }
  .tl { gap: 14px; padding: 44px 0 48px; }
  .tl__year { font-size: 52px; }
  .tl__year[data-bg] { font-size: 30px; }
  .tl__title { font-size: 30px; }
  .tl__body > p { margin-top: 14px; }
  .tl__media { margin-top: 22px; gap: 5px; }
  .tl--next { padding: 40px var(--gutter) 44px; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;   /* над лентата и над филмовото зърно */
  display: none;
  place-items: center;
  padding: 76px 16px 84px;
  background: rgba(7, 7, 8, 0.96);
  cursor: zoom-out;
}
.lightbox.is-open { display: grid; }
.lightbox img,
.lightbox video {
  grid-area: 1 / 1;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  max-height: calc(100svh - 160px);
  width: auto;
  height: auto;
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.9);
  cursor: default;
}
.lightbox video { display: none; background: #000; }

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  background: rgba(11, 11, 12, 0.7);
  border: 1px solid var(--line-strong);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.lightbox__close { top: 14px; right: 14px; font-size: 32px; }
.lightbox__nav { bottom: 18px; font-size: 34px; padding-bottom: 4px; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox__close:hover,
.lightbox__nav:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.lightbox__counter {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: center;
  min-height: 52px;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--paper);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
.lightbox__counter:empty { display: none; }

@media (min-width: 760px) {
  .lightbox { padding: 84px 104px; }
  .lightbox img,
  .lightbox video { max-height: calc(100vh - 168px); max-height: calc(100svh - 168px); }
  .lightbox__close { top: 20px; right: 24px; }
  .lightbox__nav { top: 50%; bottom: auto; width: 60px; height: 60px; transform: translateY(-50%); }
  .lightbox__nav--prev { left: 24px; }
  .lightbox__nav--next { right: 24px; }
  .lightbox__counter { bottom: 20px; min-height: 44px; }
}


/* =========================================================
   03 · ПРОЕКТИ (#work) — добавено 15.10.2026
   Две записи: витрина „браузър + телефон“ (чист CSS) и текст.
   На широк екран се редуват (BLAYZE: снимка вляво, ehype: вдясно);
   на телефон — една под друга. Казусът ehype се премести тук от #automation.
   ========================================================= */
.work { background: var(--ink-3); }
.work__top {
  display: grid;
  gap: 22px;
}
.work__pull {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(32px, 3.9vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.work__pull span { display: block; }
.work__pull span:last-child { color: var(--accent); font-style: italic; }
.work__lead {
  max-width: 46ch;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--mute);
}

/* --- една запис --- */
.proj {
  display: grid;
  gap: 30px;
  margin-top: clamp(44px, 5.5vw, 96px);
  padding-top: clamp(28px, 3vw, 44px);
  border-top: 1px solid var(--line-strong);
}
.proj + .proj { margin-top: clamp(40px, 5vw, 88px); }
.proj__media { min-width: 0; }
.proj__body { min-width: 0; }
.proj__tag {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blush);
}
.proj__name {
  margin: 10px 0 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 3.6vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.proj__name em { font-style: italic; font-weight: 300; color: var(--accent); }
.proj__text {
  max-width: 54ch;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--mute);
}
.proj__facts {
  margin: 26px 0 28px;
  border-top: 1px solid var(--line);
}
.proj__facts > div {
  display: grid;
  grid-template-columns: 104px 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.proj__facts dt {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.proj__facts dd {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.3;
  color: var(--paper);
}
.proj__link { min-height: 48px; }

/* --- витрината: браузър + телефон върху ъгъла му --- */
.dev {
  position: relative;
  padding: 0 9% 12% 0;
}
.dev__browser {
  overflow: hidden;
  border-radius: 10px;
  background: #1c1c1f;
  box-shadow:
    0 0 0 1px rgba(241, 238, 232, 0.12),
    0 40px 80px -30px rgba(0, 0, 0, 0.85);
}
.dev__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(241, 238, 232, 0.07);
}
.dev__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(241, 238, 232, 0.2);
}
.dev__dot:first-child { background: var(--accent); }
.dev__url {
  min-width: 0;
  max-width: 62%;
  margin: 0 auto;
  padding: 3px 16px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(241, 238, 232, 0.07);
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--mute);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.dev__screen {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink);
}
.dev__screen--light { background: #f4f3f8; }  /* фонът на ehype, докато снимката зарежда */
.dev__screen img,
.dev__phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.dev__phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26%;
  padding: clamp(4px, 0.55vw, 8px);
  border-radius: clamp(18px, 2.3vw, 34px);
  background: #0e0e10;
  box-shadow:
    0 0 0 1px rgba(241, 238, 232, 0.18),
    -18px 30px 60px -18px rgba(0, 0, 0, 0.9);
}
.dev__phone-screen {
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border-radius: clamp(14px, 1.85vw, 27px);
  background: var(--ink);
}
.dev__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 64%;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--dim);
}

/* ehype: телефонът е вляво, бележката — вдясно */
.proj--flip .dev { padding: 0 0 12% 9%; }
.proj--flip .dev__phone {
  right: auto;
  left: 0;
  box-shadow:
    0 0 0 1px rgba(241, 238, 232, 0.18),
    18px 30px 60px -18px rgba(0, 0, 0, 0.9);
}
.proj--flip .dev__cap { left: auto; right: 0; text-align: right; }

@media (prefers-reduced-motion: no-preference) {
  .dev__browser,
  .dev__phone { transition: transform 0.7s var(--ease); }
  .proj:hover .dev__phone { transform: translateY(-8px); }
}

/* Автоматизации: без казуса списъкът заема цялата ширина в две колони */
.auto__proof {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--accent);
}
.auto__proof:hover { text-decoration-color: var(--paper); }

@media (min-width: 900px) {
  .work__top {
    grid-template-columns: 7fr 5fr;
    gap: clamp(48px, 7vw, 120px);
    align-items: end;
  }
  .proj {
    grid-template-columns: 7fr 5fr;
    gap: clamp(40px, 5vw, 88px);
    align-items: center;
  }
  .proj--flip { grid-template-columns: 5fr 7fr; }
  .proj--flip .proj__media { order: 2; }

  .jobs--wide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(40px, 5vw, 88px);
  }
}

/* Телефон: витрината се свива, текстът е по-стегнат */
@media (max-width: 759px) {
  .work__lead { font-size: 16px; }
  .proj { gap: 22px; margin-top: 36px; padding-top: 24px; }
  .proj + .proj { margin-top: 40px; }
  .proj__name { margin: 8px 0 12px; font-size: 36px; }
  .proj__text { font-size: 15.5px; line-height: 1.65; }
  .proj__facts { margin: 20px 0 22px; }
  .proj__facts > div { grid-template-columns: 92px 1fr; padding: 9px 0; }
  .proj__facts dd { font-size: 16.5px; }
  .proj__link { width: 100%; }

  .dev { padding: 0 8% 14% 0; }
  .proj--flip .dev { padding: 0 0 14% 8%; }
  .dev__browser { border-radius: 8px; }
  .dev__bar { height: 22px; gap: 4px; padding: 0 8px; }
  .dev__dot { width: 6px; height: 6px; }
  .dev__url { padding: 1px 10px; font-size: 9.5px; }
  .dev__phone { width: 27%; }
  .dev__cap { max-width: 62%; font-size: 11px; }
  .auto__proof { margin-top: 12px; }
}

/* ============================================================
   Проекти · поправки след ревю
   - „Реален пример: ehype.bg“ е последната клетка на списъка,
     така че двете колони на широк екран се затварят без празно място
   ============================================================ */
.jobs li.jobs__proof {
  display: flex;
  align-items: center;
  padding: 6px 0 0;
  border-bottom: 0;
}
.jobs__proof .auto__proof { margin-top: 0; }
@media (min-width: 900px) {
  .jobs li.jobs__proof {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
  }
}
/* много тесни телефони (≤380px): фактите остават на един ред */
@media (max-width: 380px) {
  .proj__facts > div { grid-template-columns: 90px 1fr; gap: 10px; }
  .proj__facts dd { font-size: 15px; }
}


/* ---------- HYROX: тренировъчни снимки ----------
   Телефон: две снимки в две колони. Компютър: три равни колони на цялата
   ширина — еднакви разстояния между тях. */
.train {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(32px, 4vw, 56px);
}
.train__item--desk { display: none; }
.train__item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.train__item figcaption {
  margin-top: 10px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.45;
  text-transform: uppercase;
  color: var(--mute);
}
@media (min-width: 700px) {
  .train { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
  .train__item--desk { display: block; }
}
