/* ── Chapter 2: The Grind ── */

.ch2-section {
  position: relative;
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 1;
}

/* Section Label Badge */
.ch2-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Section Title */
.ch2-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.15;
  margin-bottom: 3rem;
  max-width: 700px;
}

.ch2-title .ch2-title-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ch2-title .ch2-title-line.ch2-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Cinematic Image Strip ── */

/* Glow wrapper — sits OUTSIDE overflow:hidden to show the blurred glow */
.ch2-image-glow-wrap {
  position: relative;
  margin-bottom: 3rem;
}

.ch2-image-wrap {
  position: relative;
  width: 100%;
  max-height: 500px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 0;
  /* Subtle gradient border via box-shadow + outline trick */
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.ch2-image-wrap.ch2-visible {
  opacity: 1;
  transform: translateY(0);
}

.ch2-parallax-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
  /* Slight scale-up so parallax shifting doesn't show edges */
  transform: scale(1.05);
}

/* Bottom overlay gradient for text contrast */
.ch2-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(10, 10, 15, 0.65) 100%
  );
  pointer-events: none;
}

/* ── Two-Column Layout: Text + Stats ── */
.ch2-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Left Column — Text */
.ch2-text-col {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms 200ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ch2-text-col.ch2-visible {
  opacity: 1;
  transform: translateY(0);
}

.ch2-text-highlight {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.ch2-text-body {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: #94a3b8;
  line-height: 1.75;
}

/* Right Column — Stats */
.ch2-stats-col {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms 400ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ch2-stats-col.ch2-visible {
  opacity: 1;
  transform: translateY(0);
}

.ch2-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ── Glass Stat Card ── */
.ch2-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  text-align: center;
  transition: border-color 400ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 400ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ch2-stat-card:hover {
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1);
}

.ch2-stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ch2-stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.4;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .ch2-content-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .ch2-section {
    padding: 4rem 1.25rem;
  }

  .ch2-title {
    margin-bottom: 2rem;
  }

  .ch2-stat-number {
    font-size: 2rem;
  }

  .ch2-stat-card {
    padding: 18px 12px;
  }

  .ch2-image-glow-wrap {
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .ch2-section {
    padding: 3rem 1rem;
  }

  .ch2-stat-number {
    font-size: 1.6rem;
  }

  .ch2-stat-card {
    padding: 14px 8px;
    border-radius: 12px;
  }

  .ch2-stat-label {
    font-size: 0.75rem;
  }

  .ch2-text-highlight {
    font-size: 1.1rem;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .ch2-title .ch2-title-line,
  .ch2-image-wrap,
  .ch2-text-col,
  .ch2-stats-col {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ch2-parallax-img {
    transform: scale(1) !important;
  }

  .ch2-stat-card:hover {
    transform: none;
  }
}
