:root {
  --bg: #00082d;
  --bg-soft: #020b3a;
  --fg: #ffffff;
  --fg-muted: rgba(255, 255, 255, 0.68);
  --fg-faint: rgba(255, 255, 255, 0.45);
  --yellow: #f4d935;
  --blue: #57bfea;
  --border: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.05);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

section { scroll-margin-top: 90px; position: relative; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.loader-logo { height: 40px; width: auto; animation: loaderPulse 1.1s ease-in-out infinite; }
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes loaderPulse {
  0%, 100% { opacity: .4; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---------- cursor glow / progress ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 420px; height: 420px;
  pointer-events: none; z-index: 5; border-radius: 50%;
  background: radial-gradient(circle, rgba(87, 191, 234, 0.14), transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity .3s ease;
  will-change: transform;
}
@media (pointer: coarse) { .cursor-glow { display: none; } }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--yellow));
  z-index: 200; transition: width .1s linear;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0;
  transition: background .35s var(--ease), padding .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(0, 8, 45, 0.75);
  backdrop-filter: blur(14px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo img { height: 30px; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--fg-muted); }
.nav-links a { transition: color .25s ease; position: relative; }
.nav-links a:hover { color: var(--fg); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 1px;
  background: var(--blue); transition: width .25s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 20px; height: 2px; background: var(--fg); display: block; }
.nav-mobile {
  display: none; flex-direction: column; gap: 16px; padding: 20px 24px;
  background: rgba(0, 8, 45, 0.97); border-bottom: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: transform .3s var(--ease), box-shadow .3s var(--ease), opacity .25s ease, border-color .25s ease;
  will-change: transform;
}
.btn span { position: relative; z-index: 1; }
.btn-primary {
  background: var(--yellow); color: #00082d;
  box-shadow: 0 0 0 rgba(244, 217, 53, 0);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(244, 217, 53, 0.35); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.22); color: var(--fg); }
.btn-ghost:hover { border-color: var(--blue); background: rgba(87, 191, 234, 0.08); }
.btn-small { padding: 9px 20px; font-size: 13px; }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 140px 24px 80px; overflow: hidden;
}
.aurora { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55;
  animation: drift 18s ease-in-out infinite;
}
.blob-blue { width: 520px; height: 520px; background: var(--blue); top: -140px; right: -80px; }
.blob-yellow { width: 380px; height: 380px; background: var(--yellow); opacity: .22; bottom: -120px; left: -60px; animation-duration: 22s; animation-delay: -4s; }
.blob-blue2 { width: 340px; height: 340px; background: #2b5fb8; opacity: .35; top: 40%; left: 30%; animation-duration: 26s; animation-delay: -9s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, 30px) scale(1.08); }
  66% { transform: translate(-30px, -20px) scale(0.96); }
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 75%);
}

.hero-inner {
  position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 18px;
}
.dot-pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--blue); display: inline-block;
  box-shadow: 0 0 0 0 rgba(87,191,234,.6); animation: pulseDot 1.8s ease-out infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(87,191,234,.55); }
  70% { box-shadow: 0 0 0 8px rgba(87,191,234,0); }
  100% { box-shadow: 0 0 0 0 rgba(87,191,234,0); }
}
.hero-title { font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.08; }
.hero-title span { display: block; }
.hero-title .accent-text { background: linear-gradient(90deg, var(--blue), var(--yellow)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin-top: 22px; font-size: 17px; color: var(--fg-muted); max-width: 480px; }
.hero-actions { margin-top: 34px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- mockup card ---------- */
.hero-visual { perspective: 1400px; }
.mockup-card {
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid var(--border); border-radius: 20px; padding: 18px;
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.03) inset;
  transform-style: preserve-3d; transition: transform .15s ease-out;
  animation: floatCard 6s ease-in-out infinite;
}
@keyframes floatCard { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.mockup-titlebar { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.mockup-dots { display: flex; gap: 6px; }
.mockup-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); }
.mockup-tabs { display: flex; gap: 16px; font-size: 12.5px; color: var(--fg-faint); }
.mockup-tabs .active { color: var(--fg); font-weight: 600; }
.live-badge { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--blue); font-weight: 600; }

.mockup-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 16px; }
.stat-card { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 14px; padding: 14px; position: relative; overflow: hidden; }
.stat-card.wide { grid-column: 1 / -1; }
.stat-label { font-size: 11.5px; color: var(--fg-faint); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-top: 4px; }
.spark { width: 100%; height: 30px; margin-top: 8px; }
.spark polyline { fill: none; stroke: var(--yellow); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 200; stroke-dashoffset: 200; transition: stroke-dashoffset 1.4s var(--ease); }
.mockup-card.in-view .spark polyline { stroke-dashoffset: 0; }

.donut { width: 46px; height: 46px; position: absolute; top: 12px; right: 14px; transform: rotate(-90deg); }
.donut-track { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 4; }
.donut-fill { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.4s var(--ease); }
.mockup-card.in-view .donut-fill { stroke-dashoffset: 0.6; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 32px; margin-top: 10px; }
.bars span { flex: 1; background: linear-gradient(180deg, var(--blue), rgba(87,191,234,.25)); border-radius: 3px; height: 0; transition: height 1s var(--ease); }
.mockup-card.in-view .bars span { height: var(--h); }

.log-card { display: flex; flex-direction: column; gap: 8px; }
.log-line { font-size: 12.5px; color: var(--fg-muted); display: flex; align-items: center; gap: 8px; }
.log-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.log-dot.yellow { background: var(--yellow); }
.log-time { margin-left: auto; color: var(--fg-faint); font-size: 11px; }
.mockup-caption { text-align: center; font-size: 11px; color: var(--fg-faint); margin-top: 12px; }

/* ---------- scroll cue ---------- */
.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-faint); z-index: 1;
}
.scroll-cue span { width: 1px; height: 26px; background: linear-gradient(180deg, var(--blue), transparent); animation: scrollLine 1.8s ease-in-out infinite; }
@keyframes scrollLine { 0% { opacity: 0; transform: scaleY(.4); } 50% { opacity: 1; } 100% { opacity: 0; transform: scaleY(1); } }

/* ---------- marquee ---------- */
.marquee-section { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 22px 0; overflow: hidden; }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 50s linear infinite; font-family: var(--font-display); font-size: 15px; color: var(--fg-faint); white-space: nowrap; }
.marquee-track span:nth-child(2n) { color: var(--yellow); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- sections generic ---------- */
.section-head { max-width: 640px; margin: 0 0 48px; text-align: left; padding: 0 24px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: 8px; }
.features, .contact { max-width: 1180px; margin: 0 auto; padding: 100px 24px; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 24px; max-width: 1180px; margin: 0 auto; }
.feature-card {
  background: var(--glass); border: 1px solid var(--border); border-radius: 16px; padding: 26px;
  transition: transform .4s var(--ease), border-color .4s ease, background .4s ease;
  position: relative; overflow: hidden;
}
.feature-card:hover { border-color: rgba(87,191,234,.4); transform: translateY(-6px); background: rgba(255,255,255,.07); }
.feature-icon { width: 42px; height: 42px; border-radius: 10px; background: rgba(87,191,234,.12); color: var(--blue); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--fg-muted); }

/* ---------- cta band ---------- */
.cta-band { padding: 40px 24px 110px; max-width: 1180px; margin: 0 auto; }
.cta-card {
  position: relative; text-align: center; border-radius: 24px; padding: 64px 32px;
  border: 1px solid var(--border); background: linear-gradient(160deg, rgba(87,191,234,.08), rgba(244,217,53,.04));
  overflow: hidden;
}
.cta-glow {
  position: absolute; inset: -40%; background: radial-gradient(circle, rgba(87,191,234,.25), transparent 60%);
  animation: drift 14s ease-in-out infinite; z-index: 0;
}
.cta-card h2, .cta-card p, .cta-card a { position: relative; z-index: 1; }
.cta-card h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.cta-card p { color: var(--fg-muted); margin: 14px auto 30px; max-width: 480px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 0 24px; }
.contact-card {
  background: var(--glass); border: 1px solid var(--border); border-radius: 16px; padding: 28px 20px; text-align: center;
  transition: transform .35s var(--ease), border-color .35s ease, box-shadow .35s ease;
}
.contact-card:hover { transform: translateY(-6px); border-color: var(--blue); box-shadow: 0 16px 40px rgba(87,191,234,.15); }
.contact-avatar {
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: #00082d;
  background: linear-gradient(135deg, var(--blue), var(--yellow));
}
.contact-name { font-weight: 600; color: var(--blue); }
.contact-phone { font-size: 13.5px; color: var(--fg-muted); margin-top: 6px; letter-spacing: .02em; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 24px; display: flex; align-items: center; justify-content: space-between; max-width: 1180px; margin: 0 auto; font-size: 13px; color: var(--fg-faint); }
.footer-logo { height: 22px; opacity: .8; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-visual { order: -1; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 620px) {
  .nav-toggle { display: flex; }
  .features-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .mockup-body { grid-template-columns: 1fr; }
  .nav-inner .btn-ghost.btn-small { display: none; }
  .footer { flex-direction: column; gap: 12px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
