:root {
  --bg: #f6f9ff;
  --bg-soft: #eef4ff;
  --surface: #ffffff;
  --surface-2: #f9fbff;
  --text: #14213d;
  --muted: #5f6f94;
  --primary: #2563eb;
  --primary-dark: #1748b5;
  --secondary: #7c3aed;
  --accent: #f59e0b;
  --success: #10b981;
  --border: #dbe7ff;
  --shadow: 0 18px 40px rgba(37, 99, 235, 0.12);
  --shadow-soft: 0 10px 24px rgba(20, 33, 61, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(246, 249, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219, 231, 255, 0.9);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.main-nav a {
  padding: 0.85rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  transition: 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.menu-toggle {
  display: none;
  border: 0;
  background: white;
  color: var(--text);
  width: 46px;
  height: 46px;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font-size: 1.2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: white;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-secondary {
  background: rgba(124, 58, 237, 0.09);
  color: var(--secondary);
  border-color: rgba(124, 58, 237, 0.16);
}

.btn-secondary:hover {
  background: rgba(124, 58, 237, 0.14);
}

.btn-outline {
  background: white;
  border-color: var(--border);
  color: var(--primary);
}

/* Hero */
.hero {
  padding: 4.5rem 0 3rem;
}

.hero-modern {
  position: relative;
  overflow: hidden;
}

.hero-modern::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), transparent 35%),
    linear-gradient(210deg, rgba(124, 58, 237, 0.06), transparent 40%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.hero-text h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  max-width: 12ch;
}

.hero-text p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-search {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.7rem;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(219, 231, 255, 0.9);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  padding: 0 0.6rem;
}

.hero-search input::placeholder {
  color: #8a98b8;
}

.hero-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-stats {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(219, 231, 255, 0.9);
  border-radius: 20px;
  padding: 1rem 1rem;
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  display: block;
  font-size: 1.35rem;
  color: var(--primary);
}

.stat-card span {
  display: block;
  font-size: 0.94rem;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  min-height: 520px;
}

.main-visual {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(219, 231, 255, 0.9);
  background: white;
}

.main-visual img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.visual-card {
  position: relative;
}

.floating-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(219, 231, 255, 0.95);
  border-radius: 20px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-soft);
  max-width: 220px;
}

.floating-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.floating-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-one {
  top: 28px;
  left: -20px;
}

.card-two {
  right: -10px;
  bottom: 28px;
}

/* Sections */
section {
  padding: 2rem 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2rem;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-head p,
.how-text p,
.video-text p,
.cta-box p,
.subject-card p,
.feature-card p,
.step-card p,
.site-footer p,
.site-footer li a {
  color: var(--muted);
}

/* Subject cards */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.subject-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.4rem;
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

.subject-card:hover,
.feature-card:hover,
.step-card:hover {
  transform: translateY(-5px);
}

.subject-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: white;
  font-weight: 800;
}

.subject-card.math .subject-icon {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.subject-card.science .subject-icon {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.subject-card.physics .subject-icon {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

.subject-card.commerce .subject-icon {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(124, 58, 237, 0.12));
  margin-bottom: 1rem;
}

/* How it works */
.how-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1.5rem;
  align-items: start;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.step-card {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.4rem;
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 800;
  margin-bottom: 0.9rem;
}

/* Video section */
.video-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1.6rem;
  align-items: center;
}

.video-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.video-card img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: auto 1.2rem 1.2rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: rgba(20, 33, 61, 0.72);
  color: white;
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: white;
  font-weight: 800;
}

/* CTA */
.cta-box {
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  color: white;
  border-radius: 30px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.cta-box h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.cta-box p {
  max-width: 700px;
  margin: 0 auto 1.2rem;
  color: rgba(255, 255, 255, 0.88);
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  background: #0f172a;
  color: #e5ecff;
  padding-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}

.site-footer h3,
.site-footer h4 {
  margin-top: 0;
}

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

.site-footer li+li {
  margin-top: 0.6rem;
}

.site-footer a:hover {
  color: white;
}

.footer-bottom {
  padding: 1.3rem 0;
  margin-top: 1.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

/* Utility cards if old markup still appears */
.card,
.feature-card,
.subject-card,
.step-card {
  overflow: hidden;
}

/* Responsive */
@media (max-width: 1080px) {

  .hero-grid,
  .how-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: auto;
  }

  .main-visual img {
    height: 430px;
  }

  .floating-card {
    position: static;
    margin-top: 1rem;
    max-width: none;
  }

  .subject-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 72px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.98);
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
  }

  .main-nav.show {
    display: flex;
  }

  .main-nav a {
    border-radius: 14px;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-text h1 {
    max-width: none;
  }

  .hero-search {
    flex-direction: column;
    border-radius: 22px;
  }

  .hero-stats,
  .steps-grid,
  .feature-grid,
  .subject-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .video-card img {
    height: 280px;
  }

  .cta-box {
    padding: 2.2rem 1.2rem;
    border-radius: 24px;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(var(--max-width), calc(100% - 1.2rem));
  }

  .btn {
    width: 100%;
  }

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

  .stat-card,
  .subject-card,
  .feature-card,
  .step-card {
    padding: 1.1rem;
  }
}