/* По-добри от вчера: медийна платформа. Видът следва bTV+ (Studio X), размерите са от dokumenti/referencia. */
@font-face { font-family: "Golos Text"; font-weight: 400 700; font-display: swap; src: url(fonts/golos-cyr.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 400 700; font-display: swap; src: url(fonts/golos-lat.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

:root {
  --bg: #242424;
  --black: #000;
  --panel: #151515;
  --text: #fff;
  --soft: rgba(255, 255, 255, .72);
  --line: rgba(255, 255, 255, .14);
  --ghost: rgba(255, 255, 255, .25);
  --blue: #3cb4ed;
  --grad: linear-gradient(90deg, #0068e0 .08%, #38b8d5 99.86%);
  --red: #d62027;
  --pad: 72px;
  --gap: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 110px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.2 "Golos Text", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 12px 16px; background: #fff; color: #000; border-radius: 6px; }

/* ---------- горна част ---------- */
.header { position: absolute; z-index: 30; top: 0; left: 0; right: 0; height: 104px; pointer-events: none; }
.header > * { pointer-events: auto; }
/* Лого: две колони (вчера по-ниска и бледа, днес по-висока и синя) и името до тях. */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark { width: 26px; height: 32px; }
.logo__mark rect { stroke: none; }
.logo__was { fill: #fff; opacity: .36; }
.logo__now { fill: var(--blue); }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo i, .logo b { font-size: 20px; font-style: normal; letter-spacing: -.03em; }
.logo i { font-weight: 500; }
.logo b { margin-top: 1px; font-weight: 700; }
.header > .logo { position: absolute; left: 46px; top: 34px; }
.nav { position: fixed; z-index: 31; top: 24px; left: 50%; transform: translateX(-50%); display: flex; height: 80px; padding: 0 22px; border-radius: 8px; background: rgba(18, 18, 18, .62); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.nav__link { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 22px; font-size: 16px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav__link svg { width: 26px; height: 26px; }
.nav__link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--blue); transform: scaleX(0); transition: transform .25s; }
.nav__link:hover::after, .nav__link.is-current::after { transform: scaleX(1); }
.header__right { position: absolute; right: 46px; top: 41px; display: flex; align-items: center; gap: 18px; }
.live { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 6px; background: var(--red); font-size: 16px; font-weight: 700; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: filter .2s; }
.live:hover { filter: brightness(1.12); }
/* Бутонът за книгата е самата корица: стърчи малко над и под червения бутон. */
.live { position: relative; padding-left: 62px; }
.live__book { position: absolute; left: 12px; top: 50%; width: 40px; height: auto; border-radius: 3px; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); transform: translateY(-50%) rotate(-7deg); transition: transform .25s; }
.live:hover .live__book { transform: translateY(-54%) rotate(-3deg) scale(1.06); }
.icon-btn { position: relative; display: grid; place-items: center; width: 32px; height: 46px; }
.icon-btn--search, .menu-btn { display: none; }
.saved-count { position: absolute; top: 4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--blue); color: #000; font: 700 11px/18px "Golos Text", sans-serif; text-align: center; }
.mobile-nav { display: none; }

/* ---------- първи екран ---------- */
.hero { position: relative; height: calc(100vh - 51px); min-height: 620px; max-height: 900px; margin-bottom: 51.5px; overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.slide.is-active { opacity: 1; visibility: visible; }
/* Първият екран е на цял екран, както в образеца: кадърът стига до долу, текстът е върху него. */
/* Първият кадър е истинска снимка на целия екран, като в демото на Карбовски. Кадрите от клиповете са отвесни и малки, затова стоят остри вдясно върху тъмен фон, без размиване. */
.slide { background: #141416; }
.slide__media { position: absolute; top: 0; right: 4%; bottom: 0; width: 36%; overflow: hidden; container-type: size; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 82%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 82%, transparent 100%); }
/* Лицето се мести в средата на кадъра: --fx, --fy са къде е то, --dx е преместването, --s е приближаването (слага ги main.js). */
.fc { transform-origin: var(--fx, 50%) var(--fy, 30%); transform: translateX(var(--dx, 0)) scale(var(--s, 1)); }
.slide__media img { position: absolute; top: 0; left: 0; width: 100%; max-width: none; height: auto; }
/* Кадърът е толкова голям, че надписът от клипа пада в тъмната долна част, а лицето е в средата (--x е къде е лицето). */
/* --x, --y: къде е лицето в кадъра (слага ги main.js). Кадърът е голям колкото да остане остър, лицето е в средата. */
.slide__media img.fc { --wi: max(100cqw, 56cqh); --hi: calc(var(--wi) * 1.7778); width: var(--wi); transform: none; left: clamp(calc(100cqw - var(--wi)), calc(50cqw - var(--x, .5) * var(--wi)), 0px); top: clamp(calc(100cqh - var(--hi)), calc(var(--py, 30cqh) - var(--y, .3) * var(--hi)), 0px); -webkit-mask-image: linear-gradient(#000 calc(var(--c, .56) * 100% - 11%), transparent calc(var(--c, .56) * 100% - 3.5%)); mask-image: linear-gradient(#000 calc(var(--c, .56) * 100% - 11%), transparent calc(var(--c, .56) * 100% - 3.5%)); }
/* Кадърът с книгата: цялата книга се вижда, без затъмняване. Малките картинки се скриват на този кадър, за да не я покриват. */
.slide--photo .slide__media { right: -3%; width: 62%; -webkit-mask-image: none; mask-image: none; }
.slide--photo .slide__media img { --q: min(100cqw, 100cqh); left: auto; right: 0; top: calc(50cqh - var(--q) / 2); width: var(--q); height: var(--q); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%), linear-gradient(transparent, #000 6%, #000 94%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 8%), linear-gradient(transparent, #000 6%, #000 94%, transparent); mask-composite: intersect; }
.slide--photo::before { background: linear-gradient(rgba(0, 0, 0, .5) 3.4%, rgba(0, 0, 0, 0) 23%), linear-gradient(rgba(36, 36, 36, 0) 88%, #242424 100%); }
.slide--photo .slide__body { width: 480px; }
.slide--photo { background: #141416; }
/* Първият кадър: истинска снимка от сцена на целия екран. */
.slide--full .slide__media { right: 0; width: 100%; -webkit-mask-image: none; mask-image: none; }
.slide--full .slide__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.slide::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 55%), linear-gradient(rgba(0, 0, 0, .5) 3.4%, rgba(0, 0, 0, 0) 23%), linear-gradient(rgba(36, 36, 36, 0) 45.2%, #242424 100%); pointer-events: none; }
/* При смяна на кадъра старият текст изчезва преди да се появи новият, за да не се застъпват. */
.slide__body { opacity: 0; transition: opacity .2s; }
.slide.is-active .slide__body { opacity: 1; transition: opacity .4s .3s; }
.slide__body { position: absolute; z-index: 2; left: 40px; bottom: 40px; width: 560px; }
.slide__title { font-size: 76.9px; line-height: 69.2px; font-weight: 600; letter-spacing: -.015em; }
.slide__sub { margin-top: 12px; font-size: 24px; line-height: 28.8px; font-weight: 400; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide__body .tags { margin-top: 16px; }
.slide__btns { display: flex; gap: 8px; margin-top: 28px; }

.tags { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; line-height: 21px; font-weight: 700; text-transform: uppercase; }
.tags li { white-space: nowrap; }
.tags li:not(:last-child)::after { content: ""; display: inline-block; width: 4px; height: 4px; margin-left: 14px; border-radius: 50%; background: currentColor; vertical-align: middle; position: relative; top: -1px; }
.tags .dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--c, var(--blue)); }
.tags--plain { margin-top: 24px; }

.button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 71px; padding: 22px 28px; border-radius: 6px; background: var(--grad); font-size: 18px; line-height: 27px; font-weight: 700; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: filter .2s, background-color .2s; }
.button:hover { filter: brightness(1.1); }
.button--ghost { background: var(--ghost); }
.button--ghost:hover { background: rgba(255, 255, 255, .34); filter: none; }
.button--sm { min-height: 49px; padding: 13px 20px; font-size: 15px; line-height: 22.5px; }
.label { position: absolute; top: -10px; right: 12px; padding: 0 10px; border-radius: 12px; background: var(--red); font-size: 14px; line-height: 24px; font-weight: 700; }

.hero__thumbs { position: absolute; z-index: 3; left: max(62%, 690px); bottom: 51px; display: flex; align-items: center; height: 331px; transition: transform .5s; }
.thumb { flex: none; width: 200px; height: 267px; margin-right: 8px; border-radius: 12px; overflow: hidden; border: 0 solid #fff; opacity: .9; transition: width .4s, height .4s, margin .4s, border-width .2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.thumb img.fc { transform-origin: var(--fx) 0; }
.thumb.is-active { width: 248px; height: 331px; margin-right: 14px; border-width: 3px; border-radius: 16px; opacity: 1; }
.thumb.is-past { opacity: 0; }
.arrow { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(90deg, #0068e0, #2f9fe0); transition: filter .2s, opacity .2s; }
.arrow:hover { filter: brightness(1.15); }
.arrow[disabled] { opacity: 0; pointer-events: none; }
.hero__prev, .hero__next { position: absolute; z-index: 4; bottom: 193px; }
.hero__prev { left: calc(max(62%, 690px) - 84px); }
.hero__next { right: 14px; }
.hero__thumbs { transition: transform .5s, opacity .3s; }
.hero.is-clean .hero__thumbs { opacity: 0; pointer-events: none; }
.hero.is-clean .hero__prev, .hero.is-clean .hero__next { bottom: 40px; }
.hero.is-clean .hero__prev { left: auto; right: 68px; }
/* по-тесен компютър: менюто е без иконки, за да не опира в червения бутон */
@media (max-width: 1280px) { .nav__link { padding: 0 14px; } .nav__link svg { display: none; } }
.hero__dots { display: none; }

/* ---------- секции и редове ---------- */
.section { position: relative; padding: 0 0 51.5px; }
.section--accent { background: var(--black); padding-top: 45.3px; }
.section + .section:not(.section--accent) { padding-top: 45.3px; }
.hero + .section { padding-top: 0; }
.section__title { margin: 0 var(--pad) 32px; font-size: 40.1px; line-height: 44.1px; font-weight: 600; letter-spacing: -.01em; }
.section__title--sub { margin-top: 56px; font-size: 26.9px; line-height: 35px; font-weight: 700; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-right: var(--pad); }
.more, .links a, .links button, .note a { font-weight: 600; color: var(--blue); text-decoration: none; }
.more { margin-bottom: 38px; font-size: 16px; }
.more:hover, .links a:hover, .links button:hover, .note a:hover { text-decoration: underline; text-underline-offset: 4px; }
.note { margin: 20px var(--pad) 0; font-size: 14px; line-height: 21px; color: var(--soft); }
.links { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 28px var(--pad) 0; font-size: 16px; }
.links--left { margin-left: 0; margin-right: 0; }

.row-wrap { position: relative; }
.row { display: flex; gap: var(--gap); padding: 0 var(--pad); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: var(--pad); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.row::-webkit-scrollbar { display: none; }
.row > * { flex: none; scroll-snap-align: start; }
.row-wrap > .arrow { position: absolute; z-index: 5; top: calc(var(--arrow-y, 50%) - 23px); }
.row-wrap > .arrow--prev { left: 14px; }
.row-wrap > .arrow--next { right: 14px; }

/* плакат: шестте части на книгата */
.poster { position: relative; display: block; width: 317px; height: 439px; border-radius: 16px; overflow: hidden; text-align: left; background: #111; }
.poster img { position: absolute; top: 0; left: 0; width: 100%; height: auto; transition: transform .5s; }
.poster:hover img { transform: translateX(var(--dx, 0)) scale(calc(var(--s, 1) * 1.04)); }
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 36%, rgba(0, 0, 0, .96) 62%, #000 70%); }
.poster__body { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 20px; }
.poster__body b { display: block; margin-top: 8px; font-size: 26.9px; line-height: 30px; font-weight: 700; }
.poster__body span { display: block; margin-top: 8px; font-size: 16px; line-height: 21px; color: var(--soft); }
.poster__bar { position: absolute; z-index: 1; left: 0; bottom: 0; height: 4px; background: var(--blue); transition: width .4s; }

.progress { display: flex; align-items: center; gap: 16px; margin: 24px var(--pad) 0; font-size: 14px; line-height: 21px; }
.progress b { font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.progress__track { flex: 1; max-width: 420px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.progress__track i { display: block; width: 0; height: 100%; background: var(--blue); transition: width .4s; }
.progress small { font-size: 14px; color: var(--soft); }

/* видео карта (вертикално видео) */
.vcard { position: relative; width: 236px; }
.vcard__img { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #111; }
.vcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.vcard__img:hover img { transform: translateX(var(--dx, 0)) scale(calc(var(--s, 1) * 1.04)); }
.vcard__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .2s; }
.vcard__img:hover .vcard__play, .vcard__img:focus-visible .vcard__play { opacity: 1; }
.vcard__dur { position: absolute; left: 10px; bottom: 10px; padding: 0 8px; border-radius: 4px; background: rgba(0, 0, 0, .7); font-size: 14px; line-height: 24px; font-weight: 700; }
.save { position: absolute; z-index: 2; top: 8px; right: 8px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .5); }
.save[aria-pressed="true"] svg { fill: #fff; }
.vcard__title { margin: 14px 16px 0 4px; font-size: 17px; line-height: 23px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vcard .tags { margin: 8px 4px 0; gap: 2px 10px; }
.vcard .tags li:not(:last-child)::after { margin-left: 10px; }
.vcard--all { display: grid; place-items: center; align-content: center; gap: 16px; aspect-ratio: 9 / 16; height: auto; align-self: flex-start; border-radius: 12px; background: var(--panel); font-size: 17px; font-weight: 700; text-align: center; padding: 20px; }
.section--accent .vcard--all { background: #1b1b1b; }

/* широка карта (подкасти, история) */
.lcard { width: 424px; }
.lcard__img { position: relative; display: block; width: 100%; aspect-ratio: 424 / 239; border-radius: 10px; overflow: hidden; background: #111; }
.lcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
a.lcard__img:hover img { transform: scale(1.04); }
.lcard__title { margin: 10px 16px 0; font-size: 24px; line-height: 30px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard__text { margin: 8px 16px 0; font-size: 16px; line-height: 22px; color: var(--soft); }
.lcard .tags { margin: 10px 16px 0; }
.chip-label { position: absolute; top: 0; right: 16px; padding: 0 12px; border-radius: 0 0 8px 8px; background: var(--blue); color: #000; font-size: 14px; line-height: 26px; font-weight: 700; }

.chips { display: flex; gap: 8px; margin: -8px 0 24px; padding: 0 var(--pad); overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 44px; padding: 0 18px; border-radius: 6px; background: rgba(255, 255, 255, .1); font-size: 15px; font-weight: 600; white-space: nowrap; transition: background-color .2s; }
.chip:hover { background: rgba(255, 255, 255, .18); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: #fff; color: #000; }

/* книгата */
.book { display: grid; grid-template-columns: 424px 1fr; gap: 48px; align-items: start; margin: 0 var(--pad); }
.book__cover img { width: 100%; height: auto; border-radius: 16px; }
.book__title { font-size: 40.1px; line-height: 44.1px; font-weight: 600; }
.book__lead { max-width: 640px; margin-top: 16px; font-size: 20px; line-height: 28px; color: var(--soft); }
.editions { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.edition { display: grid; grid-template-columns: 132px 1fr; gap: 20px; align-items: start; }
.edition img { width: 132px; height: 132px; object-fit: cover; border-radius: 10px; background: #fff; }
.edition h4 { margin-top: 6px; font-size: 24px; line-height: 30px; font-weight: 700; }
.edition p { margin: 6px 0 16px; font-size: 16px; line-height: 22px; color: var(--soft); }
.book .note { margin: 10px 0 0; }
.book > *, .editions > *, .edition > * { min-width: 0; }
.edition .button { white-space: normal; text-align: center; }
@media (max-width: 1399px) { .editions { grid-template-columns: 1fr; } }

/* отзиви */
.quote { display: flex; flex-direction: column; width: 424px; padding: 28px; border-radius: 10px; background: var(--panel); }
.quote blockquote { font-size: 24px; line-height: 30px; font-weight: 600; }
.quote blockquote::before { content: "“"; display: block; height: 34px; font-size: 64px; line-height: 64px; color: var(--blue); }
.quote h3 { font-size: 24px; line-height: 30px; font-weight: 700; }
.quote p { margin-top: 10px; font-size: 16px; line-height: 23px; color: var(--soft); }
.quote figcaption { margin-top: auto; padding-top: 24px; }
.quote figcaption b { display: block; font-size: 17px; line-height: 23px; font-weight: 700; }
.quote figcaption span { display: block; font-size: 16px; line-height: 22px; color: var(--soft); }
.quote .tags { margin-top: 12px; color: var(--soft); }

/* авторът */
.author { display: grid; grid-template-columns: 424px 1fr; gap: 48px; align-items: start; margin: 0 var(--pad); }
.author__photo img { width: 100%; height: auto; border-radius: 16px; }
.author__name { font-size: 40.1px; line-height: 44.1px; font-weight: 600; }
.author__role { margin-top: 8px; font-size: 24px; line-height: 28.8px; }
.author__body > p:not(.author__role):not(.links) { max-width: 680px; margin-top: 16px; font-size: 18px; line-height: 27px; color: var(--soft); }
.facts { display: flex; gap: 48px; margin: 32px 0; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { font-size: 40.1px; line-height: 44.1px; font-weight: 600; }
.facts dd { margin-top: 4px; font-size: 16px; line-height: 22px; color: var(--soft); }

/* мисията */
.mission { display: grid; grid-template-columns: 424px 1fr; gap: 48px; align-items: start; margin: 0 var(--pad); }
.mission__photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.mission__body > p { max-width: 680px; margin-bottom: 20px; font-size: 20px; line-height: 28px; color: var(--soft); }
.five { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: start; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.five > b { font-size: 76.9px; line-height: 69.2px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.five h3 { font-size: 24px; line-height: 30px; font-weight: 700; }
.five p { max-width: 600px; margin: 10px 0 20px; font-size: 16px; line-height: 23px; color: var(--soft); }

/* общност и бюлетин */
.community > * { min-width: 0; }
.community { display: grid; grid-template-columns: 1fr 520px; gap: 64px; align-items: start; margin: 0 var(--pad); }
.community__body > p { max-width: 620px; font-size: 20px; line-height: 28px; color: var(--soft); }
.steps { margin: 28px 0 32px; counter-reset: s; border-top: 1px solid var(--line); }
.steps li { counter-increment: s; display: flex; gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 18px; line-height: 25px; }
.steps li::before { content: counter(s); font-size: 24px; font-weight: 700; color: var(--blue); min-width: 18px; }
.form { padding: 32px; border-radius: 12px; background: var(--panel); }
.form h3 { margin-bottom: 20px; font-size: 26.9px; line-height: 35px; font-weight: 700; }
.form label, .search__meta label, .modal label.field { display: block; margin-bottom: 16px; font-size: 14px; line-height: 21px; font-weight: 700; }
select, textarea, input[type="email"], input[type="search"], input[type="text"] { display: block; width: 100%; margin-top: 6px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 6px; background: #242424; font-size: 16px; line-height: 22px; font-weight: 400; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
textarea { resize: vertical; }
.form .note { margin: 12px 0 0; }
.news { margin: 0 var(--pad); max-width: 720px; }
.news > p:first-child { font-size: 20px; line-height: 28px; color: var(--soft); }
.news__row { display: flex; gap: 8px; margin-top: 20px; }
.news__row input { margin: 0; height: 49px; }
.news .note { margin: 12px 0 0; }

/* долна част */
.footer { padding: 32px 0 36.7px; }
.channels { display: flex; justify-content: center; gap: 40px; padding: 0 var(--pad) 40px; flex-wrap: wrap; }
.channels a { display: grid; place-items: center; width: 140px; height: 90px; border-radius: 6px; font-size: 20px; font-weight: 700; text-decoration: none; color: var(--soft); transition: color .2s, background-color .2s; }
.channels a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.footer__panel { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center; margin: 0 16px; padding: 28px 32px; border-radius: 12px; background: var(--black); }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand .logo { margin-right: 12px; }
.social { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--panel); transition: background-color .2s; }
.social:hover { background: #2a2a2a; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; font-size: 15.5px; line-height: 23.2px; font-weight: 600; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--blue); }
.coltcode-credit { font-size: 15px; }
.coltcode-credit a { display: inline-flex; align-items: center; gap: .35em; color: inherit; text-decoration: none; }
.coltcode-credit img { flex: none; display: block; }
.coltcode-credit span { text-decoration: underline; text-underline-offset: 3px; }
.footer__note { margin: 20px var(--pad) 0; font-size: 14px; line-height: 21px; color: var(--soft); text-align: center; }

/* ---------- прозорци ---------- */
dialog { border: 0; padding: 0; color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, .78); }
.modal { width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border-radius: 12px; background: var(--panel); overflow: auto; }
.modal__inner { padding: 40px; }
.modal__close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.modal__close:hover { background: rgba(255, 255, 255, .2); }
.modal h2 { margin: 8px 48px 0 0; font-size: 26.9px; line-height: 35px; font-weight: 700; }
.modal .tags { color: var(--soft); }
#modalBody { margin-top: 20px; }
#modalBody > p { margin-bottom: 14px; font-size: 16px; line-height: 23px; color: var(--soft); }
.player { display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; }
.player__frame { width: 320px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #000 center / cover no-repeat; }
.player__frame iframe { width: 100%; height: 100%; border: 0; }
.player__info p { margin-bottom: 14px; font-size: 16px; line-height: 23px; color: var(--soft); }
.player__info .lesson { padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 20px 0; }
.player__info .lesson b { display: block; font-size: 14px; line-height: 21px; text-transform: uppercase; }
.player__info .lesson span { display: block; margin-top: 4px; font-size: 18px; line-height: 25px; font-weight: 600; color: #fff; }
.hashtags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.hashtags button { height: 32px; padding: 0 12px; border-radius: 6px; background: rgba(255, 255, 255, .1); font-size: 14px; font-weight: 600; }
.hashtags button:hover { background: rgba(255, 255, 255, .2); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.lesson-row { display: grid; grid-template-columns: 24px 34px 1fr auto; gap: 12px; align-items: center; min-height: 52px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 23px; cursor: pointer; }
.lesson-row:first-of-type { border-top: 1px solid var(--line); }
.lesson-row input { width: 22px; height: 22px; margin: 0; accent-color: var(--blue); }
.lesson-row b { font-weight: 700; color: var(--blue); }
.lesson-row small { font-size: 14px; color: var(--soft); white-space: nowrap; }
.lesson-row--day { grid-template-columns: 24px 64px 1fr; }

.search { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; background: #1b1b1b; overflow-y: auto; }
.search__bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 16px; padding: 24px var(--pad); background: #1b1b1b; }
.search__bar > svg { width: 32px; height: 32px; }
.search__bar input { flex: 1; margin: 0; padding: 8px 0; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; background: none; font-size: 32px; line-height: 44px; font-weight: 600; }
.search__bar input:focus { outline: 0; border-color: var(--blue); }
.search__bar .modal__close { position: static; }
.search .chips { margin: 0 0 20px; flex-wrap: wrap; overflow: visible; }
.search__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 var(--pad) 24px; }
.search__meta b { font-size: 14px; text-transform: uppercase; }
.search__meta label { display: flex; align-items: center; gap: 12px; margin: 0; white-space: nowrap; }
.search__meta select { margin: 0; width: auto; padding-top: 9px; padding-bottom: 9px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 32px 8px; padding: 0 var(--pad) 64px; }
.grid .vcard, .grid .lcard { width: auto; }
.grid .lcard { grid-column: span 2; }
.grid__empty { grid-column: 1 / -1; padding: 40px 0; font-size: 20px; color: var(--soft); }

/* ---------- таблет ---------- */
@media (max-width: 1100px) {
  :root { --pad: 32px; }
  .nav__link { padding: 0 14px; }
  .nav__link svg { display: none; }
  .hero__thumbs, .hero__prev, .hero__next { display: none; }
  .hero__dots { display: flex; }
  .slide__body { width: min(560px, 58vw); }
  .slide--photo .slide__media { width: 56%; }
  .slide--photo .slide__body { width: min(440px, 46vw); }
  .slide--photo .slide__btns { flex-wrap: wrap; }
  .book, .author, .mission { grid-template-columns: 300px 1fr; gap: 32px; }
  .editions { grid-template-columns: 1fr; }
  .community { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- телефон ---------- */
@media (max-width: 839px) {
  :root { --pad: 16px; }
  html { scroll-padding-top: 84px; }
  .header { position: fixed; height: 74px; background: linear-gradient(rgba(0, 0, 0, .3), rgba(0, 0, 0, 0)); }
  .header::before { content: ""; position: absolute; inset: 4px; border-radius: 12px; background: rgba(10, 10, 10, .88); opacity: 0; transition: opacity .25s; }
  .header.is-scrolled::before, .header.is-open::before { opacity: 1; }
  .header > .logo { left: 16px; top: 22px; gap: 8px; }
  .logo__mark { width: 21px; height: 26px; }
  .logo i, .logo b { font-size: 17px; }
  .mobile-nav button { display: block; width: 100%; padding: 24px 16px; border-radius: 6px; background: var(--black); font-size: 20px; line-height: 30px; font-weight: 600; text-align: left; }
  .nav { display: none; }
  .header__right { right: 8px; top: 12px; gap: 8px; }
  .live { height: 38px; padding: 0 12px 0 48px; gap: 8px; font-size: 14px; }
  .live__book { left: 8px; width: 32px; }
  .icon-btn { width: 44px; height: 50px; }
  .icon-btn--saved { display: none; }
  .menu-btn { position: relative; display: grid; place-content: center; justify-items: end; gap: 5px; width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, #0068e0, #38b8d5); }
  .menu-btn span { display: block; width: 22px; height: 2px; border-radius: 1px; background: #fff; transition: transform .25s, opacity .25s, width .25s; }
  .menu-btn span:nth-child(2) { width: 16px; }
  .menu-btn span:nth-child(3) { width: 19px; }
  .menu-btn[aria-expanded="true"] span { width: 22px; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mobile-nav { position: fixed; z-index: 29; inset: 0; display: flex; flex-direction: column; gap: 12px; padding: 90px 16px 24px; background: var(--bg); overflow-y: auto; }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav a { display: block; padding: 24px 16px; border-radius: 6px; background: var(--black); font-size: 20px; line-height: 30px; font-weight: 600; text-decoration: none; }

  /* На телефон кадърът е на цял екран, както в образеца. Преливането към фона започва под лицето и скрива надписа от клипа. */
  .hero { height: calc(100svh - 63px); min-height: 560px; max-height: 781px; margin-bottom: 0; }
  .slide__media, .slide--photo .slide__media { right: 0; width: 100%; -webkit-mask-image: none; mask-image: none; }
  .slide__media img.fc { --py: 30cqh; --wi: max(100cqw, 62cqh); }
  .slide--photo .slide__media img { top: 0; right: 0; width: 100%; height: 56%; object-fit: cover; -webkit-mask-image: none; mask-image: none; }
  .slide--photo .slide__body { width: auto; }
  .slide--photo .slide__btns .button { padding-left: 12px; padding-right: 12px; }
  .slide--full .slide__media img { object-position: 52% 0; }
  .slide::before { background: linear-gradient(rgba(0, 0, 0, .5) 3.4%, rgba(0, 0, 0, 0) 23%), linear-gradient(rgba(36, 36, 36, 0) 46%, rgba(36, 36, 36, .97) 57%, #242424 60%); }
  .slide--photo::before { background: linear-gradient(rgba(0, 0, 0, .5) 3.4%, rgba(0, 0, 0, 0) 23%), linear-gradient(rgba(36, 36, 36, 0) 49%, rgba(36, 36, 36, .97) 56%, #242424 59%); }
  .slide--full::before { background: linear-gradient(rgba(0, 0, 0, .5) 3.4%, rgba(0, 0, 0, 0) 23%), linear-gradient(rgba(36, 36, 36, 0) 40%, rgba(36, 36, 36, .92) 66%, #242424 80%); }
  .slide__body .tags { font-size: 13px; }
  .slide__btns .button { padding-left: 16px; padding-right: 16px; gap: 8px; }
  .slide__body { left: 16px; right: 16px; bottom: 24px; width: auto; }
  .slide__sub { -webkit-line-clamp: 2; }
  .slide__title { font-size: 48px; line-height: 43.2px; }
  .slide__sub { margin-top: 10px; font-size: 20px; line-height: 25px; }
  .slide__body .tags { margin-top: 12px; }
  .slide__btns { margin-top: 24px; }
  .button { min-height: 49px; padding: 13px 20px; font-size: 15px; line-height: 22.5px; }
  .slide__btns .button svg { width: 22px; height: 22px; }
  .tags { gap: 2px 10px; }
  .tags li:not(:last-child)::after { margin-left: 10px; }
  .hero__dots { display: flex; justify-content: center; gap: 8px; height: 63px; align-items: center; }
  .hero + .section { padding-top: 0; }
  .hero { overflow: visible; margin-bottom: 63px; }
  .hero__slides { position: absolute; inset: 0; overflow: hidden; }
  .hero__dots { position: absolute; left: 0; right: 0; top: 100%; }
  .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; transition: background-color .2s; }
  .dot::after { content: ""; display: block; width: 24px; height: 44px; margin: -18px 0 0 -8px; }
  .dot[aria-selected="true"] { background: var(--blue); }

  .section { padding-bottom: 32px; }
  .section--accent, .section + .section:not(.section--accent) { padding-top: 32px; }
  .hero + .section { padding-top: 0; }
  .section__title { margin-bottom: 20px; font-size: 28px; line-height: 30.8px; text-align: center; }
  .section__title--sub { margin-top: 40px; font-size: 23px; line-height: 27.6px; }
  .section__head { display: block; margin: 0; }
  .more { display: block; margin: -8px 16px 20px; text-align: center; }
  .links { justify-content: center; gap: 12px 24px; margin-top: 24px; }
  .links--left { justify-content: flex-start; }
  .note { text-align: center; }
  .row-wrap > .arrow { display: none; }

  .poster { width: 324px; height: 449px; }
  .vcard { width: 220px; }
  .vcard__play { opacity: 1; width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  .lcard { width: 324px; }
  .lcard__title { font-size: 20px; line-height: 26px; }
  .quote { width: 324px; padding: 24px; }
  .quote blockquote, .quote h3 { font-size: 20px; line-height: 26px; }
  .progress { flex-wrap: wrap; gap: 8px 16px; justify-content: center; text-align: center; }
  .progress__track { flex: 1 1 120px; }
  .progress small { flex-basis: 100%; }
  .chips { margin-top: 0; }

  .book, .author, .mission { display: block; }
  .book__cover, .author__photo, .mission__photo { margin-bottom: 24px; }
  .book__cover img { aspect-ratio: 4 / 3; object-fit: cover; }
  .author__photo img { aspect-ratio: 1; object-fit: cover; object-position: 50% 20%; }
  .mission__photo img { aspect-ratio: 4 / 3; }
  .book__title, .author__name { font-size: 28px; line-height: 30.8px; }
  .book__lead, .mission__body > p, .community__body > p, .news > p:first-child { font-size: 18px; line-height: 26px; }
  .author__role { font-size: 20px; line-height: 25px; }
  .author__body > p:not(.author__role):not(.links) { font-size: 17px; line-height: 25px; }
  .editions { gap: 24px; margin-top: 24px; padding-top: 24px; }
  .edition { grid-template-columns: 96px 1fr; gap: 16px; }
  .edition img { width: 96px; height: 96px; }
  .edition h4 { font-size: 20px; line-height: 26px; }
  .edition .button { width: 100%; }
  .book .note, .form .note, .news .note { text-align: left; }
  .facts { gap: 0; justify-content: space-between; margin: 24px 0; padding: 20px 0; }
  .facts div { flex: 1; }
  .facts dt { font-size: 28px; line-height: 30.8px; }
  .facts dd { font-size: 14px; line-height: 19px; padding-right: 8px; }
  .five { display: block; margin-top: 32px; padding-top: 24px; }
  .five > b { display: block; margin-bottom: 16px; font-size: 64px; line-height: 58px; }
  .five h3 { font-size: 20px; line-height: 26px; }
  .steps li { font-size: 17px; line-height: 24px; }
  .form { padding: 24px 20px; }
  .form .button, .news__row .button, .community__body > .button { width: 100%; white-space: normal; text-align: center; }
  .form h3 { font-size: 23px; line-height: 27.6px; }
  .news__row { flex-direction: column; }

  .footer { padding: 32px 0; }
  .channels { gap: 8px; padding-bottom: 24px; }
  .channels a { width: 100px; height: 64px; font-size: 16px; }
  .footer__panel { display: block; padding: 24px; }
  .footer__links { flex-direction: column; gap: 14px; margin: 28px 0; font-size: 15px; line-height: 22.5px; }
  .footer__note { text-align: left; }

  .modal { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .modal__inner { padding: 64px 16px 32px; }
  .modal h2 { margin-right: 0; font-size: 23px; line-height: 27.6px; }
  .player { display: block; }
  .player__frame { width: min(300px, 78vw); margin: 0 auto 24px; }
  .btns .button { flex: 1 1 100%; }
  .lesson-row { font-size: 16px; line-height: 22px; grid-template-columns: 24px 28px 1fr auto; gap: 10px; }
  .lesson-row--day { grid-template-columns: 24px 58px 1fr; }
  .search__bar { padding: 12px 16px; gap: 10px; }
  .search__bar > svg { display: none; }
  .search__bar input { font-size: 20px; line-height: 30px; }
  .search .chips { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 16px; }
  .search__meta { margin-bottom: 16px; }
  .search__meta label { font-size: 0; gap: 0; }
  .grid { grid-template-columns: 1fr 1fr; gap: 24px 8px; padding-bottom: 40px; }
  .grid .vcard__title { font-size: 15px; line-height: 20px; margin-top: 10px; }
}

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

/* тесен телефон: бутонът е само „Книгата“, за да не застъпва логото */
@media (max-width: 372px) { .live__word { display: none; } }
@media (max-width: 380px) { .slide__body .tags { font-size: 12px; gap: 2px 7px; } }
