/* ============================================================
   Palco — Artigos, Entrevistas, Imprensa e Podcasts
   Implementação de referência do Design System "Palco"
   (docs/DESIGN-SYSTEM.md). Carregado depois de design-system.css, v10.css e
   cursos-palestras.css; remover este arquivo devolve o visual anterior.
   ============================================================ */

.stage {
  /* Tokens do Design System (design-system.css) */
  --stage-ink: var(--ds-ink);
  --stage-card: var(--ds-surface);
  --stage-line: var(--ds-line-inv);
  --stage-glow: var(--ds-red-light);
  --stage-font: var(--ds-font-stage);
  position: relative;
  overflow-x: clip;
  isolation: isolate;
}

/* ─── Fundo: canhão de luz nas seções escuras, papel nas claras ─ */
.stage.section-dark {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(45% 35% at 50% 100%, rgba(179, 38, 30, 0.14), transparent 75%),
    var(--stage-ink);
}
.stage.section-dark::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background: conic-gradient(from 162deg at 50% -4%,
    transparent 0deg, rgba(255, 255, 255, 0.055) 18deg, transparent 36deg);
}
.stage:not(.section-dark) {
  background: radial-gradient(80% 70% at 50% 0%, #ffffff, #efece7 85%);
}

/* ─── Título: palavra projetada em escala, número do ato ──────── */
.stage-title {
  position: relative;
  margin-bottom: 64px;
}
.stage-title::before {
  content: attr(data-ghost);
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  transform: translate(-50%, -54%);
  font-family: var(--stage-font);
  font-weight: 800;
  font-size: clamp(4rem, 15vw, 12rem);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(10, 10, 10, 0.09);
  pointer-events: none;
  user-select: none;
}
.section-dark .stage-title::before { -webkit-text-stroke-color: rgba(255, 255, 255, 0.08); }

.stage-act {
  display: block;
  margin-bottom: 14px;
  font-family: var(--stage-font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--accent);
}
.stage-act i { font-style: normal; color: var(--gray-400); font-weight: 500; }
.section-dark .stage-act { color: var(--stage-glow); }
.section-dark .stage-act i { color: var(--gray-500); }

.stage .stage-title h2::after {
  width: 64px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(224, 87, 77, 0.7);
}

/* ─── Trilho do carrossel ─────────────────────────────────────── */
.stage .carousel-track {
  padding: 14px 8px 44px;
  scrollbar-width: none;
}
.stage .carousel-track::-webkit-scrollbar { display: none; }

.stage .carousel-track > .stage-card { width: calc(33.333% - 16px); }

.stage-rail {
  position: relative;
  height: 2px;
  margin: -12px 8px 0;
  border-radius: 2px;
  background: rgba(10, 10, 10, 0.1);
  overflow: hidden;
}
.section-dark .stage-rail { background: rgba(255, 255, 255, 0.1); }
.stage-rail[hidden] { display: none; }
.stage-rail-light {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--stage-glow);
  transition: left 0.25s ease, width 0.25s ease;
}

/* Setas: lentes de vidro sobre o palco */
.stage .carousel-nav {
  width: 52px;
  height: 52px;
  font-size: 1.5rem;
  background: rgba(10, 10, 10, 0.88);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
.section-dark.stage .carousel-nav { background: rgba(255, 255, 255, 0.1); }
.stage .carousel-nav:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px rgba(224, 87, 77, 0.55);
}

/* ─── Card: uma tela que acende ───────────────────────────────── */
.stage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
  background: var(--stage-card);
  border: 1px solid var(--stage-line);
  color: #fff;
  font-family: var(--stage-font);
  cursor: pointer;
  box-shadow: 0 22px 36px -22px rgba(0, 0, 0, 0.55);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.4s ease;
}
.stage:not(.section-dark) .stage-card { box-shadow: 0 22px 36px -22px rgba(0, 0, 0, 0.5); }

/* Filete de luz no topo e feixe que atravessa a tela no hover */
.stage-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  z-index: 4;
  background: linear-gradient(90deg, transparent, var(--stage-glow), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.stage-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.09) 50%, transparent 65%);
  transform: translateX(-120%);
}
.stage-card .badge-new { z-index: 5; }

.stage-card:focus-visible {
  outline: 2px solid var(--stage-glow);
  outline-offset: 3px;
}

.stage-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #262626, #141414);
}
.stage-screen img,
.stage-screen .card-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: brightness(0.9);
  transition: transform 1.2s var(--ease-out), filter 0.6s ease;
}
.stage-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(18, 18, 19, 0.7) 85%, var(--stage-card));
  pointer-events: none;
}
.stage-card--article .stage-screen img { object-position: 50% 28%; }
.stage-card--article .stage-screen::after {
  background: linear-gradient(180deg, transparent 30%, rgba(18, 18, 19, 0.82) 78%, var(--stage-card));
}

.stage-num {
  position: absolute;
  left: 18px;
  bottom: 6px;
  z-index: 2;
  font-family: var(--stage-font);
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.6);
  transition: -webkit-text-stroke-color 0.4s ease, text-shadow 0.4s ease;
}

.stage-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 18px 22px 20px;
}

.stage-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stage-glow);
}
.stage-eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.stage-headline {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stage-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gray-400);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stage-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--stage-line);
}
.stage-meta {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.stage-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
}
.stage-arrow {
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--stage-glow);
  transition: transform 0.35s var(--ease-out);
}

/* Botão de play: lente circular de vidro */
.stage-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.5s var(--ease-out);
}
.stage-play::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-35%, -50%);
  border-left: 15px solid #fff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

/* ─── Imprensa: manchete em cena, logo numa caixa de luz ──────── */
.stage-masthead {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--stage-line);
}
.stage-logo {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.14);
}
.stage-logo img {
  height: 28px;
  max-width: 112px;
  width: auto;
  object-fit: contain;
}
.stage-outlet {
  min-width: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-masthead .stage-num {
  position: static;
  margin-left: auto;
  font-size: 1.75rem;
  -webkit-text-stroke-color: rgba(255, 255, 255, 0.35);
}
.stage-quote {
  display: block;
  height: 2.4rem;
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 5.5rem;
  line-height: 0.85;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(224, 87, 77, 0.55);
}
.stage-card--press .stage-headline {
  font-size: 1.375rem;
  -webkit-line-clamp: 5;
}
.stage-card--press .stage-body { padding-top: 14px; }

/* ─── Podcasts ────────────────────────────────────────────────── */
.stage .podcast-channel { margin-bottom: 72px; }
.stage .podcast-channel:last-child { margin-bottom: 0; }
.stage .podcast-channel-header {
  align-items: flex-end;
  border-bottom: 0;
  padding-bottom: 26px;
  margin-bottom: 18px;
  position: relative;
}
.stage .podcast-channel-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), rgba(10, 10, 10, 0.12) 30%, rgba(10, 10, 10, 0.04));
}
.stage .podcast-channel-header h3 {
  font-family: var(--stage-font);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 10px;
}
.stage-onair {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--stage-font);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}
.stage-onair::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(224, 87, 77, 0.6);
  animation: stage-onair 2s ease-out infinite;
}
.stage .podcast-channel-header .btn {
  flex: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.stage .podcast-channel-header .btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(224, 87, 77, 0.45);
}

.stage-card--video .stage-screen { aspect-ratio: 16 / 9; }
.stage-card--video .stage-body { gap: 8px; padding: 16px 18px 18px; }
.stage-card--video .stage-headline {
  font-size: 1.0625rem;
  -webkit-line-clamp: 2;
}
.stage-duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  font-family: var(--stage-font);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
}
.stage-duration::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stage-glow);
}

/* ─── Eventos: a turnê ────────────────────────────────────────── */
/* Data como um ingresso aceso no canto da tela */
.stage-date {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 12px;
  background: rgba(10, 10, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  font-family: var(--stage-font);
  color: #fff;
}
.stage-date b {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stage-date span {
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stage-glow);
}
.stage-card--event .stage-screen img { object-position: 50% 35%; }

/* Faixa de turnê: as paradas rolando devagar, como o verso de uma camiseta de turnê */
.tour {
  position: relative;
  margin: -24px 0 36px;
  padding: 14px 0;
  overflow: hidden;
  border-block: 1px solid rgba(10, 10, 10, 0.12);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tour-track {
  display: flex;
  align-items: center;
  gap: 22px;
  width: max-content;
  animation: tour-roll 60s linear infinite;
}
.tour:hover .tour-track { animation-play-state: paused; }
.tour-stop {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
  font: 600 0.9375rem/1 var(--font-serif);
  color: var(--gray-900);
}
.tour-stop b {
  font: 700 0.6875rem/1 var(--stage-font);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.tour-track > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--stage-glow);
  flex: none;
}
@keyframes tour-roll { to { transform: translateX(-50%); } }

/* ─── Sobre ───────────────────────────────────────────────────── */
.stage--about .about-grid { align-items: start; }
.stage--about .about-photo { margin: 0; }
.stage--about .about-photo::before {
  /* moldura antiga vira luz difusa por trás do retrato */
  inset: 8% -6% -6% 8%;
  border: 0;
  border-radius: 14px;
  background: radial-gradient(60% 60% at 70% 60%, var(--ds-red-glow), transparent 70%);
  filter: blur(30px);
  opacity: 0.5;
  z-index: -1;
}
.stage--about figure.ds-portrait img { aspect-ratio: 3 / 4; height: auto; object-position: 50% 20%; }
.stage--about .about-text p { color: var(--ds-text-2); }
.stage--about .about-text p:first-child {
  font: 600 clamp(1.25rem, 1.8vw, 1.5rem)/1.45 var(--font-serif);
  color: var(--ds-text);
  padding-left: 18px;
  border-left: 2px solid var(--accent);
}
.stage--about .about-text.is-collapsed::after {
  background: linear-gradient(to bottom, rgba(244, 241, 236, 0), #f4f1ec);
}
.stage--about .about-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border: 1px solid var(--ds-text);
  border-radius: 999px;
  background: transparent;
  font: 700 0.6875rem/1 var(--stage-font);
  letter-spacing: 0.16em;
  color: var(--ds-text);
}
.stage--about .about-toggle:hover { background: var(--ds-text); color: #fff; }
.stage--about .about-stats { margin-top: 36px; }
.stage--about .ds-stat { background: rgba(255, 255, 255, 0.6); }

/* Formação: cada tipo vira uma tela escura */
.stage--about .capacitations-block { border-top: 0; margin-top: 72px; padding-top: 0; }
.stage--about .capacitations-title {
  margin-bottom: 28px;
  font: 700 0.6875rem/1 var(--stage-font);
  letter-spacing: 0.32em;
  color: var(--accent);
}
.stage--about .capacitations-list {
  column-count: initial;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: none;
}
.stage--about .cap-group {
  margin: 0;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--ds-surface);
  border: 1px solid var(--ds-line-inv);
  box-shadow: var(--ds-shadow-card);
}
.stage--about .cap-group-type {
  color: var(--stage-glow);
  border-bottom-color: var(--ds-line-inv);
  font-family: var(--stage-font);
}
.stage--about .cap-course { color: #fff; font-family: var(--font-serif); }
.stage--about .cap-inst { color: var(--ds-text-inv-2); }
.stage--about .brands-section { border-top-color: rgba(10, 10, 10, 0.1); }

/* ─── Interação (só onde há ponteiro) ─────────────────────────── */
@media (hover: hover) {
  .stage-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 40px -26px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(224, 87, 77, 0.25);
  }
  .stage-card:hover::before { opacity: 1; }
  .stage-card:hover::after {
    transform: translateX(120%);
    transition: transform 1s var(--ease-out);
  }
  .stage-card:hover .stage-screen img,
  .stage-card:hover .stage-screen .card-placeholder {
    transform: scale(1.07);
    filter: brightness(1.04);
  }
  .stage-card:hover .stage-num {
    -webkit-text-stroke-color: var(--stage-glow);
    text-shadow: 0 0 22px rgba(224, 87, 77, 0.6);
  }
  .stage-card:hover .stage-arrow { transform: translateX(5px); }
  .stage-card:hover .stage-play {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 10px rgba(224, 87, 77, 0.18), 0 0 30px rgba(224, 87, 77, 0.6);
    transform: translate(-50%, -50%) scale(1.06);
  }
}

/* ─── Entrada: as telas acendem em sequência ──────────────────── */
.stage .reveal:not(.in-view) .stage-card { opacity: 0; }
.stage .reveal.in-view .stage-card {
  animation: stage-light-up 0.9s var(--ease-out) both;
  animation-delay: calc(min(var(--i, 0), 5) * 90ms);
}

@keyframes stage-light-up {
  from { opacity: 0; translate: 0 36px; filter: brightness(0.3); }
  to   { opacity: 1; translate: 0 0;    filter: none; }
}
@keyframes stage-onair {
  0%   { box-shadow: 0 0 0 0 rgba(224, 87, 77, 0.6); }
  80%  { box-shadow: 0 0 0 10px rgba(224, 87, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 87, 77, 0); }
}

/* ─── Responsivo ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stage .carousel-track > .stage-card { width: calc(50% - 12px); }
}

@media (max-width: 768px) {
  .tour { margin: -12px 0 28px; }
  .stage-date b { font-size: 1.625rem; }
  .stage--about .about-photo { max-width: 340px; }
  .stage-title { margin-bottom: 44px; }
  .stage-title::before { font-size: clamp(3.25rem, 19vw, 7rem); }
  .stage-act { font-size: 0.6875rem; margin-bottom: 10px; }

  .stage .carousel-track { gap: 16px; padding: 10px 8px 36px; }
  .stage .carousel-track > .stage-card { width: 82%; }

  .stage-num { font-size: 2.5rem; left: 16px; }
  .stage-body { padding: 16px 18px 18px; }
  .stage-headline { font-size: 1.125rem; }
  .stage-card--press .stage-headline { font-size: 1.1875rem; }
  .stage-quote { font-size: 4.5rem; height: 2rem; }
  .stage-masthead { min-height: 68px; padding: 14px 18px; }
  .stage-logo { height: 38px; }
  .stage-logo img { height: 24px; max-width: 96px; }
  .stage-play { width: 50px; height: 50px; }

  .stage .podcast-channel { margin-bottom: 52px; }
  .stage .podcast-channel-header { align-items: flex-start; gap: 16px; }
  .stage .podcast-channel-header .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .stage .carousel-track > .stage-card { width: 86%; }
  .stage-foot { flex-wrap: wrap; row-gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .stage-card,
  .stage-card::after,
  .stage-screen img,
  .stage-play,
  .stage-arrow { transition: none !important; }
  .stage .reveal .stage-card { opacity: 1 !important; animation: none !important; }
  .stage-onair::before { animation: none; }
  .tour-track { animation: none; }
}
