/* Problem — source: sections/Problem.tsx (v4) */

#problem {
  background: #060e1c;
  padding: clamp(56px, 7vw, 88px) 0;
}

/* ---- Header ---- */

/* Elementor's default container gap would stack on top of the margins the
   source uses to space these three; zero it and let the margins rule. */
#problem .lt-prob-head {
  gap: 0;
  text-align: center;
  margin-bottom: clamp(28px, 4vw, 40px);
}

/*
 * .lt-eyebrow supplies the pill and the source only recolours it for the dark
 * ground — so these three land on the wrapper, where the token class painted
 * them, not on the inner title (which would draw a second pill inside the
 * first). align-self is the catch: .lt-eyebrow is display:inline-block, but as
 * a child of a flex container it is blockified and stretched, so the pill would
 * run the full width of the header instead of hugging its text.
 */
#problem .lt-prob-eyebrow {
  align-self: center;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.11);
}

#problem .lt-prob-h2 {
  margin-top: 16px;
}

/*
 * Typography must target .elementor-heading-title, not the wrapper carrying
 * _css_classes. hello-elementor's reset.css sets `h2 { font-size: 2rem }` and
 * `h1..h6 { font-weight: 500 }` on the heading element itself, and Elementor
 * adds `.elementor-heading-title { line-height: 1 }`. All three match the inner
 * <h2> directly, and a direct match always beats a value inherited from the
 * wrapper — so a wrapper-level font-size here would silently render 32px/500/1.
 */
#problem .lt-prob-h2 .elementor-heading-title {
  font-size: var(--t-h1);
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
}

#problem .lt-prob-sub p {
  font-size: var(--t-lead);
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
  max-width: 640px;
  margin: 14px auto 0;
}

/* ---- Video frame ---- */

/*
 * overflow:hidden is load-bearing twice over: it clips the video to the radius
 * AND hides the cards while they sit 72px below the bottom edge, so they slide
 * up out of nowhere rather than fading in over the page background.
 */
#problem .lt-prob-frame {
  position: relative;
  gap: 0;
  padding: 0;
  background: #000;
  border: 1px solid rgba(41, 128, 242, 0.20);
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(41, 128, 242, 0.07), 0 28px 72px -12px rgba(41, 128, 242, 0.28);
}

/*
 * The scrim is anchored to this wrapper rather than to .lt-prob-frame. On
 * desktop the two are the same box, but below 700px the cards leave the overlay
 * and add their own height to the frame — anchoring to the frame would stretch
 * the 55% scrim down over the stacked cards and (being absolute against static
 * cards) paint on top of them. Scoping it to the video keeps the gradient on
 * the footage at every width.
 */
#problem .lt-prob-video {
  position: relative;
  display: block;
}

#problem video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

#problem .lt-prob-scrim {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(6, 14, 28, 0.90) 0%, rgba(6, 14, 28, 0.50) 55%, transparent 100%);
  pointer-events: none;
}

/* ---- Cards ---- */

#problem .lt-problem-grid {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.5vw, 20px);
  padding: clamp(16px, 2.5vw, 28px);
}

#problem .lt-prob-card {
  position: relative;
  width: auto !important;
  max-width: none !important;
  gap: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  backdrop-filter: blur(20px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  padding: clamp(18px, 2.5vw, 28px);
  will-change: opacity, transform;
}

/* Accent bar. A pseudo-element rather than the source's extra <div> — it is
   pure decoration and an Elementor widget would only add a flex item. */
#problem .lt-prob-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(to left, #2980f2, #7eb0f2);
}

/* Card 3 is deaths — red, not brand blue. */
#problem .lt-prob-card-red::before {
  background: linear-gradient(to left, #f20505, #f29b88);
}

#problem .lt-prob-stat {
  margin-bottom: 6px;
}

#problem .lt-prob-stat .elementor-heading-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  color: #7eb0f2;
  line-height: 1;
}

#problem .lt-prob-card-red .lt-prob-stat .elementor-heading-title {
  color: #ff7070;
}

#problem .lt-prob-label {
  margin-bottom: 8px;
}

#problem .lt-prob-label .elementor-heading-title {
  font-size: var(--t-h4);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

#problem .lt-prob-body p {
  font-size: var(--t-small);
  color: rgba(255, 255, 255, 0.60);
  line-height: 1.6;
  margin: 0;
}

/* ---- Slide-up. lifetec.js adds .is-in, staggered 120ms per card. ---- */
#problem .lt-prob-card {
  opacity: 0;
  transform: translateY(72px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

#problem .lt-prob-card.is-in {
  opacity: 1;
  transform: none;
}

/* lifetec.js adds .is-in immediately when reduced-motion is set; killing the
   transition here stops that from animating anyway on first paint. */
@media (prefers-reduced-motion: reduce) {
  #problem .lt-prob-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 820px) {
  #problem .lt-prob-br {
    display: none;
  }
}

/* Overlay -> stacked: the cards drop out from over the video and sit below it,
   still inside the frame's black rounded box (as in the source). */
@media (max-width: 700px) {
  #problem .lt-problem-grid {
    grid-template-columns: 1fr !important;
    position: static !important;
    margin-top: 16px;
  }
}
