/* ==========================================================================
   Premium UI — Global fixes & enterprise polish
   Load after landing.css
   ========================================================================== */

/* Critical: prevent SVG/icons blowing up to full container width */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

svg {
  display: block;
  flex-shrink: 0;
}

.icon,
.btn svg,
.theme-toggle svg,
.swiper-nav__btn svg,
.feature-card__link svg,
.hero__trust-logo svg,
.mobile-nav__chevron svg {
  width: var(--icon-md, 20px);
  height: var(--icon-md, 20px);
  max-width: none;
}

/* Navbar icons only — never shrink the brand mark */
.navbar__logo .brand-logo__svg {
  width: var(--logo-svg, 46px);
  height: var(--logo-svg, 46px);
  max-width: none;
  flex-shrink: 0;
}

/* Section rhythm */
.section {
  padding-block: var(--section-py, clamp(3.75rem, 8vw, 7.5rem));
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header__title {
  font-size: var(--text-section, clamp(1.625rem, 4vw, 2.625rem));
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
}

.section-header__desc {
  font-size: var(--text-body-lg, 1.125rem);
  line-height: 1.8;
  max-width: 42rem;
  margin-inline: auto;
}

/* Compact section lead (extra line under section header) */
.section-lead {
  max-width: 46rem;
  margin: calc(var(--space-5) * -1) auto var(--space-8);
  text-align: center;
  font-size: var(--text-sm);
  line-height: 1.85;
  color: var(--color-text-secondary);
}

@media (max-width: 767px) {
  .section-lead {
    margin: calc(var(--space-4) * -1) auto var(--space-7);
    padding-inline: var(--space-2);
  }
}

/* Hero typography */
.hero__title {
  font-size: var(--text-hero, clamp(2.25rem, 5.5vw, 4rem));
  line-height: 1.1;
}

.hero--premium .hero__title {
  margin-bottom: 0;
}

.hero__desc {
  font-size: var(--text-body-lg, 1.125rem);
  line-height: 1.75;
}

.hero--premium .hero__desc {
  margin-bottom: 0;
}

/* Feature cards — premium depth + tilt */
.features__grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
  }
}

.feature-card {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 100%;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.feature-card--glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), transparent 40%, rgba(251, 191, 36, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-base);
}

.feature-card--glass:hover::after {
  opacity: 1;
}

.feature-card__icon,
.feature-card .ds-icon-tile {
  width: var(--icon-feature, 56px) !important;
  height: var(--icon-feature, 56px) !important;
  min-width: var(--icon-feature, 56px);
  font-size: 1.5rem !important;
  border-radius: var(--radius-lg);
  margin-bottom: 0;
}

.feature-card__icon svg {
  width: 28px;
  height: 28px;
}

.feature-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0;
}

.feature-card__desc {
  font-size: var(--text-base);
  line-height: 1.75;
  flex: 1;
  margin: 0;
}

/* Hero visual */
@media (min-width: 1024px) {
  .hero--premium .hero__inner {
    grid-template-columns: 1fr 1fr;
  }
}

.hero__card-main img {
  width: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
}

.hero--premium .hero__card-main.glass-card {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
}

.hero__float-icon {
  font-size: 1.25rem !important;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--gradient-primary-soft);
  flex-shrink: 0;
}

.hero--premium .hero__float-icon--svg svg {
  width: 22px;
  height: 22px;
  max-width: none;
}

.hero__trust-logo svg {
  width: 18px;
  height: 18px;
}

/* Teacher cards */
.teacher-card {
  padding: var(--space-8) var(--space-6);
  text-align: center;
  border-radius: var(--radius-xl);
  transition:
    transform var(--duration-base) var(--ease-out-expo),
    box-shadow var(--duration-base);
}

.teacher-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl), 0 0 40px rgba(5, 150, 105, 0.12);
}

.teacher-card__avatar-wrap {
  width: 112px;
  height: 112px;
  margin: 0 auto var(--space-5);
  padding: 3px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-glow-primary);
}

.teacher-card__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-bg-elevated);
}

.teacher-card__name {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.teacher-card__bio {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--color-text-secondary);
}

/* Brand logo — see brand-logo-premium.css for 3D mark */

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}

.navbar__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
}

.navbar__logo:hover {
  color: inherit;
  text-decoration: none;
}

.navbar__logo-text {
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
}

.dashboard__sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  font-size: var(--text-sm);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
}

.dashboard__sidebar-brand:hover {
  color: var(--color-primary);
}

/* Cursor glow (desktop) */
.cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08), transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

body.has-cursor-glow .cursor-glow {
  opacity: 1;
}

/* Page loader */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--color-bg);
  transition: opacity 0.5s var(--ease-out-expo), visibility 0.5s;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Pricing / testimonial polish */
.pricing-card,
.testimonial-card {
  padding: var(--space-8);
  border-radius: var(--radius-xl);
}

.timeline__marker {
  width: 48px;
  height: 48px;
  font-size: var(--text-lg);
}

@media (max-width: 767px) {
  .hero {
    min-height: 0;
    padding-bottom: var(--space-12);
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .teacher-card__avatar-wrap {
    width: 96px;
    height: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-glow {
    display: none;
  }
}
