/* ============================================
   CODE NEST STUDIOS - UNIFIED DARK THEME
   Grade 9 Math Practice
   ============================================ */

:root {
  /* === Core Palette (Dark Mode) === */
  --bg-body: #0f172a;
  /* Deep Slate */
  --bg-card: rgba(30, 41, 59, 0.7);
  /* Glassy Slate */
  --bg-glass: rgba(15, 23, 42, 0.6);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-highlight: #38bdf8;
  /* Sky Blue */

  /* === Brand Colors === */
  --primary: #6366f1;
  /* Indigo */
  --primary-glow: rgba(99, 102, 241, 0.4);
  --accent: #06b6d4;
  /* Cyan */
  --accent-pink: #ec4899;
  /* Pink for contrasts */

  --border: rgba(148, 163, 184, 0.1);

  /* === Gradients === */
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--accent));
  --gradient-text: linear-gradient(to right, #818cf8, #22d3ee);

  /* === Typography === */
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* === Compatibility Colors (Dark Mode) === */
  --bg-secondary: #1e293b;
  /* Lighter Slate for sections */
  --bg-tertiary: #334155;
  /* Even lighter for highlights */
  --text-secondary: #cbd5e1;
  /* Light gray for readability */

  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --radius-lg: 24px;
  --radius-btn: 50px;
}

/* === Base Styles === */
body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-body);
  margin: 0;
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: white;
  margin-top: 0;
  font-weight: 700;
}

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

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

.text-center {
  text-align: center;
}

.section {
  padding: 80px 0;
}

.bg-primary {
  background-color: var(--bg-body);
}

.bg-secondary {
  background-color: var(--bg-secondary);
}

.bg-tertiary {
  background-color: var(--bg-tertiary);
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* === Components === */

/* Navbar (Glass) */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-family: var(--font-heading);
  font-size: 1.25rem;
}

.navbar-logo {
  background: var(--primary);
  color: white;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.8rem;
}

.navbar-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-menu a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: white;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.navbar-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: white;
  margin: 5px 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 30px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 10px 30px -10px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -10px var(--primary-glow);
}

.btn-outline {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.btn-outline:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

.btn-large {
  padding: 14px 40px;
  font-size: 1.1rem;
}

/* Hero */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  text-align: center;
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* Cards (Glass) */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: 0.4s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px -20px black;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.subject-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

/* Features Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.feature-item {
  text-align: left;
  padding: 25px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 15px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 80px 0 30px;
  margin-top: 50px;
  background: rgba(0, 0, 0, 0.2);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer h4 {
  color: white;
  margin-bottom: 20px;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer li {
  margin-bottom: 10px;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  color: rgba(255, 255, 255, 0.3);
}

/* Animation Utils */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s forwards;
}

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

  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .navbar-menu {
    display: none;
  }

  /* Mobile menu toggle logic needed in JS */
  .navbar-toggle {
    display: block;
  }
}