/*
 * vispy.net — shared site chrome (nav, footer, buttons, help FAB, ambient
 * background, entrance animations). Loaded by index.html, privacy.html and
 * terms.html — NOT by 404.html, which intentionally keeps a lighter,
 * static-background variant. Requires tokens.css to be loaded first.
 */
html { scroll-behavior: smooth; scroll-padding-top: 76px; }

.skip-link {
  position: absolute; top: -100px; left: 12px; z-index: 1000;
  background: var(--accent); color: #13111f; font-weight: 700;
  padding: 12px 20px; border-radius: var(--radius-sm); text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

body {
  font-family: 'Golos Text', sans-serif;
  background: var(--bg); color: var(--text);
  overflow-x: hidden; line-height: 1.6;
}
body::before, body::after {
  content: ''; position: fixed; inset: -20%; z-index: 0; pointer-events: none;
}
body::before {
  background: radial-gradient(ellipse 60% 50% at 30% 25%, rgba(196,190,240,0.09) 0%, transparent 65%);
  animation: ambientDrift1 9s ease-in-out infinite alternate;
}
body::after {
  background: radial-gradient(ellipse 50% 55% at 75% 80%, rgba(120,100,220,0.07) 0%, transparent 65%);
  animation: ambientDrift2 11s ease-in-out infinite alternate;
}
@keyframes ambientDrift1 {
  0% { transform: translate(0,0) scale(1); }
  50% { transform: translate(14%,16%) scale(1.25); }
  100% { transform: translate(-16%,6%) scale(1.1); }
}
@keyframes ambientDrift2 {
  0% { transform: translate(0,0) scale(1.1); }
  50% { transform: translate(-15%,-13%) scale(1); }
  100% { transform: translate(10%,-16%) scale(1.25); }
}
section, nav, footer, main { position: relative; z-index: 1; }

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6%; height: 68px;
  background: rgba(19,17,31,0.92);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.nav-logo img { height: 34px; width: 34px; border-radius: var(--radius-sm); object-fit: cover; }
.nav-logo .brand { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  position: relative; color: var(--text2); text-decoration: none;
  font-size: 0.88rem; font-weight: 500; padding-bottom: 4px; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
.btn-primary {
  background: var(--accent); color: #13111f;
  border: none; cursor: pointer;
  font-family: 'Golos Text', sans-serif; font-weight: 700; font-size: 0.88rem;
  padding: 10px 22px; border-radius: 50px; text-decoration: none;
  transition: all 0.2s; white-space: nowrap; display: inline-block;
}
.btn-primary:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.35); }
.btn-primary:active, .btn-secondary:active { transform: scale(0.97); }
.btn-secondary {
  background: transparent; color: var(--text2);
  border: 1px solid var(--border2); cursor: pointer;
  font-family: 'Golos Text', sans-serif; font-weight: 500; font-size: 0.88rem;
  padding: 10px 22px; border-radius: 50px; text-decoration: none;
  transition: all 0.2s; display: inline-block;
}
.btn-secondary:hover { color: var(--text); border-color: var(--accent); }

.hamburger {
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
  background: none; border: none; width: 44px; height: 44px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text2); border-radius: 2px; transition: all 0.3s; }
.mobile-menu {
  display: none; position: fixed; top: 68px; left: 0; right: 0; z-index: 99;
  background: rgba(19,17,31,0.97); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); padding: 20px 6%;
  flex-direction: column; gap: 16px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--text2); text-decoration: none; font-size: 1rem; font-weight: 500; padding: 8px 0; border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--accent); }

/* ─── HELP FAB ─── */
.help-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #13111f;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px var(--border2);
  text-decoration: none; transition: all 0.2s;
}
.help-fab:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.45), 0 0 0 1px var(--border2); }
.help-fab svg { width: 22px; height: 22px; }
@media (max-width: 600px) {
  .help-fab { right: 16px; bottom: 16px; width: 46px; height: 46px; }
  .help-fab svg { width: 19px; height: 19px; }
}

/* ─── FOOTER ─── */
footer { padding: 60px 6% 36px; border-top: 1px solid var(--border); }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: var(--text2); font-size: 0.88rem; max-width: 260px; margin-top: 12px; line-height: 1.65; }
.footer-col h4 {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text3); margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--text2); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text3); flex-wrap: wrap; gap: 10px;
}

/* ─── ENTRANCE ANIMATIONS ─── */
@keyframes fadeInUp { from{opacity:0;transform:translateY(22px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeInDown { from{opacity:0;transform:translateY(-14px)} to{opacity:1;transform:translateY(0)} }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── SHARED RESPONSIVE ─── */
@media (max-width: 900px) {
  .nav-links, .nav .btn-primary { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  nav { padding: 0 4%; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand p { max-width: 100%; }
}
