/* --- 1. CONFIGURATION & VARIABLES --- */
:root {
  --bg: #030712;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --accent: #0ea5e9;
  --glow: rgba(99, 102, 241, 0.5);
  
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.1);
  --nav-bg: rgba(3, 7, 18, 0.85);
  --nav-border: rgba(255, 255, 255, 0.2);
  --radius: 24px;
  --line-color: #cbd5e1;
}

[data-theme="light"] {
  --bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --primary: #4f46e5;
  --accent: #0284c7;
  --glow: rgba(79, 70, 229, 0.3);
  --card-bg: rgba(0, 0, 0, 0.02);
  --card-border: rgba(0, 0, 0, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --nav-border: rgba(0, 0, 0, 0.15);
  --line-color: #94a3b8;
}

[data-theme="dark"] {
  --line-color: #ffffff; 
}

/* --- 2. BASE STYLES --- */
* { box-sizing: border-box; margin: 0; padding: 0; cursor: none; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s ease;
}

h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.03em; }
a { text-decoration: none; color: inherit; cursor: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 6%; position: relative; z-index: 2; }

/* --- 3. CUSTOM CURSOR --- */
#cursor {
  position: fixed; top: 0; left: 0; 
  width: 20px; height: 20px;
  border: 2px solid var(--text-main);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background-color 0.3s;
  mix-blend-mode: difference;
}
#cursor.hovered {
  width: 50px; height: 50px;
  background-color: rgba(255, 255, 255, 0.2);
  border-color: transparent;
  backdrop-filter: blur(2px);
}

/* --- 4. CANVAS PARTICLES --- */
#canvas-container {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; opacity: 0.6; pointer-events: none;
  background: var(--bg);
}

/* --- 5. INTRO OVERLAY --- */
#intro-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg);
  transition: opacity 0.8s ease;
}
.intro-text {
  font-size: 4rem; font-weight: 800; color: var(--text-main);
  background: linear-gradient(to right, var(--text-main), var(--text-muted));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* --- 6. NAVIGATION --- */
header { 
  position: fixed; top: 30px; width: 100%; z-index: 100; 
  display: flex; justify-content: center; 
}
.nav-box {
  width: 90%; max-width: 900px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--nav-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border-radius: 99px; padding: 16px 32px;
  display: flex; justify-content: space-between; align-items: center;
}
.brand { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 30px; font-size: 0.95rem; font-weight: 500; }
.nav-links a { opacity: 0.8; transition: opacity 0.3s; }
.nav-links a:hover { opacity: 1; color: var(--primary); }
.btn-icon { background: none; border: none; font-size: 1.2rem; padding: 5px; opacity: 0.8; transition: transform 0.2s; }
.btn-icon:hover { transform: rotate(15deg) scale(1.1); opacity: 1; }
@media (max-width: 768px) { .nav-links { display: none; } }

/* --- 7. HERO SECTION --- */
.hero-wrapper { 
  min-height: 100vh; 
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; 
  z-index: 1; 
  padding-top: 100px; /* offset for nav */
}
.hero-content {
  text-align: center; 
  width: 100%;
}
.hero-title {
  font-size: clamp(3rem, 8vw, 6rem); line-height: 1; font-weight: 800;
  margin-bottom: 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--text-muted));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-highlight {
  display: block; color: var(--primary); -webkit-text-fill-color: var(--primary);
  filter: drop-shadow(0 0 20px var(--glow));
  transition: opacity 0.5s ease;
}
.hero-desc { 
  font-size: 1.2rem; color: var(--text-muted); max-width: 600px; 
  margin: 0 auto 40px auto; line-height: 1.8; text-align: center;
}
.btn-glow {
  position: relative; padding: 16px 36px; border-radius: 99px;
  background: var(--text-main); color: var(--bg); font-weight: 600;
  overflow: hidden; transition: transform 0.2s; display: inline-block;
}
.btn-glow:hover { transform: scale(1.05); }

/* --- 8. TICKER --- */
.ticker-wrap {
  width: 100%; padding: 30px 0; background: var(--card-bg);
  border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(5px); position: relative; z-index: 2;
  overflow: hidden; white-space: nowrap;
}
.ticker { display: inline-flex; animation: scroll 30s linear infinite; }
.ticker-item {
  font-family: 'Space Grotesk'; font-size: 1.5rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; padding: 0 40px; display: flex; align-items: center; gap: 10px;
}
.ticker-item:hover { color: var(--primary); }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- 9. BENTO GRID --- */
.content-layer {
  position: relative; z-index: 5; 
  background: transparent; 
  padding-bottom: 100px; 
}
.content-layer::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, transparent, var(--bg) 90%);
  opacity: 0.8;
}

.section-header { text-align: center; margin: 100px 0 60px; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 10px; }
.bento-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.card {
  background: rgba(255, 255, 255, 0.03); 
  border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 40px;
  position: relative; overflow: hidden; cursor: none;
  backdrop-filter: blur(10px);
  transition: transform 0.2s;
}
[data-theme="light"] .card { background: rgba(255,255,255, 0.6); }

.card:hover { transform: translateY(-5px); }
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
  opacity: 0; transition: opacity 0.5s; pointer-events: none; z-index: 1;
}
.card:hover::before { opacity: 1; }
.card-content { position: relative; z-index: 2; }
.card-icon { font-size: 2.5rem; margin-bottom: 20px; display: inline-block; filter: grayscale(1); transition: 0.3s; }
.card:hover .card-icon { filter: grayscale(0); transform: scale(1.1); }
.card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.card p { color: var(--text-muted); font-size: 1rem; }

/* --- 10. FOOTER --- */
footer { text-align: center; padding: 80px 0 40px; color: var(--text-muted); border-top: 1px solid var(--card-border); }