/* Problem */

.problem-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.4rem, 3vw, 2.8rem);
  align-items: start;
}

.problem__cta-row {
  margin-top: 1.5rem;
  text-align: center;
}

.problem-intro {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.problem-intro__eyebrow {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.4rem 0.88rem;
  border: 1px solid rgba(255, 179, 142, 0.24);
  background: rgba(252, 103, 103, 0.08);
  color: #ffb28b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.problem-intro h2,
.problem-intro p {
  margin-bottom: 0;
}

.problem-intro p {
  max-width: 46ch;
  color: var(--text-secondary);
}

.problem-signal {
  margin-top: 0.55rem;
  padding: 1.05rem;
  border: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(252, 103, 103, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(72, 45, 36, 0.9), rgba(45, 31, 28, 0.9) 58%, rgba(29, 24, 24, 0.9)),
    rgba(29, 24, 24, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 20px 42px rgba(0, 0, 0, 0.28);
}

.problem-signal__label {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: #f1c8b4;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.problem-signal__track {
  position: relative;
  height: 8.6rem;
  perspective: 1000px;
  transform-style: preserve-3d;
  overflow: hidden;
}

.problem-signal__track span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 6.4rem;
  padding: 0.58rem 0.95rem;
  border: 1px solid rgba(255, 179, 142, 0.2);
  background: rgba(22, 18, 20, 0.92);
  color: #f7e2d7;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  transform: translate3d(-50%, -50%, 0);
  transform-style: preserve-3d;
  will-change: transform, opacity;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.problem-signal__track span.is-front {
  border-color: rgba(255, 164, 126, 0.42);
  background: rgba(70, 38, 35, 0.96);
  color: #ffe7db;
  box-shadow:
    0 14px 24px rgba(0, 0, 0, 0.28),
    0 0 14px rgba(252, 103, 103, 0.1);
}

.problem-signal__track span.is-mid {
  border-color: rgba(255, 164, 126, 0.22);
  background: rgba(39, 25, 27, 0.92);
  color: #f4d8cb;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.2),
    0 0 10px rgba(252, 103, 103, 0.06);
}

.problem-signal__track span.is-back {
  border-color: rgba(255, 164, 126, 0.12);
  background: rgba(24, 19, 22, 0.82);
  color: #dbb7a8;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.18),
    0 0 8px rgba(252, 103, 103, 0.04);
}

.problem-signal__track span:not(:last-child)::after {
  display: none;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 1.9vw, 1.4rem);
  align-items: stretch;
}

.problem-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
  padding: clamp(1.35rem, 2.3vw, 1.85rem);
  background:
    radial-gradient(circle at top right, rgba(252, 103, 103, 0.22), transparent 38%),
    linear-gradient(180deg, rgba(78, 42, 31, 0.97), rgba(43, 27, 23, 0.96) 62%, rgba(30, 22, 21, 0.96));
  border: 1px solid rgba(255, 179, 142, 0.2);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.problem-card::before {
  display: none;
  content: none;
}

.problem-card:hover {
  transform: none;
  border-color: rgba(255, 179, 142, 0.2);
  background:
    radial-gradient(circle at top right, rgba(252, 103, 103, 0.24), transparent 38%),
    linear-gradient(180deg, rgba(88, 47, 34, 0.975), rgba(48, 30, 25, 0.965) 62%, rgba(34, 24, 22, 0.965));
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.26);
}

.problem-card::after {
  content: "";
  position: absolute;
  inset: auto -14% -28% auto;
  width: 52%;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(252, 103, 103, 0.18), transparent 72%);
  pointer-events: none;
}

.problem-card--primary {
  grid-column: span 2;
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(126, 67, 46, 0.98), rgba(77, 42, 31, 0.97) 44%, rgba(42, 28, 25, 0.97) 84%),
    linear-gradient(180deg, rgba(88, 49, 36, 0.97), rgba(40, 27, 24, 0.965));
  border-color: rgba(255, 179, 142, 0.3);
}

.problem-card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(255, 179, 142, 0.34);
  background: rgba(252, 103, 103, 0.14);
  color: #ffbf9f;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.problem-card__label {
  position: absolute;
  top: 1.1rem;
  right: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5.2rem;
  min-height: 5.2rem;
  padding: 0.55rem;
  border: 4px double rgba(var(--brand-color-deep-rgb));
  color: rgba(var(--brand-color-deep-rgb));
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.18;
  text-align: center;
  transform: rotate(10deg);
  transform-origin: center;
  pointer-events: none;
  z-index: 0;
}

.problem-card h3 {
  position: relative;
  z-index: 1;
  max-width: 22ch;
  margin-bottom: 0;
  font-size: clamp(1.02rem, 0.98rem + 0.2vw, 1.12rem);
  color: #fff0e8;
}

.problem-card p {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgba(236, 218, 208, 0.8);
}

.problem-card--primary h3 {
  max-width: 24ch;
  font-size: clamp(1.35rem, 1.16rem + 0.45vw, 1.7rem);
}

.problem-card--primary p {
  max-width: 64ch;
}

.problem-drift {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.problem-drift span {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 179, 142, 0.26);
  background: rgba(42, 28, 28, 0.88);
  color: #efcdbf;
  font-size: 0.8rem;
  font-weight: 600;
}

.problem-cta {
  background:
    linear-gradient(135deg, #6c382a, #53271f);
  border-color: #835340;
  color: #fff3ec;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 179, 142, 0.05);
}

.problem-cta:hover {
  background:
    linear-gradient(135deg, #763d2d, #592a20);
  border-color: #8f5945;
  color: #fff4ed;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(255, 179, 142, 0.07);
}

:root[data-theme="light"] .problem-intro__eyebrow {
  border-color: rgba(191, 164, 144, 0.32);
  background: rgba(255, 243, 236, 0.72);
  color: #9f5333;
}

:root[data-theme="light"] .problem-signal {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 228, 214, 0.62), transparent 42%),
    linear-gradient(180deg, rgba(255, 247, 242, 0.96), rgba(255, 255, 255, 0.9)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 16px 32px rgba(28, 18, 12, 0.06);
}

:root[data-theme="light"] .problem-signal__label {
  color: #6d5243;
}

:root[data-theme="light"] .problem-signal__track span {
  border-color: rgba(232, 208, 197, 0.6);
  background: rgba(255, 255, 255, 0.76);
  color: #7f6757;
}

:root[data-theme="light"] .problem-signal__track span.is-front {
  border-color: rgba(252, 103, 103, 0.5);
  background: rgba(255, 236, 228, 0.98);
  color: #8b3c25;
  box-shadow: 0 0 14px rgba(252, 103, 103, 0.14);
}

:root[data-theme="light"] .problem-signal__track span.is-mid {
  border-color: rgba(232, 208, 197, 0.6);
  background: rgba(255, 247, 242, 0.88);
  color: #7f6757;
  box-shadow: 0 0 10px rgba(252, 103, 103, 0.08);
}

:root[data-theme="light"] .problem-signal__track span.is-back {
  border-color: rgba(232, 208, 197, 0.48);
  background: rgba(255, 255, 255, 0.72);
  color: #876f61;
  box-shadow: 0 0 8px rgba(252, 103, 103, 0.04);
}

:root[data-theme="light"] .problem-card {
  background:
    radial-gradient(circle at top right, rgba(255, 205, 182, 0.46), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 245, 242, 0.98));
  border-color: rgba(212, 192, 181, 0.56);
  box-shadow: 0 18px 34px rgba(6, 12, 18, 0.08);
}

:root[data-theme="light"] .problem-card:hover {
  border-color: rgba(212, 192, 181, 0.56);
  background:
    radial-gradient(circle at top right, rgba(255, 205, 182, 0.46), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 245, 242, 0.98));
  box-shadow: 0 18px 34px rgba(6, 12, 18, 0.08);
}

:root[data-theme="light"] .problem-card::after {
  background: radial-gradient(circle, rgba(252, 103, 103, 0.1), transparent 72%);
}

:root[data-theme="light"] .problem-card--primary {
  background:
    linear-gradient(135deg, rgba(255, 228, 214, 0.98), rgba(255, 245, 238, 0.94) 42%, rgba(255, 255, 255, 0.98) 78%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 247, 244, 0.98));
  border-color: rgba(220, 165, 140, 0.54);
}

:root[data-theme="light"] .problem-card__index {
  border-color: rgba(220, 165, 140, 0.54);
  background: rgba(255, 233, 221, 0.92);
  color: #b75d38;
}

:root[data-theme="light"] .problem-card__label {
  border-color: rgba(var(--brand-color-deep-rgb));
  background: transparent;
  color: rgba(var(--brand-color-deep-rgb));
  box-shadow: none;
}

:root[data-theme="light"] .problem-card h3 {
  color: #1c1713;
}

:root[data-theme="light"] .problem-card p {
  color: #5f5147;
}

:root[data-theme="light"] .problem-drift span {
  border-color: rgba(220, 165, 140, 0.44);
  background: rgba(255, 244, 237, 0.86);
  color: #7a5642;
}

:root[data-theme="light"] .problem-cta {
  background:
    linear-gradient(135deg, rgba(255, 252, 251, 0.98), rgba(251, 242, 238, 0.98));
  border-color: rgba(196, 107, 79, 0.34);
  color: #8e4d39;
  box-shadow: 0 12px 24px rgba(191, 95, 69, 0.1);
}

:root[data-theme="light"] .problem-cta:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(250, 238, 233, 1));
  border-color: rgba(207, 115, 88, 0.42);
  color: #9b543d;
  box-shadow: 0 14px 28px rgba(191, 95, 69, 0.14);
}

@media (max-width: 768px) {
  .problem-card h3 {
      max-width: none;
    }
}

@media (max-width: 1024px) {
  .problem-shell {
      grid-template-columns: 1fr;
    }

  .problem-intro {
      position: static;
    }
}

@media (max-width: 768px) {
  .problem-grid {
      grid-template-columns: 1fr;
    }

  .problem-card--primary {
      grid-column: auto;
    }
}

@media (max-width: 640px) {
  .problem-signal__track {
      height: 7.6rem;
    }

  .problem-signal__track span::after {
      display: none;
    }

  .problem-card {
      padding: 1.2rem 1rem;
    }

  .problem-card__index {
      width: 2rem;
      height: 2rem;
    }

  .problem-card__label {
      top: 0.95rem;
      right: 0.45rem;
      width: 4.55rem;
      min-height: 4.55rem;
      padding: 0.45rem;
      font-size: 0.58rem;
      transform: rotate(9deg);
    }
}
