/* ================================================================
   base.css — ParseApp shared design system
   Подключается во все страницы. Содержит: reset, navbar, buttons,
   section utilities, footer, animations, hamburger/mobile menu, colors.
   ================================================================ */

/* ── COLOR VARIABLES ── */
:root {
  color-scheme: dark;
  --bg: #06080D;
  --bg2: #0C1018;
  --bg3: #111620;
  --bg4: #161C28;
  --gold: #8B5CF6;
  --gold2: #7C3AED;
  --blue: #4DA6FF;
  --cyan: #30D5C8;
  --text: #E8EAF0;
  --text2: #8892A4;
  --text3: #556070;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --font-display: 'Golos Text', sans-serif;
  --font-body: 'Onest', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 20px;
  /* theme-specific */
  --overlay-bg: rgba(6,8,13,.92);
  --overlay-bg-solid: rgba(6,8,13,.97);
  --grid-color: rgba(139,92,246,.04);
  --hero-grid-color: rgba(255,255,255,.05);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FAFBFF;
  --bg2: #FFFFFF;
  --bg3: #F3F4F9;
  --bg4: #E9EAF4;
  --blue: #2563EB;
  --cyan: #0891B2;
  --text: #0F1117;
  --text2: #4B5563;
  --text3: #9CA3AF;
  --border: rgba(0,0,0,0.07);
  --border2: rgba(0,0,0,0.13);
  --overlay-bg: rgba(250,251,255,.92);
  --overlay-bg-solid: rgba(250,251,255,.97);
  --grid-color: rgba(139,92,246,.07);
  --hero-grid-color: rgba(0,0,0,.05);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute; top: -100px; left: 16px; padding: 8px 16px;
  background: var(--gold); color: #fff; border-radius: 4px;
  font-weight: 700; z-index: 9999; transition: top .2s;
}
.skip-link:focus { top: 8px; }

/* ── NAVBAR ── */
header.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 48px;
  transition: all .3s ease;
}
header.site-header.scrolled {
  background: var(--overlay-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text); text-decoration: none;
  margin-right: 64px;
}
.nav-logo .logo-accent {
  background: linear-gradient(130deg, var(--gold) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
}
.nav-logo .logo-tagline {
  font-size: 15px;
  font-weight: 400;
  opacity: 0.85;
  line-height: 1;
  display: inline;
}
.footer-logo .logo-tagline {
  font-size: 15px;
  font-weight: 400;
  opacity: 0.85;
  line-height: 1;
  display: inline;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  color: var(--text2); text-decoration: none;
  font-size: 14px; font-weight: 500; transition: color .2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--gold); }
.nav-cta {
  background: var(--gold); color: #fff !important;
  padding: 9px 20px; border-radius: 8px;
  font-weight: 700 !important; font-size: 14px !important;
  text-decoration: none;
  transition: background .2s, transform .1s !important;
  position: relative; overflow: hidden;
  white-space: nowrap; flex-shrink: 0;
}
.nav-cta::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  transform: skewX(-15deg);
  animation: nav-cta-shimmer 2.4s infinite;
}
@keyframes nav-cta-shimmer {
  0%   { left: -100%; }
  60%  { left: 140%; }
  100% { left: 140%; }
}
.nav-cta:hover { background: #A78BFA !important; transform: translateY(-1px); }

/* ── THEME TOGGLE ── */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all .2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--gold);
}

/* ── HAMBURGER ── */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; cursor: pointer;
  background: none; border: none; padding: 6px;
  border-radius: 8px; transition: background .2s;
}
.nav-hamburger:hover { background: rgba(255,255,255,.06); }
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text2); border-radius: 2px;
  transition: all .25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE MENU ── */
.mobile-menu {
  display: none;
  position: fixed; top: 72px; left: 0; right: 0;
  background: var(--overlay-bg-solid);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 24px;
  z-index: 999;
  flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--text2); text-decoration: none;
  font-size: 16px; font-weight: 500;
  padding: 12px 8px; border-radius: 8px;
  transition: all .15s;
  display: block;
}
.mobile-menu a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.mobile-menu .mobile-cta {
  margin-top: 8px; background: var(--gold);
  color: #fff !important; font-weight: 700 !important;
  text-align: center; padding: 13px !important;
}
.mobile-menu .mobile-cta:hover { background: #A78BFA !important; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--gold); color: #fff;
  padding: 14px 28px; border-radius: var(--radius);
  font-weight: 700; font-size: 15px;
  text-decoration: none; display: inline-flex;
  align-items: center; gap: 8px;
  transition: all .2s; border: none; cursor: pointer;
}
.btn-primary:hover { background: #A78BFA; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(139,92,246,.3); }
.btn-ghost {
  color: var(--text2); padding: 14px 24px;
  border-radius: var(--radius); font-weight: 500; font-size: 15px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border2);
  transition: all .2s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
.btn-outline {
  display: block; text-align: center;
  padding: 13px 24px; border-radius: var(--radius);
  border: 1px solid var(--border2);
  color: var(--text); text-decoration: none;
  font-weight: 600; font-size: 14px;
  transition: all .2s;
}
.btn-outline:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.04); }
.btn-gold {
  display: block; text-align: center;
  padding: 13px 24px; border-radius: var(--radius);
  background: var(--gold); color: #fff;
  text-decoration: none; font-weight: 700; font-size: 14px;
  transition: all .2s;
}
.btn-gold:hover { background: #A78BFA; }

/* ── SECTIONS ── */
section { padding: 96px 48px; }
.container { max-width: 1400px; margin: 0 auto; }
.section-label {
  font-family: var(--font-mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--gold); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.section-label::before {
  content: ''; display: block;
  width: 24px; height: 1px; background: var(--gold);
}
.section-label.center { justify-content: center; }
.section-label.center::before { display: none; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 800; line-height: 1.12;
  letter-spacing: -.025em; margin-bottom: 16px;
}
.section-sub {
  font-size: 17px; color: var(--text2);
  max-width: 560px; line-height: 1.7;
  font-weight: 300;
}

/* ── FOOTER ── */
footer.site-footer {
  background-color: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 48px;
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.footer-links {
  display: flex; gap: 24px; list-style: none; flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px; color: var(--text3);
  text-decoration: none; transition: color .2s;
}
.footer-links a:hover { color: var(--text2); }
.footer-copy {
  font-size: 12px; color: var(--text3);
  font-family: var(--font-mono);
}

/* ── ANIMATIONS ── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}
@keyframes flt { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: .1s; }
.fade-up:nth-child(3) { transition-delay: .2s; }
.fade-up:nth-child(4) { transition-delay: .3s; }
.fade-up:nth-child(5) { transition-delay: .4s; }
.fade-up:nth-child(6) { transition-delay: .5s; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

@media (max-width: 768px) {
  section { padding: 64px 20px; }
  header.site-header { padding: 0 20px; }
  footer.site-footer { padding: 36px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .nav-logo .logo-tagline { display: block; }
  .footer-logo .logo-tagline { display: block; }
}
@media (max-width: 480px) {
  section { padding: 52px 16px; }
  footer.site-footer { padding: 28px 16px; }
  .section-title { letter-spacing: -.01em; }
}
