:root {
  --bg: #060814;
  --bg-alt: #0a0e20;
  --blue: #2E6BFF;
  --blue-light: #2E9BFF;
  --purple: #6B3FF2;
  --purple-light: #9B3FE0;
  --white: #f4f6ff;
  --muted: #9aa3c4;
  --border: rgba(255, 255, 255, 0.08);
  --gradient: linear-gradient(135deg, var(--blue-light), var(--blue), var(--purple), var(--purple-light));
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo { width: 90px; animation: pulse 1.6s ease-in-out infinite; }
.loader-bar { width: 200px; height: 3px; background: var(--border); border-radius: 4px; overflow: hidden; }
.loader-fill { width: 0%; height: 100%; background: var(--gradient); animation: loading 1.4s ease forwards; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.7; } }
@keyframes loading { to { width: 100%; } }

/* 3D background canvas */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s ease, padding 0.3s ease, backdrop-filter 0.3s ease;
}
.navbar.scrolled {
  background: rgba(6, 8, 20, 0.75);
  backdrop-filter: blur(16px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 40px; height: 40px; }
.brand-name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  font-weight: 500;
}
.brand-name strong {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.25s ease;
  position: relative;
}
.nav-links a:hover { color: var(--white); }
.nav-cta { flex-shrink: 0; }
.nav-links .nav-cta-mobile { display: none; }
.menu-toggle { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 24px rgba(107, 63, 242, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(107, 63, 242, 0.5); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.btn-lg { padding: 15px 32px; font-size: 1rem; }

/* Sections */
.section { position: relative; z-index: 1; padding: 120px 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(46,107,255,0.04), transparent); }
.section-inner { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 64px; }
.section-label {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 20px;
}
.section-text { color: var(--muted); font-size: 1.05rem; max-width: 520px; }
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.check-list { list-style: none; margin: 24px 0 32px; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.98rem; }
.check-list li::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  flex-shrink: 0;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 140px 32px 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -40px;
  z-index: -1;
  background-size: cover;
  background-position: center 30%;
  opacity: 0.28;
  filter: saturate(1.1) contrast(1.05);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 55%, transparent 100%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 55%, transparent 100%);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 30% 20%, rgba(46,107,255,0.18), transparent 55%),
              radial-gradient(circle at 80% 70%, rgba(155,63,224,0.16), transparent 55%);
}
.hero-content { max-width: 620px; }
.hero-tag {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 28px;
  background: rgba(255,255,255,0.03);
}
.hero-tag strong { color: var(--blue-light); }
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 24px;
}
.hero-subtitle { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 64px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 48px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-number, .stat-suffix {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline;
}
.stat-label { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }

.hero-logo-3d {
  width: 380px;
  flex-shrink: 0;
  filter: drop-shadow(0 30px 60px rgba(107, 63, 242, 0.45));
  animation: float 6s ease-in-out infinite;
  transform-style: preserve-3d;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotateY(0deg); }
  50% { transform: translateY(-18px) rotateY(6deg); }
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-indicator span {
  width: 22px; height: 36px;
  border: 2px solid var(--border);
  border-radius: 999px;
  position: relative;
}
.scroll-indicator span::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 8px;
  background: var(--blue-light);
  border-radius: 999px;
  transform: translateX(-50%);
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot { 0% { top: 6px; opacity: 1; } 70% { top: 18px; opacity: 0; } 100% { top: 6px; opacity: 0; } }
.scroll-indicator p { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* Tilt cards (3D effect) */
.tilt-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  transition: transform 0.1s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
  position: relative;
}
.tilt-card:hover {
  border-color: rgba(107, 63, 242, 0.4);
  box-shadow: 0 20px 50px rgba(46, 107, 255, 0.15);
}

.about-visual {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.about-img { width: 55%; z-index: 1; }
.glow-ring {
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: var(--gradient);
  filter: blur(60px);
  opacity: 0.35;
  animation: spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.class-card { text-align: left; padding: 0; overflow: hidden; }
.class-card.featured { border-color: rgba(107, 63, 242, 0.5); background: linear-gradient(160deg, rgba(107,63,242,0.12), rgba(46,107,255,0.03)); }
.card-photo { width: 100%; aspect-ratio: 16/10; overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.class-card:hover .card-photo img { transform: scale(1.08); }
.class-card .card-icon,
.class-card h3,
.class-card p,
.class-card .card-tag { margin-left: 28px; margin-right: 28px; }
.class-card .card-icon { font-size: 2rem; margin-top: 24px; margin-bottom: 18px; }
.class-card .card-tag { margin-bottom: 28px; display: inline-block; }
.class-card h3 { font-family: var(--font-head); font-size: 1.15rem; margin-bottom: 10px; }
.class-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--blue-light);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.feature { text-align: center; }
.feature-icon-wrap {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(46,107,255,0.15), rgba(107,63,242,0.15));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.feature h4 { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.9rem; }

/* Teacher cards */
.teacher-card { text-align: center; }
.teacher-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 auto 18px;
}
.teacher-card h3 { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 6px; }
.teacher-role { display: block; color: var(--blue-light); font-size: 0.82rem; margin-bottom: 14px; }
.teacher-card p { color: var(--muted); font-size: 0.9rem; }

/* Testimonials */
.testimonial-card p { color: var(--white); font-size: 0.98rem; font-style: italic; margin-bottom: 18px; }
.testimonial-card footer { color: var(--blue-light); font-size: 0.88rem; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--bg-alt);
  aspect-ratio: 4/3;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, transparent 55%, rgba(107,63,242,0.35));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover {
  transform: translateY(-4px);
  border-color: rgba(107, 63, 242, 0.5);
  box-shadow: 0 20px 45px rgba(46, 107, 255, 0.2);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover::after { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(3, 5, 14, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,0.14); transform: rotate(90deg); }

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1500;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: waPulse 2.4s ease-in-out infinite;
}
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 12px 32px rgba(37, 211, 102, 0.6); }
@keyframes waPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* CTA Final */
.cta-final {
  position: relative;
  z-index: 1;
  padding: 140px 32px;
  text-align: center;
}
.cta-inner { max-width: 560px; margin: 0 auto; }
.cta-inner .section-text { margin: 0 auto 40px; }
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.contact-form input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.25s ease;
}
.contact-form input:focus { border-color: var(--blue); }
.contact-form input::placeholder { color: var(--muted); }
.contact-form button { margin-top: 8px; }
.form-note { color: var(--blue-light); font-size: 0.9rem; min-height: 1.2em; }

/* Footer */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-copy { color: var(--muted); font-size: 0.85rem; text-align: center; }
.footer-made { font-size: 0.75rem; opacity: 0.6; }
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  color: var(--muted);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.footer-social a:hover { color: var(--white); border-color: var(--blue); }

/* Reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 0.8s ease, transform 0.8s ease; }
[data-reveal].visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(6, 8, 20, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 28px 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
  }
  .nav-links.open { max-height: calc(100vh - 70px); opacity: 1; overflow-y: auto; }
  .nav-links a { font-size: 1.05rem; }
  .nav-cta { display: none; }
  .nav-links .nav-cta-mobile { display: inline-flex; margin-top: 8px; }
  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
  }
  .menu-toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
  .menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero { flex-direction: column-reverse; text-align: center; padding-top: 110px; }
  .hero-content { max-width: 100%; }
  .hero-subtitle { margin: 0 auto 40px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-logo-3d { width: 220px; margin-top: 40px; }
  .grid-2 { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .nav-inner { padding: 0 20px; }
  .section-inner { padding: 0 20px; }
  .hero { padding-left: 20px; padding-right: 20px; }
  .cards-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .section { padding: 72px 0; }
  .cta-final { padding: 90px 20px; }
  .whatsapp-float { width: 54px; height: 54px; bottom: 18px; right: 18px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { gap: 28px; }
  .stat { flex: 1 1 40%; }
  .brand-name { font-size: 0.95rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 2.1rem; }
  .hero-logo-3d { width: 170px; }
  .hero-stats { gap: 20px; }
  .stat-number, .stat-suffix { font-size: 1.6rem; }
}
