:root {
  --bg: #05070f;
  --bg-2: #0a0e1c;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #eef2ff;
  --muted: #9aa7c7;
  --muted-2: #7a86a6;
  --accent: #6c7bff;
  --accent-2: #a855f7;
  --accent-3: #22d3ee;
  --grad: linear-gradient(135deg, #6c7bff 0%, #a855f7 100%);
  --grad-2: linear-gradient(90deg, #6c7bff, #a855f7, #22d3ee);
  --ok: #34d399;
  --warn: #fbbf24;
  --rad: 22px;
  --rad-sm: 13px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  --head: 'Space Grotesk', 'Inter', sans-serif;
  --body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}
body::selection { background: rgba(108, 123, 255, 0.4); }
a { color: inherit; }

/* ---------- Accessibility: skip link ---------- */
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 2000;
  background: var(--grad);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.3s;
}
.skip-link:focus { top: 16px; }

/* ---------- Background ---------- */
#stars { position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%; }
.noise {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--grad-2);
  z-index: 1500;
  box-shadow: 0 0 12px rgba(108,123,255,0.8);
  border-radius: 0 3px 3px 0;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: opacity 0.6s, visibility 0.6s;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  font-family: var(--head);
  font-weight: 700;
  letter-spacing: 0.3em;
  font-size: 1.5rem;
  animation: breathe-logo 1.4s ease-in-out infinite;
}
.preloader-bar {
  position: absolute;
  bottom: 34%;
  width: 160px; height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.preloader-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-2);
  animation: loadbar 1s ease forwards;
  transform-origin: left;
}
@keyframes loadbar { to { width: 100%; } }
@keyframes breathe-logo { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }

/* ---------- Cursor ---------- */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; border-radius: 50%; mix-blend-mode: screen; }
.cursor-dot { width: 6px; height: 6px; background: var(--accent-3); transform: translate(-50%,-50%); }
.cursor-ring { width: 38px; height: 38px; border: 1.5px solid rgba(108,123,255,0.7); transform: translate(-50%,-50%); transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s; }
.cursor-ring.is-active { width: 60px; height: 60px; border-color: var(--accent-3); background: rgba(34,211,238,0.1); }
@media (pointer: coarse) { body { cursor: auto; } .cursor-dot, .cursor-ring { display: none; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s, backdrop-filter 0.3s;
  will-change: transform;
  transform: translateZ(0);
}
.nav.scrolled { background: rgba(5,7,15,0.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom-color: var(--border); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 26px; display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 4px 20px rgba(108,123,255,0.5); }
.brand-word { font-family: var(--head); font-weight: 700; letter-spacing: 0.22em; font-size: 1.05rem; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-link { text-decoration: none; color: var(--muted); font-size: 0.94rem; font-weight: 500; position: relative; padding: 6px 0; transition: color 0.25s; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1.5px; background: var(--grad-2); transform: scaleX(0); transform-origin: right; transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); }
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-link.active { color: var(--text); }
.nav-link.active::after { transform: scaleX(1); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 10px; cursor: pointer; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 28px; border-radius: 13px; font-weight: 600; font-size: 0.96rem;
  text-decoration: none; border: none; cursor: pointer; font-family: inherit;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s, background 0.25s;
  overflow: hidden;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 26px rgba(108,123,255,0.4); }
.btn-primary svg { transition: transform 0.3s; }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-glow:hover { box-shadow: 0 10px 45px rgba(108,123,255,0.65); transform: translateY(-2px) scale(1.02); }
.btn-primary::before { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform 0.7s; }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-ghost { background: var(--panel); color: var(--text); border: 1px solid var(--border-2); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: var(--panel-2); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--accent); border: 1.5px solid rgba(108,123,255,0.5); }
.btn-outline:hover { border-color: var(--accent); background: rgba(108,123,255,0.08); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- Page transitions (clean fade) ---------- */
body { transition: opacity 0.25s ease; }
body.fading { opacity: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(16px);
  color: var(--text);
  padding: 15px 26px;
  border-radius: 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.4s;
  z-index: 2500;
  max-width: 90%;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast .toast-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 12px var(--ok); flex-shrink: 0; }
.toast .toast-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.2rem; line-height: 1; margin-left: 6px; }

/* ---------- Back to top ---------- */
.totop {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 50px; height: 50px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  border: none;
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 2000;
  box-shadow: 0 8px 26px rgba(108,123,255,0.5);
}
.totop.show { opacity: 1; transform: translateY(0); }
.totop:hover { transform: translateY(-3px); }

/* ---------- Container / Reveal / Sections ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 26px; }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

.section { padding: 130px 0 90px; position: relative; }
.section-hero { min-height: 0; padding-top: 150px; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(108,123,255,0.05) 20%, rgba(168,85,247,0.04) 80%, transparent); }
.sec-head { max-width: 640px; margin-bottom: 64px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.76rem; font-weight: 600; color: var(--accent-3); }
.sec-head h2 { font-family: var(--head); font-weight: 600; font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.05; letter-spacing: -0.02em; margin: 18px 0 18px; }
.sec-head h2 em { font-style: normal; background: var(--grad-2); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sec-head p { color: var(--muted); font-size: 1.08rem; }
.grad-text { background: var(--grad-2); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- Page hero banner ---------- */
.page-hero { text-align: center; padding-bottom: 40px; }
.page-hero h1 { font-family: var(--head); font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.03; letter-spacing: -0.03em; margin: 26px 0 20px; }
.page-hero p { color: var(--muted); font-size: 1.15rem; max-width: 40rem; margin: 0 auto; }

/* ---------- Pods (info chips) ---------- */
.pod-row { display: flex; gap: 18px; flex-wrap: wrap; }
.pod { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 16px 22px; display: flex; align-items: center; gap: 14px; backdrop-filter: blur(8px); }
.pod .pod-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--grad-soft, rgba(108,123,255,0.15)); color: var(--accent); }
.pod .pod-ico svg { width: 20px; height: 20px; }
.pod .pod-txt strong { display: block; font-family: var(--head); font-size: 1.05rem; }
.pod .pod-txt span { color: var(--muted); font-size: 0.82rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 70px 0 34px; background: rgba(5,7,15,0.6); }
.footer-grid { max-width: 1200px; margin: 0 auto; padding: 0 26px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; align-items: start; }
.footer-brand .brand-mark { width: 34px; height: 34px; }
.footer-tag { color: var(--muted-2); margin-top: 12px; font-size: 0.92rem; max-width: 16rem; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-title { font-family: var(--head); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.25s, transform 0.25s; }
.footer-col a:hover { color: var(--text); transform: translateX(3px); }
.footer-copy { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 28px; color: var(--muted-2); font-size: 0.85rem; }

/* ---------- Responsive (base) ---------- */
@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: rgba(5,7,15,0.97); backdrop-filter: blur(18px);
    padding: 24px 26px; gap: 18px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .nav-cta { text-align: center; width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-copy { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
}