@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');
@import url('legal.css');

/* === VARIABLES === */
:root {
  --bg:  #FAFAFA;
  --bg2: #F2F3F5;
  --bg3: #ffffff;
  --card: #ffffff;
  --card2: #F0F1F3;
  --gold:  #e09000;
  --gold2: #f59e0b;
  --gold-light: #fde68a;
  --gold-glow: rgba(245,158,11,0.18);
  --lime:  #f59e0b;
  --lime2: #f59e0b;
  --lime3: #fde68a;
  --lime-glow: rgba(245,158,11,0.14);
  --accent: #6c47ff;
  --accent2: #4726d9;
  --purple: #5c5c6e;
  --text:  #0D0D0D;
  --text2: #6B6B7B;
  --border: rgba(0,0,0,0.09);
  --border-gold: rgba(245,158,11,0.50);
  --border-lime: rgba(245,158,11,0.45);
  --green: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 1px 8px rgba(0,0,0,0.06);
  --shadow-gold: 0 4px 20px rgba(245,158,11,0.28);
  --shadow-lime: 0 4px 18px rgba(245,158,11,0.22);
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  --max-w: 1160px;
  --font-display: 'Montserrat', 'Arial Black', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --bg-dark:  #0D0D0D;
  --bg-dark2: #1A1A1A;
  --text-light:  #ffffff;
  --text-light2: #A0A0A8;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 18px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  font-weight: 400;
  letter-spacing: -0.01em;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

main,
section,
.container {
  min-width: 0;
}

h1, h2, h3, h4, h5, h6, p, li, figcaption {
  overflow-wrap: anywhere;
  word-break: break-word;
}

img, video, svg {
  max-width: 100%;
  height: auto;
}

/* Subtle fixed tint — no animation */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 70% 55% at 95% 5%, rgba(108,71,255,0.03) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 5% 95%, rgba(245,158,11,0.04) 0%, transparent 55%);
  z-index: 0;
  opacity: 1;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }

/* === TYPOGRAPHY === */
h1, h2 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}
h3 {
  font-family: var(--font-body);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 900; line-height: 1.08; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.7rem); font-weight: 800; line-height: 1.12; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { font-family: var(--font-body); font-weight: 400; color: var(--text2); line-height: 1.7; }
strong { font-weight: 700; color: var(--text); }

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: 96px 0; }

/* === HEADER === */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 8px 0;
  background: rgba(250,250,250,0.94);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  transition: var(--transition);
}
.header--scrolled { padding: 5px 0; box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 0 rgba(0,0,0,0.04); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--text);
  margin-right: auto;
}
.logo__title { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 22px; margin-right: 8px; }
.nav a { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text2); position: relative; }
.nav a:not(.btn)::after { content: ''; position: absolute; bottom: -3px; left: 0; width: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--purple)); border-radius: 2px; transition: width 0.28s ease; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav a:not(.btn):hover::after { width: 100%; }
.nav .nav__link--active { color: var(--accent); }
.nav .nav__link--active::after { width: 100%; }
.burger {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 4px;
}
.burger span { display: block; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; transition: var(--transition); }
.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 44px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600; font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: var(--transition);
  white-space: nowrap;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
  gap: 8px;
}
.btn--sm { padding: 8px 20px; font-size: 0.73rem; border-radius: 8px; border: 1.5px solid rgba(108,71,255,0.40); color: var(--accent); background: rgba(108,71,255,0.05); letter-spacing: 0.06em; font-weight: 600; transition: var(--transition); }
.nav .btn--sm { margin-left: 20px; }
.btn--sm:hover { background: rgba(108,71,255,0.10); border-color: rgba(108,71,255,0.65); transform: translateY(-1px); }
.btn--gold {
  background: linear-gradient(135deg, #f59e0b 0%, #ef8800 100%);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 2px 12px rgba(245,158,11,0.20), inset 0 1px 0 rgba(255,255,255,0.14);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(245,158,11,0.30); }
.btn--gold:active { transform: scale(0.98); }
.btn--outline-gold {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn--outline-gold:hover { background: rgba(10,22,128,0.06); transform: translateY(-1px); }
.btn--lime {
  background: linear-gradient(135deg, var(--lime2) 0%, #ef8800 100%);
  color: #0d0820;
  box-shadow: var(--shadow-lime), inset 0 1px 0 rgba(255,255,255,0.22);
  font-weight: 900;
}
.btn--lime:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(245,158,11,0.50); }
.btn--lime:active { transform: scale(0.97); }
.btn--accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 24px rgba(245,158,11,0.35), inset 0 1px 0 rgba(255,255,255,0.14);
}
.btn--accent:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(108,71,255,0.32); }
.btn--lg { padding: 18px 52px; font-size: 0.88rem; letter-spacing: 0.06em; }

/* === FOOTER === */
.footer {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #0e0930 100%);
  border-top: 1px solid rgba(0,0,0,0.07);
  padding: 64px 0 32px;
}
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 48px 40px; align-items: start; text-align: left; }
.footer__logo { font-size: 1.3rem; font-weight: 900; color: #fff; text-transform: uppercase; letter-spacing: -0.03em; margin-bottom: 12px; }
.footer__desc { font-size: 0.8rem; color: var(--text-light2); line-height: 1.6; margin-bottom: 6px; }
.footer__col-title { font-size: 0.68rem; font-weight: 700; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.footer__nav { display: flex; flex-direction: column; gap: 9px; }
.footer__nav a { font-size: 0.82rem; color: var(--text-light2); text-decoration: none; transition: var(--transition); }
.footer__nav a:hover { color: var(--lime2); }
.footer__nav--legal { margin-top: 12px; }
.footer__nav--legal a { color: rgba(255,255,255,0.8); }
.footer__nav--legal a:hover { color: rgba(255,255,255,1); }

/* Ask widget toggle: make transparent and match glass style */
#askWidgetToggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  padding: 10px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: none;
}

#askWidgetToggle:hover { background: rgba(255,255,255,0.028); }
#askWidgetToggle:active { transform: translateY(1px); }
.footer__contact-item { font-size: 0.82rem; color: var(--text-light2); margin-bottom: 8px; }
.footer__links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.footer__links a { font-size: 0.78rem; color: rgba(168,158,232,0.65); text-decoration: underline; text-underline-offset: 3px; }
.footer__links a:hover { color: var(--lime2); }
.footer__bottom { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.07); padding-top: 20px; margin-top: 8px; display: flex; justify-content: space-between; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.footer__copy { color: rgba(168,158,232,0.55); font-size: 0.75rem; }
.footer__disclaimer { font-size: 0.72rem; color: rgba(168,158,232,0.4); line-height: 1.5; max-width: 560px; text-align: right; }
@media (max-width: 860px) { .footer__inner { grid-template-columns: 1fr 1fr; } .footer__disclaimer { text-align: left; } }
@media (max-width: 600px) { .footer__inner { grid-template-columns: 1fr; gap: 28px; } .footer__bottom { flex-direction: column; } }

/* === MODAL === */
.modal {
  display: none; position: fixed;
  inset: 0; z-index: 200;
  align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal__overlay { position: absolute; inset: 0; background: rgba(9,8,30,0.65); backdrop-filter: blur(10px); }
.modal__box {
  position: relative; z-index: 1;
  background: #ffffff;
  border: 1.5px solid rgba(0,0,0,0.10);
  border-radius: var(--radius);
  padding: 48px 40px;
  max-width: 420px; width: 90%;
  text-align: center;
  box-shadow: 0 8px 64px rgba(0,0,0,0.11), 0 2px 16px rgba(0,0,0,0.06);
}
.modal__icon { font-size: 3rem; margin-bottom: 16px; }
.modal__box h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: 12px;
}
.modal__box p { color: var(--text2); }
.modal__close {
  position: absolute; top: 16px; right: 16px;
  font-size: 1.1rem; color: var(--text2);
  padding: 4px 8px;
}
.modal__close:hover { color: var(--text); }

/* === VIDEO MODAL === */
.video-modal { display: none; position: fixed; inset: 0; z-index: 300; align-items: center; justify-content: center; }
.video-modal.active { display: flex; }
.video-modal__overlay { position: absolute; inset: 0; background: rgba(5,4,20,0.88); backdrop-filter: blur(14px); cursor: pointer; }
.video-modal__box { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(420px, 92vw); }
.video-modal__close { position: absolute; top: -40px; right: 0; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); color: #fff; font-size: 1.1rem; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; }
.video-modal__close:hover { background: rgba(255,255,255,0.22); }
.video-modal__title { color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 700; text-align: center; margin: 0; }
.video-modal__player { width: 100%; border-radius: 16px; background: #000; aspect-ratio: 9/16; max-height: 80vh; display: block; }
.modal__box--legal {
  max-width: 720px;
  max-height: min(78vh, 820px);
  padding: 40px 32px 28px;
  text-align: left;
  overflow: hidden;
}
.legal-modal__content {
  margin-top: 14px;
  max-height: calc(78vh - 120px);
  overflow-y: auto;
  padding-right: 12px;
  color: var(--text2);
}
.legal-modal__content h4 {
  margin: 18px 0 8px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}
.legal-modal__content p {
  margin: 0 0 12px;
  line-height: 1.65;
}
.legal-modal__content ul {
  margin: 0 0 14px;
  padding-left: 18px;
}
.legal-modal__content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* === REVEAL & ENTRANCE ANIMATIONS === */
.reveal { opacity: 0; transform: translateY(28px) scale(0.98); transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1), transform 0.65s cubic-bezier(0.22,1,0.36,1); }
.reveal.visible { opacity: 1; transform: translateY(0) scale(1); }

/* Stagger delays for grids */
.teasers__grid .reveal:nth-child(1) { transition-delay: 0.04s; }
.teasers__grid .reveal:nth-child(2) { transition-delay: 0.10s; }
.teasers__grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.teasers__grid .reveal:nth-child(4) { transition-delay: 0.22s; }
.teasers__grid .reveal:nth-child(5) { transition-delay: 0.28s; }
.bento-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.bento-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.bento-grid .reveal:nth-child(3) { transition-delay: 0.19s; }
.bento-grid .reveal:nth-child(4) { transition-delay: 0.26s; }
.bento-grid .reveal:nth-child(5) { transition-delay: 0.33s; }

/* Slide in from left */
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: translateX(0); } }
.slide-in-left { animation: slideInLeft 0.6s cubic-bezier(0.22,1,0.36,1) forwards; }

/* Fade up */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.55s cubic-bezier(0.22,1,0.36,1) forwards; }

/* Scale in */
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.scale-in { animation: scaleIn 0.45s cubic-bezier(0.34,1.56,0.64,1) forwards; }

/* Progress bar fill */
@keyframes fillBar { from { width: 0; } to { width: var(--fill, 100%); } }
.anim-fill { animation: fillBar 1.1s cubic-bezier(0.22,1,0.36,1) forwards; }

/* Section title underline draw */
@keyframes drawLine { from { scaleX(0); } to { scaleX(1); } }

/* Pulse dot */
@keyframes pulseDot { 0%,100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.35); opacity: 1; } }
.pulse-dot { animation: pulseDot 1.8s ease-in-out infinite; }

/* === MISC === */
.section__title span { color: var(--accent); }
.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(108,71,255,0.22);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.section__title { margin-bottom: 48px; line-height: 1.1; }

/* === BUTTON GROUPS === */
.hero__actions,
.page-hero__actions,
.not-found-actions,
[class*="__actions"] {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.btn + .btn { margin-left: 0; }
.hint { font-size: 0.75rem; color: var(--text2); margin-top: 12px; opacity: 0.7; }
.badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 6px;
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.30);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  margin-bottom: 28px;
}
@keyframes pulse-badge { 0%,100%{box-shadow:none} }

/* Floating animations removed for premium feel */
@keyframes floatUp   { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
@keyframes floatUpSm { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)} }
@keyframes floatGlow { 0%,100%{opacity:0.7} 50%{opacity:1} }
/* === STAGGER REVEAL === */
.cards-3 .reveal:nth-child(2), .feat-row .reveal:nth-child(2) { transition-delay: 0.10s; }
.cards-3 .reveal:nth-child(3), .feat-row .reveal:nth-child(3) { transition-delay: 0.20s; }
.cards-3 .reveal:nth-child(4) { transition-delay: 0.30s; }
.steps-arc .reveal:nth-child(2) { transition-delay: 0.08s; }
.steps-arc .reveal:nth-child(3) { transition-delay: 0.16s; }
.steps-arc .reveal:nth-child(4) { transition-delay: 0.24s; }
/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.15s !important; }
  .reveal { opacity: 1; transform: none; }
}

/* === MONEY RAIN === */
.money-rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.money-particle {
  position: absolute;
  top: -80px;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(245,158,11,0.5));
  animation: money-fall linear forwards;
  user-select: none;
}
@keyframes money-fall {
  0%   { transform: translateY(0) rotate(0deg) scale(0.7); opacity: 0; }
  8%   { opacity: 1; }
  88%  { opacity: 0.85; }
  100% { transform: translateY(115vh) rotate(900deg) scale(1.2); opacity: 0; }
}
@keyframes money-spin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  /* Поднимаем stacking context хедера выше nav-backdrop (199), чтобы nav-панель внутри была кликабельна */
  .header { z-index: 202; }
  /* height: 100dvh — обходит баг: backdrop-filter на родителе делает его containing block для fixed-потомков */
  .nav {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
    gap: 4px;
    position: fixed; top: 0; right: 0; bottom: 0;
    height: 100vh; height: 100dvh;
    width: min(240px, 78vw);
    padding: 68px 18px 24px;
    background: #fff;
    border-left: 1px solid var(--border);
    box-shadow: -6px 0 24px rgba(10,22,128,0.10);
    z-index: 200;
    transform: translateX(110%);
    transition: transform 0.30s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    margin-right: 0;
  }
  .nav.open { transform: translateX(0); }
  .nav a:not(.btn) {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text2);
    border-radius: 10px;
    transition: background 0.18s, color 0.18s;
  }
  .nav a:not(.btn):hover, .nav a:not(.btn):active { background: var(--bg2); color: var(--accent); }
  .nav .btn--sm {
    margin: 8px 0 0 0;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.76rem;
    border-radius: 50px;
  }
  .nav-backdrop { display: none; position: fixed; inset: 0; background: rgba(13,15,46,0.48); z-index: 199; }
  .nav-backdrop.open { display: block; }
  .burger { display: flex; z-index: 201; }
  .modal__box { padding: 36px 24px; }
  .modal__box--legal { padding: 34px 22px 24px; }
  .footer__links { flex-direction: column; gap: 8px; align-items: center; }
  .header__inner { gap: 12px; }
  .cab-panel-trigger { padding: .55rem .85rem; margin-left: 0; }
  .cab-panel-trigger span { display: none; }
  .btn { padding: 13px 24px; font-size: 0.8rem; }
  .btn--sm { padding: 10px 20px; font-size: 0.74rem; }
  .btn--lg { padding: 14px 26px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .section { padding: 44px 0; }
  .container { padding: 0 16px; }
  .logo { font-size: 1.02rem; }
  .btn {
    max-width: 100%;
    padding: 12px 18px;
    font-size: 0.74rem;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
  .btn--sm { padding: 9px 16px; font-size: 0.68rem; }
  .btn--lg { padding: 13px 20px; font-size: 0.74rem; }
}

@media (max-width: 360px) {
  html { font-size: 16px; }
  .container { padding: 0 12px; }
  .header__inner { gap: 8px; }
  .logo { font-size: 0.92rem; }
  .cab-panel-trigger { padding: .48rem .7rem; }
  .btn { padding: 11px 14px; font-size: 0.68rem; }
  .btn--sm { padding: 8px 12px; font-size: 0.64rem; }
  .btn--lg { padding: 12px 16px; font-size: 0.68rem; }
}
