/* ================================================================
   SAMAAN MIKHAEL — COURSE PAGE  |  assets/css/course.css
   All course-specific styles. Inherits CSS vars from main.css.
   ================================================================ */

/* ── HERO ─────────────────────────────────────────────────────── */
.cr-hero {
  background: var(--bg);
  overflow-x: clip;
  transition: background 0.7s cubic-bezier(0.76,0,0.24,1);
}

.cr-hero-kinetic-bg {
  pointer-events: none;
  user-select: none;
}

.cr-kinetic-word {
  will-change: transform;
}

/* ── HERO TITLE ────────────────────────────────────────────────── */
.cr-hero-title {
  font-family: 'BUNDAYCLEAN', 'Bebas Neue', sans-serif;
  font-size: clamp(4rem,11vw,13rem);
}

.cr-hero-title .word,
.cr-hero-title .char {
  display: inline-block;
  will-change: transform;
  font-family: inherit;
}

.cr-hero-title .line {
  overflow: hidden;
  display: block;
}

/* ── VIDEO WRAPPER ─────────────────────────────────────────────── */
.cr-yt-wrap {
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22), 0 0 0 1px var(--border);
}

.cr-video-caption {
  opacity: 0.55;
}

/* ── SCROLL LINE ANIMATION ─────────────────────────────────────── */
@keyframes scrollPulseCr {
  0%   { transform: translateY(-100%); opacity: 1; }
  80%  { opacity: 0.6; }
  100% { transform: translateY(100%); opacity: 0; }
}
.cr-scroll-line {
  height: 100%;
  animation: scrollPulseCr 1.8s ease-in-out infinite;
}

/* ── STATS ─────────────────────────────────────────────────────── */
.cr-stats {
  gap: 1.5rem;
}

.cr-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cr-stat-val {
  font-family: 'BUNDAYCLEAN', 'Bebas Neue', sans-serif;
  letter-spacing: -0.02em;
}

.cr-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cr-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── GENERIC REVEAL ────────────────────────────────────────────── */
.cr-reveal {
  will-change: opacity, transform;
}

/* ── OVERVIEW / FEATURE CARDS ──────────────────────────────────── */
.cr-overview {
  background: var(--bg);
  transition: background 0.7s cubic-bezier(0.76,0,0.24,1);
}

.cr-feature-card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s ease, transform 0.45s cubic-bezier(0.23,1,0.32,1);
  will-change: opacity, transform;
}

.cr-feature-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #BB2649, #DB343B);
  transition: width 0.55s cubic-bezier(0.76,0,0.24,1);
}

.cr-feature-card:hover {
  border-color: rgba(187,38,73,0.22);
  transform: translateY(-4px);
}

.cr-feature-card:hover::after {
  width: 100%;
}

.cr-feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 0.875rem;
  background: rgba(187,38,73,0.08);
  border: 1px solid rgba(187,38,73,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #BB2649;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.cr-feature-card:hover .cr-feature-icon {
  background: rgba(187,38,73,0.15);
  border-color: rgba(187,38,73,0.3);
}

.cr-feature-title {
  font-family: 'BUNDAYCLEAN', 'Bebas Neue', sans-serif;
}

/* ── SECTION HEADINGS ──────────────────────────────────────────── */
.cr-section-heading {
  font-family: 'BUNDAYCLEAN', 'Bebas Neue', sans-serif;
}

.cr-line-char {
  display: block;
  will-change: transform;
  font-family: inherit;
}

/* ── CURRICULUM ────────────────────────────────────────────────── */
.cr-curriculum {
  background: var(--bg);
  transition: background 0.7s cubic-bezier(0.76,0,0.24,1);
}

/* ── PROGRESS INDICATOR ────────────────────────────────────────── */
.cr-progress-indicator {
  position: fixed;
  top: 50%;
  right: clamp(1rem, 3vw, 2.5rem);
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.cr-progress-indicator.is-visible {
  opacity: 1;
}

.cr-progress-counter {
  font-family: 'BUNDAYCLEAN', 'Bebas Neue', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
  color: #BB2649;
}

.cr-progress-total {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── LESSON LIST ───────────────────────────────────────────────── */
.cr-lesson-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── LESSON CARD ───────────────────────────────────────────────── */
.cr-lesson {
  position: relative;
  padding: 2rem 2.5rem 2rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.35s ease, transform 0.45s cubic-bezier(0.23,1,0.32,1);
  will-change: opacity, transform;
}

.cr-lesson:hover {
  border-color: rgba(187,38,73,0.2);
  transform: translateX(4px);
}

.cr-lesson--finale {
  border-color: rgba(187,38,73,0.2);
  background: linear-gradient(145deg, var(--bg-card) 60%, rgba(187,38,73,0.04) 100%);
}

/* ── LESSON LEFT BAR ───────────────────────────────────────────── */
.cr-lesson-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, #BB2649, #DB343B);
  border-radius: 0 2px 2px 0;
  transform-origin: top center;
  transform: scaleY(0);
  transition: none; /* animated via GSAP */
}

/* ── LESSON BACKGROUND NUMBER ──────────────────────────────────── */
.cr-lesson-bgnum {
  position: absolute;
  bottom: -0.2em;
  right: 1.5rem;
  font-family: 'BUNDAYCLEAN', 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 12vw, 14rem);
  line-height: 1;
  color: var(--text-primary);
  opacity: 0.025;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  letter-spacing: -0.04em;
}

/* ── LESSON INNER ──────────────────────────────────────────────── */
.cr-lesson-inner {
  position: relative;
  z-index: 2;
}

/* ── LESSON META ───────────────────────────────────────────────── */
.cr-lesson-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

/* ── BADGES ────────────────────────────────────────────────────── */
.cr-lesson-badge {
  display: inline-flex;
  align-items: center;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1;
}

.cr-badge-video {
  background: rgba(187,38,73,0.1);
  border-color: rgba(187,38,73,0.2);
  color: #BB2649;
}

.cr-badge-text {
  background: rgba(71,28,47,0.1);
  border-color: rgba(71,28,47,0.2);
  color: var(--text-muted);
}

[data-theme="dark"] .cr-badge-text {
  background: rgba(249,246,247,0.06);
  border-color: rgba(249,246,247,0.1);
  color: var(--text-muted);
}

.cr-badge-finale {
  background: linear-gradient(135deg, rgba(187,38,73,0.2), rgba(219,52,59,0.2));
  border-color: rgba(187,38,73,0.4);
  color: #DB343B;
}

/* ── LESSON DURATION ───────────────────────────────────────────── */
.cr-lesson-duration {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ── LESSON TITLE ──────────────────────────────────────────────── */
.cr-lesson-title {
  font-family: 'BUNDAYCLEAN', 'Bebas Neue', sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 2.4rem);
  line-height: 1.0;
  margin-bottom: 0.5rem;
}

/* ── LESSON DESCRIPTION ────────────────────────────────────────── */
.cr-lesson-desc {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 72ch;
}

/* ── PRICING SECTION ───────────────────────────────────────────── */
.cr-pricing {
  position: relative;
  overflow: hidden;
}

/* Pricing section vertical breathing — the Tailwind py-24/lg:py-36
   utilities on the markup get overridden in the cascade by Tailwind
   CDN's injected layer and/or a MasterStudy reset that lands on
   <section>, so the section visually collapses to its content height.
   Pin the padding here with !important + a higher-specificity
   selector so neither the parent theme nor Tailwind can win. */
section.cr-pricing,
#cr-pricing.cr-pricing {
  padding-block: clamp(5rem, 10vw, 10rem) !important;
}

.cr-pricing-bg {
  background: var(--bg-card);
  transition: background 0.7s cubic-bezier(0.76,0,0.24,1);
}

.cr-price-display {
  line-height: 1;
}

/* ── BOOKLET SECTION ───────────────────────────────────────────── */
.cr-booklet {
  background: var(--bg);
  transition: background 0.7s cubic-bezier(0.76,0,0.24,1);
}

.cr-booklet-img-wrap {
  will-change: transform;
}

.cr-booklet-img {
  max-width: 340px;
  width: 100%;
  display: block;
  filter: drop-shadow(0 32px 48px rgba(0,0,0,0.28)) drop-shadow(0 0 1px rgba(187,38,73,0.12));
  will-change: transform;
}

/* ── MOBILE BREAKPOINTS ────────────────────────────────────────── */
/* .cr-hero-title intentionally has NO mobile override — the single
   clamp(4rem,11vw,13rem) keeps the hero title identical across pages. */

@media (max-width: 767px) {
  .cr-hero {
    min-height: 100svh;
  }

  .cr-lesson {
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  }

  .cr-lesson-bgnum {
    font-size: clamp(4rem,20vw,8rem);
  }

  .cr-lesson-title {
    font-size: clamp(1.2rem,5vw,1.8rem);
  }

  .cr-progress-indicator {
    display: none;
  }

  .cr-yt-wrap {
    border-radius: 1rem;
  }
}

@media (max-width: 480px) {
  .cr-lesson {
    padding: 1.25rem;
  }

  .cr-feature-card {
    padding: 1.5rem;
  }
}
