/* ==========================================================================
   Player próprio do vídeo "Pra quê preciso da Brave2Grow?" (home e /basic).
   O player é escuro nos dois temas; capítulos e textos seguem a seção em volta
   (variáveis --v-*). O tema claro da home sobrescreve a faixa em theme-light.css.
   ========================================================================== */
.b2g-video {
  --v-ink: var(--text-dark);
  --v-muted: var(--text-dark-subtle);
  --v-line: rgba(16, 15, 12, 0.1);
  --v-chip: #FFFFFF;
  --v-accent: var(--brand-purple);
  margin: 0;
  min-width: 0;
}

.b2g-video [hidden] { display: none !important; }

.b2g-video-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  background: #0B0914;
  color: #FFFFFF;
  outline: none;
  box-shadow: 0 44px 90px -42px rgba(90, 15, 212, 0.7), 0 18px 40px -26px rgba(0, 0, 0, 0.6);
}

/* Moldura fina no gradiente da marca */
.b2g-video-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--brand-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.85;
  pointer-events: none;
}

.b2g-video-stage:focus-visible { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 6px var(--brand-violet); }

.b2g-video-media,
.b2g-video-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.b2g-video-media { object-fit: contain; background: #000000; }

.b2g-video-cover {
  z-index: 1;
  object-fit: cover;
  /* A capa é ambiente: escura e levemente desfocada, para o play e o título se destacarem */
  filter: brightness(0.72) saturate(1.1) blur(1.5px);
  transform: scale(1.03);
  transition: opacity 0.45s ease, transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.b2g-video-stage:hover .b2g-video-cover { transform: scale(1.06); }

.b2g-video-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(46% 52% at 50% 52%, rgba(11, 9, 20, 0.62), transparent 100%),
    radial-gradient(60% 70% at 50% 46%, rgba(90, 15, 212, 0.3), transparent 70%),
    linear-gradient(180deg, rgba(11, 9, 20, 0.3) 0%, rgba(11, 9, 20, 0.45) 50%, rgba(11, 9, 20, 0.88) 100%);
  transition: opacity 0.45s ease;
}

.b2g-video-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(11, 9, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  font: 700 10.5px/1 var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}

.b2g-video-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(240, 96, 32, 0.25);
}

/* Botão de play da marca: círculo no gradiente, faceta clara como no símbolo e anel pulsante */
.b2g-video-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  border: 0;
  padding: 0 24px;
  background: transparent;
  color: #FFFFFF;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.b2g-video-play {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(66px, 8.5vw, 98px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 20px 44px -14px rgba(139, 31, 232, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
}

.b2g-video-play::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 52%);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.b2g-video-play::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: inherit;
  border: 2px solid rgba(192, 32, 176, 0.6);
  animation: b2g-video-pulse 2.4s ease-out infinite;
}

.b2g-video-play svg {
  position: relative;
  width: 40%;
  height: 40%;
  margin-left: 9%;
  fill: #FFFFFF;
  filter: drop-shadow(0 2px 6px rgba(40, 0, 80, 0.35));
}

.b2g-video-start:hover .b2g-video-play { transform: scale(1.07); box-shadow: 0 24px 54px -12px rgba(192, 32, 176, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.b2g-video-start:active .b2g-video-play { transform: scale(0.97); }
.b2g-video-start:focus-visible { outline: none; }
.b2g-video-start:focus-visible .b2g-video-play { outline: 3px solid #FFFFFF; outline-offset: 7px; }

@keyframes b2g-video-pulse {
  0% { transform: scale(0.92); opacity: 0.9; }
  100% { transform: scale(1.38); opacity: 0; }
}

.b2g-video-start-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.b2g-video-start-text b {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.b2g-video-start-text small {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.3vw, 1.85rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.1;
}

/* Depois do play: some a capa; o botão volta pequeno quando o vídeo está pausado */
.is-started .b2g-video-cover,
.is-started .b2g-video-shade,
.is-started .b2g-video-badge { opacity: 0; visibility: hidden; }
.is-started .b2g-video-start-text { display: none; }
.is-started .b2g-video-start { pointer-events: none; }
.is-started .b2g-video-play { pointer-events: auto; width: clamp(54px, 6vw, 72px); }
.is-started .b2g-video-play::after { animation: none; opacity: 0; }
.is-started.is-playing .b2g-video-start,
.is-started.is-ended .b2g-video-start { opacity: 0; visibility: hidden; }

.b2g-video-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 25%, #8B1FE8, #C020B0, #F06020);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  animation: b2g-video-spin 0.9s linear infinite;
}

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

/* Barra de controles */
.b2g-video-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 34px 14px 10px;
  background: linear-gradient(180deg, transparent, rgba(8, 6, 16, 0.85));
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.is-idle .b2g-video-bar { opacity: 0; transform: translateY(10px); pointer-events: none; }
.is-idle .b2g-video-stage { cursor: none; }

.b2g-video-track {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
}

.b2g-video-track::before,
.b2g-video-buffer,
.b2g-video-fill {
  position: absolute;
  left: 0;
  height: 4px;
  border-radius: 4px;
  transition: transform 0.15s ease;
}

.b2g-video-track::before { content: ""; right: 0; background: rgba(255, 255, 255, 0.22); }
.b2g-video-buffer { width: 0; background: rgba(255, 255, 255, 0.3); }
.b2g-video-fill { width: 0; background: var(--brand-gradient-h); box-shadow: 0 0 12px rgba(192, 32, 176, 0.65); }
.b2g-video-track:hover::before,
.b2g-video-track:hover .b2g-video-buffer,
.b2g-video-track:hover .b2g-video-fill { transform: scaleY(1.5); }

/* Início de cada capítulo na barra */
.b2g-video-tick {
  position: absolute;
  z-index: 1;
  width: 3px;
  height: 6px;
  background: rgba(8, 6, 16, 0.9);
  transform: translateX(-50%);
  pointer-events: none;
}

.b2g-video-seek {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.b2g-video-seek::-webkit-slider-runnable-track { height: 18px; background: transparent; }
.b2g-video-seek::-moz-range-track { height: 18px; background: transparent; }

.b2g-video-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  border: 3px solid var(--brand-magenta);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(192, 32, 176, 0.25);
  transform: scale(0.6);
  transition: transform 0.15s ease;
}

.b2g-video-seek::-moz-range-thumb {
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--brand-magenta);
  background: #FFFFFF;
  transform: scale(0.6);
  transition: transform 0.15s ease;
}

.b2g-video-track:hover .b2g-video-seek::-webkit-slider-thumb,
.b2g-video-seek:focus-visible::-webkit-slider-thumb { transform: scale(1); }
.b2g-video-track:hover .b2g-video-seek::-moz-range-thumb,
.b2g-video-seek:focus-visible::-moz-range-thumb { transform: scale(1); }
.b2g-video-seek:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; border-radius: 4px; }

.b2g-video-buttons {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}

.b2g-video-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
  transition: background 0.2s ease;
}

.b2g-video-btn:hover { background: rgba(255, 255, 255, 0.12); }
.b2g-video-btn:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 1px; }
.b2g-video-btn svg { width: 22px; height: 22px; fill: currentColor; }
.b2g-video-btn .i-line { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.b2g-video-btn .i-line .fill { fill: currentColor; stroke: none; }
.b2g-video-btn .i-line text { fill: currentColor; stroke: none; font: 700 7.5px var(--font-sans); }

.b2g-video .i-pause,
.b2g-video .i-muted,
.b2g-video .i-shrink,
.b2g-video.is-playing .i-play,
.b2g-video.is-muted .i-sound,
.b2g-video.is-fullscreen .i-expand { display: none; }
.b2g-video.is-playing .i-pause,
.b2g-video.is-muted .i-muted,
.b2g-video.is-fullscreen .i-shrink { display: block; }

.b2g-video-time {
  flex: none;
  margin: 0 8px 0 4px;
  font: 500 13px var(--font-sans);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.b2g-video-time .sep { margin: 0 4px; opacity: 0.5; }

.b2g-video-now {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.b2g-video-speed { width: auto; min-width: 38px; padding: 0 8px; font: 700 12.5px var(--font-sans); }

/* Tela cheia (o iPhone usa a tela cheia do próprio sistema) */
.b2g-video-stage:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }
.b2g-video-stage:-webkit-full-screen { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }
.b2g-video-stage:fullscreen::after { display: none; }
.b2g-video-stage:-webkit-full-screen::after { display: none; }

/* Fim do vídeo e erro */
.b2g-video-end,
.b2g-video-error {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(70% 80% at 50% 40%, rgba(90, 15, 212, 0.55), rgba(11, 9, 20, 0.94) 72%);
  backdrop-filter: blur(6px);
}

.b2g-video-end b { font-family: var(--font-serif); font-size: clamp(1.45rem, 3vw, 2.3rem); font-weight: 700; line-height: 1.1; }
.b2g-video-end p,
.b2g-video-error p { max-width: 42ch; margin: 0; color: rgba(255, 255, 255, 0.8); font-size: 14.5px; line-height: 1.55; }

.b2g-video-end-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.b2g-video-cta,
.b2g-video-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font: 700 12px var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.b2g-video-cta {
  border: 0;
  background: var(--brand-gradient);
  color: #FFFFFF;
  box-shadow: 0 14px 30px -14px rgba(192, 32, 176, 0.9);
}

.b2g-video-ghost {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.b2g-video-cta:hover { transform: translateY(-1px); }
.b2g-video-ghost:hover { background: rgba(255, 255, 255, 0.16); }
.b2g-video-cta:focus-visible,
.b2g-video-ghost:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }

/* Capítulos (abaixo do player) */
.b2g-video-chapters { margin-top: 18px; }

.b2g-video-chapters-label {
  display: block;
  margin-bottom: 10px;
  color: var(--v-muted);
  font: 700 10.5px var(--font-sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.b2g-video-chapters ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.b2g-video-chapters button {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--v-line);
  border-radius: 12px;
  background: var(--v-chip);
  color: var(--v-ink);
  font: 500 13px/1.3 var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.b2g-video-chapters button:hover { border-color: rgba(139, 31, 232, 0.55); transform: translateY(-1px); }
.b2g-video-chapters button:focus-visible { outline: 2px solid var(--brand-violet); outline-offset: 2px; }
.b2g-video-chapters .t { color: var(--v-accent); font-weight: 700; font-size: 11.5px; font-variant-numeric: tabular-nums; }

.b2g-video-chapters [aria-current="true"] {
  border: 1.5px solid transparent;
  background: linear-gradient(var(--v-chip), var(--v-chip)) padding-box, var(--brand-gradient) border-box;
}

/* Links "Assistir ao vídeo" do topo das páginas */
.b2g-video-jump {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
  font: 600 13.5px var(--font-sans);
  text-decoration: none;
}

.b2g-video-jump-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 8px 18px -8px rgba(139, 31, 232, 0.9);
  transition: transform 0.2s ease;
}

.b2g-video-jump-icon svg { width: 13px; height: 13px; margin-left: 2px; fill: #FFFFFF; }
.b2g-video-jump:hover .b2g-video-jump-icon { transform: scale(1.08); }
.b2g-video-jump:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.b2g-video-jump:focus-visible { outline: 2px solid var(--brand-violet); outline-offset: 4px; border-radius: 999px; }
.b2g-hero .b2g-video-jump { color: var(--text-light); }

/* Faixa da home: escura, como uma sala de cinema (o tema claro sobrescreve em theme-light.css) */
.b2g-vsec {
  position: relative;
  overflow: hidden;
  padding: 6.5rem 0;
  background: var(--bg-dark-3);
  color: var(--text-light);
}

.b2g-vsec::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(139, 31, 232, 0.22), transparent);
  pointer-events: none;
}

.b2g-vsec .b2g-container { position: relative; }
.b2g-vsec .b2g-section-title { color: var(--text-light); }

.b2g-vsec .b2g-video {
  --v-ink: var(--text-light);
  --v-muted: var(--text-light-subtle);
  --v-line: rgba(255, 255, 255, 0.12);
  --v-chip: rgba(255, 255, 255, 0.04);
  --v-accent: #C79BFF;
}

.b2g-vsec .b2g-video-chapters [aria-current="true"] {
  background: linear-gradient(#17131F, #17131F) padding-box, var(--brand-gradient) border-box;
}

.b2g-vsec-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.b2g-vsec-desc {
  max-width: 46ch;
  margin: 0 0 2rem;
  color: var(--text-light-muted);
  font-size: 15.5px;
  font-weight: 300;
  line-height: 1.7;
}

/* /basic */
.bs-video .b2g-vsec-grid { align-items: start; }
.bs-video .bs-title { margin-bottom: 16px; }
.bs-video .bs-text { margin: 0 0 24px; }
.bs-video-jump { margin-top: 18px; }

@media (max-width: 960px) {
  .b2g-vsec { padding: 4.5rem 0; }
  .b2g-video-chapters ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Uma coluna: o vídeo sobe para logo depois do título, antes do texto e do botão */
  .b2g-vsec-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .b2g-vsec-copy { display: contents; }
  .b2g-vsec-copy > * { order: 1; }
  .b2g-vsec-copy > h2 { order: 2; }
  .b2g-vsec-grid > .b2g-video { order: 3; margin-bottom: 1.75rem; }
  .b2g-vsec-copy > p { order: 4; }
  .b2g-vsec-copy > a { order: 5; justify-self: start; }
}

@media (max-width: 560px) {
  .b2g-video-stage { border-radius: 14px; }
  .b2g-video-badge { top: 10px; left: 10px; }
  .b2g-video-start { gap: 12px; }
  .b2g-video-now,
  .b2g-video-end p { display: none; }
  .b2g-video-bar { padding: 26px 6px 4px; }
  .b2g-video-btn { width: 36px; height: 36px; }
  .b2g-video-end { gap: 6px; padding: 12px; }
  .b2g-video-end-actions { margin-top: 4px; }
  .b2g-video-cta,
  .b2g-video-ghost { min-height: 40px; padding: 0.6rem 1rem; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .b2g-video-play::after,
  .b2g-video-spinner { animation: none; }
  .b2g-video-cover,
  .b2g-video-play,
  .b2g-video-bar { transition: none; }
  .b2g-video-stage:hover .b2g-video-cover { transform: scale(1.03); }
}
