/* Solução para Operadoras: componentes próprios da página.
   Usa os componentes sp-* de softphone.css (seções, títulos, pipeline,
   cartões) e os tokens de flux-ds.css, então segue o tema escuro (padrão)
   e o claro (data-theme="light"). */

@media (max-width: 640px) {
  .op-page .sp-sec {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

.op-head {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
}

.op-step {
  background: hsl(var(--primary) / 0.14);
  border-radius: 99px;
  display: inline-block;
  letter-spacing: 0.08em;
  margin-right: 0.7rem;
  padding: 0.2rem 0.55rem;
}

/* Animações em CSS ficam paradas enquanto a seção está fora da tela */
.js .op-anim:not(.op-on) *,
.js .op-anim:not(.op-on) *::before,
.js .op-anim:not(.op-on) *::after {
  animation-play-state: paused !important;
}

/* ---------- Hero: as duas camadas ---------- */
.op-cake {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 3rem auto 0;
  max-width: 760px;
  padding-left: 2.5rem;
  position: relative;
  width: 100%;
}

.op-beam {
  background: repeating-linear-gradient(hsl(var(--primary) / 0.55) 0 6px, transparent 6px 12px);
  bottom: 1.5rem;
  left: 0.9rem;
  position: absolute;
  top: 1.5rem;
  width: 2px;
}

.op-beam i {
  animation: op-drop 3.6s linear infinite;
  background: hsl(var(--primary));
  border-radius: 50%;
  box-shadow: 0 0 0 5px hsl(var(--primary) / 0.18);
  height: 12px;
  left: -5px;
  position: absolute;
  top: 0;
  width: 12px;
}

.op-beam i:nth-child(2) { animation-delay: 1.2s; }
.op-beam i:nth-child(3) { animation-delay: 2.4s; }

@keyframes op-drop {
  from { opacity: 0; top: -4px; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  to { opacity: 0; top: 100%; }
}

.op-layer {
  align-items: center;
  animation: op-breathe 6s ease-in-out infinite;
  border-radius: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  padding: 1rem 1.25rem;
  text-align: left;
}

.op-layer:nth-child(3) { animation-delay: -2s; }
.op-layer:nth-child(4) { animation-delay: -4s; }

@keyframes op-breathe {
  50% { transform: translateX(6px); }
}

.op-layer b {
  color: hsl(var(--ink-strong));
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  font-weight: 500;
}

.op-layer-tag {
  color: hsl(var(--primary));
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  min-width: 9.5rem;
  text-transform: uppercase;
}

.op-layer--brand {
  background: linear-gradient(135deg, hsl(var(--primary)), #7c6cf0);
  box-shadow: 0 20px 48px hsl(var(--primary) / 0.32);
}

.op-layer--brand b,
.op-layer--brand .op-layer-tag {
  color: #fff;
}

.op-layer--flux {
  border-color: hsl(var(--primary) / 0.4);
}

.op-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.op-chips span {
  background: hsl(var(--surface-soft));
  border: 1px solid hsl(var(--ink-strong) / 0.12);
  border-radius: 99px;
  color: hsl(var(--ink-strong));
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
}

/* ---------- 01 Desafio: fornecedores separados x Flux ---------- */
.op-vs-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.op-toggle {
  align-self: center;
  background: hsl(var(--surface-soft));
  border: 1px solid hsl(var(--ink-strong) / 0.1);
  border-radius: 99px;
  display: flex;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.25rem;
}

.op-toggle button {
  border-radius: 99px;
  color: hsl(var(--ink-secondary));
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 0.95rem;
  transition: background 0.3s, color 0.3s;
}

.op-toggle button.is-on {
  background: hsl(var(--primary));
  color: #fff;
}

.op-vs {
  height: 380px;
  position: relative;
  width: 100%;
}

.op-vs-lines {
  height: 100%;
  inset: 0;
  position: absolute;
  transition: opacity 0.6s;
  width: 100%;
}

.op-vs-lines path {
  animation: op-dash 2.4s linear infinite;
  fill: none;
  stroke: rgba(244, 63, 94, 0.45);
  stroke-dasharray: 5 6;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

@keyframes op-dash {
  to { stroke-dashoffset: -44; }
}

.op-frame {
  border: 1.5px dashed hsl(var(--primary) / 0.55);
  border-radius: 24px;
  bottom: 2%;
  left: 2%;
  opacity: 0;
  position: absolute;
  right: 2%;
  top: 32%;
  transform: scale(0.94);
  transition: opacity 0.6s, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  background: hsl(var(--primary) / 0.06);
}

.op-frame span {
  background: linear-gradient(135deg, hsl(var(--primary)), #7c6cf0);
  border-radius: 99px;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 600;
  left: 50%;
  letter-spacing: 0.18em;
  padding: 0.3rem 0.7rem;
  position: absolute;
  text-transform: uppercase;
  top: -0.8rem;
  transform: translateX(-50%);
  white-space: nowrap;
}

.op-core,
.op-sup {
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: left 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), top 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.5s, box-shadow 0.5s;
}

.op-core {
  background: linear-gradient(135deg, hsl(var(--primary)), #7c6cf0);
  border-radius: 20px;
  box-shadow: 0 18px 40px hsl(var(--primary) / 0.32);
  color: #fff;
  padding: 0.85rem 1.2rem;
  text-align: center;
  white-space: nowrap;
  z-index: 3;
}

.op-core small {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  opacity: 0.85;
  text-transform: uppercase;
}

.op-core b {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

.op-sup {
  background: hsl(var(--surface-muted));
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.16);
  padding: 0.7rem 0.8rem;
  text-align: center;
  width: min(44%, 200px);
  z-index: 2;
}

.op-sup b {
  color: hsl(var(--ink-strong));
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
}

.op-sup small {
  display: grid;
  font-size: 0.72rem;
  margin-top: 0.2rem;
}

.op-sup small span {
  grid-area: 1 / 1;
  transition: opacity 0.5s;
}

.op-sup .a { color: #f43f5e; }
.op-sup .b { color: hsl(var(--primary)); font-weight: 600; opacity: 0; }

.op-vs[data-mode="sep"] .s1 { left: 24%; top: 14%; }
.op-vs[data-mode="sep"] .s2 { left: 76%; top: 14%; }
.op-vs[data-mode="sep"] .s3 { left: 24%; top: 86%; }
.op-vs[data-mode="sep"] .s4 { left: 76%; top: 86%; }

.op-vs[data-mode="flux"] .op-vs-lines { opacity: 0; }
.op-vs[data-mode="flux"] .op-frame { opacity: 1; transform: none; }
.op-vs[data-mode="flux"] .op-core { top: 11%; }
.op-vs[data-mode="flux"] .op-sup { border-color: hsl(var(--primary) / 0.45); box-shadow: 0 12px 28px hsl(var(--primary) / 0.14); }
.op-vs[data-mode="flux"] .op-sup .a { opacity: 0; }
.op-vs[data-mode="flux"] .op-sup .b { opacity: 1; }
.op-vs[data-mode="flux"] .s1 { left: 27%; top: 53%; }
.op-vs[data-mode="flux"] .s2 { left: 73%; top: 53%; }
.op-vs[data-mode="flux"] .s3 { left: 27%; top: 80%; }
.op-vs[data-mode="flux"] .s4 { left: 73%; top: 80%; }

.op-vs-note {
  color: hsl(var(--ink-muted));
  font-size: 0.9rem;
  margin: 0;
  min-height: 2.8em;
  text-align: center;
}

html[data-theme="light"] .op-sup {
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

/* ---------- 02 Como funciona: diagrama com passos sincronizados ---------- */
.op-panel {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--ink-strong) / 0.08);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.25);
  min-width: 0;
  padding: 1rem 1.1rem 0.6rem;
}

.op-panel-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.op-dg {
  display: block;
  height: auto;
  overflow: visible;
  width: 100%;
}

@media (max-width: 640px) {
  .op-dg {
    min-width: 640px;
  }
}

.op-lm {
  color: hsl(var(--ink-muted));
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  margin: 0.5rem 0 0;
  text-transform: uppercase;
}

.op-dg text { font-family: Outfit, ui-sans-serif, system-ui, sans-serif; }
.op-dg .zone { fill: hsl(var(--ink-strong) / 0.025); stroke: hsl(var(--ink-strong) / 0.16); stroke-dasharray: 5 6; stroke-width: 1.2; }
.op-dg .zone.fx { fill: hsl(var(--primary) / 0.05); stroke: hsl(var(--primary) / 0.45); }
.op-dg .zt { fill: hsl(var(--ink-muted)); font-size: 10.5px; font-weight: 600; letter-spacing: 2px; }
.op-dg .zt.fx { fill: hsl(var(--primary)); }
.op-dg .nd { fill: hsl(var(--surface-muted)); stroke: hsl(var(--ink-strong) / 0.14); stroke-width: 1.2; }
.op-dg .nd.on { stroke: hsl(var(--primary)); stroke-width: 2; }
.op-dg .nd.brand { fill: url(#op-acc); stroke: none; }
.op-dg .t1 { fill: hsl(var(--ink-strong)); font-size: 16px; font-weight: 600; }
.op-dg .t2 { fill: hsl(var(--ink-muted)); font-size: 10.5px; font-weight: 600; letter-spacing: 1.6px; }
.op-dg .t2.a { fill: hsl(var(--primary)); }
.op-dg .t3 { fill: hsl(var(--ink-secondary)); font-size: 12.5px; }
.op-dg .w { fill: #fff; }
.op-dg .t2.w, .op-dg .t3.w { fill: rgba(255, 255, 255, 0.85); }
.op-dg .ln { animation: op-dash2 3s linear infinite; fill: none; stroke: hsl(var(--primary) / 0.55); stroke-dasharray: 6 6; stroke-width: 2; }
@keyframes op-dash2 { to { stroke-dashoffset: -200; } }
.op-dg .pk { fill: hsl(var(--primary)); }
.op-dg .pk.v { fill: #7c6cf0; }
.op-dg .pk.g { fill: #10b981; }
.op-dg .ring { fill: none; stroke: hsl(var(--primary)); stroke-width: 2; }
.op-dg .chipbg.g { fill: rgba(16, 185, 129, 0.12); stroke: rgba(16, 185, 129, 0.5); }
.op-dg .ct { font-size: 11px; font-weight: 600; letter-spacing: 0.6px; }
.op-dg .ct.g { fill: #34d399; }
html[data-theme="light"] .op-dg .ct.g { fill: #047857; }
html[data-theme="light"] .op-dg .chipbg.g { fill: #ecfdf5; }
html[data-theme="light"] .op-panel { box-shadow: 0 30px 80px rgba(15, 23, 42, 0.1); }

.op-sts {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

@media (min-width: 640px) {
  .op-sts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .op-sts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.op-st {
  align-items: flex-start;
  border: 1px solid transparent;
  border-radius: 18px;
  display: flex;
  gap: 0.8rem;
  padding: 0.75rem 0.9rem;
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.op-st b {
  color: hsl(var(--ink-strong));
  display: block;
  font-weight: 600;
}

.op-st p {
  color: hsl(var(--ink-muted));
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0.2rem 0 0;
}

.op-n {
  align-items: center;
  background: hsl(var(--primary) / 0.14);
  border-radius: 50%;
  color: hsl(var(--primary));
  display: grid;
  flex: none;
  font-size: 0.85rem;
  font-weight: 600;
  height: 2rem;
  place-items: center;
  transition: background 0.35s, color 0.35s;
  width: 2rem;
}

.op-st.is-on {
  background: hsl(var(--surface-muted));
  border-color: hsl(var(--primary) / 0.45);
  box-shadow: 0 14px 34px hsl(var(--primary) / 0.14);
}

.op-st.is-on .op-n {
  background: hsl(var(--primary));
  color: #fff;
}

/* ---------- 03 Produtos em duas camadas ---------- */
.op-tiers {
  display: flex;
  flex-direction: column;
}

.op-tier-lb {
  align-items: center;
  color: hsl(var(--ink-secondary));
  display: flex;
  font-size: 0.72rem;
  font-weight: 600;
  gap: 0.6rem;
  letter-spacing: 0.18em;
  margin: 0 0 0.9rem;
  text-transform: uppercase;
}

.op-tier-lb i {
  background: linear-gradient(135deg, hsl(var(--primary)), #7c6cf0);
  border-radius: 4px;
  height: 12px;
  width: 12px;
}

.op-tier-lb--fx i {
  background: transparent;
  border: 2px solid hsl(var(--primary));
}

.op-prods {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .op-prods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .op-prods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .op-prods--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.op-prod {
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.op-prod:hover,
.op-prod:focus-visible {
  border-color: hsl(var(--primary) / 0.55);
  box-shadow: 0 18px 40px hsl(var(--primary) / 0.16);
  transform: translateY(-3px);
}

.op-prod b {
  color: hsl(var(--ink-strong));
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 0.4rem;
}

.op-prod p {
  color: hsl(var(--ink-muted));
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

.op-go {
  color: hsl(var(--primary));
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: auto;
  padding-top: 0.4rem;
}

.op-bus {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 1.1rem auto;
  position: relative;
}

.op-bus span {
  color: hsl(var(--ink-muted));
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.op-bus i {
  background: repeating-linear-gradient(hsl(var(--primary) / 0.6) 0 5px, transparent 5px 10px);
  height: 36px;
  position: relative;
  width: 2px;
}

.op-bus i::after {
  animation: op-bus 1.6s linear infinite;
  background: hsl(var(--primary));
  border-radius: 50%;
  box-shadow: 0 0 0 5px hsl(var(--primary) / 0.18);
  content: "";
  height: 10px;
  left: -4px;
  position: absolute;
  top: 0;
  width: 10px;
}

@keyframes op-bus {
  from { opacity: 0; top: -4px; }
  25% { opacity: 1; }
  to { opacity: 0; top: 100%; }
}

/* ---------- 05 Na prática ---------- */
.op-cases {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .op-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.op-case {
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.5rem;
}

.op-case-who {
  color: hsl(var(--ink-strong));
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.op-case-row {
  align-items: flex-start;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 6.2rem minmax(0, 1fr);
}

.op-case-row p {
  color: hsl(var(--ink-secondary));
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

.op-case-k {
  border-radius: 99px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 0.35rem 0.6rem;
  text-align: center;
  text-transform: uppercase;
}

.op-case-k.bad { background: rgba(244, 63, 94, 0.12); color: #f43f5e; }
.op-case-k.good { background: hsl(var(--primary)); color: #fff; }

.op-case-flow {
  background: hsl(var(--primary) / 0.12);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  position: relative;
}

.op-case-flow i {
  animation: op-fb 2.6s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, hsl(var(--primary)), transparent);
  border-radius: 99px;
  bottom: 0;
  left: -30%;
  position: absolute;
  top: 0;
  width: 30%;
}

@keyframes op-fb {
  to { left: 100%; }
}

.op-case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.op-case-tags a {
  border: 1px solid hsl(var(--primary) / 0.4);
  border-radius: 99px;
  color: hsl(var(--primary));
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  transition: background 0.25s;
}

.op-case-tags a:hover { background: hsl(var(--primary) / 0.12); }

/* ---------- FAQ ---------- */
.op-faq-wrap {
  max-width: 900px;
}

.op-faq {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.op-q {
  border-radius: 20px;
  padding: 1.1rem 1.3rem;
}

.op-q summary {
  align-items: center;
  color: hsl(var(--ink-strong));
  cursor: pointer;
  display: flex;
  font-size: 1rem;
  gap: 1rem;
  justify-content: space-between;
  list-style: none;
}

.op-q summary::-webkit-details-marker { display: none; }

.op-q summary i {
  border-bottom: 2px solid hsl(var(--primary));
  border-right: 2px solid hsl(var(--primary));
  flex: none;
  height: 9px;
  transform: rotate(45deg);
  transition: transform 0.3s;
  width: 9px;
}

.op-q[open] summary i { transform: rotate(-135deg); }

.op-q p {
  color: hsl(var(--ink-muted));
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0.8rem 0 0;
}

/* ---------- Respeitar "reduzir movimento": estado final visível ---------- */
@media (prefers-reduced-motion: reduce) {
  .op-beam i,
  .op-bus i::after,
  .op-case-flow i {
    display: none;
  }
}
