/* ZH Marketing, shell.css
   Новата обвивка (проба от 13.10.2026): фон, хедър, последна секция и подвал по структурата на visuvate.com,
   в нашия шрифт и цветове. Включва се от build.py с page(..., shell=True); засега само за услугите.
   Зарежда се след site.css и home.css. Сравнение с остри ръбове: ?sharp=1 (връщане: ?sharp=0). */

.zh-shell {
  --cond: 'Sofia Sans XCond', 'Arial Narrow', 'Roboto Condensed', Impact, sans-serif;
  --ease-brand: cubic-bezier(0.22, 0.61, 0.36, 1);
  --r-card: 16px; --r-cap: 10px; --r-pill: 999px;
  --glass: rgba(12, 12, 12, 0.3);
  --glass-line: rgba(247, 247, 247, 0.12);
  --header-h: 68px;
  background: var(--ink);
}
.sharp .zh-shell { --r-card: 0px; --r-cap: 0px; --r-pill: 0px; }
.zh-shell .home { --p-pad: clamp(56px, 7vw, 96px); }
.zh-shell .cond { font-family: var(--cond); font-weight: 900; text-transform: uppercase; line-height: 0.86; letter-spacing: -0.005em; text-wrap: balance; overflow-wrap: normal; }
.zh-shell ::selection { background: var(--signal); color: var(--paper); }
.zh-shell :focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
.zh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Фон: zh-lines.js рисува върху canvas-а; без JS или WebGL остава статичното преливане ---------- */
.zh-lines { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--ink); }
canvas[data-zh-lines] {
  display: block; width: 100%; height: 100%;
  background:
    radial-gradient(60% 50% at 18% 28%, color-mix(in srgb, var(--signal) 30%, transparent), transparent 70%),
    radial-gradient(50% 45% at 82% 72%, color-mix(in srgb, var(--signal) 18%, transparent), transparent 70%),
    var(--ink);
}

/* ---------- Полупрозрачна карта ---------- */
.zh-card {
  position: relative; border: 1px solid var(--glass-line); border-radius: var(--r-card); background: rgba(12, 12, 12, 0.72);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .zh-card { background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
}
/* Светла черта по горния ръб */
.zh-card::after { content: ''; position: absolute; left: var(--r-card); right: var(--r-card); top: -1px; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(247, 247, 247, 0.4), transparent); }

/* ---------- Светла черта, която обикаля ръба на карта при посочване (една обиколка за 2.8 s) ---------- */
@property --s-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@media (hover: hover) and (pointer: fine) {
  :is(.s-card, .p-card)::before {
    content: ''; position: absolute; inset: -1px; z-index: 1; padding: 2px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 120ms linear;
    background: conic-gradient(from var(--s-ang), transparent 0, var(--signal) 18deg, var(--paper) 36deg, transparent 72deg, transparent 360deg);
    -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, linear-gradient(#000 0 0); mask-composite: exclude;
  }
  :is(.s-card, .p-card):is(:hover, :focus-visible)::before { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  :is(.s-card, .p-card):is(:hover, :focus-visible)::before { animation: s-orbit 2.8s linear infinite; }
  @keyframes s-orbit { to { --s-ang: 360deg; } }
}

/* ---------- Заглавие, което изостава при скрол и минава под следващия блок (Контакти, статия) ----------
   Обвивката .zh-lag се мести надолу с --lag-shift, докато страницата измине --lag-range. Резервен път: shell.js. */
.zh-lag { will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .zh-lag { animation: zh-lag linear both; animation-timeline: scroll(root block); animation-range: 0px var(--lag-range); }
    @keyframes zh-lag { to { transform: translateY(var(--lag-shift)); } }
  }
}

/* ---------- Бутон капсула с превъртане на буквите ---------- */
.zh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: var(--r-pill);
  background: var(--signal); color: var(--paper); text-decoration: none; white-space: nowrap; cursor: pointer;
  font-family: var(--cond); font-weight: 800; font-size: 23px; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.03em;
  transition: background-color 220ms var(--ease-brand), color 220ms var(--ease-brand), border-color 220ms var(--ease-brand), transform var(--dur-press) var(--ease-out);
}
.zh-btn:active { transform: scale(0.97); }
.zh-btn svg { width: 18px; height: 18px; flex: none; }
.zh-btn--ghost { background: rgba(247, 247, 247, 0.15); }
.zh-btn--line { background: transparent; box-shadow: inset 0 0 0 1px rgba(247, 247, 247, 0.28); }
.zh-btn--sm { min-height: 44px; padding: 0 18px; font-size: 20px; }
.zh-btn--wide { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .zh-btn:hover { background: var(--paper); color: var(--ink); }
  .zh-btn--ghost:hover { background: rgba(247, 247, 247, 0.26); color: var(--paper); }
  .zh-btn--line:hover { background: var(--paper); color: var(--ink); }
}
/* Всяка буква е колона от две еднакви; при посочване колоната се качва с един ред. Измерено: 0.52 s, 18 ms между буквите. */
.zh-roll { display: none; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .zh-roll-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .zh-roll { display: inline-flex; align-items: flex-start; height: 1.2em; padding-inline: 0.06em; overflow: hidden; }
  .zh-roll > span { display: inline-flex; flex-direction: column; white-space: pre; transition: transform 520ms var(--ease-brand) calc(var(--i) * 18ms); }
  .zh-roll > span > span { flex: none; height: 1.2em; }
  :is(a, button):is(:hover, :focus-visible) .zh-roll > span { transform: translateY(-50%); }
}
@media (prefers-reduced-motion: reduce) { .zh-btn, .zh-btn:active { transition: none; transform: none; } }

/* ---------- Хедър: пълна ширина, при скрол лента, после капсула ---------- */
.zh-header { position: fixed; top: 0; left: 0; right: 0; height: auto; padding-top: 0; border-bottom: 1px solid transparent; transition: padding 500ms var(--ease-brand), border-color 500ms var(--ease-brand); }
.zh-header::before { background: rgba(12, 12, 12, 0.72); border: 0; -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5); transition: opacity 500ms var(--ease-brand); }
html:not(.js) .zh-header::before { opacity: 1; }
.zh-header.is-scrolled { border-bottom-color: rgba(247, 247, 247, 0.09); }
.zh-header-in {
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; max-width: 1380px; margin-inline: auto; padding: 12px var(--gutter); border-radius: 0;
  transition: max-width 500ms var(--ease-brand), padding 500ms var(--ease-brand), border-radius 500ms var(--ease-brand), background-color 500ms var(--ease-brand), box-shadow 500ms var(--ease-brand);
}
.zh-header .logo { justify-self: start; }
.zh-header .logo img { width: 168px; height: auto; }
.zh-header .nav-list { gap: 28px; }
.zh-header .nav-list a:not(.btn) { font-size: 15px; color: var(--paper-72); transition: color 220ms var(--ease-brand); }
.zh-header .nav-list a:not(.btn)[aria-current="page"] { color: var(--paper); }
.zh-header .nav-list a:not(.btn)[aria-current="page"]::after { height: 2px; bottom: 4px; }
.zh-header-cta { justify-self: end; }
.zh-header .home-menu-cta { display: none; }
@media (min-width: 900px) {
  .zh-header-in { grid-template-columns: 1fr auto 1fr; }
  /* Капсула: измерено 920px, отстояние 20px отгоре, вътрешно поле 12px, 0.5 s */
  .zh-header.is-pill { padding-top: 20px; border-bottom-color: transparent; }
  .zh-header.is-pill::before { opacity: 0; }
  .zh-header.is-pill .zh-header-in { max-width: 920px; padding: 8px 10px 8px 20px; border-radius: var(--r-cap); background: rgba(12, 12, 12, 0.72); box-shadow: 0 0 0 1px rgba(247, 247, 247, 0.1); -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5); }
}
@media (max-width: 1099px) and (min-width: 900px) {
  .zh-header .logo img { width: 140px; }
  .zh-header .nav-list { gap: 18px; }
  .zh-header.is-pill .zh-header-in { max-width: calc(100% - 40px); }
}
@media (max-width: 899px) {
  .zh-header-cta { display: none; }
  .zh-header .home-menu-cta { display: block; }
  .zh-header .logo img { width: 160px; }
  .js .zh-header .nav-list { position: absolute; top: 100%; max-height: calc(100svh - 68px); overflow-y: auto; gap: 0; background: var(--ink); }
  .js .zh-header .nav-list a:not(.btn) { font-size: 20px; }
  .zh-header .home-menu-cta .zh-btn { width: 100%; }
  html:not(.js) .zh-header { position: static; }
  html:not(.js) .zh-header-in { display: flex; flex-wrap: wrap; gap: 0 var(--s5); }
  html:not(.js) .zh-header .site-nav { width: 100%; }
  html:not(.js) .zh-header .nav-list li:last-child { display: block; }
  html:not(.js) .zh-shell .zh-hero { padding-top: 32px; }
}
@media (prefers-reduced-motion: reduce) { .zh-header, .zh-header::before, .zh-header-in { transition: none; } }

/* ---------- Първи панел на страница ---------- */
.zh-hero { padding-top: calc(var(--header-h) + clamp(48px, 7vw, 104px)); padding-bottom: clamp(36px, 5vw, 64px); color: var(--paper); }
.zh-hero .container { display: grid; justify-items: start; gap: clamp(22px, 2.6vw, 36px); }
.zh-hero h1 { font-size: clamp(54px, 13.4vw, 190px); max-width: none; text-wrap: balance; }
.zh-hero h1 b { color: var(--signal); font-weight: 900; }
.zh-hero-lead { max-width: 30em; font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; line-height: 1.5; color: var(--paper-72); }
@media (prefers-reduced-motion: no-preference) {
  .zh-hero h1 { animation: zh-line-in 760ms var(--ease-out) both; }
  .zh-hero :is(.zh-hero-lead, .zh-back) { animation: zh-fade-in 600ms var(--ease-out) 240ms both; }
  .zh-hero .zh-back { animation-delay: 0ms; }
  @keyframes zh-line-in { from { clip-path: inset(0 0 100% 0); transform: translateY(34%); } to { clip-path: inset(-20% -2% -20% -2%); transform: none; } }
  @keyframes zh-fade-in { from { opacity: 0; } }
}

/* Поява при скрол, веднъж: 34px по-ниско, 0.7 s. Без JS стои видимо. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise]:not(.is-in) { opacity: 0; transform: translateY(34px); }
  .js [data-rise] { transition: opacity 700ms var(--ease-brand), transform 700ms var(--ease-brand); }
}

/* ---------- Последна секция и подвал ---------- */
.zh-footer { position: relative; isolation: isolate; overflow: hidden; margin-top: clamp(56px, 8vw, 120px); padding-top: clamp(72px, 9vw, 120px); color: var(--paper); background: linear-gradient(to bottom, transparent, var(--ink) 220px); }
.zh-end { display: grid; justify-items: center; gap: clamp(26px, 3vw, 40px); text-align: center; }
.zh-end h2 { font-size: clamp(52px, 10.4vw, 156px); max-width: none; }
.zh-end h2 span { display: block; }
.zh-end-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
/* Едрото „ZH“: излиза отдолу и се размива зад лентата с връзките */
.zh-mark {
  position: relative; z-index: -1; display: block; height: clamp(150px, 27vw, 400px); margin-top: clamp(28px, 4vw, 56px); margin-bottom: clamp(-190px, -12.6vw, -70px);
  font-family: var(--cond); font-weight: 900; font-size: clamp(250px, 45vw, 660px); line-height: 0.74; letter-spacing: -0.02em; text-align: center; color: var(--signal); white-space: nowrap; user-select: none; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .js .zh-mark { opacity: 0; transform: translateY(36px) scale(0.985); transition: opacity 1200ms cubic-bezier(0.5, 0, 0.6, 1), transform 1200ms cubic-bezier(0.5, 0, 0.6, 1); }
  .js .zh-mark.is-in { opacity: 1; transform: none; }
}
.zh-veil { position: relative; background: rgba(12, 12, 12, 0.9); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .zh-veil { background: rgba(12, 12, 12, 0.6); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
}
.zh-veil::before { content: ''; position: absolute; top: 0; left: -100vw; right: -100vw; border-top: 1px solid var(--glass-line); pointer-events: none; }
.zh-veil-in { border-inline: 1px solid var(--glass-line); }
.zh-reach { display: grid; }
.zh-reach a { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--paper); border-bottom: 1px solid var(--glass-line); min-width: 0; }
.zh-reach a > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zh-reach svg { width: 18px; height: 18px; flex: none; }
.zh-reach .go { margin-left: auto; width: 16px; height: 16px; color: var(--paper-56); transition: transform 300ms var(--ease-brand); }
@media (min-width: 600px) {
  .zh-reach { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zh-reach li:nth-child(even) a { border-left: 1px solid var(--glass-line); }
}
@media (min-width: 1100px) {
  .zh-reach { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .zh-reach a { min-height: 62px; padding: 0 24px; }
  .zh-reach li:not(:first-child) a { border-left: 1px solid var(--glass-line); }
}
.zh-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.zh-cols > * { padding: 24px 16px; border-left: 1px solid var(--glass-line); }
.zh-cols > :nth-child(odd) { border-left: 0; }
.zh-cols > :nth-child(n+3) { border-top: 1px solid var(--glass-line); grid-column: 1 / -1; }
.zh-cols h3 { font-family: var(--font); font-size: 14px; font-weight: 400; line-height: 1.4; letter-spacing: 0; color: var(--paper-56); }
.zh-cols ul { display: grid; gap: 2px; margin-top: 10px; }
.zh-cols a { display: inline-flex; align-items: center; min-height: 36px; font-size: 15px; text-decoration: none; color: var(--paper); }
.zh-legal { padding: 22px var(--gutter) 26px; border-top: 1px solid var(--glass-line); background: var(--ink); text-align: center; font-size: 13px; color: var(--paper-56); max-width: none; }
@media (min-width: 768px) {
  .zh-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .zh-cols > *, .zh-cols > :nth-child(n+3) { grid-column: auto; padding: 44px 24px 40px; border-top: 0; border-left: 1px solid var(--glass-line); }
  .zh-cols > :first-child { border-left: 0; }
}
@media (hover: hover) and (pointer: fine) {
  .zh-reach a:hover .go { transform: translateX(4px); }
  .zh-cols a:hover, .zh-reach a:hover { text-decoration: underline; text-underline-offset: 5px; }
}
@media (prefers-reduced-motion: reduce) { .zh-reach .go { transition: none; } }
