/* =================== ROOT TOKENS =================== */
:root{
  --bg:#F8FAFF;
  --panel:#FFFFFF;
  --text:#0F172A;
  --muted:#64748B;
  --accent:#6C5CE7;
  --accent2:#FF6B9A;
  --cyan:#22D3EE;
  --ring:0 0 0 4px rgba(108,92,231,.18);

  /* header tokens */
  --hdr-h:72px;
  --glass-bg: color-mix(in oklab, var(--bg) 72%, transparent);
  --glass-brd: color-mix(in oklab, var(--text) 12%, transparent);

  /* buttons */
  --btn-bg:#ffffff;
  --btn-text:var(--text);

  /* Cookie Consent (final) */
  --cc-brand: var(--brand, var(--accent));
  --cc-onbrand: #fff;
  --cc-bg: color-mix(in oklab, var(--panel, #fff) 90%, transparent);
  --cc-shadow: 0 20px 50px rgba(0,0,0,.18), 0 6px 18px rgba(0,0,0,.08);
  --cc-br: 16px;
}

/* Accent palette switch */
html.grad-cyan, html[data-gradient="cyan"]{ --accent2: var(--cyan); }

/* Optional brand gradient presets */
:root[data-gradient="pink"] { --brand: linear-gradient(135deg,#ff5f91,#a855f7) }
:root[data-gradient="cyan"] { --brand: linear-gradient(135deg,#22d3ee,#3b82f6) }

/* =================== BASE =================== */
*{ box-sizing:border-box }
html,body{
  margin:0; padding:0; background:var(--bg); color:var(--text);
  font-family:system-ui,-apple-system,'Segoe UI',Roboto,Inter,Ubuntu,'Helvetica Neue',Arial,'Noto Sans',sans-serif;
  line-height:1.55; letter-spacing:.1px;
}
a{ color:inherit; text-decoration:none }
img{ max-width:100%; display:block }
.container{ width:min(1160px,92%); margin:0 auto }
.muted{ color:var(--muted) }

/* =================== HEADER =================== */
.site-header{
  position: sticky; top:0; z-index:60;
  height: var(--hdr-h);
  display:grid; align-items:center;

  /* fallbacks for color-mix/backdrop-filter */
  background: rgba(248,250,255,.72);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-bottom:1px solid rgba(15,23,42,.12);
  border-bottom:1px solid var(--glass-brd);
}
/* one animated bottom line */
.site-header.aurora4::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:2px;
  background: linear-gradient(90deg,var(--accent),var(--accent2),var(--accent),var(--accent2));
  background-size: 200% 100%; animation: beam-pan4 8s linear infinite;
}
@keyframes beam-pan4{ to{ background-position: 200% 0; } }

/* soft aurora glow behind header */
.hdr-aurora{
  position:absolute; inset:-40% -8% auto -8%; height:220px; pointer-events:none; z-index:-1;
  background:
    radial-gradient(800px 180px at 22% 62%, color-mix(in oklab,var(--accent) 30%, transparent) 0%, transparent 60%),
    radial-gradient(720px 180px at 78% 42%, color-mix(in oklab,var(--accent2) 30%, transparent) 0%, transparent 60%);
  filter: blur(26px) saturate(120%);
  animation: aurora-drift4 14s ease-in-out infinite alternate;
}
@keyframes aurora-drift4{ 0%{ transform: translateY(-10px); opacity:.82 } 100%{ transform: translateY(8px); opacity:.96 } }

.hdr-row{ display:grid; grid-template-columns:auto 1fr auto; gap:16px; align-items:center; }

/* Logo: fallback <img> + градиентная маска при поддержке */
.logo{ display:flex; align-items:center; gap:.6rem; height:40px }
.logo-img{ width:40px; height:40px; display:block; object-fit:contain }

/* .logo-mark по умолчанию скрыта; маску и показ включит JS */
.logo-mark{
  display:none; width:40px; height:40px; border-radius:12px;
  background: var(--brand, linear-gradient(135deg,#ff5f91,#a855f7));
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.20));
  will-change: transform, filter, background-position;
}

@keyframes logo-breathe{
  0%,100%{ transform:scale(1);   filter:drop-shadow(0 2px 6px rgba(0,0,0,.20)) }
  50%    { transform:scale(1.04); filter:drop-shadow(0 6px 16px rgba(0,0,0,.28)) brightness(1.04) }
}



/* =================== NAV =================== */
.nav{ display:flex; align-items:center; justify-content:space-between; padding:12px 0; gap:16px; flex-wrap:wrap }
.nav-links{ position:relative; display:flex; gap:18px; align-items:center; flex-wrap:wrap; }
.nav-links, .nav-links li{ list-style:none; margin:0; padding:0; }
.nav-links li::marker, .nav-links li::before{ content:none; }
.nav-links a{
  position:relative; padding:10px 2px; border-radius:10px; border:1px solid transparent;
  transition: color .25s ease, transform .15s ease;
}
.nav-links a:hover{ transform: translateY(-1px); }
/* focus only for keyboard users */
.nav-links a:focus{ outline:none; box-shadow:none; }
.nav-links a:focus-visible{ box-shadow: var(--ring); }
.nav-links .ink{
  position:absolute; bottom:-2px; height:2px; width:0; border-radius:2px;
  background: linear-gradient(90deg,var(--accent),var(--accent2));
  transition: left .25s ease, width .25s ease, opacity .25s ease;
  opacity:.0; pointer-events:none;
}

/* Actions */
.hdr-actions{ display:flex; align-items:center; gap:8px; }
.lang-switch{ display:flex; gap:6px; padding:2px; border:1px solid var(--glass-brd); border-radius:999px; }
.lang-switch .lang-btn{
  font-size:12px; padding:6px 10px; border-radius:999px; line-height:1;
  background: transparent; border:0; cursor:pointer;
  transition: background .2s ease, color .2s ease, transform .1s ease;
}
.lang-switch .lang-btn.active{
  color:#fff; background: linear-gradient(135deg,var(--accent),var(--accent2));
}
.lang-switch .lang-btn:active{ transform: scale(.98); }

/* Buttons */
.btn{ padding:10px 14px; border-radius:12px; border:1px solid rgba(15,23,42,.08); background:var(--btn-bg); color:var(--btn-text); cursor:pointer }
.btn.small{ padding:6px 10px; font-size:13px }
.btn:hover{ box-shadow:var(--ring) }
.btn.primary{ background:linear-gradient(135deg,var(--accent),var(--accent2)); border:none; color:#fff; font-weight:800 }

/* keyboard focus for interactive controls */
.btn:focus{ outline:none; }
.btn:focus-visible,
.lang-switch .lang-btn:focus-visible,
.burger:focus-visible,
.toc .toc-toggle:focus-visible{ box-shadow: var(--ring); outline:none; }

.btn.icon{
  min-width:38px; height:38px; display:grid; place-items:center;
  border-radius:10px; border:1px solid var(--glass-brd); background:transparent;
  transition: transform .1s ease, background .2s ease, border-color .2s ease;
}
.btn.icon:hover{ background: color-mix(in oklab, var(--glass-brd) 12%, transparent); border-color: color-mix(in oklab, var(--text) 16%, transparent); }
.btn.icon:active{ transform: scale(.96); }

/* gradient palette icon demo */
#gradBtn.palette{ position:relative; }
#gradBtn.palette span{
  position:absolute; left:9px; right:9px; height:3px; border-radius:3px;
  background: linear-gradient(90deg,var(--accent),var(--accent2));
  transition: transform .15s ease, opacity .15s ease;
}
#gradBtn.palette span:nth-child(1){ top:10px }
#gradBtn.palette span:nth-child(2){ top:16px }
#gradBtn.palette span:nth-child(3){ top:22px }
#gradBtn.palette:active span{ transform: scale(.96); }

/* Burger */
.burger{ display:none; position:relative; width:44px; height:38px; border:0; background:transparent; }
.burger span{
  position:absolute; left:10px; right:10px; height:2px; background: currentColor; border-radius:2px;
  transition: transform .25s ease, top .25s ease, opacity .2s ease;
}
.burger span:nth-child(1){ top:12px } .burger span:nth-child(2){ top:18px } .burger span:nth-child(3){ top:24px }
.burger.active span:nth-child(1){ top:18px; transform: rotate(45deg) }
.burger.active span:nth-child(2){ opacity:0 }
.burger.active span:nth-child(3){ top:18px; transform: rotate(-45deg) }

/* Mobile panel */
.mobile-nav{
  display:grid; gap:12px; padding:12px 16px 16px; border-top:1px solid var(--glass-brd);
  /* fallback then token */
  background: rgba(248,250,255,.72);
  background: var(--glass-bg);
}
.mobile-nav[hidden]{ display:none !important; }
.mobile-nav nav{ display:grid; gap:10px; }
.mobile-nav a{ padding:10px 8px; border-radius:10px; text-decoration:none; transition: background .2s ease; }
.mobile-nav a:hover{ background: color-mix(in oklab, var(--text) 8%, transparent); }
.mobile-cta{ display:flex; } .mobile-cta .btn{ width:100%; }

/* Compact on scroll */
.site-header.aurora4.scrolled{ height:64px; }
.site-header.scrolled .logo-mark{ transform: scale(.94); }
.site-header.scrolled .logo-text{ letter-spacing: .2px; }

/* Breakpoint */
@media (max-width: 940px){ .nav{ display:none } .burger{ display:block } }

/* remove borders/markers in dark */
html.theme-dark .nav-links a, html[data-theme="dark"] .nav-links a{ border-color:transparent!important; }

/* =================== CONTENT =================== */
.hero{ display:grid; grid-template-columns:1.1fr .9fr; gap:24px; align-items:center; padding:36px 0 10px }
.kicker{ color:var(--accent); text-transform:uppercase; font-size:12px; letter-spacing:.25em }
.hero h1{ margin:.3rem 0 10px; font-size:46px }
.hero p{ margin:0 0 12px; color:var(--muted) }
.hero-media{ border:1px solid rgba(15,23,42,.08); border-radius:16px; overflow:hidden }
.hero-media video{ display:block; width:100%; height:auto }
.video-controls{ display:flex; gap:8px; padding:8px }

.section{ padding:24px 0 }
.section h2{ margin:0 0 12px; font-size:30px }

.grid{ display:grid; gap:16px } /* single source of truth for gap */
.products{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)) }

.card{
  background:var(--panel); display:flex; flex-direction:column;
  border:1px solid rgba(15,23,42,.08); border-radius:16px; padding:18px;
  box-shadow:0 8px 22px rgba(2,8,23,.06)
}
.price{ font-size:26px; font-weight:800; margin:8px 0 }
.old{ color:var(--muted); text-decoration:line-through; margin-right:8px; font-weight:500 }
.features{ color:var(--muted); font-size:14px; list-style:none; padding-left:18px }
.features li{ margin:6px 0; position:relative }
.features li:before{ content:'•'; position:absolute; left:-14px; color:var(--accent) }

.rec .badge.right{ margin-left:8px }
.badge{
  display:inline-block; padding:6px 10px; border-radius:999px;
  background:linear-gradient(180deg,rgba(108,92,231,.12),rgba(255,107,154,.12));
  border:1px solid rgba(108,92,231,.35); color:#5b50dd
}
.rec-ico{
  display:inline-grid; place-items:center; width:22px; height:22px; border-radius:999px;
  background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; font-size:13px; font-weight:800
}

.extras-row{ display:grid; gap:16px; grid-template-columns: repeat(6, minmax(0,1fr)); align-items:stretch; }
.svc-meta{ display:flex; gap:6px; flex-wrap:wrap; margin:8px 0 }
.chip{
  font-size:12px; padding:6px 8px; border-radius:999px;
  background:linear-gradient(180deg,rgba(108,92,231,.10),rgba(255,107,154,.10));
  border:1px solid rgba(108,92,231,.25); color:#5b50dd
}

details summary{ cursor:pointer }
details[open] summary{ color:var(--accent) }

.process{ grid-template-columns:repeat(auto-fit,minmax(220px,1fr)) }
.step{ background:var(--panel); border:1px solid rgba(15,23,42,.08); border-radius:12px; padding:12px }

.cta-bar{
  display:flex; gap:12px; justify-content:center; padding:8px;
  border:1px dashed rgba(15,23,42,.12); border-radius:12px;
  background:linear-gradient(180deg,#fff,#f8fbff)
}

.footer{ margin-top:34px; padding:22px 0; border-top:1px solid rgba(15,23,42,.08) }
.social{ display:flex; gap:14px; align-items:center }

/* Modal */
.modal-backdrop{
  position:fixed; inset:0; background:rgba(14,18,34,.55);
  backdrop-filter:blur(6px); display:none; align-items:center; justify-content:center; z-index:1050;
}
.modal-backdrop[hidden]{ display:none }
.modal{
  width:min(820px,92%); background:#fff; border:1px solid rgba(15,23,42,.08);
  border-radius:16px; box-shadow:0 20px 60px rgba(2,8,23,.18); z-index:1060;
}
.modal header{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid rgba(15,23,42,.06) }
.modal .body{ padding:14px 16px; color:#334155 }
.modal footer{ display:flex; justify-content:flex-end; gap:10px; padding:12px 16px; border-top:1px solid rgba(15,23,42,.06) }
.modal .close{ border:none; background:transparent; cursor:pointer; font-size:18px; line-height:1; padding:6px; border-radius:8px }

/* === Fancy Service Modal (glass + gradient border + sheet on mobile) === */
.modal-backdrop{ opacity:0; pointer-events:none; transition:opacity .25s ease }
.modal-backdrop.is-open{ opacity:1; pointer-events:auto }

.modal{ 
  position:relative; overflow:clip;
  transform:translateY(12px) scale(.98); opacity:0;
  transition:transform .28s cubic-bezier(.22,.61,.36,1), opacity .28s ease;
}
.modal-backdrop.is-open .modal{ transform:none; opacity:1 }

.modal::before{
  content:''; position:absolute; inset:0; padding:1px; border-radius:16px;
  background:linear-gradient(120deg, var(--accent), var(--cyan), var(--accent2));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.modal::after{
  content:''; position:absolute; inset:auto auto 10% -15%;
  width:340px; height:340px; border-radius:50%;
  background:radial-gradient(closest-side, color-mix(in oklab, var(--accent) 25%, transparent), transparent 70%);
  filter:blur(24px); opacity:.6; pointer-events:none;
}

/* типографика */
.modal header{ background:linear-gradient(180deg, color-mix(in oklab, var(--panel) 85%, transparent), transparent) }
.modal header h3{ font-size:22px }
.modal .body{ font-size:16px; line-height:1.6 }
.modal .kicker{ font:600 12px/1 Inter, system-ui; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin:0 0 6px }

/* двухколоночный лэйаут */
.modal .grid{ display:grid; grid-template-columns:220px 1fr; gap:18px; align-items:start }
.modal .rail{
  background:linear-gradient(180deg, color-mix(in oklab, var(--accent) 15%, transparent), transparent);
  border:1px solid rgba(15,23,42,.08); border-radius:12px; padding:14px;
}
.modal .rail .metric{ display:grid; gap:8px }
.metric .chip{
  display:inline-flex; gap:8px; align-items:center; padding:6px 10px; border-radius:999px;
  border:1px solid rgba(15,23,42,.12); background:color-mix(in oklab, var(--panel) 85%, transparent);
}
.metric .chip strong{ font-weight:600 }
/* чек-лист */
.modal .list-check {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.modal .list-check li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
}

.modal .list-check li::before {
  content: '';
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  
  /* ✅ Исправление: добавлено стандартное свойство */
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="black" d="M7.5 13.5 3.8 9.8l-1.3 1.3L7.5 15.5 17.5 5.5 16.2 4.2z"/></svg>') center/contain no-repeat;

  /* Поддержка для Safari */
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="black" d="M7.5 13.5 3.8 9.8l-1.3 1.3L7.5 15.5 17.5 5.5 16.2 4.2z"/></svg>') center/contain no-repeat;
}

/* футер */
.modal footer{ justify-content:space-between; align-items:center }
.modal footer .muted{ font-size:13px; color:var(--muted) }
.modal .btn.secondary{ background:var(--btn-bg); color:var(--btn-text); border:1px solid rgba(15,23,42,.12) }

/* мобильный bottom-sheet */
@media (max-width:720px){
  .modal .grid{ grid-template-columns:1fr }
  .modal{ border-radius:16px 16px 0 0; margin-top:auto }
  .modal-backdrop{ align-items:flex-end }
}

/* блокировка скролла под модалкой */
body.no-scroll{ position:fixed; width:100% }


/* Reveal on scroll (utility) */
.reveal{ opacity:0; transform:translateY(10px); transition:opacity .45s ease, transform .45s ease }
.reveal.visible{ opacity:1; transform:none }

/* =================== RESPONSIVE =================== */
@media (max-width:900px){
  .hero{ grid-template-columns:1fr }
  .hero h1{ font-size:36px }
}

/* =================== DARK THEME =================== */
html.theme-dark, html[data-theme="dark"]{
  --bg:#0B1220;
  --panel:#0F172A;
  --text:#E7ECF2;
  --muted:#A9B6C7;
  --btn-bg:#101826;
  --btn-text:#E7ECF2;
  --ring:0 0 0 4px rgba(34,211,238,.16);
}
html.theme-dark .card, html.theme-dark .step, html.theme-dark .hero-media, html.theme-dark .modal,
html[data-theme="dark"] .card, html[data-theme="dark"] .step, html[data-theme="dark"] .hero-media, html[data-theme="dark"] .modal{
  background:#0F172A; border-color:rgba(255,255,255,.10);
}
html.theme-dark .footer, html[data-theme="dark"] .footer{ border-color:rgba(255,255,255,.12) }
html.theme-dark .cta-bar, html[data-theme="dark"] .cta-bar{ background:linear-gradient(180deg,#0f172a,#0b1220); border-color:rgba(255,255,255,.12) }
html.theme-dark .badge, html.theme-dark .chip,
html[data-theme="dark"] .badge, html[data-theme="dark"] .chip{
  background:linear-gradient(180deg, rgba(108,92,231,.22), rgba(34,211,238,.16));
  border-color:rgba(108,92,231,.45); color:#D8DEFF;
}
html.theme-dark .old, html[data-theme="dark"] .old{ color:#99A7BB }
html.theme-dark .video-controls .btn, html[data-theme="dark"] .video-controls .btn{ background:#0b1220; border-color:rgba(255,255,255,.16) }

/* =================== CONTACT =================== */
.contact{ padding:28px 0; border-top:1px solid rgba(15,23,42,.08); margin-top:8px }
.grid.s2{ display:grid; gap:18px; grid-template-columns:1.1fr .9fr }
@media (max-width:900px){ .grid.s2{ grid-template-columns:1fr } }
.contact form{ display:grid; gap:10px }
.contact input,.contact textarea{ padding:10px 12px; border-radius:12px; border:1px solid rgba(15,23,42,.18); background:#fff; color:var(--text) }
html.theme-dark .contact input, html.theme-dark .contact textarea,
html[data-theme="dark"] .contact input, html[data-theme="dark"] .contact textarea{
  background:#0b1220; border-color:rgba(255,255,255,.16); color:#e7ecf2
}
footer .container a{ text-decoration:underline; opacity:.9 }
.card .cta{ margin-top:auto; display:flex; gap:10px; flex-wrap:wrap }

/* =================== FAQ ACCORDION =================== */
.section details{
  border:1px solid rgba(15,23,42,.12); border-radius:12px; padding:10px 12px; background:var(--panel);
  transition:border-color .2s ease, background .2s ease
}
.section details + details{ margin-top:10px }
.section details summary{ display:flex; align-items:center; gap:10px; list-style:none; cursor:pointer }
.section details summary::-webkit-details-marker{ display:none }
.section details summary:before{
  content:'+'; display:inline-grid; place-items:center; width:22px; height:22px; border-radius:6px;
  border:1px solid rgba(15,23,42,.15)
}
.section details[open] summary:before{ content:'–'; }
.section details p{ margin:8px 0 0 32px; color:var(--muted) }
html.theme-dark .section details{ border-color:rgba(255,255,255,.12) }
html.theme-dark .section details summary:before, html[data-theme="dark"] .section details summary:before{ border-color:rgba(255,255,255,.22) }

/* =================== FOOTER LAYOUT =================== */
.footer-row.three{ display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px }
.footer-row.three .foot-left{ justify-self:start; display:flex; gap:10px; align-items:center; flex-wrap:wrap }
.footer-row.three .foot-center{ justify-self:center; display:flex; gap:12px; align-items:center }
.footer-row.three .foot-right{ justify-self:end; display:flex; gap:12px; align-items:center }
.footer-row.three .icon{ color:#9aa4b2; transition:color .15s ease }
.footer-row.three .icon.tg:hover{ color:#229ED9 }
.footer-row.three .icon.ig:hover{ color:#E1306C }
html.theme-dark .footer-row.three .icon{ color:#9aa4b2 }

/* =================== PROCESS FLOW (horizontal) =================== */
.process-flow{
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 12px; align-items: stretch; overflow-x: auto; padding: 6px 0;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.process-flow .step{
  min-width: 240px; background: var(--panel); border: 1px solid rgba(15,23,42,.08);
  border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px;
  scroll-snap-align: center; transition: transform .2s ease, box-shadow .2s ease;
}
.process-flow .step:hover{ transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.10); }
.process-flow .ico{ font-size: 18px; }
.process-flow .arrow{ align-self: center; opacity: .6; animation: arrowPulse 1.6s ease-in-out infinite; user-select: none; }
@keyframes arrowPulse{ 0%,100%{ transform: translateX(0); opacity:.45 } 50%{ transform: translateX(2px); opacity:.9 } }
@media (max-width: 900px){ .process-flow{ grid-auto-columns: minmax(220px,1fr); } }
html[data-theme="dark"] .process-flow .step{ border-color: rgba(255,255,255,.10); }

/* =================== THEME BUTTON ICON TOGGLE =================== */
#themeBtn .ico-moon { display: none; }
html[data-theme="dark"] #themeBtn .ico-sun { display: none; }
html[data-theme="dark"] #themeBtn .ico-moon { display: inline; }

/* =================== LEGAL / DOCS (single, enhanced) =================== */
.doc-layout{
  display:grid; grid-template-columns:260px 1fr; gap:24px; padding:24px 0;
}
.toc{
  position:sticky; top:calc(var(--hdr-h,72px) + 16px);
  align-self:start; background:var(--panel);
  border:1px solid rgba(15,23,42,.10); border-radius:14px; padding:12px;
}
.toc-title{
  font-weight:800; letter-spacing:.2px; margin:6px 8px 8px;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.toc nav{ display:grid; gap:6px; }
.toc nav a{
  display:block; padding:8px 10px; border-radius:10px;
  color:var(--muted); text-decoration:none;
  transition:background .2s ease,color .2s ease, transform .1s ease;
}
.toc nav a:hover{ color:var(--text); transform:translateX(1px); }
.toc nav a.active{ color:#fff; background:linear-gradient(135deg,var(--accent),var(--accent2)); }

/* hero strip */
.legal-hero{
  position:relative; overflow:hidden;
  background:linear-gradient(180deg, rgba(108,92,231,.10), rgba(34,211,238,.10));
  border:1px solid rgba(108,92,231,.28); border-radius:16px; padding:18px 18px 20px;
}
.legal-hero::before{
  content:""; position:absolute; inset:-30% -10% auto -10%; height:180px; pointer-events:none;
  background:
    radial-gradient(600px 160px at 16% 60%, color-mix(in oklab,var(--accent) 28%, transparent) 0%, transparent 62%),
    radial-gradient(600px 160px at 84% 40%, color-mix(in oklab,var(--accent2) 28%, transparent) 0%, transparent 62%);
  filter:blur(24px) saturate(120%); animation: lh-float 12s ease-in-out infinite alternate;
}
@keyframes lh-float{ from{transform:translateY(-8px)} to{transform:translateY(6px)} }

.doc-main{ display:grid; gap:16px; }

.section-card{
  position:relative; background:var(--panel);
  border:1px solid rgba(15,23,42,.10); border-radius:16px; padding:18px;
  box-shadow:0 8px 22px rgba(2,8,23,.05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.section-card:hover{
  transform: translateY(-1px); box-shadow: 0 14px 30px rgba(2,8,23,.08);
  border-color: rgba(15,23,42,.14);
}
.section-card h2{ margin:0 0 10px; display:flex; align-items:center; gap:10px; }
.section-card h2::after{
  content:""; flex:1 1 auto; height:2px; border-radius:2px; margin-left:8px;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  transform-origin:0 50%; transform:scaleX(.15); opacity:.65;
  transition: transform .35s ease, opacity .35s ease;
}
.section-card:hover h2::after{ transform:scaleX(1); opacity:.95; }

/* right-aligned anchor */
.section-card .anchor{
  margin-left:auto; font-size:14px; opacity:.0; transition:opacity .2s ease;
  color:var(--muted); text-decoration:none; border:1px dashed transparent; padding:2px 6px; border-radius:8px;
}
.section-card:hover .anchor{ opacity:.75; }
.section-card .anchor.copied{ border-color:rgba(34,211,238,.4); }
.section-card .anchor.copied::after{
  content: "Ссылка скопирована"; margin-left: 6px; font-size: 12px; opacity: .9;
}

/* readable lists */
.doc-main ul:not([class]){ padding-left:20px; }
.doc-main ul:not([class]) li{ margin:6px 0; }
.doc-main ol:not([class]){ padding-left:18px; }
.doc-main ol:not([class]) li{ margin:8px 0; }

/* chips & callouts */
.doc-chip{
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; padding:4px 8px; border-radius:999px;
  background:linear-gradient(180deg,rgba(108,92,231,.12),rgba(34,211,238,.12));
  border:1px solid rgba(108,92,231,.35);
}
.callout{
  position:relative; padding:12px 12px 12px 14px; border-radius:14px;
  background:var(--panel); border:1px solid rgba(15,23,42,.10);
}
.callout::before{
  content:attr(data-ico); position:absolute; left:-10px; top:10px;
  width:26px; height:26px; border-radius:8px; display:grid; place-items:center; font-size:14px; color:#fff;
  background:linear-gradient(135deg,var(--accent),var(--accent2)); box-shadow:0 4px 12px rgba(2,8,23,.12);
}
.callout.info{ border-color: rgba(108,92,231,.35); }
.callout.warn{ border-color: rgba(255,165,0,.45); }
.callout.tip { border-color: rgba(34,211,238,.45); }

/* anchor scroll offset */
[id]{ scroll-margin-top: calc(var(--hdr-h,72px) + 14px); }

/* TOC toggle (mobile) */
.toc .toc-toggle{ display:none; }
@media (max-width: 900px){
  .doc-layout{ grid-template-columns:1fr; }
  .toc{ position:static; padding:10px; }
  .toc::after{
    content:''; display:block; height:1px; margin-top:10px;
    background:linear-gradient(90deg,var(--accent),var(--accent2)); opacity:.35;
  }
  .toc nav{ display:none; }
  .toc.open nav{ display:grid; margin-top:8px; }
  .toc .toc-toggle{
    display:block; width:100%; border:1px solid rgba(15,23,42,.12);
    background:#fff; color:var(--text); border-radius:10px; padding:8px 10px; cursor:pointer;
  }
}
/* dark tweaks for docs */
html[data-theme="dark"] .toc, html.theme-dark .toc{ border-color:rgba(255,255,255,.12); }
html[data-theme="dark"] .section-card, html.theme-dark .section-card{ background:#0F172A; border-color:rgba(255,255,255,.10); }
html[data-theme="dark"] .legal-hero, html.theme-dark .legal-hero{
  background:linear-gradient(180deg, rgba(108,92,231,.12), rgba(34,211,238,.10));
  border-color:rgba(108,92,231,.35);
}

/* smooth scroll */
html{ scroll-behavior:smooth; }

/* =================== HERO "AURORA" VISUAL =================== */
.hero-visual{
  position: relative; width: 100%; max-width: 820px; aspect-ratio: 16 / 9;
  border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(2,8,23,.16);
}
.hero-anim{
  position:absolute; inset:0;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,.12) 0, transparent 55%) no-repeat,
    radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.1) 0, transparent 55%) no-repeat,
    #0b1020;
  isolation:isolate;
}
:root { --aurora-a:#ff5f91; --aurora-b:#ff3366; --aurora-c:#3ec7c2; --aurora-d:#007c91; }
[data-gradient="pink"] .hero-anim { --aurora-a:#ff5f91; --aurora-b:#ff3366; --aurora-c:#ffb2c8; --aurora-d:#c81e6e; }
[data-gradient="cyan"] .hero-anim { --aurora-a:#3ec7c2; --aurora-b:#007c91; --aurora-c:#9be7e4; --aurora-d:#006073; }
[data-theme="light"] .hero-anim { background-color: #f7f8fb; }
[data-theme="dark"]  .hero-anim { background-color: #0b1020; }

.hero-anim::before,
.hero-anim::after{
  content:""; position:absolute; inset:-25%; filter: blur(40px); opacity:.9; will-change: transform, opacity;
}
.hero-anim::before{
  background:
    radial-gradient(50% 60% at 30% 40%, var(--aurora-a) 0%, transparent 60%),
    radial-gradient(60% 50% at 70% 60%, var(--aurora-b) 0%, transparent 60%),
    radial-gradient(40% 50% at 50% 20%, var(--aurora-c) 0%, transparent 55%);
  animation: auroraMove 18s ease-in-out infinite alternate;
}
.hero-anim::after{
  background:
    radial-gradient(55% 55% at 60% 30%, var(--aurora-d) 0%, transparent 60%),
    radial-gradient(45% 45% at 40% 70%, var(--aurora-a) 0%, transparent 60%);
  mix-blend-mode: screen; animation: auroraDrift 26s ease-in-out infinite alternate;
}
@keyframes auroraMove{ 0%{ transform: translate3d(-4%, -2%, 0) scale(1.05) } 100%{ transform: translate3d(4%, 3%, 0) scale(1.08) } }
@keyframes auroraDrift{ 0%{ transform: translate3d(3%, -3%, 0) scale(1.03); opacity:.85 } 100%{ transform: translate3d(-3%, 4%, 0) scale(1.1); opacity:1 } }

.hero-anim .sparkles{
  position:absolute; inset:0;
  background:
    radial-gradient(2px 2px at 10% 20%, rgba(255,255,255,.25) 0 50%, transparent 55%) repeat,
    radial-gradient(2px 2px at 70% 80%, rgba(255,255,255,.18) 0 50%, transparent 55%) repeat;
  background-size: 200px 200px, 260px 260px;
  mix-blend-mode: screen; opacity:.55; animation: sparkScroll 32s linear infinite; pointer-events:none;
}
@keyframes sparkScroll{ 0%{ background-position: 0 0, 0 0 } 100%{ background-position: 600px 400px, -500px -300px } }

@media (prefers-reduced-motion: reduce){
  .hero-anim::before, .hero-anim::after, .hero-anim .sparkles{ animation:none !important; }
}
@media (max-width:720px){ .hero-visual{ max-width:100%; border-radius:14px } }

/* 3D tilt + particles overlay */
:root{ --tilt: 8deg; }
.hero-visual{ perspective:900px; }
.hero-anim{
  transform-style:preserve-3d;
  transform: rotateX(var(--ry,0deg)) rotateY(var(--rx,0deg));
  transition: transform .6s cubic-bezier(.2,.9,.2,1), filter .4s ease;
}
.hero-visual.is-hover .hero-anim{ filter: saturate(1.08) brightness(1.02); }
.hero-particles{ position:absolute; inset:0; pointer-events:none; opacity:.75; mix-blend-mode: screen; }

/* =================== GLOBAL PARTICLES LAYER =================== */
#site-particles{ position: fixed; inset: 0; z-index:0; pointer-events:none; mix-blend-mode: screen; opacity:.7; }
[data-theme="light"] #site-particles{ mix-blend-mode:multiply; opacity:.9; }
[data-theme="dark"]  #site-particles{ mix-blend-mode:screen; opacity:.7; }

/* keep normal stacking for content above particles */
.section, .container, header, footer, .site-header, main { position: relative; z-index: 1; }

/* =================== COOKIE CONSENT — Lively (final) =================== */
.cookie-banner{
  position: fixed; inset: auto 16px 16px 16px; z-index: 1000;
  background: var(--cc-bg);
  border: 1px solid color-mix(in srgb, var(--cc-brand), #000 85%);
  border-radius: var(--cc-br);
  backdrop-filter: saturate(120%) blur(10px);
  -webkit-backdrop-filter: saturate(120%) blur(10px);
  box-shadow: var(--cc-shadow);
  padding: 14px 16px;
  animation: cc-slide-in .35s cubic-bezier(.2,.9,.2,1) both;
}
.cookie-inner{ display:flex; gap:16px; align-items:center; }
.cookie-text{ flex:1; }
.cookie-text strong{ font-weight:700; }
.cookie-text p{ margin:.25rem 0 0; font-size:14.5px; opacity:.9; }
.cookie-actions{ display:flex; gap:8px; flex-wrap:wrap; }

/* Buttons in theme color */
.cc-btn{
  --_ring: color-mix(in srgb, var(--cc-brand), #fff 30%);
  --_ring2: color-mix(in srgb, var(--cc-brand), #000 10%);
  border-radius: 999px; padding:10px 14px; font-weight:600;
  border: 1px solid var(--_ring2); background:#fff; color:#111;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.cc-btn:focus-visible{ outline:none; box-shadow: 0 0 0 3px var(--_ring); }
.cc-btn:hover{ transform: translateY(-1px); }
.cc-btn.cc-primary{
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--cc-brand), #fff 10%),
    color-mix(in srgb, var(--cc-brand), #000 10%)
  );
  color: var(--cc-onbrand);
  border-color: color-mix(in srgb, var(--cc-brand), #000 30%);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--cc-brand), #000 70% / 28%);
}
.cc-btn.cc-primary:hover{ filter: saturate(1.05) brightness(1.02); }
.cc-btn.cc-secondary{
  background: color-mix(in srgb, var(--cc-brand), #fff 90%);
  color: color-mix(in srgb, var(--cc-brand), #000 20%);
}
.cc-btn.cc-neutral{ background:#fff; color:#111; }

/* Modal */
.cookie-modal{
  position: fixed; inset: 0; display:none; z-index:1001;
  background: color-mix(in srgb, #000 50%, transparent);
}
.cookie-modal.open{
  display:flex; align-items:center; justify-content:center;
  animation: cc-fade .2s ease-out both;
}
.cm-dialog{
  background: var(--cc-bg);
  border-radius: var(--cc-br);
  border: 1px solid color-mix(in srgb, var(--cc-brand), #000 85%);
  box-shadow: var(--cc-shadow);
  padding: 18px; min-width:320px; max-width:520px;
  transform: translateY(6px) scale(.98);
  animation: cc-pop .28s cubic-bezier(.2,.9,.2,1) .08s both;
  backdrop-filter: saturate(120%) blur(10px);
  -webkit-backdrop-filter: saturate(120%) blur(10px);
}
.cm-dialog h3{ margin:0 0 8px; }
.cm-row{ display:block; margin:10px 0; font-size:14.5px; }
.cm-actions{ display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }

/* Lively micro-anim */
.cookie-banner.lively{ animation: cc-slide-in .35s cubic-bezier(.2,.9,.2,1) both, cc-breathe 6s ease-in-out 1.2s infinite; }
@keyframes cc-breathe{ 0%,100%{ box-shadow: var(--cc-shadow) } 50%{ box-shadow: 0 24px 60px rgba(0,0,0,.22), 0 10px 26px rgba(0,0,0,.10) } }
@keyframes cc-slide-in{ from{ transform: translateY(16px); opacity:0; } to{ transform:none; opacity:1; } }
@keyframes cc-pop{ to{ transform:none; } }
@keyframes cc-fade{ from{ opacity:0; } to{ opacity:1; } }


@media (max-width:520px){
  .cookie-inner{ flex-direction: column; align-items: stretch; gap:10px; }
  .cookie-actions{ display:flex; gap:8px; flex-wrap:wrap; }
  .cc-btn{ width:100%; text-align:center; }
}
@media (prefers-color-scheme: dark){
  :root{
    --cc-bg: color-mix(in oklab, #101114 92%, white 0%);
    --cc-onbrand: #fff;
  }
  .cc-btn{ background:#111; color:#eaeaea; border-color:#1f1f1f; }
  .cc-btn.cc-secondary{ background: color-mix(in srgb, var(--cc-brand), #000 85%); color: #eaeaea; }
}

/* положи это ПОСЛЕ объявления .cookie-banner, чтобы перебить старое */
.cookie-banner{ --cc-brand: var(--accent); }  /* был градиент из --brand */

/* =================== ACCESSIBILITY & FALLBACKS =================== */
@media (prefers-reduced-motion: reduce){
  .cookie-banner, .cookie-banner.lively, .cookie-modal, .cm-dialog{
    animation: none !important; transition: none !important;
  }
  html{ scroll-behavior: auto; } /* disable smooth scroll for reduced motion */
}
@supports not (backdrop-filter: blur(1px)){
  .site-header{ background: rgba(248,250,255,.92) }
  html[data-theme="dark"] .site-header{ background: rgba(15,23,42,.88) }
}

.button { position: relative; overflow: hidden; }
.button .ripple {
  position:absolute; border-radius:50%; pointer-events:none; inset:auto;
  transform: translate(-50%,-50%); opacity:.25; background: currentColor;
  animation: ripple .5s ease-out forwards;
}
@keyframes ripple { from{ width:0; height:0; opacity:.35 } to{ width:240px; height:240px; opacity:0 } }

/* для <path class="draw"> внутри SVG */
svg .draw {
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  animation: draw 1s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* необязательно, но приятно: затемнение */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

/* добавь в CSS */
.site-header.hide-on-down { transition: transform .24s ease; will-change: transform; }
.site-header.hide-on-down.is-hidden { transform: translateY(-100%); }

/* === Logo — live gradient + glow + hover tilt === */
.logo{ position:relative; display:flex; align-items:center; gap:.6rem; --mx:50%; --my:50%; }
.logo-mark{
  position:relative; width:40px; height:40px; border-radius:10px; isolation:isolate;
  background: var(--brand, linear-gradient(135deg,#ff5f91,#a855f7));
  background-size: 200% 200%;
  /* мягкое «дыхание» уже есть у тебя: logo-breathe — оставляем */
  animation: logo-grad 9s ease-in-out infinite alternate, logo-breathe 4.5s ease-in-out infinite;
  transition: transform .28s cubic-bezier(.2,.9,.2,1), filter .28s ease;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.20));
}
.logo:hover .logo-mark{ transform: scale(1.04) rotate(-1.5deg); filter: brightness(1.05) saturate(1.06); }

/* курсорное свечение (следит за --mx/--my) */
.logo::after{
  content:""; position:absolute; inset:-14px; border-radius:16px; pointer-events:none;
  background: radial-gradient(120px 120px at var(--mx,50%) var(--my,50%),
              color-mix(in oklab, var(--accent) 35%, transparent) 0%,
              transparent 60%);
  filter: blur(16px) saturate(120%);
  opacity:0; transition: opacity .18s ease; mix-blend-mode: screen;
}
.logo.is-hover::after{ opacity:.9; }

/* плавное «переливание» градиента */
@keyframes logo-grad{ 0%{ background-position: 0% 50% } 100%{ background-position: 100% 50% } }

/* красивый градиентный текст рядом с маркой */
.logo-text{
  background: linear-gradient(135deg,var(--accent),var(--accent2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
  background-size:200% 200%; animation: logo-text-pan 12s ease-in-out infinite;
  font-weight: 800; letter-spacing:.2px;
}
@keyframes logo-text-pan{ 0%{background-position:0 50%} 100%{background-position:100% 50%} }


/* уважение к reduced motion */
@media (prefers-reduced-motion: reduce){
  .logo-mark{ animation: none; }
  .logo::after{ display:none; }
}

/* Светлая тема: сделаем primary-кнопку темнее и текст белым */
[data-theme="light"] .cookie-banner .cc-btn.cc-primary{
  color:#fff;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--cc-brand), #000 10%),
    color-mix(in srgb, var(--cc-brand), #000 35%)
  );
  border-color: color-mix(in srgb, var(--cc-brand), #000 45%);
}

/* HERO video */
.hero-visual{
  position: relative;
  width: 100%;
  max-width: 820px;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(2,8,23,.16);
  background: var(--panel); /* фолбэк */
}

.hero-video{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  /* Чуть приглушаем, чтобы в обеих темах текст читался */
  filter: saturate(.9) contrast(1.02) brightness(var(--video-bright,1));
  transition: filter .4s ease;
}

/* Нейтральный градиент-оверлей под обе темы */
.hero-overlay{
  position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in oklab, var(--bg) 30%, transparent) 0, transparent 55%) no-repeat,
    radial-gradient(120% 120% at 100% 0%, color-mix(in oklab, var(--bg) 22%, transparent) 0, transparent 55%) no-repeat;
  mix-blend-mode: normal;
}

/* Тёмная тема (если у тебя переключатель через атрибут/класс — подстрой селектор) */
html[data-theme="dark"] .hero-video{ --video-bright: .9; }
html[data-theme="dark"] .hero-overlay{
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,.06) 0, transparent 55%) no-repeat,
    radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.05) 0, transparent 55%) no-repeat;
}

/* Мобильные скругления */
@media (max-width:720px){
  .hero-visual{ max-width:100%; border-radius:14px }
}

/* Общий контейнер уже есть; важно: hero-visual { position:relative; overflow:hidden } */

/* Мягкий градиент-оверлей поверх видео */
.hero-overlay.aurora{
  position:absolute; inset:0; pointer-events:none; isolation:isolate;
  /* базовая подложка по теме — не кричит */
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in oklab, var(--bg) 24%, transparent) 0, transparent 55%) no-repeat,
    radial-gradient(120% 120% at 100% 0%, color-mix(in oklab, var(--bg) 18%, transparent) 0, transparent 55%) no-repeat;
}

/* Те же «аврора-пятна», что в hero-anim (но потише) */
.hero-overlay.aurora::before,
.hero-overlay.aurora::after{
  content:""; position:absolute; inset:-25%; filter: blur(42px);
  opacity:.55; will-change: transform, opacity;
}
.hero-overlay.aurora::before{
  background:
    radial-gradient(50% 60% at 30% 40%, var(--aurora-a) 0%, transparent 60%),
    radial-gradient(60% 50% at 70% 60%, var(--aurora-b) 0%, transparent 60%),
    radial-gradient(40% 50% at 50% 20%, var(--aurora-c) 0%, transparent 55%);
  animation: auroraMove 18s ease-in-out infinite alternate;
}
.hero-overlay.aurora::after{
  background:
    radial-gradient(55% 55% at 60% 30%, var(--aurora-d) 0%, transparent 60%),
    radial-gradient(45% 45% at 40% 70%, var(--aurora-a) 0%, transparent 60%);
  mix-blend-mode: screen; animation: auroraDrift 26s ease-in-out infinite alternate;
  opacity:.5; /* ещё мягче, чем у hero-anim */
}

/* Нюанс по темам: в светлой чуть увеличим прозрачность, в тёмной — приглушим */
html[data-theme="light"] .hero-overlay.aurora{ opacity:.85; }
html[data-theme="dark"]  .hero-overlay.aurora{ opacity:.7; }

/* Супермягкий тинт (один слой) */
.hero-overlay.tint{
  position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--aurora-a), transparent 85%),
                                     color-mix(in srgb, var(--aurora-b), transparent 85%));
  mix-blend-mode: soft-light;   /* или color-dodge для чуть ярче */
  opacity:.6;                   /* подстрой 0.45–0.7 */
}

/* Включи один из overlay-классов: aurora ИЛИ tint */

.hero-video{
  filter: saturate(.92) contrast(1.02) brightness(var(--video-bright,1));
}
/* Едва заметная статичная подложка — чтобы соединить с общей палитрой */
.hero-overlay{
  position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in oklab, var(--bg) 24%, transparent) 0, transparent 55%) no-repeat,
    radial-gradient(120% 120% at 100% 0%, color-mix(in oklab, var(--bg) 18%, transparent) 0, transparent 55%) no-repeat;
  opacity:.6;
}
html[data-theme="dark"] .hero-video{ --video-bright:.9; }

/* === Featured works grid === */
.works-title{ text-align:center; margin:0 0 18px }

.works-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
}

.work-card{
  display:block; position:relative;
  border-radius:14px; overflow:hidden;
  background:linear-gradient(180deg, rgba(15,23,42,.06), rgba(15,23,42,.02));
  box-shadow:0 8px 24px rgba(2,8,23,.08);
  transition:transform .25s ease, box-shadow .25s ease;
}

.work-card img{
  width:100%; height:100%; display:block;
  object-fit:cover; aspect-ratio:16/9;
}

/* тонкий внутренний обвод для аккуратности */
.work-card::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  border-radius:14px; box-shadow:inset 0 0 0 1px rgba(15,23,42,.08);
}

.work-card:hover{
  transform:translateY(-4px);
  box-shadow:0 14px 34px rgba(2,8,23,.14);
}

/* адаптив: 4 → 3 → 2 → 1 колонки */
@media (max-width:1200px){ .works-grid{ grid-template-columns:repeat(3,1fr) } }
@media (max-width:900px){ .works-grid{ grid-template-columns:repeat(2,1fr) } }
@media (max-width:560px){
  .works-grid{ grid-template-columns:1fr }
  .works-title{ font-size:20px }
}

/* === Hover/Focus оверлей на карточке работ === */
.work-card{
  position:relative;
}

.work-info{
  position:absolute; inset:auto 0 0 0; /* снизу */
  padding:12px 14px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  color:#fff;

  /* стеклянный фон + градиент для читаемости на любом превью */
  background:
    linear-gradient(180deg, rgba(3,7,18,0) 0%, rgba(3,7,18,.55) 40%, rgba(3,7,18,.75) 100%);
  backdrop-filter: blur(4px);

  /* по умолчанию — скрыто, показываем по hover/focus */
  opacity:0; transform:translateY(8px);
  transition:opacity .22s ease, transform .22s ease;
}

.work-card:hover .work-info,
.work-card:focus-within .work-info{
  opacity:1; transform:none;
}

.work-title{
  margin:0; font-size:14px; line-height:1.35; font-weight:600;
  color:#fff; flex:1 1 auto; min-width:0;   /* чтобы переносилась */
}

/* Цена — акцентная «пилюля» */
.work-price{
  flex:0 0 auto;
  font-weight:800; font-size:14px; white-space:nowrap;
  padding:6px 10px; border-radius:999px;
  background:linear-gradient(135deg, var(--accent), var(--cyan));
  color:#fff; box-shadow:0 2px 10px rgba(0,0,0,.18);
}

/* Чуть крупнее на больших экранах */
@media (min-width: 900px){
  .work-title{ font-size:15px }
  .work-price{ font-size:15px; padding:6px 12px }
}

/* Доступность: если пользователь отключил hover — показываем оверлей всегда */
@media (hover: none){
  .work-info{ opacity:1; transform:none }
}

/* Фокус-оконтуривание для клавиатуры */
.work-card:focus-visible{
  outline: 2px solid color-mix(in oklab, var(--accent) 70%, white 30%);
  outline-offset: 3px;
}

/* =================== MOBILE FIXES =================== */
@media (max-width: 768px) {

  /* --- hero section --- */
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 16px 20px;
  }
  .hero h1 {
    font-size: 32px;
    line-height: 1.2;
  }
  .hero p {
    font-size: 15px;
  }
  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  .hero-buttons .btn {
    width: 90%;
    font-size: 16px;
  }

  /* --- extra cards --- */
  .extras-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .extras-row .card,
  .extras-row > div {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
  }
  .extras-row p {
    word-break: break-word;
    font-size: 15px;
  }

  /* --- contact form --- */
  .contact-section, .contact {
    padding: 24px 16px;
  }
  .contact form input,
  .contact form textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
  }
  .contact form button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
  }

  /* --- footer --- */
  .footer {
    padding: 24px 16px;
    text-align: center;
    font-size: 14px;
  }
  .footer-row.three {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .footer .container a {
    display: inline-block;
    margin-bottom: 6px;
  }

  /* --- header + menu --- */
  .hdr-row {
    gap: 8px;
    padding: 0 10px;
  }
  .lang-switch {
    gap: 4px;
    flex-wrap: wrap;
  }
  .burger {
    margin-left: auto;
  }
}
/* === FIX: перекрытие меню === */
.mobile-nav {
  position: fixed;
  inset: var(--hdr-h) 0 0 0;
  z-index: 999;
  background: var(--bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-y: auto;
}

.mobile-nav a {
  font-size: 18px;
  padding: 14px;
  text-align: center;
  display: block;
}

.burger.active {
  color: var(--accent);
}
@media (max-width: 768px) {
  .hero h1 {
    margin-bottom: 12px;
    font-size: 30px;
  }
  .hero p {
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.5;
  }
  .hero-buttons {
    gap: 10px;
  }
}
[data-cookieconsent] .cm-preferences,
#cm-preferences,
#consent_title,
#consent_desc {
  display: none !important;
}

.cm-container,
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  border-radius: 16px 16px 0 0;
  background: rgba(20, 20, 30, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}
@media (max-width: 768px) {
  .cm-btn,
  .cm-btn-group button {
    display: block;
    width: 100%;
    margin: 8px 0;
    font-size: 16px;
  }

  .cm-content {
    padding: 12px 16px 20px;
    text-align: center;
  }

  .cm-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
  }

  .cm-desc {
    font-size: 14px;
    line-height: 1.5;
  }
}
/* === Фикс мобильного меню === */
.burger {
  z-index: 2000 !important;
  position: relative;
}

/* При открытом меню */
.nav--open {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Ссылки внутри меню */
.nav--open a {
  color: #fff;
  font-size: 20px;
  text-decoration: none;
  margin: 12px 0;
}
/* === Фикс языкового блока === */
.lang-switcher {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px 6px;
  margin-top: 6px;
}

.lang-switcher button,
.lang-switcher a {
  flex: 1 1 28%;
  min-width: 60px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.lang-switcher button.active {
  background: linear-gradient(90deg, #7a5fff, #01c6ff);
  color: #fff;
}
header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* === Активное мобильное меню для JS-логики app.js === */
#mobileNav:not([hidden]) {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: var(--hdr-h, 60px) 0 0 0;
  background: rgba(10, 12, 20, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1999;
  padding: 20px;
}

#mobileNav a {
  color: #fff !important;
  text-decoration: none;
  font-size: 1.2rem;
  margin: 12px 0;
  font-weight: 500;
  letter-spacing: 0.5px;
}

#mobileNav a:hover {
  color: var(--accent, #00d1ff);
}

#navToggle.active span {
  background: var(--accent, #00d1ff);
}

/* Скрыть служебные элементы перевода */
[id^="consent_"], [class^="consent_"] {
  display: none !important;
}

/* Универсальный стиль для cookie баннера */
.cm-container {
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  border-radius: 16px 16px 0 0;
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px;
  text-align: center;
  z-index: 9999;
}

.cm-btn, .cm-btn-group button {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-size: 15px;
  border-radius: 8px;
}
/* Кнопка переключения языка */
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(90deg, #6C5CE7, #00C6FF);
  border: none;
  border-radius: 12px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.lang-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

@media (prefers-color-scheme: light) {
  .lang-toggle {
    color: #111;
    background: linear-gradient(90deg, #7A5FFF, #01C6FF);
  }
}

/* === Плавающее меню (всегда отображается) === */
.floating-nav {
  position: fixed;
  right: 20px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 9999;
}

.floating-nav a,
.floating-nav button {
  background: linear-gradient(135deg, #6a5af9, #00c6ff);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.floating-nav a:hover,
.floating-nav button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

/* Убедимся, что меню не скрыто на мобильных */
@media (max-width: 768px) {
  .floating-nav {
    display: flex !important;
    right: 15px;
    bottom: 90px; /* чуть выше кнопок браузера */
    gap: 12px;
  }

  .floating-nav a,
  .floating-nav button {
    width: 46px;
    height: 46px;
    font-size: 20px;
  }
}
@media (max-width: 768px) {
  .contact {
    padding-bottom: 120px;
  }
}

/* Скрыть бургер-меню на мобильных устройствах */
@media (max-width: 768px) {
  .burger {
    display: none !important;
  }
}
/* Плавающее меню (фиксированные кнопки) */
.floating-nav {
  position: fixed;
  right: 20px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 9999;
}

.floating-nav a,
.floating-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6a5af9, #00c6ff);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.floating-nav a:hover,
.floating-nav button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .floating-nav {
    right: 15px;
    bottom: 90px;
    gap: 12px;
  }

  .floating-nav a,
  .floating-nav button {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }
}
@supports (padding: env(safe-area-inset-bottom)) {
  .floating-nav {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
}
/* Плавная прокрутка при переходе по якорям */
html {
  scroll-behavior: smooth;
}
.floating-nav a.active {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.7);
  transform: scale(1.1);
}

/* === MOBILE HEADER FIX === */
@media (max-width: 768px) {
  .site-header {
    height: 60px;
    padding: 0 12px;
  }

  .hdr-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .logo-img,
  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hdr-actions {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .lang-switch {
    gap: 4px;
  }

  /* Кнопки выровнены по центру */
  .hdr-actions .btn.icon,
  .lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
.floating-nav {
  gap: 16px;
}

.floating-nav {
  opacity: 0;
  transform: translateY(20px);
  transition: all .35s ease;
}

/* === Call Modal === */
.modal-backdrop[hidden] { display: none !important; }

.call-modal {
  background: color-mix(in oklab, var(--panel) 94%, transparent);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  padding: 18px;
  max-width: 400px;
  width: 92%;
  text-align: center;
  animation: call-pop .3s ease;
}
@keyframes call-pop {
  from { transform: translateY(20px) scale(.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.call-modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 10px;
}
.call-modal header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.call-modal .close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  transition: color .2s ease;
}
.call-modal .close:hover { color: var(--accent2); }

.call-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

/* Пульсирующая кнопка */
.btn.pulse {
  position: relative;
  overflow: visible;
  animation: pulse-ring 1.8s infinite ease-in-out;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 20px color-mix(in oklab, var(--accent) 60%, transparent);
}
@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.6);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(108, 92, 231, 0);
    transform: scale(1.04);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(108, 92, 231, 0);
    transform: scale(1);
  }
}

.btn.pulse:hover {
  filter: brightness(1.1);
  transform: scale(1.05);
}

/* Адаптив */
@media (max-width: 480px) {
  .call-modal {
    width: 92%;
    padding: 16px;
  }
  .call-modal .body p {
    font-size: 15px;
  }
  .call-actions .btn {
    font-size: 16px;
    padding: 12px 14px;
  }
}
