/* THEME DESIGN TOKENS (Cosmic Violet / Midnight Graphite mixed) */
:root {
  --bg-base: #05000A;
  --bg-surface: #1A0A2E;
  --bg-elevated: #281145;
  --text-primary: #f5f5f0;
  --text-secondary: #a1a1aa;
  --text-inverse: #1a1a18;
  --border-subtle: rgba(255,255,255,0.08);
  --border-highlight: rgba(192,132,252,0.3);
  --shadow-ambient: rgba(0,0,0,0.4);
  --glow-accent: rgba(192,132,252,0.15);
  
  --accent: #C084FC;
  --accent-hover: #d8b4fe;
  
  --font-display: 'Clash Display', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --cursor-size: 8px;
}

/* Reset & Global */
* { margin: 0; padding: 0; box-sizing: border-box; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none; /* Custom cursor */
}

a, button { cursor: none; outline: none; }

/* Custom Cursor */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: var(--cursor-size);
  height: var(--cursor-size);
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(192,132,252,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}
.cursor-hover .cursor-dot { width: 40px; height: 40px; background: rgba(192,132,252,0.1); border: 1px solid var(--accent); }
.cursor-hover .cursor-ring { width: 0; height: 0; opacity: 0; }

/* Intro Overlay */
.intro-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.intro-logo {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-primary);
  margin-bottom: 2rem;
  clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0% 100%);
}
.intro-progress {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.intro-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
}

/* Backgrounds */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

#webgl-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% -20%, rgba(192,132,252,0.15), transparent 60%),
              radial-gradient(circle at 0% 100%, rgba(56,189,248,0.1), transparent 50%);
  opacity: 0.6;
}

/* Typography */
h1, h2, h3, .logo, .intro-logo {
  font-family: var(--font-display);
  font-weight: 600;
}
.split-char { display: inline-block; opacity: 0; transform: translateY(20px) rotateX(-45deg); }
.split-word { display: inline-block; white-space: pre; }

/* Nav */
.nav {
  position: fixed;
  top: 0; width: 100%;
  padding: 1.5rem 2rem;
  z-index: 100;
  display: flex;
  justify-content: center;
  mix-blend-mode: difference;
}
.nav-content {
  width: 100%; max-width: 1400px;
  display: flex; justify-content: space-between; align-items: center;
}
.logo { font-size: 1.5rem; letter-spacing: -0.02em; font-weight: 700; color: #fff;}
.nav-links { display: flex; gap: 2.5rem; }
.nav-link { color: #fff; text-decoration: none; font-size: 0.95rem; font-weight: 500; }

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}
.btn-primary { background-color: var(--accent); color: var(--bg-base); }
.btn-primary .btn-bg {
  position: absolute; inset: 0; background: var(--accent-hover);
  transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}
.btn-primary:hover .btn-bg { transform: translateY(0); }
.btn-primary .btn-text { position: relative; z-index: 1; }

.btn-secondary {
  background-color: transparent; color: var(--text-primary);
  border-color: var(--border-subtle);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background-color: rgba(255,255,255,0.05);
  border-color: var(--border-highlight);
}

/* Sections */
.section { padding: 10rem 2rem; max-width: 1400px; margin: 0 auto; }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; max-width: 1400px; margin: 0 auto;
}
.hero-content { flex: 1; max-width: 600px; position: relative; z-index: 2; }
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: 20px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle);
  font-size: 0.85rem; color: var(--accent); margin-bottom: 2rem;
}
.badge-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero-title { font-size: clamp(3.5rem, 7vw, 6.5rem); line-height: 1; margin-bottom: 1.5rem; letter-spacing: -0.03em; }
.accent-glow { 
  background: linear-gradient(135deg, #C084FC, #38bdf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  display: inline-block;
}
.hero-subtitle { font-size: 1.25rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 3rem; font-weight: 300; }
.hero-actions { display: flex; gap: 1rem; }

.hero-visual { flex: 1; display: flex; justify-content: flex-end; position: relative; z-index: 1; }
.perspective-wrapper { perspective: 1200px; transform-style: preserve-3d; }

/* Advanced Liquid Glass */
.liquid-glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
  backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 20px 40px var(--shadow-ambient);
  border-radius: 16px;
}
.liquid-glass-refraction {
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
  backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid var(--border-subtle);
  border-radius: 16px; transition: all 0.4s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.liquid-glass-refraction:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  border-color: var(--border-highlight);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px var(--glow-accent);
}

/* Terminal Mockup */
.terminal-mockup { width: 100%; max-width: 600px; transform: rotateY(-15deg) rotateX(10deg); transition: transform 0.1s; }
.terminal-bar { padding: 1rem; background: rgba(0,0,0,0.4); display: flex; align-items: center; border-bottom: 1px solid var(--border-subtle); }
.dots span { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; }
.dots span:nth-child(1) { background: #ff5f57; }
.dots span:nth-child(2) { background: #febc2e; }
.dots span:nth-child(3) { background: #28c840; }
.terminal-bar .title { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-secondary); margin-left: 1rem; }
.terminal-body { padding: 2rem; font-family: var(--font-mono); font-size: 0.95rem; line-height: 1.8; }
.prompt { color: var(--accent); font-weight: 700; }
.highlight { color: #fff; font-weight: 600; }
.term-cursor { display: inline-block; width: 10px; height: 18px; background: var(--accent); vertical-align: text-bottom; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.bar-chart { color: var(--text-secondary); }
.bar-chart { background: linear-gradient(90deg, var(--accent), #38bdf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Showcase Horizontal Scroll Section */
.showcase-section { position: relative; width: 100%; max-width: 100%; overflow: hidden; padding-bottom: 0; padding-top: 5rem; }
.showcase-content { max-width: 1400px; margin: 0 auto; padding: 0 2rem 4rem; }
.section-title { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 1rem; letter-spacing: -0.02em; }
.section-subtitle { font-size: 1.25rem; color: var(--text-secondary); }
.horizontal-scroll-container { width: 100vw; height: 500px; margin-left: calc(-50vw + 50%); position: relative; }
.horizontal-scroll-track { display: flex; gap: 2rem; padding: 0 2rem; height: 100%; position: absolute; left: 0; top: 0; }
.h-card {
  width: 450px; height: 350px; flex-shrink: 0;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 3rem;
}
.h-card h3 { font-size: 2rem; margin-bottom: 1rem; }
.h-card p { color: var(--text-secondary); font-size: 1.1rem; line-height: 1.6; }

/* Bento Grid */
.bento-section { padding-top: 5rem; }
.section-header { margin-bottom: 4rem; }
.bento-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 350px); gap: 2rem;
}
.bento-cell { padding: 3rem; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.cell-large { grid-column: span 2; grid-row: span 2; }
.cell-small { grid-column: span 1; grid-row: span 1; }
.cell-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.3; transition: opacity 0.5s;}
.bento-cell:hover .cell-bg { opacity: 0.5; }
.gradient-mesh {
  background: radial-gradient(circle at 100% 100%, var(--glow-accent), transparent 50%),
              radial-gradient(circle at 0% 0%, rgba(56,189,248,0.1), transparent 50%);
}
.cell-content, .cell-visual { position: relative; z-index: 1; }
.cell-icon { font-size: 2.5rem; margin-bottom: 1.5rem; }
.cell-content h3 { font-size: 2rem; margin-bottom: 1rem; font-weight: 500; }
.cell-content p { color: var(--text-secondary); font-size: 1.1rem; line-height: 1.6; }

.dynamic-chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; margin-top: auto; opacity: 0.8; }
.dynamic-chart .bar { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; min-width: 10px; transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1); }

/* Install */
.install-section { text-align: center; position: relative; padding-bottom: 10rem; }
.install-container { padding: 5rem; max-width: 900px; margin: 0 auto; position: relative; overflow: hidden; }
.glow-orb { position: absolute; top: -50%; left: 50%; transform: translateX(-50%); width: 300px; height: 300px; background: var(--accent); filter: blur(150px); opacity: 0.3; border-radius: 50%; z-index: 0; pointer-events: none;}
.install-container h2, .install-container p, .code-block { position: relative; z-index: 1; }
.install-container p { color: var(--text-secondary); font-size: 1.2rem; margin: 1.5rem 0 3rem; }
.code-block { background: rgba(0,0,0,0.5); border: 1px solid var(--border-subtle); border-radius: 12px; text-align: left; transition: transform 0.3s; }
.code-header { background: rgba(255,255,255,0.03); padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-subtle); display: flex; gap: 8px;}
.code-body { padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.code-body code { font-family: var(--font-mono); color: var(--accent); font-size: 1.1rem; }
.copy-btn { background: rgba(255,255,255,0.1); border: 1px solid transparent; color: #fff; padding: 0.5rem 1.2rem; border-radius: 6px; font-weight: 500; transition: all 0.2s;}
.copy-btn:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.1); }

/* Footer */
.footer { background: var(--bg-surface); padding: 4rem 2rem; border-top: 1px solid var(--border-subtle); }
.footer-content { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.footer-logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #fff;}
.footer p { color: var(--text-secondary); }
.footer-links a { color: var(--text-primary); text-decoration: none; font-weight: 500; }

@media (max-width: 1000px) {
  .hero { flex-direction: column; text-align: center; padding-top: 8rem; gap: 4rem;}
  .hero-visual { justify-content: center; }
  .terminal-mockup { transform: none; }
  .bento-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .cell-large, .cell-small { grid-column: span 1; grid-row: auto; }
  .horizontal-scroll-container { display: none; }
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
  a, button { cursor: pointer; }
}
