/* The Problem section */
.problem-section {
  padding: clamp(4rem, 7vw, 7rem) 1rem;
  position: relative;
  isolation: isolate;
  background-color: #161616; /* Slightly different dark shade */
  background-image: url('../assets/images/background/dots-dark.svg');
  background-size: 400px;
  background-repeat: repeat;
}

/* Background enhancements for prominence */
.problem-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent, rgba(0,0,0,0.6) 75%);
  pointer-events: none;
  z-index: 0;
}

.problem-section::after {
  content: '';
  position: absolute;
  width: clamp(320px, 36vw, 520px);
  height: clamp(320px, 36vw, 520px);
  right: -8%;
  top: -8%;
  background: radial-gradient(circle, rgba(0,243,255,0.14), rgba(0,243,255,0));
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}

.problem-container {
  max-width: min(92vw, 1200px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.problem-title {
  font-family: 'Satoshi', sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  text-align: center;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: clamp(1.75rem, 3vw, 2.25rem);
}

.problem-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto clamp(0.75rem, 1.6vw, 1rem);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  width: fit-content;
}

/* Light mode removed */

.problem-subtitle {
  font-family: 'Inter', sans-serif;
  color: var(--muted);
  text-align: center;
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  max-width: 780px;
  margin: 0 auto clamp(1.5rem, 3vw, 2rem);
}

/* Grid */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

@media (max-width: 900px) {
  .problem-grid { grid-template-columns: 1fr; }
}

/* Cards */
.problem-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: clamp(1rem, 2.8vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 210px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.problem-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,243,255,0.15) inset;
  border-color: rgba(0,243,255,0.25);
}

/* Light mode removed */

.problem-icon {
  width: 40px;
  height: 40px;
  color: var(--primary); /* dark: cyan | light: gold */
}

/* Single theme icon */

.problem-card h3 {
  font-family: 'Satoshi', sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 700;
  color: var(--text);
  margin: 0.25rem 0 0.25rem;
}

.problem-card p {
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

.problem-metric {
  margin-top: 0.5rem;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 0.85rem;
}

/* Single theme metric */

/* CTA */
.problem-cta {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 3vw, 2rem);
}

.problem-cta a {
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.problem-cta .primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}

.problem-cta .secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
}

/* Single theme */

.problem-cta a:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* Reveal animation reuse */
.problem-section .reveal-up { opacity: 0; transform: translateY(30px); }
.problem-section .reveal-up.revealed { opacity: 1; transform: translateY(0); }

/* Icon specifics */
/* Clock: rotate hands slowly */
.icon-clock svg { display: block; width: 40px; height: 40px; }
.icon-clock .hand-minute {
  transform-origin: 20px 20px;
  animation: minute-rot 18s linear infinite;
}
.icon-clock .hand-hour {
  transform-origin: 20px 20px;
  animation: hour-rot 54s linear infinite;
}
@keyframes minute-rot { to { transform: rotate(360deg); } }
@keyframes hour-rot { to { transform: rotate(360deg); } }

/* Dollar: subtle top-to-bottom depletion using mask */
.icon-dollar svg { display: block; width: 40px; height: 40px; }
.icon-dollar svg {
  /* show less over time to simulate depletion */
  -webkit-mask-image: linear-gradient(to bottom, #000 75%, rgba(0,0,0,0) 75%);
  mask-image: linear-gradient(to bottom, #000 75%, rgba(0,0,0,0) 75%);
  animation: deplete 6s ease-in-out infinite alternate;
}
@keyframes deplete {
  0% { -webkit-mask-image: linear-gradient(to bottom, #000 80%, rgba(0,0,0,0) 80%); mask-image: linear-gradient(to bottom, #000 80%, rgba(0,0,0,0) 80%); }
  100% { -webkit-mask-image: linear-gradient(to bottom, #000 40%, rgba(0,0,0,0) 40%); mask-image: linear-gradient(to bottom, #000 40%, rgba(0,0,0,0) 40%); }
}

/* Morph: crossfade between slide and thumbs-down */
.icon-morph { position: relative; width: 40px; height: 40px; }
.icon-morph svg { position: absolute; inset: 0; width: 40px; height: 40px; transition: opacity 0.8s ease; }
.icon-morph .slide { opacity: 1; }
.icon-morph .alt { opacity: 0; }
.icon-morph { animation: morph 7s ease-in-out infinite; }
@keyframes morph {
  0%, 45% { }
  50%, 100% { }
}
/* Toggle opacities via animation steps */
.icon-morph { --phase: 0; }
.icon-morph.slide-visible .slide { opacity: 1; }
.icon-morph.slide-visible .alt { opacity: 0; }
.icon-morph.alt-visible .slide { opacity: 0; }
.icon-morph.alt-visible .alt { opacity: 1; }

/* JS-free toggling using keyframe steps */
@keyframes morph {
  0%, 45% { }
  50%, 100% { }
}
/* We'll drive visibility via animation using steps by flipping classes via CSS animation trick */
.icon-morph { animation: morphToggle 8s ease-in-out infinite; }
@keyframes morphToggle {
  0%, 45% { }
  50%, 100% { }
}
/* Simpler: alternate opacity using nth-child pseudo is not applicable to SVG stacked; use keyframes on each */
.icon-morph .slide { animation: slideFade 8s ease-in-out infinite; }
.icon-morph .alt { animation: altFade 8s ease-in-out infinite; }
@keyframes slideFade {
  0%, 45% { opacity: 1; }
  55%, 100% { opacity: 0; }
}
@keyframes altFade {
  0%, 45% { opacity: 0; }
  55%, 100% { opacity: 1; }
}
