:root {
  --brand: #0057ff;
  --brand-dark: #0040cc;
  --accent: #ff6b2b;
  --accent2: #00c48c;
  --surface: #f4f6ff;
  --dark: #0a0f2c;
  --card: #ffffff;
  --muted: #6b7280;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Open Sans", sans-serif;
  background: #fff;
  color: var(--dark);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: "Open Sans", sans-serif;
}

/* HERO */
.hero-bg {
  background: linear-gradient(135deg, #0a0f2c 0%, #0d1b6e 50%, #0a0f2c 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 60% at 70% 50%,
      rgba(0, 87, 255, 0.35) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 50% 40% at 20% 80%,
      rgba(0, 196, 140, 0.2) 0%,
      transparent 60%
    );
}

.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  position: absolute;
  inset: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  font-weight: 700;
  font-family: "Open Sans", sans-serif;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--dark);
  color: #fff;
  border-radius: 14px;
  font-weight: 700;
  font-family: "Open Sans", sans-serif;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 4px 16px rgba(10, 15, 44, 0.25);
}

.btn-dark:hover {
  background: #1a2150;
  transform: translateY(-2px);
}

/* SEARCH BAR */
.search-bar {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 48px rgba(0, 87, 255, 0.18);
}

/* CATEGORY CHIPS */
.chip {
  border: 1.5px solid #e5e7eb;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.chip:hover,
.chip.active {
  border-color: var(--brand);
  background: rgba(0, 87, 255, 0.07);
  color: var(--brand);
}

/* STAT */
.stat-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 16px rgba(0, 87, 255, 0.06);
  transition: 0.25s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 87, 255, 0.12);
}

/* FEATURE CARD */
.feat-card {
  background: #fff;
  border-radius: 24px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 20px rgba(0, 87, 255, 0.06);
  transition: 0.3s;
  overflow: hidden;
}

.feat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 87, 255, 0.14);
}

.feat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

/* INSTITUTE CARD */
.inst-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  transition: 0.3s;
  cursor: pointer;
}

.inst-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 87, 255, 0.15);
}

.inst-badge {
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
}

/* HOW IT WORKS */
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  font-family: "Open Sans", sans-serif;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 87, 255, 0.35);
}

.step-line {
  width: 2px;
  background: linear-gradient(to bottom, var(--brand), #c7d5ff);
  flex: 1;
  min-height: 40px;
}

/* CLASSMASTER */
.cm-bg {
  background: linear-gradient(135deg, #0a0f2c 0%, #1a2680 100%);
}

.cm-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

/* STUDENT DASHBOARD PREVIEW */
.dash-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.progress-bar {
  height: 8px;
  border-radius: 50px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--brand), var(--accent2));
}

/* TESTIMONIAL */
.testi-card {
  background: #fff;
  border-radius: 24px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 24px rgba(0, 87, 255, 0.07);
  transition: 0.25s;
}

.testi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 87, 255, 0.12);
}

/* APP STORE */
.app-store-btn {
  border-radius: 16px;
  background: #0a0f2c;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  transition: 0.2s;
  cursor: pointer;
}

.app-store-btn:hover {
  background: #1a2680;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 87, 255, 0.3);
}

/* FAQ */
.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  transition: 0.2s;
}

.faq-item:hover {
  border-color: rgba(0, 87, 255, 0.3);
}

.faq-q {
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem !important;
}

.faq-a {
  display: none;
}

.faq-item.open .faq-a {
  display: block;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  color: var(--brand);
}

.faq-icon {
  transition: 0.3s;
}

/* ── BACK TO TOP ── */
#toTop {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #0a6cff;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(10, 108, 255, 0.35);
}

#toTop.visible {
  opacity: 1;
  transform: translateY(0);
}

#toTop:hover {
  background: #0550cc;
  transform: translateY(-3px);
}

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger > * {
  transition-delay: calc(var(--i) * 80ms);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stack-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .hero-visual {
    display: none;
  }

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

@media (max-width: 768px) {
  #hero {
    padding: 100px 20px 60px;
  }

  .container {
    padding: 0 20px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .stack-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
  }
}

/* ANIMATIONS */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.anim-up {
  animation: slideUp 0.7s ease both;
}

.anim-d1 {
  animation-delay: 0.1s;
}

.anim-d2 {
  animation-delay: 0.2s;
}

.anim-d3 {
  animation-delay: 0.3s;
}

.anim-d4 {
  animation-delay: 0.4s;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00c48c;
  position: relative;
  display: inline-block;
}

.live-dot:after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(0, 196, 140, 0.4);
  animation: pulse-ring 1.5s ease-out infinite;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-blue {
  background: linear-gradient(135deg, var(--brand) 0%, #00c48c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* SCROLL INDICATOR */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--brand);
  z-index: 9999;
  transition: width 0.1s;
}

/* MAP PLACEHOLDER */
.map-card {
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.map-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 87, 255, 0.4);
  cursor: pointer;
}

.map-pin:hover {
  transform: scale(1.2);
}

/* CONTACT */
.contact-input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  outline: none;
  transition: 0.2s;
  background: #fff;
}

.contact-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.08);
}

/* BADGE */
.badge {
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
