/* ==========================================================================
   SST — Documentos + Camadas de IA (adaptado DOCS → Laudo Pro)
   ========================================================================== */

/* Documentos SST — fundo via .section-bg no HTML */

.sst-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1rem;
  max-width: 960px;
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
}

.sst-doc-card {
  text-align: center;
  padding: 1.375rem 1rem;
  background: var(--white);
  border: 1px solid rgba(15, 30, 61, 0.07);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.sst-doc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(46, 139, 122, 0.28);
  box-shadow: var(--shadow-md);
}

.sst-doc-card__icon {
  width: 2rem;
  height: 2rem;
  color: var(--teal);
  margin: 0 auto 0.625rem;
}

.sst-doc-card__name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.375rem;
}

.sst-doc-card__desc {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--gray);
  margin: 0;
}

/* Camadas de IA — fundo via .section-white no HTML */

.section-ai-layers .section-header.center .section-label::before {
  margin-inline: auto;
}

.ai-layers__figure {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.75rem);
  width: 100%;
  max-width: 960px;
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  min-height: min(420px, 85vw);
}

.ai-layers__diagram-col {
  flex: 0 0 auto;
  width: min(100%, 380px);
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.ai-layers__diagram {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.ai-layers__connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.ai-layers__connector-line {
  stroke: rgba(46, 139, 122, 0.35);
  stroke-width: 1.5;
  stroke-linecap: round;
  transition: stroke 0.25s ease, stroke-width 0.25s ease, opacity 0.25s ease;
}

.ai-layers__connector-line.is-active {
  stroke: rgba(15, 30, 61, 0.85);
  stroke-width: 2.25;
}

.ai-layers__rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ai-layers__hitmap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 2;
}

.ai-layers__hit {
  pointer-events: stroke;
  cursor: pointer;
  stroke: transparent;
  transition: stroke 0.2s ease;
}

.ai-layers__hit--core {
  pointer-events: fill;
  fill: transparent;
  transition: fill 0.2s ease;
}

.ai-layers__diagram:hover .ai-layers__hit:not(:hover):not(.ai-layers__hit--core) {
  stroke: rgba(46, 139, 122, 0.14);
}

.ai-layers__diagram:hover .ai-layers__hit--core:not(:hover) {
  fill: rgba(46, 139, 122, 0.08);
}

.ai-layers__hit:hover,
.ai-layers__hit.is-active {
  stroke: rgba(46, 139, 122, 0.5);
}

.ai-layers__hit--core:hover,
.ai-layers__hit--core.is-active {
  fill: rgba(46, 139, 122, 0.22);
}

.ai-layers__ring--viz {
  position: absolute;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    filter 0.35s ease;
}

.ai-layers__ring--viz.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.ai-layers__ring--viz:nth-child(1) {
  width: 100%;
  height: 100%;
  background-color: rgba(46, 139, 122, 0.1);
  border: 1px dashed rgba(46, 139, 122, 0.28);
}

.ai-layers__ring--viz:nth-child(2) {
  width: 78%;
  height: 78%;
  background-color: rgba(46, 139, 122, 0.14);
  border: 1px solid rgba(46, 139, 122, 0.22);
  transition-delay: 100ms;
}

.ai-layers__ring--viz:nth-child(3) {
  width: 56%;
  height: 56%;
  background-color: rgba(31, 75, 143, 0.12);
  border: 1px solid rgba(31, 75, 143, 0.22);
  transition-delay: 200ms;
}

.ai-layers__ring--viz:nth-child(4) {
  width: 36%;
  height: 36%;
  background-color: rgba(31, 75, 143, 0.2);
  border: 1px solid rgba(31, 75, 143, 0.32);
  transition-delay: 300ms;
}

.ai-layers__ring--viz:nth-child(5) {
  width: 20%;
  height: 20%;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  border: none;
  transition-delay: 400ms;
}

.ai-layers__ring--viz.is-pulse {
  filter: brightness(1.06);
  box-shadow: 0 0 0 3px rgba(46, 139, 122, 0.22);
}

.ai-layers__ring--viz:nth-child(5).is-pulse {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35), 0 0 24px rgba(46, 139, 122, 0.45);
}

.ai-layers__rows {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.375rem;
  min-width: 0;
  position: relative;
  z-index: 2;
  padding: 0.25rem 0;
}

.ai-layers__row {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  min-height: 0;
  margin: 0;
  padding: 2px 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: default;
  text-align: left;
}

.ai-layers__row-body {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 30, 61, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ai-layers__row:hover .ai-layers__row-body,
.ai-layers__row:focus-visible .ai-layers__row-body {
  border-color: rgba(46, 139, 122, 0.32);
  background: var(--white);
}

.ai-layers__row:focus-visible {
  outline: none;
}

.ai-layers__row:focus-visible .ai-layers__row-body {
  box-shadow: 0 0 0 2px rgba(46, 139, 122, 0.25);
}

.ai-layers__row.is-active .ai-layers__row-body {
  border-color: rgba(46, 139, 122, 0.45);
  background: rgba(46, 139, 122, 0.06);
}

.ai-layers__row-label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--teal);
  line-height: 1.35;
}

.ai-layers__row-desc {
  margin: 0.375rem 0 0;
  font-size: 0.75rem;
  color: var(--gray);
  line-height: 1.5;
}

.ai-layers__hint {
  text-align: center;
  margin: clamp(1.125rem, 3vw, 1.5rem) auto 0;
  width: 100%;
  max-width: none;
  font-size: var(--text-sm);
  color: var(--gray);
  line-height: 1.5;
}

.ai-layers__closing {
  text-align: center;
  margin-top: clamp(1rem, 2.5vw, 1.5rem);
  font-size: var(--text-lead);
  color: var(--gray);
  width: 100%;
  max-width: none;
  margin-inline: auto;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .ai-layers__figure {
    flex-direction: column;
    align-items: stretch;
    max-width: min(100%, 440px);
    min-height: 0;
  }

  .ai-layers__diagram-col {
    width: 100%;
  }

  .ai-layers__diagram {
    width: min(100%, 280px);
    margin-inline: auto;
  }

  .section-ai-layers .section-header h2 {
    font-size: clamp(1.125rem, 4.8vw, 1.5rem);
    line-height: 1.25;
  }

  .ai-layers__connectors {
    display: none;
  }

  .ai-layers__rows {
    flex: none;
    gap: 0.625rem;
    padding-top: 1rem;
  }

  .ai-layers__row {
    flex: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-layers__ring--viz {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transition: none;
  }

  .ai-layers__connector-line {
    transition: none;
  }

  .sst-doc-card:hover {
    transform: none;
  }
}
