/* ═══════════════════════════════════════════════════════════════════════════
   MAXZEETON.NG — BASE STYLES
   CSS Variables, Resets, Typography, Background Effects, Utilities
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ────────────────────────────────────────────────────────── */
:root {
  /* ── BACKGROUNDS ── */
  --bg-page:        #f8f9fa;      /* Main page background (white/light grey) */
  --bg-dark:        #0d0f1a;      /* Used ONLY for hero section overlay */
  --bg-card:        #ffffff;      /* Card backgrounds */
  --bg-card-hover:  #fef2f2;      /* Card hover (very faint red tint) */
  --bg-section-alt: #f4f4f6;      /* Alternating section bg */

  /* ── BRAND COLORS ── */
  --red:            #d6001c;      /* PRIMARY — Maxzeeton brand red (from logo) */
  --red-deep:       #b00018;      /* Darker red for hover states */
  --red-dim:        rgba(214,0,28,0.10);   /* Red tint for backgrounds */
  --red-glow:       rgba(214,0,28,0.25);   /* Red glow for shadows */
  --red-border:     rgba(214,0,28,0.20);   /* Red border tint */

  /* ── TEXT ── */
  --text-primary:   #0d0f1a;      /* Main body text (deep charcoal) */
  --text-muted:     #6b7280;      /* Muted/secondary text */
  --text-white:     #f8f9fa;      /* Text on dark backgrounds (hero only) */

  /* ── BORDERS & DIVIDERS ── */
  --border:         rgba(0,0,0,0.08);       /* Default light border */
  --border-strong:  rgba(0,0,0,0.15);       /* Stronger border */

  /* ── SECONDARY ACCENTS (keep from original) ── */
  --blue:           #0ea5e9;      /* Secondary accent — links, info */
  --blue-dim:       rgba(14,165,233,0.10);
  --orange:         #f97316;      /* Courses/Academy CTA only */

  /* ── LEGACY ALIASES (so existing code doesn't break) ── */
  /* These map old variable names to new values */
  --black:          #0d0f1a;      /* Was page bg, now dark-only (hero) */
  --dark:           #1a1c2e;
  --card:           #ffffff;      /* Cards are now white */
  --teal:           #d6001c;      /* REPLACE teal with red everywhere */
  --teal-dim:       rgba(214,0,28,0.10);
  --teal-glow:      rgba(214,0,28,0.25);
  --white:          #0d0f1a;      /* Was white text, now dark text */
  --muted:          #6b7280;
  --text-light:     #4b5563;      /* Darker for readability on light bg */

  /* ── FONTS (unchanged) ── */
  --font-display: 'Syne', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-body:    'Outfit', sans-serif;
}

/* ── RESET ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body[data-auth-pending='true'] main {
  visibility: hidden;
}

body[data-teacher-auth-gated]:not(.teacher-auth-ready),
body[data-admin-auth-gated]:not(.admin-auth-ready) {
  visibility: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

/* ── TYPOGRAPHY ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 8vw, 2rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
}

p {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.7;
  color: var(--text-primary);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.text-red { color: var(--red); }
.text-teal { color: var(--red); }
.text-blue { color: var(--blue); }
.text-orange { color: var(--orange); }
.text-muted { color: var(--text-muted); }

/* ── BACKGROUND EFFECTS ────────────────────────────────────────────────────── */

/* Grid Overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(214,0,28,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214,0,28,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Ambient Orbs */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: drift 20s ease-in-out infinite;
}

.bg-orb:nth-child(1) {
  width: 500px;
  height: 500px;
  background: rgba(214,0,28,0.07);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.bg-orb:nth-child(2) {
  width: 400px;
  height: 400px;
  background: rgba(214,0,28,0.05);
  top: 40%;
  right: -5%;
  animation-delay: 5s;
  animation-duration: 30s;
}

.bg-orb:nth-child(3) {
  width: 450px;
  height: 450px;
  background: rgba(247,113,22,0.04);
  bottom: -15%;
  left: 50%;
  animation-delay: 10s;
  animation-duration: 35s;
}

/* Scan Line */
.scan-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(214,0,28,0.4), transparent);
  opacity: 0.05;
  z-index: 1;
  pointer-events: none;
  animation: scan 8s linear infinite;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-40px, 30px) scale(0.9); }
}

@keyframes scan {
  0% { top: 0; opacity: 0; }
  50% { opacity: 0.05; }
  100% { top: 100%; opacity: 0; }
}

/* ── LAYOUT ────────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  position: relative;
  z-index: 1;
  padding: 60px 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--muted);
  text-align: center;
  max-width: 700px;
  margin: -32px auto 48px;
}

/* ── UTILITIES ─────────────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.hidden { display: none; }
.block { display: block; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

/* ── GLOBAL SCROLL TO TOP ─────────────────────────────────────────────────── */
.scroll-top-btn {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 998;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--red);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 10px 24px rgba(214, 0, 28, 0.28);
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.scroll-top-btn:hover {
  box-shadow: 0 14px 30px rgba(214, 0, 28, 0.35);
}

@media (max-width: 640px) {
  .container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 11px;
  }

  .scroll-top-btn {
    right: 14px;
    bottom: 76px;
    width: 42px;
    height: 42px;
  }
}

/* ── Z-INDEX LAYERS ────────────────-------──────────────────────────────────────── */
/* 0 = background effects */
/* 1 = content */
/* 100 = navbar */
/* 1000 = mobile menu, modals */
