/* ==========================================================
   STAZ — Premium SaaS marketing site
   Design tokens + base styles
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand */
  --brand-500: #2D7CFF;
  --brand-400: #4A93FF;
  --brand-600: #1E63E0;
  --brand-300: #7DB3FF;
  --brand-cyan: #5BC9FF;
  --brand-deep: #0B3FA8;

  /* Dark surfaces (default) */
  --bg-0: #05080F;
  --bg-1: #0A0E1F;
  --bg-2: #10162B;
  --bg-3: #161E38;
  --surface: rgba(20, 28, 52, 0.6);
  --surface-strong: rgba(20, 28, 52, 0.85);
  --border: rgba(120, 145, 200, 0.12);
  --border-strong: rgba(120, 145, 200, 0.22);

  /* Text */
  --fg: #E8ECF7;
  --fg-muted: #9AA4BE;
  --fg-dim: #6B7596;

  /* Accent (controlled by tweaks) */
  --accent: #2D7CFF;
  --accent-soft: rgba(45, 124, 255, 0.14);
  --accent-glow: rgba(45, 124, 255, 0.45);

  /* Type */
  --font-sans: 'Geist', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 60px var(--accent-glow);
}

[data-theme="light"] {
  --bg-0: #FBFCFE;
  --bg-1: #F4F6FB;
  --bg-2: #EAEEF7;
  --bg-3: #DEE3F0;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --border: rgba(20, 30, 60, 0.08);
  --border-strong: rgba(20, 30, 60, 0.16);
  --fg: #0A0E1F;
  --fg-muted: #4A5575;
  --fg-dim: #7A85A0;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-0);
  color: var(--fg);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
body {
  overflow-x: hidden;
  min-height: 100vh;
}

/* Atmospheric background */
.atmosphere {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(45,124,255,0.18), transparent 60%),
    radial-gradient(800px 600px at 100% 10%, rgba(91,201,255,0.12), transparent 60%),
    radial-gradient(1200px 800px at 50% 110%, rgba(45,124,255,0.10), transparent 60%);
}
[data-theme="light"] .atmosphere {
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(45,124,255,0.10), transparent 60%),
    radial-gradient(800px 600px at 100% 10%, rgba(91,201,255,0.08), transparent 60%),
    radial-gradient(1200px 800px at 50% 110%, rgba(45,124,255,0.06), transparent 60%);
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Grid lines bg */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
}

/* Typography */
h1, h2, h3, h4, h5 { margin: 0; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Containers */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  border: 1px solid transparent;
  transition: all 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, color-mix(in oklab, var(--accent) 80%, black) 100%);
  color: white;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 1px 2px rgba(0,0,0,0.2),
    0 8px 24px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    0 2px 4px rgba(0,0,0,0.2),
    0 12px 32px var(--accent-glow);
}
.btn-ghost {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--border-strong);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover {
  background: var(--surface-strong);
  border-color: var(--accent);
}
.btn-link {
  background: transparent;
  color: var(--fg);
  height: auto; padding: 8px 0;
}
.btn-link:hover { color: var(--accent); }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}
.card-hover {
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 300ms;
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.tilt-card {
  isolation: isolate;
  will-change: transform;
  transition: transform 200ms ease-out, border-color 240ms ease, box-shadow 240ms ease;
}
.tilt-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 24px 70px rgba(0,0,0,0.24);
}
.tilt-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  transform: translateZ(24px);
}
.tilt-card-spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.tilt-card-spotlight span {
  position: absolute;
  width: 180%;
  height: 180%;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle,
      rgba(255,255,255,0.18) 0%,
      rgba(60,168,255,0.16) 18%,
      transparent 46%);
}

@media (prefers-reduced-motion: reduce) {
  .tilt-card {
    transform: none !important;
    transition: border-color 160ms ease, box-shadow 160ms ease;
  }
  .tilt-card-content {
    transform: none;
  }
  .tilt-card-spotlight {
    display: none;
  }
}

/* Aurora background */
.aurora-background {
  position: relative;
  overflow: hidden;
}
.aurora-background-content {
  position: relative;
  z-index: 2;
}
.aurora-layer {
  position: absolute;
  inset: -14%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.48;
  filter: blur(14px);
  mix-blend-mode: screen;
  will-change: background-position, transform;
  background-image:
    repeating-linear-gradient(100deg,
      rgba(255,255,255,0.02) 0%,
      rgba(255,255,255,0.02) 7%,
      transparent 10%,
      transparent 12%,
      rgba(255,255,255,0.02) 16%),
    repeating-linear-gradient(100deg,
      var(--accent) 10%,
      var(--brand-cyan) 15%,
      #7c6dff 20%,
      rgba(255,255,255,0.24) 25%,
      var(--accent) 30%);
  background-size: 320% 320%, 220% 220%;
  background-position: 50% 50%, 50% 50%;
  animation: auroraShift 36s linear infinite;
}
.aurora-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.22), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(91,201,255,0.22), transparent 34%),
    radial-gradient(circle at 50% 80%, rgba(139,92,246,0.22), transparent 34%);
  mix-blend-mode: overlay;
}
.aurora-layer-mask {
  mask-image: radial-gradient(ellipse at 80% 0%, black 8%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 0%, black 8%, transparent 72%);
}
[data-theme="light"] .aurora-layer {
  opacity: 0.28;
  mix-blend-mode: multiply;
}
@keyframes auroraShift {
  from { background-position: 50% 50%, 50% 50%; transform: translate3d(0,0,0) rotate(0deg); }
  to { background-position: 350% 50%, 350% 50%; transform: translate3d(2%, -1%, 0) rotate(1deg); }
}

/* Animated hero word */
.hero-animated-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: -8px auto 28px;
  color: var(--fg-muted);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.4;
}
.animated-hero-word {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(128px, 18vw, 220px);
  min-height: 34px;
  padding: 5px 12px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--fg);
  font-weight: 600;
}
.animated-hero-word > span {
  position: absolute;
}

/* Container scroll animation */
.container-scroll {
  min-height: clamp(780px, 110vh, 1080px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}
.container-scroll-perspective {
  width: 100%;
  perspective: 1200px;
}
.container-scroll-title {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  will-change: transform;
}
.container-scroll-card {
  width: min(100%, 1120px);
  margin: 38px auto 0;
  padding: clamp(8px, 1.4vw, 18px);
  border: 1px solid var(--border-strong);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    var(--bg-2);
  box-shadow:
    0 16px 34px rgba(0,0,0,0.24),
    0 58px 80px rgba(0,0,0,0.18);
  transform-origin: 50% 0%;
  transform-style: preserve-3d;
  will-change: transform;
}
.container-scroll-card-inner {
  overflow: hidden;
  border-radius: 22px;
  background: var(--bg-1);
}
.container-scroll-card-inner .dash-window {
  margin: 0;
  border-radius: 22px;
}
@media (max-width: 720px) {
  .hero-animated-row {
    flex-direction: column;
    gap: 8px;
    margin-top: -2px;
  }
  .container-scroll {
    min-height: auto;
    padding: 0;
  }
  .container-scroll-card {
    margin-top: 28px;
    transform: none !important;
    border-radius: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .aurora-layer {
    animation: none;
  }
  .container-scroll-title,
  .container-scroll-card {
    transform: none !important;
  }
}

/* Eyebrow */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: var(--accent-soft);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* Section title */
.section-title {
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
  background: linear-gradient(180deg, var(--fg) 0%, color-mix(in oklab, var(--fg) 65%, var(--bg-0)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-sub {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--fg-muted);
  max-width: 640px;
  line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border-radius: 100px;
  border: 2px solid var(--bg-0);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Selection */
::selection { background: var(--accent); color: white; }

/* Utilities */
.flex { display: flex; }
.grid { display: grid; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.relative { position: relative; }
.full { width: 100%; }

/* Loader */
.loader-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg-0);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 32px;
  overflow: hidden;
}
.loader-screen::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 50% 50%, rgba(45,124,255,0.2), transparent 60%);
}

/* Page transitions */
.page-enter {
  animation: pageEnter 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard mockup styles */
.dash-window {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 30px 80px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.02);
}
[data-theme="light"] .dash-window {
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,1) inset,
    0 30px 80px rgba(20,30,60,0.18),
    0 0 0 1px rgba(20,30,60,0.04);
}

/* Sticky logo S animation */
.s-shape {
  filter: drop-shadow(0 0 24px var(--accent-glow));
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Glass divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 20%, var(--border-strong) 80%, transparent);
}

/* Marquee */
.marquee {
  display: flex; overflow: hidden; gap: 64px;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex; gap: 64px;
  animation: marquee 40s linear infinite;
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* Hide scrollbar in webkit for marquees */
.no-scrollbar::-webkit-scrollbar { display: none; }

/* Section progress dots — hide on mobile */
@media (max-width: 980px) {
  .section-progress { display: none !important; }
}
