/* ==========================================================================
   FAKECHAT CMS — BASE STYLESHEET (Onest + Unbounded Edition v17.0)
   Typography • Reset • Capsule Header • Footer • Dialogs & Overlays • Informers
   ========================================================================== */

/* --- 1. ШРИФТЫ: ONEST + UNBOUNDED --- */
@font-face {
    font-family: 'Onest';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/onest/Onest-Variable.woff2') format('woff2');
}

@font-face {
    font-family: 'Unbounded';
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url('../fonts/unbounded/Unbounded-Variable.woff2') format('woff2');
}

/* --- 2. БАЗОВЫЙ СБРОС И ТИПОГРАФИКА --- */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  -webkit-tap-highlight-color: transparent; 
}

html { 
  scroll-behavior: smooth; 
  scroll-padding-top: 88px; 
  overflow-x: clip; 
  scrollbar-gutter: stable;
}

body { 
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif; 
  color: var(--tx); 
  background: var(--paper); 
  line-height: 1.6; 
  overflow-x: clip; 
}

body.no-scroll { overflow: hidden; }
main { flex: 1; min-width: 0; max-width: 100%; }
body:not(:has(.fh-hero)) main { padding-top: 108px; }

a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--vb); outline-offset: 3px; }

.wrap, .container { max-width: 1160px; margin: 0 auto; padding: 0 18px; width: 100%; }
section { padding: var(--sp) 0; }
h1, h2, h3, .price { font-family: var(--disp); letter-spacing: -0.02em; }
h1 { font-size: 27px; line-height: 1.12; font-weight: 800; margin-bottom: 16px; }
h2 { font-size: clamp(24px, 3.2vw, 36px); line-height: 1.18; font-weight: 700; margin-bottom: 14px; }
h3 { font-size: 16px; line-height: 1.3; font-weight: 700; margin-bottom: 8px; }
.lead { color: var(--mut); max-width: 580px; margin-bottom: clamp(30px, 4.5vw, 48px); font-size: 16px; }
.c { text-align: center; }
.c .lead { margin-inline: auto; }
.d-none { display: none !important; }

/* --- 3. КНОПКИ --- */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 12px 28px -8px rgba(4, 120, 87, 0.4);
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
[data-theme="dark"] .btn { box-shadow: 0 12px 28px -8px rgba(79, 70, 229, 0.5); }
.btn:active { transform: scale(0.97); }

.btn.line {
  background: #ffffff;
  color: var(--vd);
  border: 2px solid var(--vb);
  box-shadow: 0 4px 14px -4px rgba(4, 120, 87, 0.15);
}
.btn.line:hover {
  background: var(--t4);
  border-color: var(--vd);
  color: var(--vd);
}
[data-theme="dark"] .btn.line {
  background: rgba(255, 255, 255, 0.04);
  color: var(--violet);
  border: 2px solid var(--vd);
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .btn.line:hover {
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  border-color: var(--violet);
}

.btn.wh { background: #fff; color: var(--vd); box-shadow: 0 12px 28px -8px rgba(0,0,0,.3); }
[data-theme="dark"] .btn.wh { color: #312e81; }
.btn.ow { background: rgba(255,255,255,.16); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.btns { display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; }
.grid { display: grid; gap: var(--g); }

/* --- 4. SVG ИКОНКИ (CSS MASKS) --- */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.25em;
  height: 1.25em;
  background-color: currentColor;
  -webkit-mask-image: var(--icon);
  mask-image: var(--icon);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  vertical-align: middle;
}
.icon--xs { width: 0.8em; height: 0.8em; }
.icon--sm { width: 1em; height: 1em; }
.icon--md { width: 1.5em; height: 1.5em; }
.icon--lg { width: 2em; height: 2em; }

/* --- 5. КАПСУЛЬНЫЙ НАВБАР (.fh-nav) --- */
.hr { display: flex; align-items: center; gap: 10px; }
.tg, .burger {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--t1);
  font-size: 18px;
  color: var(--tx);
  transition: background .2s, transform .15s;
}
.tg:active, .burger:active { transform: scale(0.95); }
.tg svg { width: 20px; height: 20px; }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }

.fh-nav { position: fixed; inset: 16px 14px auto; z-index: 2000; color: var(--nav-tx); }
.fh-nav-in {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1140px;
  height: 62px;
  margin: 0 auto;
  padding: 0 12px 0 24px;
  border-radius: 999px;
  background: var(--nav-bg) !important;
  border: 1px solid var(--nav-bd);
  box-shadow: var(--nav-sh);
  transition: background-color .25s ease, box-shadow .25s ease;
}
.fh-nav.scrolled .fh-nav-in {
  background: var(--nav-bg2) !important;
  box-shadow: 0 20px 44px -10px rgba(0, 0, 0, 0.18);
}
[data-theme="dark"] .fh-nav.scrolled .fh-nav-in {
  box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.9);
}

.fh-logo { display: flex; align-items: center; gap: 9px; font-family: var(--disp); font-weight: 800; font-size: 15px; white-space: nowrap; color: var(--nav-tx); }
.fh-logo i { display: block; width: 28px; height: 24px; border-radius: 10px 10px 10px 3px; background: var(--grad); }
.fh-links { display: flex; gap: 32px; margin-inline: auto; align-items: center; }
.fh-links a { font-size: 14.5px; font-weight: 600; opacity: .92; transition: opacity .2s, color .2s; }
.fh-links a:hover { opacity: 1; color: var(--violet); }

.nav-mob-controls { display: none; }

.lang-box { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--tg-bg);
  color: var(--nav-tx);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: background .2s, transform .15s;
}
.lang-btn:hover { background: var(--tg-hv); }
.lang-btn:active { transform: scale(0.97); }
.lang-btn svg.globe { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.lang-btn svg.chev { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.2; transition: transform .2s; }
.lang-box.open .lang-btn svg.chev { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 2050;
  display: none;
  grid-template-columns: repeat(2, 140px);
  gap: 4px;
  padding: 8px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--bd);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.25);
  animation: langDrop .2s ease forwards;
}
[data-theme="dark"] .lang-menu { box-shadow: 0 20px 45px -10px rgba(0,0,0,.7); }
@keyframes langDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.lang-box.open .lang-menu { display: grid; }
.lang-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tx);
  transition: background .15s, color .15s;
}
.lang-item:hover { background: var(--t1); color: var(--vd); }
.lang-item.active { background: var(--grad); color: #fff; font-weight: 700; }
.lang-item .flag { font-size: 15px; line-height: 1; }

.fh-nav .tg, .fh-nav .burger { background: var(--tg-bg); color: var(--nav-tx); }
.fh-nav .tg:hover, .fh-nav .burger:hover { background: var(--tg-hv); }

@media (max-width: 900px) {
  .fh-nav .hr .lang-box,
  .fh-nav .hr #theme {
    display: none !important;
  }
  .fh-nav .hr { margin-left: auto; }
  .fh-nav-in { justify-content: space-between; padding: 0 12px 0 18px; }
  .fh-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 12px 20px 20px;
    border-radius: 28px;
    background: var(--card);
    color: var(--tx);
    box-shadow: var(--sh);
    border: 1px solid var(--bd);
  }
  .fh-links a { padding: 13px 0; border-bottom: 1px solid var(--t1); opacity: 1; }
  .fh-links.open { display: flex; }
  
  .nav-mob-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--bd);
  }
  .nav-mob-controls .lang-box { flex: 1; }
  .nav-mob-controls .lang-btn { width: 100%; justify-content: space-between; }
  .nav-mob-controls .lang-menu { left: 0; right: auto; width: 100%; grid-template-columns: 1fr 1fr; }
  .nav-mob-theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--t1);
    color: var(--tx);
    font-weight: 700;
    font-size: 13.5px;
  }
}

/* --- 6. ПОДВАЛ САЙТА (FOOTER) --- */
footer {
  background: var(--ft-bg);
  color: var(--ft-tx);
  padding: clamp(56px, 8vw, 88px) 0 36px;
  font-size: 14px;
  border-top: 1px solid var(--bd);
}
[data-theme="dark"] footer {
  background: #080a14;
  color: #8b99c2;
  border-color: #1e264a;
}
.ft-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 44px;
}
@media (min-width: 840px) {
  .ft-top {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
  }
}
.ft-brand { display: flex; flex-direction: column; gap: 14px; }
.ft-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--disp); font-weight: 800; font-size: 16px; color: var(--tx); }
.ft-logo i { width: 26px; height: 22px; border-radius: 9px 9px 9px 3px; background: var(--grad); display: block; }
.ft-desc { color: var(--mut); line-height: 1.6; max-width: 320px; font-size: 13.5px; }
.ft-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--bd);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tx);
  width: fit-content;
}
.ft-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px #10b981; }
.ft-col h4 { color: var(--tx); font-family: var(--disp); font-size: 14px; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.01em; }
.ft-col nav { display: flex; flex-direction: column; gap: 10px; }
.ft-col a { color: var(--tx2); transition: color .2s, transform .2s; font-size: 14px; width: fit-content; }
.ft-col a:hover { color: var(--violet); transform: translateX(2px); }
.ft-socials { display: flex; gap: 10px; margin-top: 14px; }
.ft-soc-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--bd);
  color: var(--tx);
  transition: background .2s, color .2s, transform .15s;
}
.ft-soc-btn:hover { background: var(--vb); color: #fff; transform: translateY(-2px); }
.ft-soc-btn svg, .ft-soc-btn .icon { width: 18px; height: 18px; }
.ft-btm {
  border-top: 1px solid var(--bd);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 12.5px;
  color: var(--mut);
  line-height: 1.6;
}
@media (min-width: 760px) {
  .ft-btm { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .ft-legal { max-width: 65%; }
}

@media (min-width: 640px) {
  .wrap { padding: 0 28px; }
  .btn { width: auto; }
  .btns { flex-direction: row; }
  .c2, .c4, .vs { grid-template-columns: repeat(2, 1fr); }
  .overlay { align-items: center; padding: 24px; }
  .modal { max-width: 780px; border-radius: 28px; padding: 24px; }
}
@media (min-width: 900px) {
  .burger { display: none; }
  .c3, .plans, .stps { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { 
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } 
}

/* --- 7. МОДАЛЬНЫЕ ОКНА И ЗУМ --- */
.overlay { position: fixed; inset: 0; z-index: 2100; display: none; align-items: flex-end; justify-content: center; background: rgba(7, 10, 20, 0.85); }
.overlay.open { display: flex; }
.modal { width: 100%; max-height: 92vh; overflow-y: auto; background: var(--card); border-radius: 28px 28px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px)); animation: up .3s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.m-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.close { width: 38px; height: 38px; border-radius: 50%; background: var(--t1); font-size: 20px; }
.close:active { background: var(--bd); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 12px; }
.tab { flex: none; padding: 9px 16px; border-radius: 999px; background: var(--t1); font-size: 14px; font-weight: 600; white-space: nowrap; }
.tab:active { transform: scale(0.96); }
.tab.active { background: var(--grad); color: #fff; }
.stage { display: flex; justify-content: center; background: #060914; border-radius: 20px; padding: 10px; }
.stage video { display: block; border-radius: 12px; background: #000; max-width: 100%; }
.ratio-16-9 { width: 100%; aspect-ratio: 16/9; }
.ratio-9-16 { width: min(100%, calc(55vh * 9 / 16)); aspect-ratio: 9/16; }
.ratio-1-1 { width: min(100%, 55vh); aspect-ratio: 1/1; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 14px; }
.meta span { padding: 5px 14px; border-radius: 999px; background: var(--t1); }
#zoom { align-items: center; padding: 16px; }
#zoom img { max-height: 90vh; border-radius: 20px; }

/* --- 8. СИСТЕМНЫЙ ЛАЙТБОКС (#lightboxModal) --- */
.modal.modal--lightbox {
    position: fixed;
    inset: 0;
    z-index: 2300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: transparent;
}
.modal.modal--lightbox.is-active { display: flex; }
.modal.modal--lightbox .modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.modal.modal--lightbox .modal__container {
    position: relative;
    z-index: 1;
    background: transparent;
    box-shadow: none;
    max-width: 95vw;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal__lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2350;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.modal__lightbox-close:hover { background: rgba(255, 255, 255, 0.35); }
.modal__lightbox-img {
    max-height: 90vh;
    max-width: 90vw;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
}

/* --- 9. COOKIE-БАННЕР (#cookie-banner) --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--bd);
    box-shadow: 0 -8px 32px rgba(4, 120, 87, 0.12);
    padding: 1.15rem 0;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    display: block;
}
[data-theme="dark"] .cookie-banner {
    background: rgba(21, 27, 52, 0.98);
    border-color: var(--bd);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6);
}
.cookie-banner.is-active { transform: translateY(0); }
.cookie-banner__inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}
@media (min-width: 768px) {
    .cookie-banner__inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}
.cookie-banner__text { font-size: 14px; font-weight: 500; color: var(--tx); }
.cookie-banner__text a { font-weight: 700; text-decoration: underline; color: var(--vd); }
[data-theme="dark"] .cookie-banner__text a { color: var(--violet); }
.cookie-banner__actions { display: flex; gap: 0.75rem; flex-shrink: 0; }
.cookie-banner__actions .btn { padding: 8px 20px; font-size: 13.5px; min-height: 38px; width: auto; }

/* --- 10. ИНФОРМЕР ОПЛАТЫ (#payment-informer) --- */
.informer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 10000;
    background: var(--card);
    width: 90%;
    max-width: 480px;
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--sh);
    border: 1px solid var(--bd);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}
.informer.is-active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.informer__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.informer__icon svg { width: 32px; height: 32px; }
.informer__title { margin-bottom: 0.25rem; font-weight: 700; font-size: 17px; color: var(--tx); font-family: var(--disp); }
.informer__text { margin-bottom: 0; color: var(--mut); font-size: 14px; }
.informer__text--sub { font-size: 12px; opacity: 0.8; margin-top: 4px; }
.informer__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--mut);
    transition: color .2s;
}
.informer__close:hover { color: var(--tx); }
.informer__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--grad);
    width: 100%;
    transition: width linear;
}

/* --- 11. СТРАНИЦЫ ОШИБОК 404 И 500 --- */
.error-page, .page-error {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(60px, 10vw, 120px) 20px;
    text-align: center;
    position: relative;
    background: var(--paper);
}
.error-box, .page-error__box {
    max-width: 620px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.error-code, .page-error__code {
    font-family: var(--disp);
    font-size: clamp(84px, 16vw, 160px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    filter: drop-shadow(0 10px 24px rgba(4, 120, 87, 0.25));
}
[data-theme="dark"] .error-code, 
[data-theme="dark"] .page-error__code {
    filter: drop-shadow(0 10px 24px rgba(79, 70, 229, 0.4));
}
.error-title, .page-error__title {
    font-family: var(--disp);
    font-size: clamp(22px, 3.5vw, 34px);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 14px;
    color: var(--tx);
}
.error-desc, .page-error__desc {
    font-size: 16px;
    color: var(--mut);
    margin-bottom: 32px;
    line-height: 1.6;
    max-width: 480px;
    margin-inline: auto;
}
.error-actions, .page-error__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}