/* =============================================================
   eteg-case-solutions — tokens do design-system.json (ETEG 2023)
   ─────────────────────────────────────────────────────────────
   Figma: "Section — Casos de Uso" node 695:511 (1999×782px)

   colors.brand.primary     → #1662ff  (destaque)
   colors.brand.accent      → #cba6ec  (eyebrow, highlight, header da fase)
   colors.text.dark         → #19191f  (fundo da seção e dos cards)
   colors.background.white  → #ffffff  (texto dos resultados)
   typography.fonts.heading → "Anybody, sans-serif"
   layout.max_width         → 1440px

   Conversões (outer_frame × 0.7204):
   section padding 128px    → 96px
   header gap 22px          → 15.8 → DS 16px
   grid gap (target_cont.)  → 24px — não converter
   column gap 22px          → 15.8 → DS 16px
   card padding 24×20px     → 17.3×14.4 → DS 16px todos

   Seletores para "CSS Personalizado" no Elementor:
   .eteg-case-solutions                     → seção dark
   .eteg-case-solutions__deco               → deco abs
   .eteg-case-solutions__inner              → container max-width 1440px
   .eteg-case-solutions__header             → área de cabeçalho (eyebrow+heading+desc)
   .eteg-case-solutions__eyebrow            → pré-título lilás
   .eteg-case-solutions__heading            → título italic uppercase
   .eteg-case-solutions__heading-highlight  → destaque lilás bold
   .eteg-case-solutions__description        → parágrafo branco 24px
   .eteg-case-solutions__grid               → flex-row com 3 colunas
   .eteg-case-solutions__phase              → coluna (header + result cards)
   .eteg-case-solutions__phase-header       → tab de header lilás
   .eteg-case-solutions__result-card        → card dark com borda
   .eteg-case-solutions__result-label       → rótulo lilás pequeno (nome da fase)
   .eteg-case-solutions__result-text        → texto branco do resultado
   ─────────────────────────────────────────────────────────────
   colors.brand.primary     → #1563FF
   colors.brand.accent      → #CCA6ED
   colors.text.on_primary   → #FFFFFF
   colors.background.dark   → #2D2D2B
   ============================================================= */

/* ── Reset de bloco ──────────────────────────────────────────── */
.eteg-case-solutions *,
.eteg-case-solutions *::before,
.eteg-case-solutions *::after {
  box-sizing: border-box;
}

/* =============================================================
   EXTRA SMALL — max-width: 374px
   ============================================================= */
@media (max-width: 374px) {
  .eteg-case-solutions__heading { font-size: 1.375rem; }
  .eteg-case-solutions__inner { padding-inline: 12px; }
}

/* ── BASE: mobile-first (375px+) ─────────────────────────────── */

.eteg-case-solutions {
  position: relative;
  overflow: hidden;
  background-color: #19191f;
  padding: 48px 0;
}

/* Deco — abs, oculta mobile */
.eteg-case-solutions__deco {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  /* Figma: 503px × 0.7204 = 362px */
  width: 360px;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0.6;
}
.eteg-case-solutions__deco img {
  display: block;
  width: 100%;
  height: auto;
}

/* Container */
.eteg-case-solutions__inner {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 16px;
  display: flex;
  flex-direction: column;
  gap: 32px; /* header ↔ grid */
}

/* ── Cabeçalho ───────────────────────────────────────────────── */
.eteg-case-solutions__header {
  display: flex;
  flex-direction: column;
  gap: 16px; /* Figma: 22px × 0.7204 = 15.8 → DS 16px */
  max-width: 740px;
}

.eteg-case-solutions__eyebrow {
  margin: 0;
  font-family: "Anybody", sans-serif;
  font-size: 1.0625rem; /* 17px */
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.4;
  color: #cba6ec;
}

.eteg-case-solutions__heading {
  margin: 0;
  font-family: "Anybody", sans-serif;
  font-size: clamp(1.625rem, 3.4vw + 0.83rem, 3rem); /* mobile: 1.625rem → desktop: 3rem — slope=(48-26)/649×100 */
  font-weight: 400;
  font-style: italic;
  text-transform: uppercase;
  line-height: 1.1;
  color: #ffffff;
}
.eteg-case-solutions__heading-highlight {
  font-weight: 700;
  font-style: italic;
  color: #cba6ec;
}

.eteg-case-solutions__description {
  margin: 0;
  font-family: "Anybody", sans-serif;
  font-size: var(--eteg-body-size); /* Figma: 24px → padronizado 16px */
  font-weight: 400;
  line-height: 1.6;
  color: #ffffff;
}

/* ── Grid de fases — flat CSS grid ──────────────────────────────
   Mobile (1 col): order CSS agrupa headers+cards por fase
   Tablet+ (N cols): cada row compartilha altura via CSS Grid     */
.eteg-case-solutions__grid {
  display: grid;
  grid-template-columns: 1fr; /* mobile: 1 coluna, order agrupa por fase */
  gap: 12px 16px;
}

/* Header da fase — pill lilás */
.eteg-case-solutions__phase-header {
  background-color: #cba6ec;
  border-radius: 100px; /* pill */
  padding: 14px 20px; /* Figma: 24×20 × 0.7204 = 17×14 → DS 14×20 */
  font-family: "Anybody", sans-serif;
  font-size: 1.0625rem; /* 17px — Figma: 17px */
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.3;
  color: #1a1a1a;
}

/* Card de resultado */
.eteg-case-solutions__result-card {
  background-color: #19191f;
  border: 2px solid #cba6ec;
  border-radius: 16px; /* Figma: não especificado exato → DS 16px */
  padding: 16px; /* Figma: 24×20 × 0.7204 ≈ 16px */
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Card vazio — ocultar sem remover do grid (mantém alinhamento de colunas) */
.eteg-case-solutions__result-card--empty {
  visibility: hidden;
  border-color: transparent;
  background-color: transparent;
}

/* Rótulo de fase dentro do card (ex: "ONDA IA") */
.eteg-case-solutions__result-label {
  margin: 0;
  font-family: "Anybody", sans-serif;
  font-size: 0.875rem; /* 14px mobile — Figma: 20px desktop */
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.3;
  color: #cba6ec;
}

/* Texto do resultado */
.eteg-case-solutions__result-text {
  margin: 0;
  font-family: "Anybody", sans-serif;
  font-size: 1rem; /* 16px mobile — Figma: 18px desktop */
  font-weight: 400;
  line-height: 1.5;
  color: #ffffff;
}

/* =============================================================
   LARGE PHONE / SMALL TABLET — min-width: 600px
   ============================================================= */
@media (min-width: 600px) {
  .eteg-case-solutions__inner { padding-inline: 20px; }

  /* grid: gap maior a partir de 600px */
  .eteg-case-solutions__grid {
    gap: 12px 20px;
  }
}

/* =============================================================
   LANDSCAPE PHONE — orientation: landscape, max-height: 500px
   ============================================================= */
@media (orientation: landscape) and (max-height: 500px) {
  .eteg-case-solutions { padding: 32px 0; }
}

/* =============================================================
   TABLET — min-width: 768px
   ============================================================= */
@media (min-width: 768px) {
  .eteg-case-solutions {
    padding: 64px 0;
  }
  /* deco mantém display:none — removido por solicitação */
  .eteg-case-solutions__inner {
    padding-inline: 24px;
    gap: 40px;
  }
  /* tablet: N colunas via CSS custom property definida pelo PHP */
  .eteg-case-solutions__grid {
    grid-template-columns: repeat(var(--eteg-cs-cols, 3), 1fr);
    gap: 12px 16px;
  }
  .eteg-case-solutions__result-text { font-size: 1rem; }
}

/* =============================================================
   DESKTOP — min-width: 1024px
   ============================================================= */
@media (min-width: 1024px) {
  .eteg-case-solutions {
    padding: 96px 0; /* Figma: 128px × 0.7204 = 92.2 → DS 96px */
  }
  .eteg-case-solutions__inner {
    padding-inline: 32px;
    gap: 40px; /* Figma: section gap 40px outer_frame → 28.8 → DS 32px; usamos 40 para respiro */
  }
  .eteg-case-solutions__header { gap: 20px; }
  .eteg-case-solutions__heading { font-size: 3rem; /* 48px — Figma: 48px */ }

  .eteg-case-solutions__grid {
    grid-template-columns: repeat(var(--eteg-cs-cols, 3), 1fr);
    gap: 16px 24px; /* Figma: target_container — não converter */
  }
  .eteg-case-solutions__phase-header {
    padding: 16px 20px;
    font-size: 1.0625rem;
  }
  .eteg-case-solutions__result-card {
    padding: 20px; /* Figma: 24×20 × 0.7204 */
  }
  .eteg-case-solutions__result-text { font-size: 1.125rem; /* 18px — Figma: 18px */ }
}

/* ── NOTEBOOK: min-width 1280px ─────────────────────────────── */
@media (min-width: 1280px) {

  .eteg-case-solutions {
    padding: 64px 0 !important; /* era 96px */
  }

  .eteg-case-solutions__inner {
    padding-inline: 48px; /* era 32px */
    gap: 28px;            /* era 40px */
  }

  .eteg-case-solutions__header {
    gap: 14px; /* era 20px */
  }

  .eteg-case-solutions__heading {
    font-size: 2.25rem; /* era 3rem */
  }

  .eteg-case-solutions__grid {
    grid-template-columns: repeat(var(--eteg-cs-cols, 3), 1fr);
    gap: 12px 16px; /* era 16px 24px */
  }

  .eteg-case-solutions__phase-header {
    padding: 12px 16px;   /* era 16px 20px */
    font-size: 0.9375rem; /* era 1.0625rem */
  }

  .eteg-case-solutions__result-card {
    padding: 14px; /* era 20px */
  }

  .eteg-case-solutions__result-text {
    font-size: 1rem; /* era 1.125rem */
  }
}

/* =============================================================
   WIDE — min-width: 1440px
   ============================================================= */
@media (min-width: 1440px) {

  .eteg-case-solutions {
    padding: 96px 0 !important; /* restaura */
  }

  .eteg-case-solutions__inner {
    padding-inline: 80px; /* restaura */
    gap: 40px;            /* restaura */
  }

  .eteg-case-solutions__header {
    gap: 20px; /* restaura */
  }

  .eteg-case-solutions__heading {
    font-size: 3rem; /* restaura */
  }

  .eteg-case-solutions__grid {
    grid-template-columns: repeat(var(--eteg-cs-cols, 3), 1fr);
    gap: 16px 24px; /* restaura */
  }

  .eteg-case-solutions__phase-header {
    padding: 16px 20px;    /* restaura */
    font-size: 1.0625rem;  /* restaura */
  }

  .eteg-case-solutions__result-card {
    padding: 20px; /* restaura */
  }

  .eteg-case-solutions__result-text {
    font-size: 1.125rem; /* restaura */
  }
}


/* ── Deco reveal (eteg-scroll-reveal.js) ────────────────────── */
.eteg-case-solutions.eteg-reveal .eteg-case-solutions__deco {
  opacity: 0;
  transform: translateX(-64px);
  transition: opacity 640ms cubic-bezier(0, 0, 0.2, 1),
              transform 640ms cubic-bezier(0, 0, 0.2, 1);
}
.eteg-case-solutions.is-revealed .eteg-case-solutions__deco {
  opacity: 0.6;
  transform: translateX(0);
  transition-delay: 200ms;
}

/* ── Content stagger entry (eteg-scroll-reveal.js) ──────────── */
.eteg-case-solutions.eteg-reveal .eteg-case-solutions__heading {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms cubic-bezier(0, 0, 0.2, 1), transform 500ms cubic-bezier(0, 0, 0.2, 1);
}
.eteg-case-solutions.is-revealed .eteg-case-solutions__heading {
  opacity: 1;
  transform: none;
  transition-delay: 60ms;
}
.eteg-case-solutions.eteg-reveal .eteg-case-solutions__result-card {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 480ms cubic-bezier(0, 0, 0.2, 1), transform 480ms cubic-bezier(0, 0, 0.2, 1);
}
.eteg-case-solutions.is-revealed .eteg-case-solutions__result-card { opacity: 1; transform: none; transition-delay: 80ms; }
.eteg-case-solutions.is-revealed .eteg-case-solutions__result-card:nth-child(5)  { transition-delay: 120ms; }
.eteg-case-solutions.is-revealed .eteg-case-solutions__result-card:nth-child(6)  { transition-delay: 160ms; }
.eteg-case-solutions.is-revealed .eteg-case-solutions__result-card:nth-child(7)  { transition-delay: 200ms; }
.eteg-case-solutions.is-revealed .eteg-case-solutions__result-card:nth-child(8)  { transition-delay: 240ms; }
.eteg-case-solutions.is-revealed .eteg-case-solutions__result-card:nth-child(9)  { transition-delay: 280ms; }
.eteg-case-solutions.is-revealed .eteg-case-solutions__result-card:nth-child(10) { transition-delay: 320ms; }
.eteg-case-solutions.is-revealed .eteg-case-solutions__result-card:nth-child(11) { transition-delay: 360ms; }
.eteg-case-solutions.is-revealed .eteg-case-solutions__result-card:nth-child(12) { transition-delay: 400ms; }

/* =============================================================
   ACESSIBILIDADE — prefers-reduced-motion
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .eteg-case-solutions__deco { transition: none; }

  .eteg-case-solutions.eteg-reveal .eteg-case-solutions__deco {
    opacity: 1; transform: translateX(0); transition: none;
  }

  .eteg-case-solutions.eteg-reveal .eteg-case-solutions__heading,
  .eteg-case-solutions.eteg-reveal .eteg-case-solutions__result-card {
    opacity: 1; transform: none; transition: none;
  }
}
