/* =========================================
   LABOURÉ ENGENHARIA — CASES PAGE CSS
   Teal Emerald Identity
   ========================================= */

body.cases-page {
  background: var(--soft-black);
}

/* Utilitário de acessibilidade */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================
   PAGE HERO
   ========================================= */
.cases-hero {
  position: relative;
  min-height: 75dvh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}

.cases-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 0%, rgba(10, 61, 53, 0.4) 0%, var(--soft-black) 80%);
  z-index: 0;
}

.cases-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  will-change: transform;
}

.cases-hero-orb--1 {
  width: 500px;
  height: 500px;
  background: rgba(18, 196, 167, 0.12);
  top: -100px;
  left: -100px;
}

.cases-hero-orb--2 {
  width: 400px;
  height: 400px;
  background: rgba(14, 122, 104, 0.1);
  bottom: 0;
  right: 10%;
}

.cases-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 860px;
}

.cases-hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242, 237, 230, 0.5);
  margin-bottom: 32px;
}

.cases-hero-breadcrumb a {
  color: var(--teal-glow);
  transition: color 0.2s;
}

.cases-hero-breadcrumb a:hover {
  color: var(--white);
}

.cases-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 5.5vw, 4.8rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 24px;
}

.cases-hero-title em {
  font-style: normal;
  background: linear-gradient(90deg, var(--teal-bright), var(--teal-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cases-hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(242, 237, 230, 0.65);
  max-width: 640px;
  margin-bottom: 48px;
  line-height: 1.6;
}

.cases-hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
}

.chs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chs-item strong {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--teal-glow);
  line-height: 1;
}

.chs-item span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(242, 237, 230, 0.5);
}

.chs-divider {
  width: 1px;
  height: 32px;
  background: rgba(18, 196, 167, 0.15);
}

.cases-hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

/* Reel de destaques: só aparece no mobile */
.hero-reel {
  display: none;
}

/* Estados iniciais das animações — só com JS ativo */
.js .cases-hero-breadcrumb,
.js .cases-hero .section-tag,
.js .cases-hero-title,
.js .cases-hero-sub,
.js .cases-hero-stats,
.js .filter-bar,
.js .cases-hero-scroll {
  opacity: 0;
}

.js .cases-hero-breadcrumb { transform: translateY(-20px); }
.js .cases-hero .section-tag { transform: translateY(20px); }
.js .cases-hero-title { transform: translateY(30px); }
.js .cases-hero-sub { transform: translateY(30px); }
.js .cases-hero-stats { transform: translateY(30px); }
.js .filter-bar { transform: translateY(20px); }

/* =========================================
   FILTER BAR
   ========================================= */
.filter-bar {
  position: sticky;
  top: 76px;
  z-index: 900;
  background: rgba(6, 14, 12, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(18, 196, 167, 0.1);
  border-bottom: 1px solid rgba(18, 196, 167, 0.1);
  padding: 16px 0;
}

.filter-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(242, 237, 230, 0.6);
  padding: 8px 20px;
  border-radius: 99px;
  border: 1px solid transparent;
  background: transparent;
  transition: color 0.3s, background 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-spring);
  white-space: nowrap;
}

.filter-btn:hover {
  color: var(--white);
  background: rgba(18, 196, 167, 0.08);
}

.filter-btn:active {
  transform: scale(0.97);
}

.filter-btn.active {
  color: var(--teal-glow);
  border-color: rgba(18, 196, 167, 0.3);
  background: rgba(18, 196, 167, 0.12);
  box-shadow: 0 0 16px rgba(18, 196, 167, 0.15);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0;
  color: rgba(242, 237, 230, 0.55);
  background: rgba(255, 255, 255, 0.06);
  transition: color 0.3s, background 0.3s;
}

.filter-btn.active .filter-count {
  color: var(--soft-black);
  background: var(--teal-glow);
}

/* =========================================
   CASES LIST
   ========================================= */
.cases-main {
  padding: 40px 0 var(--section-py);
}

.case-block {
  margin-bottom: 120px;
  display: block;
  scroll-margin-top: 150px;
}

.case-block.hidden {
  display: none;
}

.case-block--alt .case-desc-grid {
  direction: rtl;
}

.case-block--alt .case-desc-text,
.case-block--alt .case-desc-stats {
  direction: ltr;
  /* keep text left-to-right */
}

/* Cabeçalho de capítulo: apenas mobile */
.case-head {
  display: none;
}

/* =========================================
   PALCO DE MÍDIA (POSTER + VÍDEO)
   ========================================= */
.case-stage {
  position: relative;
  width: min(1600px, 95vw);
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 21/9;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(18, 196, 167, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  background: var(--teal-dark);
  isolation: isolate;
}

.case-stage-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  transform-origin: center center;
}

.case-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  opacity: 0;
  transition: opacity 0.7s var(--ease-out);
}

.case-stage.is-video-ready .case-video {
  opacity: 1;
}

.case-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(6, 42, 37, 0.85) 0%, rgba(6, 14, 12, 0.7) 100%);
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

/* Ao interagir, o vídeo aparece mais — a mídia é o destaque */
@media (hover: hover) {
  .case-stage:hover .case-video-overlay,
  .case-stage:focus-within .case-video-overlay {
    opacity: 0.82;
  }
}

.case-video-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  max-width: 900px;
}

.case-cat-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-glow);
  background: rgba(18, 196, 167, 0.12);
  border: 1px solid rgba(18, 196, 167, 0.3);
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 18px;
}

.case-title-mask {
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.case-video-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 12px;
}

.case-video-sub {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: rgba(242, 237, 230, 0.7);
  font-weight: 400;
  margin-bottom: 32px;
}

.case-video-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  background: rgba(6, 14, 12, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 40px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cvm-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.cvm-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(242, 237, 230, 0.5);
  margin-bottom: 4px;
}

.cvm-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
}

.case-scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--teal-glow);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  pointer-events: none;
}

.case-scroll-cue svg {
  width: 18px;
  height: 18px;
  animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.case-ghost-index {
  display: none;
}

/* ─── Controles de mídia ─── */
.case-stage-actions {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.75;
  transition: opacity 0.3s var(--ease-out);
}

.case-stage:hover .case-stage-actions,
.case-stage:focus-within .case-stage-actions {
  opacity: 1;
}

.case-media-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--white);
  background: rgba(6, 14, 12, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease-spring), color 0.25s;
  -webkit-tap-highlight-color: transparent;
}

.case-media-btn:hover {
  background: rgba(18, 196, 167, 0.24);
  border-color: rgba(18, 196, 167, 0.5);
  transform: scale(1.06);
}

.case-media-btn:active {
  transform: scale(0.96);
}

.case-media-btn svg {
  width: 18px;
  height: 18px;
}

.case-media-btn--expand {
  width: auto;
  padding: 0 18px;
  border-radius: 99px;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-media-btn--expand svg {
  width: 16px;
  height: 16px;
}

/* Alternância de ícones conforme estado */
.case-media-btn .i-pause,
.case-media-btn .i-sound {
  display: none;
}

.case-stage.is-playing .case-media-btn[data-media-toggle] .i-play {
  display: none;
}

.case-stage.is-playing .case-media-btn[data-media-toggle] .i-pause {
  display: block;
}

.case-stage.is-sound [data-media-sound] .i-mute {
  display: none;
}

.case-stage.is-sound [data-media-sound] .i-sound {
  display: block;
}

/* Sem vídeo suportado/carregado: esconde só os controles de vídeo */
.case-stage:not(.has-video) [data-media-toggle],
.case-stage:not(.has-video) [data-media-sound] {
  display: none;
}

/* CTA grande de play (mobile / autoplay bloqueado) */
.case-play {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--white);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.case-play-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(18, 196, 167, 0.9);
  box-shadow: 0 12px 40px rgba(18, 196, 167, 0.35);
  transition: transform 0.35s var(--ease-spring), background 0.3s;
}

.case-play-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(18, 196, 167, 0.55);
  animation: playPulse 2.6s ease-out infinite;
}

.case-play-icon svg {
  width: 30px;
  height: 30px;
  margin-left: 4px;
}

.case-play:hover .case-play-icon {
  transform: scale(1.08);
  background: var(--teal-glow);
}

.case-play-label {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.case-stage.is-playing .case-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.85);
}

.case-stage.is-loading .case-play-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
}

@keyframes playPulse {
  0% { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(1.5); opacity: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================
   DESCRIÇÃO DO CASE
   ========================================= */
.case-description {
  padding: 80px 0;
}

.case-desc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.case-desc-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 24px;
  line-height: 1.25;
}

.case-desc-text p {
  font-size: 0.98rem;
  color: rgba(242, 237, 230, 0.7);
  line-height: 1.7;
  margin-bottom: 16px;
}

.case-desc-body {
  position: relative;
}

.case-desc-toggle {
  display: none;
}

.case-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.case-tag-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal-glow);
  background: rgba(18, 196, 167, 0.06);
  border: 1px solid rgba(18, 196, 167, 0.2);
  padding: 6px 14px;
  border-radius: 6px;
}

.case-desc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.case-stat {
  padding: 32px 24px;
  text-align: center;
  border-radius: var(--radius-md);
  transition: transform 0.35s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}

.case-stat:hover {
  transform: translateY(-4px);
  border-color: rgba(18, 196, 167, 0.3);
  box-shadow: 0 14px 40px rgba(14, 122, 104, 0.18);
}

.case-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--teal-glow);
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.case-stat > span {
  font-size: 0.8rem;
  color: rgba(242, 237, 230, 0.6);
}

/* =========================================
   GALERIA
   ========================================= */
.case-gallery-header {
  margin-bottom: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.case-gallery-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
}

.case-gallery-count {
  display: none;
}

.gallery-grid {
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  grid-auto-rows: 350px;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--dark-card);
  color: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.gallery-item:focus-visible {
  outline: 2px solid var(--teal-glow);
  outline-offset: 3px;
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-spring), filter 0.4s;
}

@media (hover: hover) {
  .gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.85);
  }
}

.gallery-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 122, 104, 0.4);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

@media (hover: hover) {
  .gallery-item:hover .gallery-hover {
    opacity: 1;
  }
}

.gallery-hover svg {
  width: 36px;
  height: 36px;
  color: var(--white);
  transform: scale(0.5);
  transition: transform 0.4s var(--ease-spring);
}

@media (hover: hover) {
  .gallery-item:hover .gallery-hover svg {
    transform: scale(1);
  }
}

.gallery-cap {
  display: none;
}

.gallery-mobile-nav {
  display: none;
}

.case-divider {
  width: var(--container);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(18, 196, 167, 0.2), transparent);
  margin: 100px auto 0;
}

/* =========================================
   LIGHTBOX
   ========================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 9, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 0;
}

.lightbox-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: min(1200px, 92vw);
  max-height: 82dvh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 74vh;
  max-height: 74dvh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}

.lightbox-img.is-loaded {
  opacity: 1;
  transform: none;
}

.lightbox-caption {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

.lightbox-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
}

.lightbox-nav,
.lightbox-close {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-glow);
  background: rgba(18, 196, 167, 0.1);
  border: 1px solid rgba(18, 196, 167, 0.3);
  border-radius: 50%;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease-spring), opacity 0.2s;
}

.lightbox-nav {
  width: 52px;
  height: 52px;
}

.lightbox-nav svg {
  width: 22px;
  height: 22px;
}

.lightbox-nav:hover,
.lightbox-close:hover {
  background: var(--teal);
  color: var(--white);
  transform: scale(1.08);
}

.lightbox-nav:disabled {
  opacity: 0.3;
  pointer-events: none;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 4;
  width: 44px;
  height: 44px;
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
}

.lightbox-counter {
  min-width: 64px;
  text-align: center;
  color: rgba(242, 237, 230, 0.6);
  font-size: 0.8rem;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

/* =========================================
   MEDIA MODAL (VÍDEO)
   ========================================= */
.media-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}

.media-modal.open {
  opacity: 1;
  visibility: visible;
}

.media-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 7, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.media-modal-inner {
  position: relative;
  z-index: 2;
  width: min(1100px, 94vw);
  transform: translateY(16px) scale(0.985);
  transition: transform 0.4s var(--ease-out);
}

.media-modal.open .media-modal-inner {
  transform: none;
}

.media-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.media-modal-title {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-glow);
}

.media-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--teal-glow);
  background: rgba(18, 196, 167, 0.1);
  border: 1px solid rgba(18, 196, 167, 0.3);
  transition: background 0.2s, color 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.media-modal-close:hover {
  background: var(--teal);
  color: var(--white);
  transform: scale(1.06);
}

.media-modal-close svg {
  width: 20px;
  height: 20px;
}

.media-modal-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(18, 196, 167, 0.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.media-modal-video {
  display: block;
  width: 100%;
  max-height: 74vh;
  max-height: 74dvh;
  background: #000;
}

.media-modal-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: rgba(242, 237, 230, 0.75);
  background: rgba(6, 14, 12, 0.92);
  font-size: 0.92rem;
}

.media-modal-error[hidden] {
  display: none;
}

.media-modal-caption {
  margin-top: 12px;
  color: rgba(242, 237, 230, 0.55);
  font-size: 0.85rem;
}

/* =========================================
   CTA FINAL DA PÁGINA
   ========================================= */
.cases-cta {
  position: relative;
  padding: var(--section-py) 0;
  background: var(--teal-dark);
  overflow: hidden;
  text-align: center;
}

.cases-cta .cta-content {
  position: relative;
  z-index: 1;
}

/* =========================================
   ANIMAÇÕES DE ENTRADA (data-reveal)
   ========================================= */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.js .hero-reel-item {
  animation: reelIn 0.75s var(--ease-out) both;
}

.hero-reel-item:nth-child(2) {
  animation-delay: 0.08s;
}

.hero-reel-item:nth-child(3) {
  animation-delay: 0.16s;
}

@keyframes reelIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .js .hero-reel-item {
    animation: none;
  }
}

/* =========================================
   RESPONSIVE — TABLET
   ========================================= */
@media (max-width: 1024px) {
  .case-desc-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .case-block--alt .case-desc-grid {
    direction: ltr;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .gallery-item--wide {
    grid-column: auto;
  }

  .case-video-title {
    font-size: clamp(2rem, 4.4vw, 3rem);
  }

  .case-video-meta {
    gap: 26px;
    padding: 14px 30px;
  }
}

/* =========================================
   RESPONSIVE — MOBILE (estrutura principal)
   ========================================= */
@media (max-width: 768px) {

  /* ---------- HERO ---------- */
  .cases-hero {
    min-height: auto;
    padding: calc(112px + env(safe-area-inset-top)) 0 44px;
    display: block;
  }

  .cases-hero-content {
    max-width: 100%;
    padding: 0;
  }

  .cases-hero-breadcrumb {
    margin-bottom: 26px;
    font-size: 0.66rem;
  }

  .cases-hero .section-tag {
    font-size: 0.65rem;
    margin-bottom: 14px;
  }

  .cases-hero-title {
    font-size: clamp(2.35rem, 10.5vw, 3.3rem);
    margin-bottom: 18px;
    letter-spacing: -0.01em;
  }

  .cases-hero-sub {
    font-size: 0.98rem;
    max-width: 34ch;
    margin-bottom: 30px;
    line-height: 1.55;
  }

  .desk-only {
    display: none;
  }

  .cases-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
  }

  .chs-item {
    gap: 6px;
    padding: 0 6px;
  }

  .chs-item strong {
    font-size: clamp(0.88rem, 3.9vw, 1.25rem);
    letter-spacing: -0.02em;
  }

  .chs-item span {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-align: center;
    line-height: 1.35;
  }

  .chs-divider {
    display: none;
  }

  .cases-hero-scroll {
    display: none;
  }

  /* ---------- REEL DE DESTAQUES ---------- */
  .hero-reel {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 34px;
    padding: 0 5vw 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .hero-reel::-webkit-scrollbar {
    display: none;
  }

  .hero-reel-item {
    position: relative;
    flex: 0 0 46vw;
    height: 30vh;
    min-height: 190px;
    max-height: 260px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(18, 196, 167, 0.14);
    scroll-snap-align: start;
    background: var(--teal-dark);
  }

  .hero-reel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
  }

  .hero-reel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(6, 14, 12, 0.9) 0%, transparent 58%);
    pointer-events: none;
  }

  .hero-reel-label {
    position: absolute;
    left: 14px;
    bottom: 12px;
    z-index: 2;
    font-family: var(--font-heading);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white);
  }

  /* ---------- FILTER BAR ---------- */
  .filter-bar {
    top: 64px;
    padding: 10px 0;
  }

  .filter-scroll {
    /* esmaece as bordas para indicar rolagem */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  }

  .filter-bar-inner {
    width: max-content;
    min-width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 0 18px;
  }

  .filter-btn {
    padding: 7px 14px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .filter-count {
    min-width: 16px;
    height: 16px;
    font-size: 0.58rem;
  }

  /* ---------- CASES ---------- */
  .cases-main {
    padding: 26px 0 0;
  }

  .case-block {
    margin-bottom: 56px;
    scroll-margin-top: 118px;
  }

  .case-block.hidden {
    display: none;
  }

  .case-head {
    display: block;
    width: var(--container);
    margin: 0 auto 14px;
  }

  .case-head-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(242, 237, 230, 0.45);
  }

  .case-head-index {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--teal-glow);
  }

  .case-head-cat {
    color: rgba(242, 237, 230, 0.7);
  }

  .case-head-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(18, 196, 167, 0.4), transparent);
  }

  .case-head-year {
    font-variant-numeric: tabular-nums;
  }

  /* ---------- PALCO DE MÍDIA ---------- */
  .case-stage {
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    height: clamp(480px, 82vh, 680px);
    height: clamp(480px, 82svh, 680px);
    min-height: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    display: block;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  }

  .case-stage-poster,
  .case-video {
    object-position: center;
  }

  .case-video-overlay {
    /* gradiente mais leve: o vídeo é o protagonista */
    background: linear-gradient(180deg,
        rgba(6, 14, 12, 0.1) 0%,
        rgba(6, 14, 12, 0.28) 42%,
        rgba(6, 14, 12, 0.82) 78%,
        rgba(6, 14, 12, 0.96) 100%);
  }

  .case-stage:hover .case-video-overlay,
  .case-stage:focus-within .case-video-overlay {
    opacity: 1;
  }

  .case-ghost-index {
    display: block;
    position: absolute;
    top: calc(14px + env(safe-area-inset-top));
    left: 16px;
    z-index: 2;
    font-family: var(--font-heading);
    font-size: clamp(3rem, 17vw, 5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    color: rgba(255, 255, 255, 0.12);
    pointer-events: none;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
  }

  .case-video-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
    max-width: 100%;
    padding: 0 20px calc(22px + env(safe-area-inset-bottom));
  }

  .case-cat-badge {
    margin-bottom: 12px;
    font-size: 0.6rem;
    padding: 4px 12px;
  }

  .case-video-title {
    font-size: clamp(1.9rem, 8vw, 2.7rem);
    line-height: 1.06;
    margin-bottom: 8px;
    text-wrap: balance;
  }

  .case-video-sub {
    font-size: 0.88rem;
    margin-bottom: 18px;
    color: rgba(242, 237, 230, 0.68);
  }

  .case-video-meta {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 0 0;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .cvm-item {
    align-items: flex-start;
    min-width: 0;
  }

  .cvm-label {
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    margin-bottom: 3px;
  }

  .cvm-val {
    font-size: 0.78rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .case-scroll-cue {
    display: none;
  }

  /* ---------- CONTROLES ---------- */
  .case-stage-actions {
    top: calc(16px + env(safe-area-inset-top));
    right: 14px;
    gap: 8px;
    opacity: 1;
  }

  .case-media-btn {
    width: 42px;
    height: 42px;
    background: rgba(6, 14, 12, 0.55);
  }

  .case-media-btn--expand {
    width: 42px;
    padding: 0;
    border-radius: 50%;
  }

  .case-media-btn-label {
    display: none;
  }

  .case-play {
    display: flex;
    top: 42%;
  }

  .case-play-icon {
    width: 72px;
    height: 72px;
  }

  .case-play-label {
    font-size: 0.64rem;
  }

  /* ---------- DESCRIÇÃO ---------- */
  .case-description {
    padding: 46px 0 40px;
  }

  .case-desc-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .case-desc-title {
    font-size: clamp(1.45rem, 6.4vw, 1.85rem);
    margin-bottom: 18px;
    line-height: 1.22;
  }

  .case-desc-text p {
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 14px;
  }

  .case-desc-text .section-tag {
    margin-bottom: 12px;
  }

  /* Descrição recolhível */
  .js .case-desc-body:not(.is-open) {
    max-height: 6.6em;
    overflow: hidden;
  }

  .js .case-desc-body {
    transition: max-height 0.55s var(--ease-out);
  }

  .js .case-desc-body::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.6em;
    background: linear-gradient(180deg, rgba(6, 14, 12, 0), var(--soft-black));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s;
  }

  .js .case-desc-body.is-open {
    max-height: 1200px;
  }

  .js .case-desc-body.is-open::after {
    opacity: 0;
  }

  .js .case-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--teal-glow);
    border-bottom: 1px solid rgba(18, 196, 167, 0.35);
    padding-bottom: 3px;
  }

  .case-desc-toggle::after {
    content: '+';
    font-size: 0.9rem;
    line-height: 1;
  }

  .case-desc-toggle[aria-expanded="true"]::after {
    content: '−';
  }

  .case-desc-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .case-stat {
    padding: 20px 12px;
    border-radius: var(--radius-sm);
  }

  .case-stat strong {
    font-size: 1.65rem;
    margin-bottom: 6px;
  }

  .case-stat > span {
    font-size: 0.7rem;
    line-height: 1.3;
    display: block;
  }

  .case-tags {
    margin-top: 20px;
    gap: 8px;
  }

  .case-tag-pill {
    font-size: 0.67rem;
    padding: 5px 10px;
  }

  /* ---------- GALERIA (carrossel horizontal) ---------- */
  .case-gallery {
    padding: 0;
  }

  .case-gallery-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    text-align: left;
    margin-bottom: 18px;
  }

  .case-gallery-title {
    font-size: 1.45rem;
    line-height: 1.15;
  }

  .case-gallery-header .section-tag {
    margin-bottom: 8px;
  }

  .case-gallery-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(242, 237, 230, 0.45);
    white-space: nowrap;
    padding-bottom: 4px;
  }

  .gallery-grid {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    margin: 0;
    gap: 12px;
    padding: 0 5vw 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 5vw;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    grid-auto-rows: auto;
    overscroll-behavior-x: contain;
  }

  .gallery-grid::-webkit-scrollbar {
    display: none;
  }

  .gallery-item,
  .gallery-item--wide {
    flex: 0 0 82vw;
    width: 82vw;
    height: 58vw;
    min-height: 230px;
    max-height: 420px;
    scroll-snap-align: start;
    border-radius: var(--radius-md);
    grid-column: auto;
  }

  .gallery-cap {
    display: block;
    position: absolute;
    left: 14px;
    bottom: 12px;
    z-index: 2;
    font-family: var(--font-heading);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    pointer-events: none;
  }

  .gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(6, 14, 12, 0.72) 0%, transparent 46%);
    pointer-events: none;
  }

  .gallery-hover {
    display: none;
  }

  .gallery-mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: var(--container);
    margin: 14px auto 0;
    gap: 12px;
  }

  .gallery-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: var(--teal-glow);
    background: rgba(18, 196, 167, 0.08);
    border: 1px solid rgba(18, 196, 167, 0.22);
    transition: background 0.2s, color 0.2s, transform 0.2s, opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
  }

  .gallery-nav-btn svg {
    width: 20px;
    height: 20px;
  }

  .gallery-nav-btn:active {
    transform: scale(0.94);
    background: var(--teal);
    color: var(--white);
  }

  .gallery-nav-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
  }

  .gallery-counter {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: rgba(242, 237, 230, 0.45);
    font-variant-numeric: tabular-nums;
  }

  .gallery-counter strong {
    font-size: 1.05rem;
    color: var(--teal-glow);
  }

  .gallery-counter span[aria-hidden] {
    margin: 0 3px;
  }

  .case-divider {
    margin-top: 54px;
    width: var(--container);
  }

  /* ---------- LIGHTBOX ---------- */
  .lightbox {
    padding: 0;
    justify-content: center;
  }

  .lightbox-inner {
    max-width: 100vw;
    max-height: none;
    gap: 10px;
    padding: 0;
  }

  .lightbox-img {
    width: 100vw;
    max-width: 100vw;
    max-height: 72vh;
    max-height: 72dvh;
    border-radius: 0;
  }

  .lightbox-caption {
    font-size: 0.82rem;
    padding: 0 22px;
  }

  .lightbox-toolbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(20px + env(safe-area-inset-bottom));
    margin: 0;
    padding: 0 20px;
    justify-content: space-between;
    gap: 12px;
  }

  .lightbox-nav {
    width: 50px;
    height: 50px;
    background: rgba(6, 14, 12, 0.6);
  }

  .lightbox-close {
    top: calc(14px + env(safe-area-inset-top));
    right: 16px;
    width: 42px;
    height: 42px;
    background: rgba(6, 14, 12, 0.6);
  }

  /* ---------- MEDIA MODAL ---------- */
  .media-modal {
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  }

  .media-modal-inner {
    width: 100%;
  }

  .media-modal-head {
    margin-bottom: 10px;
  }

  .media-modal-title {
    font-size: 0.64rem;
  }

  .media-modal-video {
    max-height: 68vh;
    max-height: 68dvh;
  }

  .media-modal-caption {
    font-size: 0.78rem;
    margin-top: 10px;
  }

  /* ---------- CTA / FOOTER / WHATSAPP ---------- */
  .cases-cta .cta-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }

  .cases-cta .cta-buttons .btn {
    justify-content: center;
  }

  .whatsapp-float {
    width: 54px;
    height: 54px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    right: 16px;
  }

  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }

  .wfloat-tooltip {
    display: none;
  }
}

/* =========================================
   MOBILE — CELULARES PEQUENOS
   ========================================= */
@media (max-width: 480px) {
  .cases-hero-title {
    font-size: 2.25rem;
  }

  .cases-hero-sub {
    font-size: 0.92rem;
  }

  .chs-item strong {
    font-size: 0.95rem;
  }

  .chs-item span {
    font-size: 0.53rem;
  }

  .hero-reel-item {
    flex-basis: 58vw;
  }

  .case-stage {
    height: clamp(460px, 80svh, 620px);
  }

  .case-video-title {
    font-size: 1.9rem;
  }

  .case-video-meta {
    gap: 8px;
  }

  .cvm-val {
    font-size: 0.74rem;
  }

  .gallery-item,
  .gallery-item--wide {
    flex-basis: 86vw;
    width: 86vw;
    height: 62vw;
  }

  .case-stat strong {
    font-size: 1.5rem;
  }
}

/* =========================================
   MOBILE — TELA DEITADA
   ========================================= */
@media (orientation: landscape) and (max-height: 560px) and (max-width: 900px) {
  .cases-hero {
    padding-top: 96px;
  }

  .hero-reel {
    display: none;
  }

  .case-head {
    margin-bottom: 10px;
  }

  .case-stage {
    height: auto;
    aspect-ratio: 16/9;
    max-height: 92vh;
    max-height: 92svh;
  }

  .case-video-content {
    padding-bottom: 14px;
  }

  .case-video-title {
    font-size: 1.5rem;
  }

  .case-video-sub {
    margin-bottom: 10px;
  }

  .case-video-meta {
    padding-top: 8px;
  }

  .case-play {
    top: 38%;
  }

  .case-play-icon {
    width: 58px;
    height: 58px;
  }

  .case-play-label {
    display: none;
  }

  .case-ghost-index {
    display: none;
  }
}

/* =========================================
   FOCO VISÍVEL
   ========================================= */
.case-media-btn:focus-visible,
.filter-btn:focus-visible,
.gallery-nav-btn:focus-visible,
.lightbox-nav:focus-visible,
.lightbox-close:focus-visible,
.media-modal-close:focus-visible,
.case-desc-toggle:focus-visible,
.case-play:focus-visible {
  outline: 2px solid var(--teal-glow);
  outline-offset: 3px;
}

/* =========================================
   MOVIMENTO REDUZIDO
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  .case-play-icon::before,
  .case-scroll-cue svg,
  .case-stage.is-loading .case-play-icon::after {
    animation: none;
  }

  .case-video,
  .case-video-overlay,
  .gallery-item img,
  .lightbox-img,
  .media-modal-inner {
    transition: none;
  }
}
