/* ═══════════════════════════════════════════════════
   SERVIÇOS — O que fazemos
   Figma 47:1937 (intro) + 47:1947 (story)
   Desktop-first · base 1920px
   ═══════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────── */
/*  INTRO — Figma 47:1937                              */
/*  bg #1b1b1b · px-150 py-200 · flex row items-end   */
/* ─────────────────────────────────────────────────── */

#servicos-header {
  background-color: var(--c-dark);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(40px, 5vw, 96px);
  padding: clamp(80px, 10.42vw, 200px) clamp(32px, 7.81vw, 150px);
}

/* Coluna esquerda: badge + h2 */
.srv__intro-left {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.08vw, 40px);
  align-items: flex-start;
  flex-shrink: 0;
}

/* Badge — "O QUE FAZEMOS" */
.srv__badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 6px;
  background: rgba(85, 85, 85, 0.10);
  backdrop-filter: blur(12.5px);
  -webkit-backdrop-filter: blur(12.5px);
}

/* Dot quadrado vermelho */
.srv__badge-dot {
  display: block;
  width:  8.628px;
  height: 8.628px;
  background: var(--c-red);
  flex-shrink: 0;
}

.srv__badge-text {
  font-family: var(--f-mono);
  font-size: clamp(12px, 0.94vw, 18px);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--c-light);
  white-space: nowrap;
}

/* Título intro: 88px · leading 1.15 */
.srv__intro-title {
  font-family: var(--f-sans);
  font-size: clamp(40px, 4.58vw, 88px);
  font-weight: var(--fw-regular);
  line-height: 1.15;
  letter-spacing: -0.05em;
  color: var(--c-light);
}

/* Descrição intro: 24px · opacity 80% · max-w 757px */
.srv__intro-desc {
  font-family: var(--f-sans);
  font-size: clamp(16px, 1.25vw, 24px);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  letter-spacing: -0.03em;
  color: rgba(244, 245, 247, 0.80);
  max-width: clamp(300px, 39.45vw, 757px);
  flex-shrink: 0;
  align-self: flex-end;
}


/* ─────────────────────────────────────────────────── */
/*  STORY — Figma 47:1947                              */
/*  100vh · bg #1b1b1b                                  */
/*  Cada chapter: grid auto / 1fr / auto               */
/* ─────────────────────────────────────────────────── */

/* Trilho de scroll: height = (CHAPTERS + 1) × 100vh, controlado por JS */
#servicos-story {
  position: relative;
}

/* Painel sticky: prende no viewport enquanto o trilho rola */
.srv__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background-color: var(--c-dark);
}

/* Wrapper dos chapters — ocupa toda a área sticky */
.srv__chapters {
  position: absolute;
  inset: 0;
}

/* ── Chapter: fullscreen grid com 3 linhas ──
   3 estados de transição simultânea (opacity + translateY):
   aguardando → translateY(+16px) opacity:0
   ativo      → translateY(0)     opacity:1
   saindo     → translateY(-16px) opacity:0               */
.srv__chapter {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.srv__chapter--active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Capítulo saindo: sobe e desvanece simultaneamente ao entrante */
.srv__chapter--leaving {
  opacity: 0;
  transform: translateY(-16px);
}

/* Foto de fundo: absolute, abaixo do grid */
.srv__bg {
  position: absolute;
  inset: 0;
  width:  100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0.15;
  z-index: 0;
}


/* ── Linha 1 (auto): nav + counter ── */

.srv__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(24px, 3vw, 60px);
  padding: 60px clamp(32px, 7.81vw, 150px) 0;
}

/* Lista de capítulos */
.srv__nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.srv__nav-item {
  display: inline-flex;
  align-items: center;
  padding: 10px;
  font-family: var(--f-sans);
  font-size: clamp(14px, 1.04vw, 20px);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  letter-spacing: -0.03em;
  /* Inativo: opacity-30 (container) × opacity-80 (texto) = 24% */
  color: rgba(244, 245, 247, 0.24);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s var(--ease);
}

.srv__nav-item--active {
  color: rgba(244, 245, 247, 0.80);
}

.srv__nav-item:hover:not(.srv__nav-item--active) {
  color: rgba(244, 245, 247, 0.45);
}

/* Traço "—" visível apenas no item ativo */
.srv__nav-dash {
  display: none;
}

.srv__nav-item--active .srv__nav-dash {
  display: inline;
  margin-right: 0.25em;
}

/* Counter: badge glassmorphism */
.srv__counter {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 6px;
  background: rgba(85, 85, 85, 0.15);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  flex-shrink: 0;
}

/* Dot vermelho quadrado */
.srv__counter-dot {
  display: block;
  width:  8.628px;
  height: 8.628px;
  background: var(--c-red);
  flex-shrink: 0;
}

.srv__counter-text {
  font-family: var(--f-mono);
  font-size: clamp(12px, 0.94vw, 18px);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  letter-spacing: -0.03em;
  color: var(--c-light);
  white-space: nowrap;
}


/* ── Linha 2 (1fr): grafismo + título sobrepostos ── */

/* Flex center que ocupa todo o 1fr disponível */
.chapter-center {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Container do visual: grafismo define o tamanho
   título fica absolutamente centralizado dentro dele */
.chapter-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Grafismo 3D: altura relativa ao viewport — sem px fixos */
.chapter-grafismo {
  height: clamp(180px, 38vh, 440px);
  width: auto;
  max-width: none;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Título oversize: absolutamente centrado sobre o grafismo */
.chapter-title {
  position: absolute;
  top:  50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  text-align: center;
  margin: 0;
  z-index: 2;
  font-family: var(--f-sans);
  font-size: clamp(48px, 6.25vw, 120px);
  font-weight: var(--fw-regular);
  line-height: 1.05;
  letter-spacing: -0.05em;
  color: var(--c-light);
  white-space: nowrap;
  pointer-events: none;
}

/* Segunda linha do título em medium (500) */
.chapter-title-m {
  font-weight: var(--fw-medium);
}


/* ── Linha 3 (auto): descrição + progress bars ── */

.srv__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(24px, 3vw, 60px);
  padding: 0 clamp(32px, 7.81vw, 150px) 80px;
}

/* Descrição do capítulo */
.srv__desc {
  font-family: var(--f-sans);
  font-size: clamp(13px, 1.04vw, 20px);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  letter-spacing: -0.03em;
  color: rgba(244, 245, 247, 0.80);
  max-width: clamp(200px, 15.625vw, 300px);
  text-wrap: balance;
}

/* Barras de progresso: 4 × 64px × 2px · gap-16px */
.srv__progress {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.srv__progress-bar {
  width: clamp(32px, 3.33vw, 64px);
  height: 2px;
  background: rgba(85, 85, 85, 0.75);
  flex-shrink: 0;
  transition: background 0.3s var(--ease);
}

.srv__progress-bar--active {
  background: var(--c-light);
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */

@media (max-width: 1280px) {
  #servicos-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .srv__intro-desc {
    max-width: 100%;
    align-self: auto;
  }
}

@media (max-width: 1024px) {
  .srv__nav-item {
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .srv__top {
    flex-wrap: wrap;
    gap: 16px;
  }

  .srv__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}
