/* =====================================================================
   Audiofill — компоненти
   Підключати після base.css. Кожен компонент описано в
   docs/02_design-system.md, розділ 9. Живий перегляд — design-system-preview.html
   ===================================================================== */

/* ---------- Скло ---------- */
.glass {
  position: relative; background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-inner), var(--shadow-float);
}
.glass::before {   /* м'який відблиск замість обідка */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--glass-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glass--stage { background: var(--glass-bg-on-stage); color: var(--text-on-stage); box-shadow: 0 18px 44px rgba(5, 27, 34, 0.22); }
.glass--stage::before { background: var(--glass-rim-on-stage); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-solid-fallback); }
  .glass--stage { background: rgba(255, 255, 255, 0.86); }
}

/* ---------- Шапка: логотип окремо, меню — на склі ---------- */
.header { position: sticky; top: 12px; z-index: var(--z-header); padding: 0 var(--gutter); pointer-events: none; }
.header::before {   /* затемнення під логотипом, щоб зміст сторінки не наїжджав на нього */
  content: ""; position: absolute; z-index: -1; left: 0; top: -12px; width: min(100%, 460px); height: calc(var(--header-h) + 90px); pointer-events: none;
  background: radial-gradient(ellipse 62% 70% at 26% 34%, rgba(13, 16, 22, 0.97) 0, rgba(13, 16, 22, 0.9) 42%, rgba(13, 16, 22, 0) 100%);
  opacity: 0; transition: opacity var(--t-slow);
}
.header.is-scrolled::before { opacity: 1; }
.header__inner { max-width: var(--container); margin: 0 auto; display: flex; align-items: center; gap: var(--sp-5); pointer-events: auto; }
.header__logo { flex: none; display: block; border-radius: var(--r-sm); transition: opacity var(--t-fast); }
.header__logo:hover { opacity: 0.8; }
.header__logo img { display: block; height: var(--header-h); width: auto; filter: drop-shadow(0 2px 10px rgba(13, 16, 22, 0.55)); }
.header__bar { flex: 1; min-width: 0; height: var(--header-h); padding: 0 8px 0 28px; border-radius: var(--r-pill); display: flex; align-items: center; gap: var(--sp-5); }
.nav { display: flex; gap: var(--sp-5); margin-right: auto; }
.nav a { position: relative; padding: 20px 0; color: var(--text-secondary); font-size: var(--fs-small); font-weight: 500; transition: color var(--t-fast); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 13px; height: 2px; border-radius: 2px; background: var(--action); transform: scaleX(0); transform-origin: left; transition: transform var(--t-base) var(--ease-out); }
.nav a:hover, .nav a[aria-current] { color: var(--text-main); }
.nav a[aria-current]::after { transform: scaleX(1); }

/* Перемикач мови */
.lang { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: var(--r-pill); background: rgba(233, 243, 253, 0.08); }
.lang::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: var(--r-pill); background: var(--paper-100); transition: transform var(--t-base) var(--ease-spring); }
html[lang="en"] .lang::before { transform: translateX(100%); }
.lang button { position: relative; min-width: 46px; height: 34px; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-secondary); transition: color var(--t-base); }
.lang button:hover { color: var(--text-main); }
.lang button[aria-pressed="true"] { color: var(--teal-900); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: var(--r-md); font-weight: 600; white-space: nowrap;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-base), transform var(--t-base) var(--ease-out);
}
.btn i { transition: transform var(--t-base) var(--ease-out); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.985); transition-duration: 60ms; }
.btn:hover .fa-arrow-right { transform: translateX(4px); }
.btn--primary, .btn--primary:hover { background: var(--action); color: var(--text-on-accent); }
.btn--primary:hover { background: var(--action-hover); box-shadow: var(--shadow-action); }
.btn--secondary { border: 1px solid var(--line-strong); color: var(--text-main); }
.btn--secondary:hover { border-color: var(--text-secondary); background: rgba(233, 243, 253, 0.05); }
.btn--quiet { height: 40px; padding: 0 12px; color: var(--text-secondary); }
.btn--quiet:hover { color: var(--text-main); }
.btn--sm { height: 40px; padding: 0 16px; font-size: var(--fs-small); border-radius: var(--r-sm); }
.btn--header { height: 44px; padding: 0 20px; font-size: var(--fs-small); border-radius: var(--r-pill); }
.btn.is-chosen { border-color: var(--action); color: var(--action); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.play {
  flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--action); color: var(--text-on-accent);
  display: grid; place-items: center; transition: background-color var(--t-fast), box-shadow var(--t-base), transform var(--t-base) var(--ease-spring);
}
.play:hover { background: var(--action-hover); box-shadow: var(--shadow-action); transform: scale(1.06); }
.play:active { transform: scale(0.94); }
.play--sm { width: 40px; height: 40px; font-size: 13px; }

/* ---------- Перший екран ---------- */
.hero { padding-top: var(--sp-8); }
.hero__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--grid-gap); align-items: end; }
.hero__text { grid-column: 1 / 8; padding-bottom: var(--sp-7); }
.eyebrow { font-size: var(--fs-caption); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-muted); }
.hero h1 { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--track-display); margin: var(--sp-4) 0 var(--sp-5); }
.hero h1 em { font-style: normal; color: var(--action); }
.lead { font-size: var(--fs-lead); color: var(--text-secondary); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }
.stage {
  position: relative; overflow: hidden; border-radius: var(--r-xl); isolation: isolate;
  background: url("../img/bg-gradient.jpg") 0% 0% / 150% 150%, var(--stage-fallback);
  animation: stage-drift 28s var(--ease-in-out) infinite alternate;
}
@keyframes stage-drift { to { background-position: 100% 100%, 0 0; } }
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.18; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__stage { grid-column: 8 / 13; min-height: 460px; display: flex; flex-direction: column; justify-content: space-between; padding: var(--sp-5); }
.js [data-reveal] .hero__stage[data-reveal-item] { transform: translateY(28px) scale(0.97); }
.js [data-reveal].is-in .hero__stage[data-reveal-item] { transform: none; }
.stage__note { align-self: flex-end; text-align: right; color: var(--text-on-stage); font-size: var(--fs-small); font-weight: 500; }
.stage__note b { display: block; font: 600 28px/1 var(--font-display); }

/* ---------- Плеєр і хвиля ---------- */
.player { border-radius: var(--r-lg); padding: var(--sp-4); display: flex; align-items: center; gap: var(--sp-4); }
.player__body { flex: 1; min-width: 0; }
.player__title { font-weight: 600; font-size: var(--fs-small); display: flex; justify-content: space-between; gap: var(--sp-3); }
.player__time { font-variant-numeric: tabular-nums; opacity: 0.7; font-weight: 500; }
.wave { height: 44px; margin-top: 6px; display: flex; align-items: center; gap: 2px; cursor: pointer; overflow: hidden; }
.wave i {
  flex: 0 0 3px; align-self: center; border-radius: var(--r-xs); background: currentColor; opacity: 0.3; scale: 1 0.06;
  transition: scale 700ms var(--ease-out) calc(var(--n, 0) * 7ms), opacity var(--t-base) linear;
}
.is-in .wave i, html:not(.js) .wave i { scale: 1 1; }
.wave i.is-played { opacity: 1; }
.wave:hover i:not(.is-played) { opacity: 0.45; }
.is-playing .wave i.is-head { animation: bar 560ms var(--ease-in-out) infinite alternate; animation-delay: calc(var(--n, 0) * -90ms); }
@keyframes bar { to { scale: 1 0.4; } }
@media (prefers-reduced-motion: reduce) { .stage, .is-playing .wave i.is-head { animation: none; } }

/* ---------- Секції перегляду ---------- */
.section { padding-top: var(--section-gap); }
.section__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--grid-gap); border-top: 1px solid var(--line); padding-top: var(--sp-5); }
.section__label { grid-column: 1 / 4; }
.section__label .num { color: var(--text-muted); font-size: var(--fs-small); }
.section__label h2 { font-size: var(--fs-h3); font-weight: 600; margin-top: var(--sp-2); }
.section__label p { color: var(--text-muted); font-size: var(--fs-small); margin-top: var(--sp-3); max-width: 22em; }
.section__body { grid-column: 4 / 13; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.stack > * + * { margin-top: var(--sp-5); }

/* Теги, чипи */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r-xs); background: rgba(233, 243, 253, 0.08); color: var(--text-secondary); font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag--ai { background: rgba(154, 107, 255, 0.16); color: var(--ai); }
.tag--ok { background: rgba(35, 241, 190, 0.14); color: var(--mint-400); }
.chip { height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--text-secondary); font-size: var(--fs-small); font-weight: 500; transition: background-color var(--t-base), color var(--t-base), border-color var(--t-base), transform var(--t-base) var(--ease-spring); }
.chip:hover { color: var(--text-main); border-color: var(--text-secondary); }
.chip:active { transform: scale(0.95); }
.chip[aria-pressed="true"] { background: var(--paper-100); border-color: var(--paper-100); color: var(--teal-900); }

/* Рівень диктора: чотири кружечки */
.level { display: inline-flex; gap: 4px; vertical-align: middle; }
.level i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--text-muted); }
.level i.on { background: var(--paper-100); border-color: var(--paper-100); }
.legend { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-5); color: var(--text-muted); font-size: 13px; }
.legend > span { display: inline-flex; align-items: center; gap: 8px; }

/* Картка диктора */
.voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--grid-gap); }
.voice { background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4); transition: border-color var(--t-base), box-shadow var(--t-base); }
.voice:hover { border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.voice.is-selected { border-color: var(--action); box-shadow: 0 0 0 1px var(--action); }
.voice__head { display: flex; gap: var(--sp-4); }
.voice__photo { flex: none; width: 77px; height: 96px; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-raised); display: grid; place-items: center; color: var(--text-muted); font-size: 11px; }
.voice__info { flex: 1; min-width: 0; }
.voice__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.voice__id { font: 500 12px/1 var(--font-display); letter-spacing: 0.06em; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.voice__name { font: 600 var(--fs-h3)/1.15 var(--font-display); margin: 10px 0; }
.voice__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.voice__demo { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); }
.voice__demo .wave { flex: 1; min-width: 0; height: 32px; margin: 0; }
.voice__link { font-size: 13px; margin-top: var(--sp-3); }
.voice__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.voice__price { font-size: 13px; color: var(--text-muted); }
.voice__price b { display: block; font: 600 18px/1.2 var(--font-display); color: var(--text-main); font-variant-numeric: tabular-nums; }

/* Прайс */
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 112px; gap: var(--sp-5); align-items: center; padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.price-row:first-child { border-top: 1px solid var(--line); }
.price-row h3 { font: 600 var(--fs-body)/1.3 var(--font-text); display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; transition: color var(--t-fast); }
.price-row:hover h3 { color: var(--action); }
.price-row p { color: var(--text-muted); font-size: var(--fs-small); margin-top: 2px; }
.price-row__sum { text-align: right; white-space: nowrap; }
.price-row__sum b { font: 600 20px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.price-row__sum small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.add { width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); color: var(--text-main); transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-base) var(--ease-spring); }
.add:hover { background: var(--action); border-color: var(--action); color: var(--text-on-accent); transform: rotate(90deg); }

/* Форми */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.field label { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-small); font-weight: 500; margin-bottom: var(--sp-2); }
.field label small { font-weight: 400; font-size: 13px; color: var(--text-muted); }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: var(--bg-raised); color: var(--text-main); font: 400 16px/1.4 var(--font-text); transition: border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-base);
}
.field textarea { resize: vertical; display: block; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:hover, .field textarea:hover { background: var(--bg-hover); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan-500); box-shadow: var(--focus-ring); }
.field--error input { border-color: var(--danger); }
.field__hint { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.field--error .field__hint { color: var(--danger); }
.field--wide { grid-column: 1 / -1; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--sp-3); }
.tile { position: relative; text-align: left; padding: var(--sp-4); border-radius: var(--r-md); background: var(--bg-raised); border: 1px solid var(--line-strong); transition: background-color var(--t-fast), border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base) var(--ease-out); }
.tile:hover { background: var(--bg-hover); transform: translateY(-2px); }
.tile b { display: block; font-weight: 600; }
.tile span { font-size: 13px; color: var(--text-muted); }
.tile::after { content: "\f00c"; font: 900 11px "Font Awesome 6 Free"; position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--action); color: var(--text-on-accent); display: grid; place-items: center; transform: scale(0); transition: transform var(--t-base) var(--ease-spring); }
.tile[aria-pressed="true"] { border-color: var(--action); box-shadow: inset 0 0 0 1px var(--action); }
.tile[aria-pressed="true"]::after { transform: scale(1); }
.stats { display: flex; gap: var(--sp-6); flex-wrap: wrap; padding: var(--sp-4) var(--sp-5); border-radius: var(--r-md); background: var(--bg-surface); border: 1px solid var(--line); }
.stats div { font-size: 13px; color: var(--text-muted); }
.stats b { display: block; font: 600 22px/1.2 var(--font-display); color: var(--text-main); font-variant-numeric: tabular-nums; }
.stats .is-total b { color: var(--action); }

/* Панель суми */
.sumbar { border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-5); display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.sumbar__sum { margin-right: auto; font: 600 var(--fs-price)/1 var(--font-display); color: var(--action); font-variant-numeric: tabular-nums; }
.sumbar__sum small { display: block; font: 400 var(--fs-small)/1.4 var(--font-text); color: var(--text-secondary); margin-bottom: 6px; }

/* Рахунок */
.invoice { background: var(--doc-paper); color: var(--doc-ink); border-radius: var(--r-lg); overflow: hidden; max-width: 640px; }
.invoice__head { padding: var(--sp-5); display: flex; justify-content: space-between; align-items: flex-end; min-height: 132px; border-radius: 0; animation: none; background-size: cover, cover; background-position: center, center; }
.invoice__head img { height: 54px; }
.invoice__head div { text-align: right; font-size: 13px; }
.invoice__head b { display: block; font: 600 20px/1.2 var(--font-display); }
.invoice__body { padding: var(--sp-5); }
.invoice__line { display: flex; justify-content: space-between; gap: var(--sp-4); padding: 14px 0; border-bottom: 1px solid var(--doc-line); }
.invoice__line p { color: var(--doc-muted); font-size: 13px; }
.invoice__line b { font: 600 16px/1.4 var(--font-display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: var(--sp-5); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-md); background: var(--doc-tint); }
.invoice__total b { font: 600 28px/1 var(--font-display); font-variant-numeric: tabular-nums; }


/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
  .nav { display: none; }
  .header__bar { flex: 0 0 auto; margin-left: auto; padding: 0 8px; gap: var(--sp-2); }
  /* На вузьких екранах зміст проходить під усією шапкою, тож згасає на всю ширину */
  .header::before { width: 100%; height: calc(var(--header-h) + 56px); background: linear-gradient(rgba(13, 16, 22, 0.98) 0, rgba(13, 16, 22, 0.94) 58%, rgba(13, 16, 22, 0) 100%); }
  .hero__text, .hero__stage, .section__label, .section__body { grid-column: 1 / -1; }
  .hero__text { padding-bottom: 0; }
  .hero__stage { min-height: 380px; }
}
@media (max-width: 640px) {
  :root { --header-h: 52px; }
  .btn--header { width: 38px; height: 38px; padding: 0; }
  .btn--header span { display: none; }
  .lang button { min-width: 40px; height: 32px; padding: 0 10px; }
  .form { grid-template-columns: 1fr; }
  .price-row { gap: var(--sp-3); }
  .sumbar { padding: var(--sp-4); }
  .sumbar .btn { flex: 1; }
  .invoice__head img { height: 44px; }
  .invoice__head b { font-size: 15px; }
  .stats { gap: var(--sp-4) var(--sp-5); }
}

/* =====================================================================
   Каркас сайту: кнопка меню, мобільне меню, заголовок сторінки, підвал
   ===================================================================== */

/* ---------- Кнопка меню (лише на вузьких екранах) ---------- */
.burger { display: none; flex: none; width: 38px; height: 38px; border-radius: 50%; place-items: center; color: var(--text-main); background: rgba(233, 243, 253, 0.08); transition: background-color var(--t-fast), transform var(--t-base) var(--ease-spring); }
.burger:hover { background: rgba(233, 243, 253, 0.16); }
.burger:active { transform: scale(0.92); }
.burger i { transition: transform var(--t-base) var(--ease-out); }
.burger[aria-expanded="true"] i { transform: rotate(90deg); }

/* ---------- Мобільне меню ---------- */
.menu {
  position: fixed; inset: 0; z-index: calc(var(--z-header) - 1); display: flex; flex-direction: column; gap: var(--sp-6);
  padding: calc(var(--header-h) + 56px) var(--gutter) var(--sp-6); overflow-y: auto;
  background: rgba(13, 16, 22, 0.82); -webkit-backdrop-filter: blur(26px) saturate(150%); backdrop-filter: blur(26px) saturate(150%);
  opacity: 0; visibility: hidden; transition: opacity var(--t-base) var(--ease-out), visibility 0s linear var(--t-base);
}
.menu.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.menu__nav { display: flex; flex-direction: column; }
.menu__nav a {
  display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4) 0; border-bottom: 1px solid var(--line);
  font: 500 clamp(1.375rem, 6.4vw, 1.875rem)/1.15 var(--font-display); letter-spacing: var(--track-display); color: var(--text-main);
  opacity: 0; transform: translateY(14px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out), color var(--t-fast);
  transition-delay: calc(var(--n, 0) * 55ms + 60ms), calc(var(--n, 0) * 55ms + 60ms), 0s;
}
.menu__nav a i { font-size: 14px; color: var(--text-muted); }
.menu__nav a[aria-current] { color: var(--action); }
.menu.is-open .menu__nav a { opacity: 1; transform: none; }
.menu .btn { align-self: stretch; }
html.is-menu-open { overflow: hidden; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .menu { background: rgba(13, 16, 22, 0.98); } }

/* ---------- Заголовок сторінки ---------- */
.page-head { padding-top: clamp(48px, 8vw, 96px); }
.page-head h1 { font-size: var(--fs-h1); letter-spacing: var(--track-display); margin: var(--sp-4) 0 var(--sp-5); max-width: 16em; }
.page-head .lead { max-width: 36em; }

/* ---------- Підвал ---------- */
.footer { margin-top: var(--section-gap); padding: var(--sp-8) 0 var(--sp-6); background: var(--bg-sunken); color: var(--text-secondary); font-size: var(--fs-small); }
.footer__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-6) var(--grid-gap); }
.footer__brand { grid-column: 1 / 6; }
.footer__brand img { display: block; height: 72px; width: auto; }
.footer__brand p { margin-top: var(--sp-5); max-width: 26em; color: var(--text-muted); }
.footer__col { grid-column: span 2; }
.footer__col--wide { grid-column: span 3; }
.footer__title { font-size: var(--fs-caption); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--sp-4); }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.footer__list a { color: var(--text-secondary); transition: color var(--t-fast); display: inline-flex; align-items: center; gap: var(--sp-2); }
.footer__list a:hover { color: var(--text-main); }
.footer__list i { width: 16px; text-align: center; color: var(--text-muted); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-8); padding-top: var(--sp-5); border-top: 1px solid var(--line); color: var(--text-muted); font-size: 13px; }
.footer__bottom a { color: inherit; transition: color var(--t-fast); }
.footer__bottom a:hover { color: var(--text-main); }
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); }

@media (max-width: 1024px) {
  .burger { display: grid; }
  .header__inner { gap: var(--sp-3); }
  .footer__brand { grid-column: 1 / -1; }
  .footer__col, .footer__col--wide { grid-column: span 4; }
}
@media (min-width: 1025px) { .menu { display: none; } }
@media (max-width: 640px) {
  .footer__col, .footer__col--wide { grid-column: 1 / -1; }
  .footer__brand img { height: 60px; }
}

/* =====================================================================
   Плеєр: док унизу екрана, рядок роботи, темна кнопка для сцени
   ===================================================================== */

/* ---------- Док плеєра ---------- */
.dock {
  position: fixed; z-index: var(--z-dock); left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  width: min(720px, calc(100% - 2 * var(--gutter))); padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg); display: flex; align-items: center; gap: var(--sp-4);
  transform: translate(-50%, calc(100% + 32px)); opacity: 0; visibility: hidden;
  transition: transform var(--t-slow) var(--ease-out), opacity var(--t-base) linear, visibility 0s linear var(--t-slow);
}
.dock.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition-delay: 0s; }
.dock__body { flex: 1; min-width: 0; }
.dock__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .wave { height: 30px; margin-top: 2px; }
.dock .wave i { scale: 1 1; }
.dock__close { flex: none; width: 36px; height: 36px; border-radius: 50%; color: var(--text-secondary); transition: background-color var(--t-fast), color var(--t-fast); }
.dock__close:hover { background: rgba(233, 243, 253, 0.1); color: var(--text-main); }
.player__title > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player__time { flex: none; }
html.has-dock .footer { padding-bottom: 112px; }

/* ---------- Рядок роботи (портфоліо) ---------- */
.work { display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.3fr) 44px; gap: var(--sp-5); align-items: center; padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.work:first-child { border-top: 1px solid var(--line); }
.work h3 { font: 600 var(--fs-body)/1.3 var(--font-text); transition: color var(--t-fast); }
.work.is-current h3 { color: var(--action); }
.work__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-2); }
.work .wave { margin: 0; height: 40px; }
.work .player__time { font-size: 13px; color: var(--text-muted); text-align: right; opacity: 1; font-variant-numeric: tabular-nums; }
.voice__photo img { width: 100%; height: 100%; object-fit: cover; }
.voice__photo i { font-size: 22px; opacity: 0.5; }

/* ---------- Темна кнопка: головна дія поверх сцени ---------- */
.btn--ink, .btn--ink:hover { background: var(--logo-ink); color: var(--paper-100); }
.btn--ink:hover { background: #0a2c37; box-shadow: 0 10px 28px rgba(5, 27, 34, 0.35); }
.btn--on-stage { border: 1px solid rgba(5, 27, 34, 0.35); color: var(--text-on-stage); }
.btn--on-stage:hover { background: rgba(5, 27, 34, 0.08); border-color: var(--text-on-stage); }

/* ---------- Посилання «усі …» під заголовком секції ---------- */
.section__more { margin-top: var(--sp-4); font-size: var(--fs-small); font-weight: 500; }
.section__more:hover i { transform: translateX(3px); }

/* ---------- Примітка про тестові дані ---------- */
.test-note { display: none; margin-top: var(--sp-4); font-size: 12px; color: var(--warning); }
html.is-test-data .test-note { display: block; }

@media (max-width: 640px) {
  .work { grid-template-columns: 48px minmax(0, 1fr) auto; gap: var(--sp-3) var(--sp-4); }
  .work .wave { grid-column: 1 / -1; grid-row: 2; }
  .dock { padding-left: var(--sp-3); gap: var(--sp-3); }
}

/* =====================================================================
   Прайс і кошторис: лічильник кількості, плаваюча панель суми, заклик
   ===================================================================== */

/* ---------- Кнопка праворуч у рядку прайсу ---------- */
.price-row > .add, .price-row__ctl { justify-self: end; }
.price-row__ctl { display: flex; justify-content: flex-end; min-height: 40px; align-items: center; }
.price-row.is-added h3 { color: var(--action); }
.add { display: inline-grid; place-items: center; }
.qty { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: rgba(35, 241, 190, 0.12); animation: qty-in var(--t-base) var(--ease-spring); }
@keyframes qty-in { from { transform: scale(0.86); opacity: 0.4; } }
.qty button { width: 34px; height: 34px; border-radius: 8px; color: var(--mint-400); font-size: 13px; transition: background-color var(--t-fast), transform var(--t-base) var(--ease-spring); }
.qty button:hover { background: rgba(35, 241, 190, 0.18); }
.qty button:active { transform: scale(0.9); }
.qty b { min-width: 30px; text-align: center; font: 600 16px/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--text-main); }
@media (prefers-reduced-motion: reduce) { .qty { animation: none; } }

/* ---------- Плаваюча панель суми ---------- */
.sumbar--float {
  position: fixed; z-index: var(--z-dock); left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  width: min(720px, calc(100% - 2 * var(--gutter))); flex-wrap: nowrap;
  transform: translate(-50%, calc(100% + 32px)); opacity: 0; visibility: hidden;
  transition: transform var(--t-slow) var(--ease-out), opacity var(--t-base) linear, visibility 0s linear var(--t-slow);
}
.sumbar--float.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition-delay: 0s; }
.sumbar--float .sumbar__sum { font-size: clamp(1.375rem, 1rem + 1.6vw, 2rem); min-width: 0; }
.sumbar--float .sumbar__sum small { margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Док плеєра стає над панеллю суми */
html.has-sumbar .dock { bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--sumbar-h, 88px) + 12px); }
html.has-sumbar .footer { padding-bottom: calc(var(--sumbar-h, 88px) + 48px); }
html.has-sumbar.has-dock .footer { padding-bottom: calc(var(--sumbar-h, 88px) + 144px); }

/* ---------- Чипи-посилання під заголовком сторінки ---------- */
.jump { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-6); }
.jump .chip { display: inline-flex; align-items: center; }

/* ---------- Заклик унизу сторінки ---------- */
.cta-band { margin-top: var(--section-gap); }
.cta-band .stage { padding: clamp(32px, 6vw, 72px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-6); }
.cta-band h2 { font-size: var(--fs-h1); letter-spacing: var(--track-display); color: var(--text-on-stage); max-width: 14em; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }


@media (max-width: 640px) {
  .price-row { grid-template-columns: minmax(0, 1fr) auto; }
  .price-row > .add, .price-row__ctl { grid-column: 2; grid-row: 2; }
  .price-row__sum { grid-column: 2; grid-row: 1; align-self: start; }
  .price-row > div:first-child { grid-row: 1 / 3; }
  .sumbar--float { padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4); gap: var(--sp-3); }
  .sumbar--float .btn { flex: 0 0 auto; padding: 0 14px; }
  .sumbar--float .sumbar__sum { font-size: 1.25rem; white-space: nowrap; }
}

/* Картки дикторів у ряду однакової висоти: ціна й кнопка притиснуті донизу */
.voice { display: flex; flex-direction: column; }
.voice__foot { margin-top: auto; }
.voice__demo { margin-bottom: var(--sp-4); }
.voice__link { margin: calc(var(--sp-2) * -1) 0 var(--sp-4); }

/* =====================================================================
   Списки з фільтрами (диктори, портфоліо), відео
   ===================================================================== */

/* ---------- Панель фільтрів ---------- */
.filters summary { list-style: none; display: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters__body { display: grid; gap: var(--sp-5); }
.filters__group > span { display: block; font-size: var(--fs-caption); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--sp-3); }
.filters__chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.filters .field input { min-height: 46px; padding: 11px 14px 11px 40px; }
.filters .field { position: relative; }
.filters .field > i { position: absolute; left: 14px; bottom: 15px; color: var(--text-muted); font-size: 14px; pointer-events: none; }
.filters__reset { justify-self: start; padding-left: 0; }
.filters__n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--action); color: var(--text-on-accent); font: 600 12px/1 var(--font-text); }

/* Малий чип для фільтрів */
.chip--sm { height: 32px; padding: 0 12px; font-size: 13px; display: inline-flex; align-items: center; gap: var(--sp-2); }
.chip--sm[aria-pressed="true"] .level i { border-color: var(--teal-900); }
.chip--sm[aria-pressed="true"] .level i.on { background: var(--teal-900); }

/* ---------- Рядок над списком ---------- */
.list-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3) var(--sp-5); margin-bottom: var(--sp-5); }
.list-count { font: 600 var(--fs-h3)/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.select { display: inline-flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-small); color: var(--text-muted); }
.select select {
  appearance: none; -webkit-appearance: none; height: 40px; padding: 0 36px 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--bg-raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a9b9c9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--text-main); font: 500 var(--fs-small)/1 var(--font-text); cursor: pointer; transition: border-color var(--t-fast), background-color var(--t-fast);
}
.select select:hover { background-color: var(--bg-hover); }
.list-note { margin-top: var(--sp-5); font-size: 13px; color: var(--text-muted); max-width: 46em; }

/* ---------- Нічого не знайдено ---------- */
.empty { padding: var(--sp-7) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.empty h3 { font-size: var(--fs-h3); font-weight: 600; }
.empty p { color: var(--text-secondary); margin: var(--sp-2) 0 var(--sp-5); }

@media (min-width: 1025px) {
  .filters-col { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: var(--sp-2); scrollbar-width: thin; }
}
@media (max-width: 1024px) {
  .filters { border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg-surface); }
  .filters summary { display: flex; align-items: center; gap: var(--sp-3); height: 52px; padding: 0 var(--sp-4); font-weight: 600; cursor: pointer; }
  .filters summary .fa-chevron-down { margin-left: auto; font-size: 12px; color: var(--text-muted); transition: transform var(--t-base) var(--ease-out); }
  .filters[open] summary .fa-chevron-down { transform: rotate(180deg); }
  .filters__body { padding: var(--sp-2) var(--sp-4) var(--sp-5); }
}

/* ---------- Підзаголовок блоку в списку ---------- */
.list-block + .list-block { margin-top: var(--sp-8); }
.list-block > h2 { font-size: var(--fs-caption); font-family: var(--font-text); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--sp-4); }

/* ---------- Картка відео ---------- */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-6) var(--grid-gap); }
.vcard h3 { font: 600 var(--fs-body)/1.3 var(--font-text); margin-top: var(--sp-4); }
.vcard__poster { position: relative; display: block; width: 100%; padding: 0; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-raised) var(--stage-fallback); isolation: isolate; }
.vcard__poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--t-slow) var(--ease-out), filter var(--t-base); filter: brightness(0.82); }
.vcard__poster .play { position: absolute; left: var(--sp-4); bottom: var(--sp-4); }
.vcard__poster:hover img { transform: scale(1.04); filter: brightness(1); }
.vcard__poster:hover .play { background: var(--action-hover); box-shadow: var(--shadow-action); transform: scale(1.06); }

/* ---------- Вікно з відео ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--sp-8) var(--gutter);
  background: rgba(9, 11, 16, 0.88); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  opacity: 0; visibility: hidden; transition: opacity var(--t-base) var(--ease-out), visibility 0s linear var(--t-base);
}
.lightbox.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.lightbox__frame { width: min(1100px, 100%); max-height: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-float); transform: scale(0.96); transition: transform var(--t-slow) var(--ease-out); }
.lightbox.is-open .lightbox__frame { transform: none; }
.lightbox__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.lightbox__close { position: absolute; top: var(--sp-4); right: var(--gutter); width: 44px; height: 44px; border-radius: 50%; background: rgba(233, 243, 253, 0.1); color: var(--text-main); font-size: 18px; transition: background-color var(--t-fast), transform var(--t-base) var(--ease-spring); }
.lightbox__close:hover { background: rgba(233, 243, 253, 0.2); transform: rotate(90deg); }
html.is-modal-open { overflow: hidden; }

/* =====================================================================
   Форма заявки
   ===================================================================== */

/* ---------- Позначка-галочка ---------- */
.check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--sp-3); align-items: start; font-size: var(--fs-small); color: var(--text-secondary); cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; border-radius: var(--r-xs); border: 1px solid var(--line-strong); background: var(--bg-raised); display: grid; place-items: center; cursor: pointer; transition: background-color var(--t-fast), border-color var(--t-fast); }
.check input::after { content: "\f00c"; font: 900 12px "Font Awesome 6 Free"; color: var(--text-on-accent); transform: scale(0); transition: transform var(--t-base) var(--ease-spring); }
.check input:checked { background: var(--action); border-color: var(--action); }
.check input:checked::after { transform: scale(1); }
.check input:hover { border-color: var(--text-secondary); }
.check.field--error input { border-color: var(--danger); }
.check span { padding-top: 2px; }
.check a { color: var(--link); }
.check a:hover { color: var(--link-hover); }
.check .field__hint { grid-column: 2; display: block; color: var(--danger); margin-top: 0; padding-top: 0; }

/* ---------- Форма ---------- */
.order { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
.order .field--wide, .order__wide { grid-column: 1 / -1; }
.order textarea { resize: vertical; }
.order__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.order__summary { font-size: var(--fs-small); color: var(--text-secondary); max-width: 28em; }
.order__status { flex-basis: 100%; font-size: var(--fs-small); color: var(--text-secondary); min-height: 1.4em; }
.order__status.is-error { color: var(--danger); }
.order__next { list-style: none; margin: var(--sp-5) 0 0; padding: 0; display: grid; gap: var(--sp-3); font-size: var(--fs-small); color: var(--text-secondary); counter-reset: next; }
.order__next li { display: grid; grid-template-columns: 28px 1fr; gap: var(--sp-2); counter-increment: next; }
.order__next li::before { content: counter(next, decimal-leading-zero); font: 500 12px/1.7 var(--font-display); color: var(--text-muted); }
.order__next-title { font-size: var(--fs-caption) !important; font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-muted) !important; margin-top: var(--sp-6) !important; }

/* Під час заповнення заявки плаваюча панель суми не заважає */
html.is-ordering .sumbar--float.is-on { transform: translate(-50%, calc(100% + 32px)); opacity: 0; visibility: hidden; }

/* ---------- Екран «дякуємо» ---------- */
.order-done { padding: clamp(24px, 5vw, 48px); border-radius: var(--r-lg); background: var(--bg-tint); border: 1px solid var(--line); animation: est-done var(--t-slow) var(--ease-out); }
@keyframes est-done { from { opacity: 0; transform: translateY(16px); } }
.order-done__mark { width: 56px; height: 56px; border-radius: 50%; background: var(--action); color: var(--text-on-accent); display: grid; place-items: center; font-size: 22px; margin-bottom: var(--sp-5); }
.order-done h2 { font-size: var(--fs-h2); outline: none; }
.order-done__no { margin-top: var(--sp-3); font-size: var(--fs-small); color: var(--text-muted); }
.order-done__no b { font: 600 var(--fs-body)/1 var(--font-display); color: var(--text-main); margin-left: var(--sp-2); }
.order-done > p { margin-top: var(--sp-4); color: var(--text-secondary); max-width: 34em; }
.order-done .test-note { display: block; color: var(--warning); margin-top: var(--sp-3); }
.order-done h2:focus-visible { box-shadow: none; }
.order-done__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }
@media (prefers-reduced-motion: reduce) { .order-done { animation: none; } }

@media (max-width: 640px) {
  .order { grid-template-columns: minmax(0, 1fr); }
  .order__foot .btn, .order-done__actions .btn { width: 100%; }
}
