/* ============================================================
   KAIS Homepage — Dark Sophisticated Theme
   ============================================================ */

/* 1. Custom Properties
   ------------------------------------------------------------ */
:root {
  --brand: #6aa8ff;
  --brand-2: #9b6dff;
  --ok: #2fd37a;

  --kais-green: #2fd37a;
  --kais-blue: #6aa8ff;
  --kais-purple: #9b6dff;
  --kais-orange: #FF9600;
  --kais-red: #FF4B4B;
  --kais-yellow: #FFC800;

  --bg-page: #0b1020;
  --bg-alt: #0e1429;
  --bg-card: #121939;
  --text-heading: #e7e9f3;
  --text-body: #b9bfd3;
  --text-muted: #7a83a0;
  --border-light: rgba(255, 255, 255, .1);
  --border-card: rgba(255, 255, 255, .08);

  --gradient-hero: radial-gradient(1200px 600px at 80% -10%, rgba(155, 109, 255, .25), transparent),
                   radial-gradient(900px 500px at -10% 10%, rgba(106, 168, 255, .25), transparent),
                   var(--bg-page);
  --gradient-cta: linear-gradient(90deg, var(--brand), var(--brand-2));

  --shadow-card: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-card-hover: 0 25px 60px rgba(31, 45, 92, .45);
  --shadow-btn: 0 4px 15px rgba(106, 168, 255, .3);

  --radius-card: 20px;
  --radius-btn: 999px;
  --radius-pill: 999px;

  --container: 1140px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-page: #f7f8fc;
    --bg-alt: #ffffff;
    --bg-card: #ffffff;
    --text-heading: #151827;
    --text-body: #4a5368;
    --text-muted: #7a83a0;
    --border-light: rgba(0, 0, 0, .08);
    --border-card: rgba(0, 0, 0, .06);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, .08);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, .12);
    --shadow-btn: 0 4px 15px rgba(106, 168, 255, .2);
    --gradient-hero: radial-gradient(1200px 600px at 80% -10%, rgba(155, 109, 255, .1), transparent),
                     radial-gradient(900px 500px at -10% 10%, rgba(106, 168, 255, .1), transparent),
                     var(--bg-page);
  }
}

/* 2. Scoped Homepage Overrides
   ------------------------------------------------------------ */
html {
  scroll-behavior: smooth;
}

.kais-home {
  background: radial-gradient(1200px 600px at 80% -10%, rgba(155, 109, 255, .15), transparent),
              radial-gradient(900px 500px at -10% 10%, rgba(106, 168, 255, .15), transparent),
              var(--bg-page) !important;
  color: var(--text-body) !important;
  font-family: var(--font);
}

.kais-home *,
.kais-home *::before,
.kais-home *::after {
  box-sizing: border-box;
}

/* Accessible skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
  background: var(--bg-card);
  color: var(--text-heading);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--brand);
}

.skip-link:focus {
  position: fixed;
  left: 50%;
  top: 1.25rem;
  transform: translateX(-50%);
  width: auto;
  height: auto;
}

/* 3. Layout Helpers
   ------------------------------------------------------------ */
.kais-container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.kais-section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.kais-section-alt {
  background: var(--bg-alt);
}

.kais-section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.kais-section-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-body);
  line-height: 1.6;
  margin: 0;
  max-width: 36rem;
}

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

.mx-auto {
  margin-inline: auto;
}

/* Gradient-highlighted accent words */
.highlight-green {
  background: linear-gradient(90deg, var(--ok), #5dffb0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.highlight-blue {
  background: linear-gradient(90deg, var(--brand), #92c5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.highlight-purple {
  background: linear-gradient(90deg, var(--brand-2), #c5a3ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.highlight-orange {
  background: linear-gradient(90deg, #FF9600, #FFB74D);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 4. Buttons
   ------------------------------------------------------------ */
.btn-kais-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gradient-cta);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 0.9rem 2rem;
  font-weight: 700;
  font-size: 1.05rem;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  box-shadow: var(--shadow-btn);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-kais-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-kais-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(106, 168, 255, .4);
}

.btn-kais-primary:hover::before {
  opacity: 1;
}

.btn-kais-primary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.btn-kais-primary.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.15rem;
}

.btn-kais-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-heading);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  padding: 0.85rem 1.8rem;
  font-weight: 600;
  font-size: 1.05rem;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-kais-ghost:hover {
  border-color: var(--brand);
  background: rgba(106, 168, 255, .08);
  transform: translateY(-2px);
}

.btn-kais-ghost:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* 5. Hero Section
   ------------------------------------------------------------ */
.hero-section {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

/* Decorative orb shapes */
.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(14px);
  opacity: 0.7;
}

.hero-section::before {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(106, 168, 255, .3), transparent 70%);
  top: -100px;
  right: -100px;
  animation: float-shape 18s ease-in-out infinite;
}

.hero-section::after {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(155, 109, 255, .25), transparent 70%);
  bottom: -80px;
  left: -60px;
  animation: float-shape 14s ease-in-out infinite reverse;
}

@keyframes float-shape {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(40px, -30px); }
  50% { transform: translate(-40px, 20px); }
  75% { transform: translate(60px, -20px); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(106, 168, 255, .12);
  color: var(--brand);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: fit-content;
}

.hero-heading {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.1;
  margin: 0;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-body);
  line-height: 1.7;
  margin: 0;
  max-width: 30rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Social proof strip */
.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}

.proof-item {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.proof-number {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient-cta);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.proof-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Hero visual (decorative right side) */
.hero-visual {
  display: none;
  position: relative;
  min-height: 320px;
}

@media (min-width: 768px) {
  .hero-visual {
    display: block;
  }
}

/* Floating subject cards decoration */
.hero-card-stack {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
}

.hero-float-card {
  position: absolute;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border-radius: 16px;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-heading);
  animation: float-card 6s ease-in-out infinite;
}

.hero-float-card:nth-child(1) {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.hero-float-card:nth-child(2) {
  top: 35%;
  right: 5%;
  animation-delay: -1.5s;
}

.hero-float-card:nth-child(3) {
  bottom: 20%;
  left: 15%;
  animation-delay: -3s;
}

.hero-float-card:nth-child(4) {
  bottom: 5%;
  right: 10%;
  animation-delay: -4.5s;
}

.hero-float-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Hero avatar video */
.hero-avatar {
  margin-top: 1.5rem;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
}

.hero-avatar-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
}

/* 6. Wave Divider
   ------------------------------------------------------------ */
.wave-divider {
  line-height: 0;
  overflow: hidden;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

.wave-divider path {
  fill: var(--bg-alt);
}

/* 7. Subjects Showcase
   ------------------------------------------------------------ */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.subject-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 0.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid var(--border-card);
  border-radius: 16px;
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  box-shadow: var(--shadow-card);
  cursor: default;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
  z-index: 2;
}

.subject-card:hover::before {
  transform: scaleX(1);
}

.subject-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--card-color, var(--border-card));
}

.subject-card i {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  background: var(--card-color, var(--brand));
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.subject-card:hover i {
  transform: scale(1.15) rotate(-5deg);
}

.subject-card span {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-heading);
  text-align: center;
  line-height: 1.3;
}

/* 8. How It Works
   ------------------------------------------------------------ */
.steps-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
  position: relative;
}

@media (min-width: 768px) {
  .steps-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  /* Connecting line between steps */
  .steps-row::before {
    content: "";
    position: absolute;
    top: 48px;
    left: calc(16.67% + 24px);
    right: calc(16.67% + 24px);
    height: 2px;
    background: repeating-linear-gradient(
      90deg,
      var(--border-light) 0px,
      var(--border-light) 8px,
      transparent 8px,
      transparent 16px
    );
    z-index: 0;
  }
}

.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
  z-index: 2;
}

.step-card:hover::before {
  transform: scaleX(1);
}

.step-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-card-hover);
}

.step-number-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 8px 15px rgba(106, 168, 255, .3);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.step-card:hover .step-number-badge {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 12px 20px rgba(106, 168, 255, .4);
}

.step-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 0.5rem;
}

.step-card-desc {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0;
}

/* Teacher mini-list inside step 3 */
.teacher-mini-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  width: 100%;
}

.teacher-mini-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-body);
}

.teacher-mini-list li i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

/* 9. Pricing Preview
   ------------------------------------------------------------ */
.pricing-grid-home {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
  max-width: 720px;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .pricing-grid-home {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pricing-card-home {
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 2px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  box-shadow: var(--shadow-card);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pricing-card-home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
  z-index: 2;
}

.pricing-card-home:hover::before {
  transform: scaleX(1);
}

.pricing-card-home:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-card-hover);
}

.pricing-card-home.popular {
  border-color: var(--brand);
  box-shadow: 0 4px 20px rgba(106, 168, 255, .2);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-cta);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
}

.pricing-plan-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 0.25rem;
}

.pricing-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin: 0.75rem 0 0.5rem;
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-cta);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.pricing-period {
  font-size: 1rem;
  color: var(--text-muted);
}

.pricing-desc {
  font-size: 0.9rem;
  color: var(--text-body);
  margin: 0.25rem 0 1rem;
  line-height: 1.5;
}

.pricing-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.pricing-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.4;
}

.pricing-features-list li i {
  color: var(--ok);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.pricing-card-home .btn-kais-primary,
.pricing-card-home .btn-kais-ghost {
  width: 100%;
  justify-content: center;
}

/* Stripe checkout container */
#checkout {
  margin-top: 2rem;
  border-radius: var(--radius-card);
  overflow: hidden;
}

/* Billing portal links */
.billing-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.billing-links a {
  color: var(--brand);
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.billing-links a:hover {
  color: var(--brand-2);
  text-decoration: underline;
}

/* 10. FAQ
   ------------------------------------------------------------ */
.faq-section-narrow {
  max-width: 720px;
  margin-inline: auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.faq-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid var(--border-card);
  border-radius: 14px;
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item[open] {
  border-color: var(--brand);
  box-shadow: 0 2px 12px rgba(106, 168, 255, .15);
}

.faq-item summary {
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-heading);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "\2212";
  color: var(--brand);
}

.faq-item summary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: -3px;
  border-radius: 14px;
}

.faq-answer {
  padding: 0 1.25rem 1.1rem;
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.7;
}

/* 11. Final CTA
   ------------------------------------------------------------ */
.final-cta-section {
  background: radial-gradient(600px 300px at 20% -10%, rgba(106, 168, 255, .2), transparent),
              radial-gradient(600px 300px at 90% 10%, rgba(155, 109, 255, .2), transparent);
  padding-block: clamp(3rem, 6vw, 5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(106, 168, 255, .07) 0%, rgba(155, 109, 255, .07) 100%);
  z-index: 0;
}

.final-cta-section > * {
  position: relative;
  z-index: 1;
}

.final-cta-section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  background: var(--gradient-cta);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 0.75rem;
}

.final-cta-section p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-body);
  margin: 0 0 1.75rem;
  line-height: 1.6;
}

.final-cta-section .btn-kais-primary {
  box-shadow: 0 15px 24px rgba(106, 168, 255, .3);
}

.final-cta-section .btn-kais-primary:hover {
  box-shadow: 0 20px 30px rgba(106, 168, 255, .4);
}

/* 12. Reveal-on-Scroll Animations
   ------------------------------------------------------------ */
.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grid children */
.reveal-item:nth-child(2) { transition-delay: 0.08s; }
.reveal-item:nth-child(3) { transition-delay: 0.16s; }
.reveal-item:nth-child(4) { transition-delay: 0.24s; }
.reveal-item:nth-child(5) { transition-delay: 0.32s; }
.reveal-item:nth-child(6) { transition-delay: 0.40s; }
.reveal-item:nth-child(7) { transition-delay: 0.48s; }
.reveal-item:nth-child(8) { transition-delay: 0.56s; }
.reveal-item:nth-child(9) { transition-delay: 0.64s; }
.reveal-item:nth-child(10) { transition-delay: 0.72s; }
.reveal-item:nth-child(11) { transition-delay: 0.80s; }
.reveal-item:nth-child(12) { transition-delay: 0.88s; }

/* Hero fade-in */
.hero-text {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-fade-in 0.7s ease 0.2s forwards;
}

.hero-visual {
  opacity: 0;
  animation: hero-fade-in 0.7s ease 0.5s forwards;
}

@keyframes hero-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 13. Responsive
   ------------------------------------------------------------ */
@media (max-width: 639px) {
  .hero-heading {
    font-size: 2rem;
  }

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

  .hero-actions .btn-kais-primary,
  .hero-actions .btn-kais-ghost {
    width: 100%;
  }

  .hero-proof {
    gap: 1rem;
  }

  .subjects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .subject-card {
    padding: 1rem 0.5rem;
  }

  .subject-card i {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .subject-card span {
    font-size: 0.78rem;
  }
}

@media (max-width: 479px) {
  .subjects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-text,
  .hero-visual {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hero-float-card {
    animation: none;
  }

  .hero-section::before,
  .hero-section::after {
    animation: none;
  }
}
