/* SBC: componentes do deck do produto, na linguagem do site.
   Usa os tokens de flux-ds.css (tema escuro padrão e html[data-theme="light"])
   e reaproveita os componentes sp-* de softphone.css. */

/* Animações só rodam com a seção na tela (sbc.js liga .is-run) */
.js .sbc-anim:not(.is-run),
.js .sbc-anim:not(.is-run) * {
  animation-play-state: paused !important;
}

.sbc-mini {
  color: hsl(var(--ink-muted));
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  margin-top: 0.6rem;
  text-transform: uppercase;
}

/* ---------- Hero: barreira na borda ---------- */
.sbc-gate {
  margin: 2.5rem auto 0;
  max-width: 1100px;
  position: relative;
  width: 100%;
}

.sbc-gate-ends {
  display: flex;
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  gap: 1rem;
  justify-content: space-between;
  text-align: left;
}

.sbc-gate-ends > div:last-child {
  text-align: right;
}

.sbc-gate-ends b {
  color: hsl(var(--ink-strong));
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.sbc-gate-ends small {
  color: hsl(var(--ink-muted));
  display: block;
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.sbc-gate-box {
  overflow: hidden;
  position: relative;
}

.sbc-gate-box svg {
  display: block;
  height: auto;
  overflow: visible;
  width: 100%;
}

.sbc-gate .lane {
  stroke: hsl(var(--ink-strong) / 0.16);
  stroke-dasharray: 3 7;
  stroke-width: 1;
}

.sbc-gate .ok {
  fill: hsl(var(--primary));
}

.sbc-gate .bad {
  fill: #f43f5e;
}

.sbc-gate .burst {
  fill: none;
  stroke: #f43f5e;
  stroke-width: 2;
}

.sbc-shield {
  fill: url(#sbcShieldGrad);
  stroke: #48eacd;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 22px rgba(47, 216, 192, 0.3));
}

.sbc-shield-in {
  fill: none;
  opacity: 0.6;
  stroke: hsl(var(--ink-strong) / 0.3);
  stroke-dasharray: 4 6;
  stroke-width: 1;
}

.sbc-tick {
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 7;
}

.sbc-gate-name {
  color: hsl(var(--ink-strong));
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  margin-top: 0.4rem;
  text-align: center;
}

.sbc-tags {
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.sbc-tag {
  background: hsl(var(--surface));
  border: 1px solid rgba(244, 63, 94, 0.45);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  color: #fb7185;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  position: absolute;
  white-space: nowrap;
}

html[data-theme="light"] .sbc-tag {
  color: #be123c;
}

.sbc-tag.t1 { left: 24%; top: 0; }
.sbc-tag.t2 { bottom: 0; left: 28%; }
.sbc-tag.t3 { left: 6%; top: 44%; }

@media (max-width: 760px) {
  .sbc-gate-box svg {
    margin-left: -35%;
    width: 170%;
  }
  .sbc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
    position: static;
  }
  .sbc-tag {
    position: static;
  }
  .sbc-gate-ends small {
    font-size: 0.72rem;
  }
}

/* ---------- O desafio: ameaças ---------- */
.sbc-threat {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .sbc-threat {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sbc-threat .sp-ico {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
}

.sbc-note {
  border: 1px dashed hsl(var(--ink-strong) / 0.2);
  border-radius: 14px;
  color: hsl(var(--ink-muted));
  font-size: 0.92rem;
  line-height: 1.5;
  margin-top: 0.9rem;
  padding: 0.9rem 1.1rem;
}

/* ---------- A solução: pilha de camadas ---------- */
.sbc-stack {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 600px;
  width: 100%;
}

.sbc-band {
  border-radius: 16px;
  padding: 1rem 1.2rem;
  text-align: center;
}

.sbc-band small {
  color: hsl(var(--ink-muted));
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.sbc-band b {
  color: hsl(var(--ink-strong));
  display: block;
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
  font-weight: 600;
  margin-top: 0.3rem;
}

.sbc-band--core {
  background: linear-gradient(135deg, hsl(var(--primary)), #7c6cf0);
  box-shadow: 0 18px 44px hsl(var(--primary) / 0.32);
  padding: 1.3rem 1.2rem;
}

.sbc-band--core small,
.sbc-band--core b {
  color: #fff;
}

.sbc-band--core b {
  font-size: clamp(1.2rem, 1.9vw, 1.8rem);
  letter-spacing: 0.04em;
}

.sbc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.8rem;
}

.sbc-chips span {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 99px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
}

.sbc-flowv {
  background: repeating-linear-gradient(hsl(var(--primary)) 0 6px, transparent 6px 12px);
  height: 52px;
  margin: 0 auto;
  position: relative;
  width: 2px;
}

.sbc-flowv i {
  animation: sbc-vdrop 1.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;
  width: 12px;
}

.sbc-flowv i:nth-child(2) {
  animation-delay: 0.8s;
}

@keyframes sbc-vdrop {
  from { opacity: 0; top: -6px; }
  20% { opacity: 1; }
  to { opacity: 0; top: 100%; }
}

/* ---------- Benefícios (4 cartões) ---------- */
.sbc-grid4,
.sbc-grid3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
  text-align: left;
  width: 100%;
}

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

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

.sbc-case {
  border-top: 1px solid hsl(var(--ink-strong) / 0.1);
  color: hsl(var(--primary)) !important;
  margin-top: 0.4rem !important;
  padding-top: 0.8rem;
}

/* ---------- Interoperabilidade ---------- */
.sbc-frame {
  border-radius: 24px;
  margin-top: 2.5rem;
  padding: 1.4rem 1.6rem 1rem;
  width: 100%;
}

.sbc-interop {
  display: block;
  height: auto;
  overflow: visible;
  width: 100%;
}

.sbc-interop .vl {
  animation: sbc-dash 3s linear infinite;
  fill: none;
  stroke: hsl(var(--ink-strong) / 0.22);
  stroke-dasharray: 5 6;
  stroke-width: 1.8;
}

.sbc-interop .vl.ok2 {
  stroke: #48eacd;
}

@keyframes sbc-dash {
  to { stroke-dashoffset: -200; }
}

.sbc-interop .vb {
  fill: hsl(var(--surface));
  stroke: hsl(var(--ink-strong) / 0.16);
}

.sbc-interop .vb.good {
  stroke: #48eacd;
}

.sbc-interop .vn {
  fill: hsl(var(--ink-strong));
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.sbc-interop .vs {
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.sbc-interop .dot {
  fill: hsl(var(--primary));
}

.sbc-interop .sbcbox {
  fill: hsl(var(--primary));
  filter: drop-shadow(0 12px 24px hsl(var(--primary) / 0.4));
  stroke: #7c6cf0;
  stroke-width: 2;
}

.sbc-interop .sbcT {
  fill: #fff;
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 4px;
}

.sbc-interop .sbcS {
  fill: #e0e7ff;
}

/* Versão empilhada para telas estreitas */
.sbc-interop-m {
  display: none;
}

.sbc-vendors {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sbc-vendor {
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
}

.sbc-vendor b {
  color: hsl(var(--ink-strong));
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}

.sbc-vendor small {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

.sbc-vendor--good {
  border-color: #48eacd !important;
}

@media (max-width: 760px) {
  .sbc-interop {
    display: none;
  }
  .sbc-interop-m {
    display: block;
  }
  .sbc-frame {
    padding: 1rem;
  }
}

/* ---------- Funcionalidades ---------- */
.sbc-feats {
  width: 100%;
}

/* ---------- Como funciona: pipeline com 4 passos ---------- */
.sbc-pipe4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sbc-pipe4 .sp-track {
  left: 12.5%;
  right: 12.5%;
}

@media (max-width: 899px) {
  .sbc-pipe4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Redundância: failover ---------- */
.sbc-fo {
  align-items: center;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr) minmax(0, 1fr);
}

.sbc-fo-end {
  border-radius: 16px;
  padding: 0.9rem 0.6rem;
  text-align: center;
}

.sbc-fo-end b {
  color: hsl(var(--ink-strong));
  display: block;
  font-size: clamp(0.82rem, 1.2vw, 1.05rem);
  font-weight: 600;
}

.sbc-fo-end small {
  color: hsl(var(--ink-muted));
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-top: 0.25rem;
}

.sbc-fo-mid {
  margin: 1.4rem 0;
  position: relative;
}

.sbc-fo-mid svg {
  display: block;
  height: auto;
  overflow: visible;
  width: 100%;
}

.sbc-pop {
  background: hsl(var(--surface));
  border: 1px solid #48eacd;
  border-radius: 12px;
  color: hsl(var(--ink-strong));
  font-size: clamp(0.62rem, 1vw, 0.8rem);
  font-weight: 700;
  left: 50%;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem;
  position: absolute;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.sbc-pop.a { top: 9.8%; }
.sbc-pop.b { top: 90.2%; }

.sbc-pop .x {
  animation: sbc-xm 9s linear infinite;
  background: hsl(var(--surface));
  border: 2px solid #f43f5e;
  border-radius: 50%;
  color: #f43f5e;
  display: grid;
  font-size: 0.7rem;
  height: 1.4rem;
  opacity: 0;
  place-items: center;
  position: absolute;
  right: -0.8rem;
  top: -0.8rem;
  width: 1.4rem;
}

.sbc-fo .pA {
  animation: sbc-foA 9s linear infinite;
  fill: none;
  stroke: #48eacd;
  stroke-width: 3;
}

.sbc-fo .pB {
  animation: sbc-foB 9s linear infinite;
  fill: none;
  stroke: hsl(var(--ink-strong) / 0.18);
  stroke-width: 3;
}

.sbc-fo .dot {
  fill: hsl(var(--primary));
}

.sbc-fo .gA {
  animation: sbc-gA 9s linear infinite;
}

.sbc-fo .gB {
  animation: sbc-gB 9s linear infinite;
  opacity: 0;
}

@keyframes sbc-foA {
  0%, 42% { opacity: 1; stroke: #48eacd; }
  46%, 100% { opacity: 0.55; stroke: #f43f5e; }
}

@keyframes sbc-foB {
  0%, 46% { opacity: 0.6; stroke: hsl(var(--ink-strong) / 0.18); }
  52%, 100% { opacity: 1; stroke: #34d399; }
}

@keyframes sbc-gA {
  0%, 42% { opacity: 1; }
  44%, 100% { opacity: 0; }
}

@keyframes sbc-gB {
  0%, 50% { opacity: 0; }
  53%, 100% { opacity: 1; }
}

@keyframes sbc-xm {
  0%, 43% { opacity: 0; }
  46%, 100% { opacity: 1; }
}

@keyframes sbc-st2 {
  0%, 43% { opacity: 0; }
  45%, 53% { opacity: 1; }
  55%, 100% { opacity: 0; }
}

.sbc-fo-status {
  height: 44px;
  margin-top: 1rem;
  position: relative;
}

.sbc-fo-status div {
  align-items: center;
  border: 1px solid;
  border-radius: 12px;
  display: flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.6rem;
  inset: 0;
  justify-content: center;
  letter-spacing: 0.08em;
  position: absolute;
  text-align: center;
}

.sbc-fo-status .s1 {
  animation: sbc-gA 9s linear infinite;
  background: hsl(var(--primary) / 0.12);
  border-color: hsl(var(--primary) / 0.4);
  color: hsl(var(--primary));
}

.sbc-fo-status .s2 {
  animation: sbc-st2 9s linear infinite;
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fb7185;
  opacity: 0;
}

.sbc-fo-status .s3 {
  animation: sbc-gB 9s linear infinite;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
  opacity: 0;
}

html[data-theme="light"] .sbc-fo-status .s2 { color: #be123c; }
html[data-theme="light"] .sbc-fo-status .s3 { color: #047857; }

@media (max-width: 560px) {
  .sbc-fo {
    gap: 0;
    grid-template-columns: 1fr;
  }
  .sbc-fo-end {
    width: 62%;
  }
  .sbc-fo-end:first-child {
    justify-self: start;
  }
  .sbc-fo-end:last-child {
    justify-self: end;
  }
  .sbc-fo-status div {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
  }
}

/* ---------- O que o SBC protege ---------- */
.sbc-prot {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
  text-align: left;
  width: 100%;
}

@media (min-width: 760px) {
  .sbc-prot {
    gap: 1rem 1.6rem;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  .sbc-prot .c1 { grid-column: 1; grid-row: 1; }
  .sbc-prot .c2 { grid-column: 1; grid-row: 2; }
  .sbc-prot .sbc-pshield { grid-column: 2; grid-row: 1 / 3; }
  .sbc-prot .c3 { grid-column: 3; grid-row: 1; }
  .sbc-prot .c4 { grid-column: 3; grid-row: 2; }
}

.sbc-pcard {
  align-items: flex-start;
  border-radius: 18px;
  display: flex;
  gap: 0.9rem;
  padding: 1.1rem;
}

.sbc-pcard .sp-ico {
  background: rgba(63, 240, 208, 0.12);
  color: #14b8a6;
}

.sbc-pcard h3 {
  color: hsl(var(--ink-strong));
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
}

.sbc-pcard p {
  color: hsl(var(--ink-muted));
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
}

.sbc-pshield {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-self: center;
  padding: 1.5rem 0.5rem;
  position: relative;
}

.sbc-pshield svg {
  filter: drop-shadow(0 0 30px rgba(47, 216, 192, 0.3));
  height: auto;
  position: relative;
  width: min(150px, 40vw);
  z-index: 2;
}

.sbc-pshield b {
  color: hsl(var(--ink-strong));
  font-size: 0.72rem;
  letter-spacing: 0.26em;
}

.sbc-ring {
  animation: sp-pulse 3s ease-out infinite;
  border: 1.5px solid #3ff0d0;
  border-radius: 50%;
  height: min(190px, 50vw);
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 44%;
  transform: translate(-50%, -50%);
  width: min(190px, 50vw);
}

.sbc-ring.r2 {
  animation-delay: 1.5s;
}

/* ---------- Comparativo ---------- */
.sbc-cmp-wrap {
  border-radius: 24px;
  overflow-x: auto;
  padding: 0.5rem;
  width: 100%;
}

.sbc-cmp {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  text-align: left;
  width: 100%;
}

@media (max-width: 560px) {
  .sbc-cmp {
    font-size: 0.8rem;
  }
  .sbc-cmp th,
  .sbc-cmp td {
    padding: 0.7rem 0.5rem !important;
  }
  .sbc-cmp th {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }
}

.sbc-cmp th,
.sbc-cmp td {
  border-bottom: 1px solid hsl(var(--ink-strong) / 0.08);
  padding: 0.85rem 1rem;
}

.sbc-cmp tr:last-child td {
  border-bottom: 0;
}

.sbc-cmp th {
  color: hsl(var(--ink-muted));
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sbc-cmp th.us {
  background: hsl(var(--primary));
  border-radius: 12px 12px 0 0;
  color: #fff;
}

.sbc-cmp td {
  color: hsl(var(--ink-secondary));
}

.sbc-cmp td.us {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--ink-strong));
  font-weight: 500;
}

.sbc-cmp tr:last-child td.us {
  border-radius: 0 0 12px 12px;
}

.sbc-cmp td.them {
  color: hsl(var(--ink-muted));
}

.sbc-yes,
.sbc-no {
  font-weight: 800;
  margin-right: 0.5rem;
}

.sbc-yes { color: #22c55e; }
.sbc-no { color: #f43f5e; }

/* ---------- Encerramento (CTA) ---------- */
.sbc-endshield {
  display: block;
  filter: drop-shadow(0 0 34px rgba(47, 216, 192, 0.27));
  height: auto;
  margin: 0 auto 1.5rem;
  width: min(120px, 30vw);
}

/* ---------- Reduzir movimento: estado final ---------- */
@media (prefers-reduced-motion: reduce) {
  .sbc-fo .pA { opacity: 0.55; stroke: #f43f5e; }
  .sbc-fo .pB { opacity: 1; stroke: #34d399; }
  .sbc-fo .gA { opacity: 0; }
  .sbc-fo .gB { opacity: 1; }
  .sbc-pop .x { opacity: 1; }
  .sbc-fo-status .s1,
  .sbc-fo-status .s2 { opacity: 0; }
  .sbc-fo-status .s3 { opacity: 1; }
  .sbc-flowv i { display: none; }
}
