/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:       #02040F;
  --bg2:      #070A1A;
  --bg3:      #0D1226;
  --blue:     #2563EB;
  --blue-l:   #3B82F6;
  --cyan:     #22D3EE;
  --purple:   #7C3AED;
  --white:    #FFFFFF;
  --text:     #E2E8F0;
  --muted:    #64748B;
  --border:   rgba(255,255,255,0.07);
  --glass:    rgba(255,255,255,0.04);
  --glow-b:   rgba(37,99,235,0.25);
  --glow-c:   rgba(34,211,238,0.15);
  --font-h:   'Space Grotesk', sans-serif;
  --font-b:   'Inter', sans-serif;
  --radius:   12px;
  --radius-l: 20px;
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --dur:      0.45s;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: none; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Film Grain ─────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  animation: grain 0.4s steps(1) infinite;
}
@keyframes grain {
  0%,100%{transform:translate(0,0)}10%{transform:translate(-2%,-3%)}20%{transform:translate(3%,1%)}
  30%{transform:translate(-1%,2%)}40%{transform:translate(2%,-1%)}50%{transform:translate(-3%,3%)}
  60%{transform:translate(1%,-2%)}70%{transform:translate(-2%,1%)}80%{transform:translate(3%,-3%)}
  90%{transform:translate(-1%,2%)}
}

/* ── Custom Cursor ──────────────────────────────────────── */
#cursor-dot {
  position: fixed; width: 8px; height: 8px;
  background: var(--cyan); border-radius: 50%;
  pointer-events: none; z-index: 10000;
  transform: translate(-50%,-50%);
  transition: width .15s, height .15s, background .15s, opacity .3s;
}
#cursor-ring {
  position: fixed; width: 38px; height: 38px;
  border: 1.5px solid rgba(34,211,238,.45); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width .25s var(--ease), height .25s var(--ease), border-color .25s;
}
body.cur-hover #cursor-dot { width: 14px; height: 14px; background: var(--blue); }
body.cur-hover #cursor-ring { width: 56px; height: 56px; border-color: rgba(37,99,235,.4); }
body.cur-click #cursor-dot  { transform: translate(-50%,-50%) scale(0.7); }

/* ── Container ──────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 40px; }

/* ── Logo ───────────────────────────────────────────────── */
.logo { font-family: var(--font-h); font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.logo-ad, .logo-ave { color: var(--white); }
.logo-w { color: var(--blue); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 100px;
  font-family: var(--font-b); font-weight: 600; font-size: 15px;
  letter-spacing: -.01em; white-space: nowrap;
  position: relative; overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur), color var(--dur), border-color var(--dur);
  cursor: none;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,.1); opacity: 0;
  transition: opacity .3s;
}
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 0 28px rgba(37,99,235,.4), 0 4px 16px rgba(37,99,235,.2);
}
.btn-primary:hover {
  background: var(--blue-l);
  box-shadow: 0 0 50px rgba(37,99,235,.6), 0 8px 24px rgba(37,99,235,.3);
}
.btn-outline {
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 20px rgba(34,211,238,.15); }
.btn-sm {
  padding: 10px 20px; font-size: 14px;
  background: var(--glass); color: var(--white);
  border: 1px solid var(--border); backdrop-filter: blur(12px);
}
.btn-sm:hover { background: var(--blue); border-color: var(--blue); }
.btn-full { width: 100%; justify-content: center; }

/* ── Gradient text ──────────────────────────────────────── */
.text-grad {
  color: var(--cyan);
  background: linear-gradient(130deg, var(--blue-l) 0%, var(--cyan) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section labels ─────────────────────────────────────── */
.section-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-h);
  font-size: clamp(34px,5vw,54px);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.08;
  color: var(--white); margin-bottom: 16px;
}
.section-sub {
  font-size: 17px; color: var(--muted); max-width: 540px; line-height: 1.75;
}
.section-head { margin-bottom: 64px; }

/* ── Header / Nav ───────────────────────────────────────── */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  padding: 22px 0;
  transition: background .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(2,4,15,.88);
  backdrop-filter: blur(22px) saturate(180%);
  padding: 14px 0; border-color: var(--border);
}
.nav-inner {
  display: flex; align-items: center; gap: 40px;
  max-width: 1280px; margin: 0 auto; padding: 0 40px;
}
.nav-links { display: flex; gap: 36px; margin-right: auto; }
.nav-link {
  font-size: 15px; color: var(--muted); font-weight: 500;
  position: relative; transition: color .3s;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1.5px; background: var(--cyan); transition: width .3s;
}
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* ── Burger ─────────────────────────────────────────────── */
.burger { display: none; flex-direction: column; gap: 5px; width: 28px; padding: 4px 0; }
.burger span {
  display: block; height: 2px; background: var(--white); border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity .3s, width .3s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Nav ─────────────────────────────────────────── */
.mobile-nav {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(2,4,15,.96); backdrop-filter: blur(24px);
  display: flex; align-items: center; justify-content: center;
  transform: translateX(-100%);
  transition: transform .55s var(--ease);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav ul { text-align: center; }
.mobile-nav li { margin: 20px 0; overflow: hidden; }
.mn-link {
  font-family: var(--font-h); font-size: clamp(36px,10vw,56px);
  font-weight: 800; color: var(--white); letter-spacing: -.03em;
  transition: color .3s; display: inline-block;
}
.mn-link:hover { color: var(--cyan); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 0 100px; overflow: hidden;
}
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.glow {
  position: absolute; border-radius: 50%;
  filter: blur(100px); pointer-events: none;
}
.glow-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(37,99,235,.18) 0%, transparent 70%);
  top: -180px; right: -120px;
}
.glow-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,.14) 0%, transparent 70%);
  bottom: -80px; left: -80px;
}
.hero-inner { position: relative; z-index: 2; max-width: 880px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; background: var(--glass);
  border: 1px solid var(--border); border-radius: 100px;
  font-size: 13px; font-weight: 500; color: var(--text);
  margin-bottom: 32px; backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(16px);
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  animation: blink 2s ease infinite;
}
@keyframes blink {
  0%,100%{box-shadow: 0 0 0 0 rgba(34,211,238,.5)}
  50%{box-shadow: 0 0 0 6px rgba(34,211,238,0)}
}

.hero-title {
  font-family: var(--font-h);
  font-size: clamp(54px,9.5vw,128px);
  font-weight: 800; letter-spacing: -.045em; line-height: .98;
  color: var(--white); margin-bottom: 28px;
}
.title-line {
  display: block; overflow: hidden; padding-bottom: 0.06em;
}
.line-inner { display: inline-block; will-change: transform; }

.hero-sub {
  font-size: clamp(16px,2vw,19px); color: var(--muted);
  line-height: 1.75; margin-bottom: 40px; max-width: 540px;
  opacity: 0; transform: translateY(20px);
}
.hero-actions {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-bottom: 64px; opacity: 0; transform: translateY(20px);
}

/* ── Stats ──────────────────────────────────────────────── */
.hero-stats {
  display: flex; align-items: center;
  opacity: 0; transform: translateY(20px);
}
.stat-item { padding: 0 32px; }
.stat-item:first-child { padding-left: 0; }
.stat-val {
  font-family: var(--font-h);
  font-size: clamp(28px,4vw,42px);
  font-weight: 800; color: var(--white);
  line-height: 1; margin-bottom: 6px; letter-spacing: -.03em;
}
.stat-unit { color: var(--cyan); }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-div { width: 1px; height: 52px; background: var(--border); flex-shrink: 0; }

/* ── Scroll cue ─────────────────────────────────────────── */
.scroll-cue {
  position: absolute; bottom: 36px; left: 50%;
  transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.scroll-bar { width: 1px; height: 52px; background: var(--border); overflow: hidden; }
.scroll-bar-inner {
  width: 1px; height: 100%; background: var(--cyan);
  animation: scrollAnim 1.6s ease infinite;
}
@keyframes scrollAnim { 0%{transform:translateY(-100%)} 100%{transform:translateY(200%)} }

/* ── Ticker ─────────────────────────────────────────────── */
.ticker-wrap {
  background: var(--bg3); overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.ticker-track {
  display: inline-flex; align-items: center; gap: 28px;
  animation: tick 30s linear infinite;
  font-size: 14px; font-weight: 500;
  color: var(--muted); letter-spacing: .03em; padding-right: 28px;
}
.tick-sep { color: var(--blue); font-size: 9px; }
@keyframes tick { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .btn-sm    { display: none; }
  .burger    { display: flex; }
  .container { padding: 0 20px; }
}
@media (max-width: 640px) {
  .hero { padding: 100px 0 80px; }
  .hero-stats { flex-wrap: wrap; gap: 28px; }
  .stat-div   { display: none; }
  .stat-item  { padding: 0; }
  .hero-actions { flex-direction: column; }
  .section-head { margin-bottom: 40px; }
  .hero-title { font-size: clamp(44px,14vw,80px); }
}
@media (pointer: coarse) {
  body, button, .btn, .card, .social-btn { cursor: auto; }
  #cursor-dot, #cursor-ring { display: none; }
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
