/* Seção #problema — palco de vidro com régua de divergência e convergência.
   Porte do protótipo .dmie/.raw/O Problema DMIE.html, com todos os seletores
   escopados sob .problema para não colidir com o CSS global. */

.problema {
  color-scheme: dark;
  --bg: #030c21;
  --surface: #0b1630;
  --line: rgba(150, 185, 255, .16);
  --fg: #f5f8ff;
  --muted: #9db0d4;
  --faint: #6d80a8;
  --blue: #5b9dff;
  --coral: #ff5d62;
  --crm: #ffb02e;
  --erp: #ff7a3d;
  --plan: #ff5d8a;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 88% -6%, rgba(18, 70, 170, .55), transparent 62%),
    radial-gradient(700px 460px at -8% 34%, rgba(14, 46, 120, .38), transparent 60%),
    var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.problema,
.problema *,
.problema *::before,
.problema *::after { box-sizing: border-box; }

.problema .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- cabeçalho ---------- */
.problema .head { margin-bottom: clamp(28px, 4vw, 48px); }
.problema .eyebrow {
  margin: 0 0 20px;
  font: 600 12px/1 var(--font-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
}
.problema .title {
  margin: 0;
  font: 700 clamp(1.8rem, 5vw, 3.5rem)/1.12 var(--font-display);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.problema .title span { display: block; }
.problema .em {
  display: inline;
  padding-bottom: .06em;
  background: linear-gradient(var(--coral), var(--coral)) no-repeat 0 96% / 100% 3px;
  animation: problema-draw 1.1s .5s cubic-bezier(.3, .7, .2, 1) backwards;
}
@keyframes problema-draw { from { background-size: 0 3px; } }

/* ---------- palco ---------- */
.problema .stage {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3.4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(18, 32, 66, .72), rgba(8, 17, 40, .72));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 40px 80px -40px rgba(0, 0, 0, .7);
  transition: border-color .8s;
}
.problema .stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 72%) var(--my, 0%), rgba(91, 157, 255, .14), transparent 70%);
}
.problema .stage > * { position: relative; }
.problema .stage[data-state="1"] { border-color: rgba(91, 157, 255, .4); }

.problema .stage-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.problema .kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 600 12px/1.3 var(--font-body);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #aebcdc;
}
.problema .kicker .dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 93, 98, .18);
  transition: background .6s, box-shadow .6s;
}
.problema .stage[data-state="1"] .kicker .dot { background: var(--blue); box-shadow: 0 0 0 4px rgba(91, 157, 255, .2); }

.problema .switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
}
.problema .switch .thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--fg);
  transition: transform .45s cubic-bezier(.3, .7, .2, 1);
}
.problema .stage[data-state="1"] .switch .thumb { transform: translateX(100%); }
.problema .switch button {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: none;
  color: var(--muted);
  font: 500 13px/1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: color .3s;
}
.problema .switch button[aria-pressed="true"] { color: #06142f; }
.problema .switch button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* pergunta que vira resposta */
.problema .verdict { display: grid; margin-top: clamp(24px, 3.5vw, 40px); }
.problema .q {
  grid-area: 1 / 1;
  margin: 0;
  font: 700 clamp(1.6rem, 3.8vw, 2.6rem)/1.1 var(--font-display);
  letter-spacing: -.02em;
  transition: opacity .6s, transform .6s;
}
.problema .q-a { color: var(--coral); }
.problema .q-b { color: var(--blue); opacity: 0; transform: translateY(12px); }
.problema .stage[data-state="1"] .q-a { opacity: 0; transform: translateY(-12px); }
.problema .stage[data-state="1"] .q-b { opacity: 1; transform: none; }

/* ---------- régua ---------- */
.problema .ruler { position: relative; height: 148px; margin: 30px 0 10px; }
.problema .track {
  position: absolute;
  left: 0;
  right: 0;
  top: 104px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(150, 185, 255, .12), rgba(150, 185, 255, .38), rgba(150, 185, 255, .12));
}
.problema .tick { position: absolute; top: 99px; width: 1px; height: 12px; background: rgba(150, 185, 255, .32); }
.problema .tl {
  position: absolute;
  top: 120px;
  transform: translateX(-50%);
  font: 500 11px/1 var(--font-body);
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.problema .tl.first { transform: none; }
.problema .tl.last { transform: translateX(-100%); }

.problema .gap {
  position: absolute;
  top: 36px;
  height: 9px;
  border: 1.5px solid var(--coral);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}
.problema .gap-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  font: 500 13px/1 var(--font-body);
  color: var(--muted);
}
.problema .gap-label b { font: 700 18px/1 var(--font-display); color: var(--coral); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

.problema .mk { position: absolute; top: 0; width: 0; height: 148px; color: var(--c); }
.problema .mk .tag {
  position: absolute;
  top: 52px;
  left: 0;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: var(--fg);
  font: 600 12px/1 var(--font-body);
  letter-spacing: .04em;
  white-space: nowrap;
  transition: background .3s;
}
.problema .mk .tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.problema .mk .stem { position: absolute; left: 0; top: 78px; width: 1.5px; height: 27px; transform: translateX(-50%); background: var(--c); opacity: .55; }
.problema .mk .pt {
  position: absolute;
  left: 0;
  top: 105px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 5px var(--cg), 0 0 22px var(--cg);
  transition: transform .3s;
}
.problema .mk.hl .pt { transform: translate(-50%, -50%) scale(1.35); }
.problema .mk.hl .tag { background: rgba(255, 255, 255, .16); }

.problema .merged {
  position: absolute;
  top: 50px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(91, 157, 255, .5);
  border-radius: 999px;
  background: rgba(91, 157, 255, .16);
  color: #d4e5ff;
  font: 600 12px/1 var(--font-body);
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}
.problema .merged svg { width: 12px; height: 12px; }

/* ---------- cartões ---------- */
.problema .cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.problema .card {
  --c: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 22px 22px 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  transition: border-color .5s, transform .3s;
}
.problema .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--c), transparent);
}
.problema .stage[data-state="1"] .card { border-color: rgba(91, 157, 255, .35); }
@media (hover: hover) {
  .problema .card:hover { transform: translateY(-3px); border-color: rgba(150, 185, 255, .38); }
}
.problema .card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.problema .card h3 { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 14px/1 var(--font-body); color: var(--muted); }
.problema .card h3 i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.problema .badge { display: grid; font: 600 11px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; }
.problema .badge b { grid-area: 1 / 1; justify-self: end; padding: 5px 9px; border-radius: 999px; transition: opacity .5s; }
.problema .b-a { color: var(--coral); background: rgba(255, 93, 98, .12); }
.problema .b-b { color: var(--blue); background: rgba(91, 157, 255, .14); opacity: 0; }
.problema .stage[data-state="1"] .b-a { opacity: 0; }
.problema .stage[data-state="1"] .b-b { opacity: 1; }
.problema .val {
  display: flex;
  align-items: baseline;
  gap: .28em;
  margin: 6px 0 0;
  color: var(--fg);
  font: 700 clamp(2.1rem, 4.4vw, 3.3rem)/1 var(--font-display);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.problema .val .cur, .problema .val .unit { font-size: .45em; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.problema .cap { margin: 0; font-size: 14px; color: var(--muted); }
.problema .note { margin: 18px 0 0; font-size: 12px; color: var(--faint); }

/* ---------- sintomas em sequência ---------- */
.problema .flow { margin-top: clamp(48px, 7vw, 80px); }
.problema .flow-title { margin: 0; font: 600 12px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.problema .steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 48px);
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.problema .steps::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--coral), rgba(255, 93, 98, .12));
  transform-origin: left;
  transition: transform 1.4s cubic-bezier(.3, .7, .2, 1);
}
html.js .problema .steps:not(.in)::before { transform: scaleX(.001); }
.problema .steps li { position: relative; padding-top: 34px; }
.problema .steps li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border: 2px solid var(--coral);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 5px rgba(255, 93, 98, .12);
}
.problema .lbl { font: 600 12px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.problema .steps p { max-width: 24ch; margin: 10px 0 0; font: 600 clamp(1.05rem, 1.8vw, 1.3rem)/1.3 var(--font-body); text-wrap: balance; }

/* ---------- fecho ---------- */
.problema .closing {
  max-width: 32ch;
  margin: clamp(48px, 7vw, 88px) 0 0;
  font: 500 clamp(1.4rem, 3.2vw, 2.3rem)/1.2 var(--font-display);
  letter-spacing: -.02em;
  color: var(--muted);
  text-wrap: balance;
}
.problema .closing strong {
  font-weight: 700;
  background: linear-gradient(90deg, var(--fg), #8cb8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- mobile ---------- */
@media (max-width: 720px) {
  .problema .stage { border-radius: 22px; }
  .problema .switch { width: 100%; }
  .problema .mk .tag { padding: 5px 8px; font-size: 11px; }
  .problema .gap-label { font-size: 12px; }
  .problema .gap-label b { font-size: 16px; }
  .problema .cards { grid-template-columns: 1fr; gap: 10px; }
  .problema .card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "head val" "cap val";
    align-items: center;
    column-gap: 12px;
    row-gap: 8px;
    padding: 16px 18px;
  }
  .problema .card::before { left: 18px; right: 18px; }
  .problema .card-head { grid-area: head; justify-content: flex-start; gap: 10px; }
  .problema .badge b { justify-self: start; }
  .problema .cap { grid-area: cap; font-size: 13px; }
  .problema .val { grid-area: val; margin: 0; font-size: 1.9rem; }
  .problema .steps { grid-template-columns: 1fr; gap: 26px; padding-left: 34px; }
  .problema .steps::before {
    top: 6px;
    bottom: 20px;
    left: 6px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--coral), rgba(255, 93, 98, .12));
    transform-origin: top;
  }
  html.js .problema .steps:not(.in)::before { transform: scaleY(.001); }
  .problema .steps li { padding-top: 0; }
  .problema .steps li::before { top: 2px; left: -34px; }
  .problema .steps p { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .problema,
  .problema *,
  .problema *::before,
  .problema *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}
