:root {
  /* MODE CLAIR PREMIUM */
  --bg-color: #f6f8fb;
  --panel-bg: rgba(255, 255, 255, 0.85);
  --panel-border: rgba(0, 0, 0, 0.05);
  --text-primary: #1a1e2b;
  --text-secondary: #4a5568;
  --accent-1: #005bea;
  --accent-2: #00c6fb;
  --accent-glow: rgba(0, 91, 234, 0.15);
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-display: 'Outfit', -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.8rem;
  letter-spacing: -1px;
}

h3 {
  font-size: 1.6rem;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

.subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.accent-gradient {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 8rem 0;
  position: relative;
  z-index: 10;
}

.alt-bg {
  background: rgba(0, 0, 0, 0.015);
  border-top: 1px solid rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header p {
  font-size: 1.2rem;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

.section-header span {
  color: var(--accent-1);
}

/* Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Glassmorphism */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--panel-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo span {
  color: var(--accent-1);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-1);
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2.2rem;
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 91, 234, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--accent-1);
  border: 1.5px solid var(--accent-1);
}

.btn-outline:hover {
  background: rgba(0, 91, 234, 0.05);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 10;
  padding: 0 2rem;
  padding-top: 5rem;
}

.hero-content {
  max-width: 900px;
}

.reveal-text {
  font-size: 5rem;
  letter-spacing: -2px;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s ease forwards 0.2s;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease forwards 0.5s;
}

.cta-group {
  margin-top: 3rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  opacity: 0.8;
  color: var(--text-secondary);
}

.scroll-indicator span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

.mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-secondary);
  border-radius: 12px;
  position: relative;
}

.mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 2px;
  animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Feature Cards */
.feature-card {
  text-align: center;
  padding: 3rem 2rem;
}

.feature-card .icon {
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.highlight-on-hover:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 91, 234, 0.2);
  box-shadow: 0 15px 40px rgba(0, 91, 234, 0.08);
}

/* Visual Components */
.visual-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.animation-container {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
}

.caption {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  text-align: center;
  font-style: italic;
  color: var(--text-secondary);
}

/* Math Equations Display */
.equations-showcase {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.eq-block {
  text-align: center;
  padding: 2.5rem;
}

.eq-title {
  font-size: 1.25rem;
  font-family: var(--font-display);
  color: var(--accent-1);
  margin-bottom: 1rem;
  font-weight: 700;
}

.math-display {
  font-size: 1.5rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  border-left: 4px solid var(--accent-1);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
  color: var(--text-primary);
  overflow-x: auto;
}

.eq-desc {
  font-size: 1rem;
  margin-bottom: 0;
}

/* Wide panel */
.glass-panel.wide {
  max-width: 1000px;
  margin: 0 auto;
}

.glass-panel.wide p {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.glass-panel.wide p:last-child {
  margin-bottom: 0;
}

/* Footer */
footer {
  border-top: 1px solid rgba(0,0,0,0.05);
  padding: 4rem 0;
  background: rgba(255,255,255,0.5);
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  margin-bottom: 1rem;
}

.footer-content p {
  max-width: 500px;
  font-size: 1rem;
  color: var(--text-secondary);
}

.copyright {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content h1.reveal-text {
    font-size: 3.2rem;
  }
  
  .hero {
    padding-top: 6rem;
  }

  h2 {
    font-size: 2.2rem;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .menu-btn {
    display: block;
  }
  
  .cta-group {
    flex-direction: column;
  }
  
  .section {
    padding: 5rem 0;
  }
  
  .math-display {
    font-size: 1.1rem;
    padding: 1rem;
  }
}

/* -------------------------------------------
   RESPONSIVE TEXT & OVERFLOW FIXES (Mobile)
   ------------------------------------------- */
body {
    word-break: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}
.math-display, .math-box, .ia-content, pre, code {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}
@media (max-width: 768px) {
    .glass-panel {
        padding: 1.5rem !important;
    }
    .ia-details {
        padding: 1rem 1.2rem !important;
    }
    .hero h1 {
        font-size: 2.2rem !important;
    }
    .section {
        padding: 4rem 0 !important;
    }
    .container {
        padding: 0 1rem !important;
    }
}
