/* ProX Digital — base styles */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

:root {
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --yellow: #FBFF0E;
  --purple: #320487;
  --purple-mid: #4A0BC4;
  --purple-light: #7C3AED;
}

/* DARK (default) */
:root, [data-theme="dark"] {
  --bg-base: #0A0612;
  --bg-surface: #110920;
  --bg-elevated: #16092a;
  --fg-1: #F5F0FF;
  --fg-2: rgba(245, 240, 255, 0.7);
  --fg-3: rgba(245, 240, 255, 0.62);
  --fg-4: rgba(245, 240, 255, 0.22);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.12);
  --glass-bg: rgba(50, 4, 135, 0.22);
  --glass-bg-hover: rgba(50, 4, 135, 0.35);
  --glass-border: rgba(251, 255, 14, 0.14);
  --glass-border-hover: rgba(251, 255, 14, 0.35);
  --accent: #FBFF0E;
  --accent-fg: #0A0612;
  --hero-blob-1: rgba(74, 11, 196, 0.40);
  --hero-blob-2: rgba(124, 58, 237, 0.18);
  --hero-blob-3: rgba(251, 255, 14, 0.06);
  --grain-opacity: 0.5;
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-elevated: 0 16px 48px rgba(0,0,0,0.5);
}

/* LIGHT */
[data-theme="light"] {
  --bg-base: #F7F5FB;
  --bg-surface: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --fg-1: #1A0F32;
  --fg-2: rgba(26, 15, 50, 0.72);
  --fg-3: rgba(26, 15, 50, 0.65);
  --fg-4: rgba(26, 15, 50, 0.22);
  --border-subtle: rgba(50, 4, 135, 0.08);
  --border-default: rgba(50, 4, 135, 0.14);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-hover: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(50, 4, 135, 0.12);
  --glass-border-hover: rgba(50, 4, 135, 0.28);
  --accent: #320487;
  --accent-fg: #FFFFFF;
  --hero-blob-1: rgba(124, 58, 237, 0.18);
  --hero-blob-2: rgba(74, 11, 196, 0.10);
  --hero-blob-3: rgba(251, 255, 14, 0.20);
  --grain-opacity: 0.18;
  --shadow-card: 0 8px 28px rgba(50, 4, 135, 0.08);
  --shadow-elevated: 0 16px 48px rgba(50, 4, 135, 0.14);
  --bg-overlay: rgba(247, 245, 251, 0.88);
}

body {
  background: var(--bg-base);
  color: var(--fg-1);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  -webkit-font-smoothing: antialiased;
}

/* Subtle grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--grain-opacity);
  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.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.3  0 0 0 0 0.6  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

::selection { background: rgba(251,255,14,0.3); color: var(--fg-1); }
[data-theme="light"] ::selection { background: rgba(50,4,135,0.18); color: var(--fg-1); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--fg-4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-3); }

/* ─── Reusable utilities ─────────────────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--fg-3);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--fg-1);
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.h-display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 5.6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--fg-1);
  text-wrap: balance;
}

.h-section {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 3.8vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--fg-1);
  text-wrap: balance;
}

.lead {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--fg-2);
  font-weight: 400;
  text-wrap: pretty;
}

/* Section gradient orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  z-index: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s, background 0.25s, border-color 0.25s, color 0.25s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}
[data-theme="dark"] .btn-primary { box-shadow: 0 0 20px rgba(251,255,14,0.25); }
.btn-primary:hover {
  transform: translateY(-2px);
}
[data-theme="dark"] .btn-primary:hover { box-shadow: 0 0 28px rgba(251,255,14,0.45), 0 0 60px rgba(251,255,14,0.18); }
[data-theme="light"] .btn-primary:hover { box-shadow: 0 8px 24px rgba(50,4,135,0.32); }

.btn-secondary {
  background: var(--glass-bg);
  color: var(--fg-1);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.btn-secondary:hover {
  border-color: var(--glass-border-hover);
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-2);
  border: 1px solid var(--border-default);
  padding: 12px 22px;
}
.btn-ghost:hover {
  color: var(--fg-1);
  border-color: var(--fg-3);
}

/* Glass card */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

/* Section spacing */
section { position: relative; z-index: 2; }
.section-pad { padding: 120px 0; }
.section-pad-sm { padding: 80px 0; }

@media (max-width: 720px) {
  .section-pad { padding: 80px 0; }
  .section-pad-sm { padding: 56px 0; }
  .container { padding: 0 22px; }
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Text helpers */
.text-accent { color: var(--accent); }
.text-muted { color: var(--fg-3); }
.text-mono { font-family: var(--font-mono); }

/* dot accent (numbered list) */
.num-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-3);
  letter-spacing: 0.08em;
}

/* ─── Reveal & Hero animations ──────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--reveal-delay, 0) * 1ms);
  }
  .reveal.visible {
    opacity: 1;
    transform: none;
  }
  .hero-enter {
    animation: heroUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--d, 0ms);
  }
  @keyframes heroUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
  }
  .path-draw {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: drawPath 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--d, 0.8s);
  }
  @keyframes drawPath {
    to { stroke-dashoffset: 0; }
  }
}
