/* ==========================================================================
   VIDEO.CSS — Intro, player e loader (somente landing / front-page)
   ========================================================================== */

/* — Seção principal de vídeo — */
.landing-no-navbar main {
  display: flex;
  flex-direction: column;
}

.landing-no-navbar .hero {
  order: 1;
}

.video-section {
  position: relative;
  order: 2;
  z-index: var(--z-content);
  padding-block: clamp(1rem, 3vw, 1.75rem) clamp(2rem, 5vw, 3rem);
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--color-dark) 0%, var(--color-dark-2) 58%, var(--color-dark) 100%);
}

.landing-no-navbar #provas {
  order: 3;
}

.video-section__bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.video-section__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.video-section__glow--neon {
  top: 12%;
  left: 18%;
  width: 18rem;
  height: 18rem;
  background: var(--color-neon-soft);
}

.video-section__glow--blue {
  right: 18%;
  bottom: 10%;
  width: 16rem;
  height: 16rem;
  background: rgba(59, 130, 246, 0.05);
  animation-delay: 2s;
}

.video-section__inner {
  position: relative;
  z-index: var(--z-content);
}

.video-section__header {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto clamp(1.25rem, 3vw, 1.75rem);
}

.video-section__title {
  font-family: var(--font-display);
  max-width: 34rem;
  margin-inline: auto;
  font-size: clamp(1.875rem, 4.5vw, 3.15rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: var(--tracking-tight);
  color: var(--color-neon);
  margin-bottom: 24px;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
  text-shadow:
    0 2px 24px rgba(5, 10, 15, 0.85),
    0 0 28px rgba(0, 255, 136, 0.18);
}

.video-section__text {
  max-width: 31rem;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 1.55vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-white-70);
  text-wrap: pretty;
}

.video-scarcity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: min(100%, 34rem);
  margin: 0 auto clamp(1.1rem, 2.6vw, 1.5rem);
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(248, 113, 113, 0.62);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 0%, rgba(248, 113, 113, 0.16), transparent 62%),
    linear-gradient(135deg, rgba(95, 18, 28, 0.72), rgba(45, 8, 14, 0.9));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 26px rgba(248, 113, 113, 0.18),
    0 12px 34px rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.8vw, 1rem);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.video-scarcity strong {
  color: #fecaca;
}

.video-scarcity__icon {
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(248, 113, 113, 0.45));
}

/* — Hero sem navbar — */
.landing-no-navbar .hero {
  padding-top: 0;
}

.video-info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 28rem;
  margin: 0 auto clamp(1.25rem, 3vw, 1.75rem);
  padding: 0;
  list-style: none;
}

.video-info-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-body);
  color: var(--color-white-80);
  line-height: var(--leading-normal);
}

.video-info-list__icon {
  flex-shrink: 0;
  font-size: 1.125rem;
  line-height: 1;
}

/* — Player wrapper — */
.video-player-wrap {
  position: relative;
  width: min(100%, 24rem);
  height: 42.6667rem;
  max-height: calc(100svh - 2rem);
  max-width: calc(100vw - 2rem);
  margin-inline: auto;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  aspect-ratio: 9 / 16;
  background: var(--color-dark-3);
  border: 1px solid rgba(0, 255, 136, 0.14);
  box-shadow:
    var(--shadow-card),
    0 0 0 1px var(--color-glass-border),
    0 0 40px var(--color-neon-glow),
    0 18px 60px rgba(0, 0, 0, 0.45);
}

.video-player-wrap.is-ready {
  box-shadow:
    var(--shadow-card),
    0 0 0 1px rgba(0, 255, 136, 0.15),
    0 0 60px rgba(0, 255, 136, 0.12);
}

/* — Loader — */
.video-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  z-index: 5;
  transition: opacity var(--duration-slow) var(--ease-out),
    visibility var(--duration-slow) var(--ease-out);
}

.video-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.video-loader__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(0, 255, 136, 0.08) 0%, transparent 55%),
    linear-gradient(160deg, var(--color-dark-2) 0%, var(--color-dark-3) 50%, var(--color-dark) 100%);
}

.video-loader__ring {
  position: relative;
  width: clamp(7rem, 22vw, 9.5rem);
  height: clamp(7rem, 22vw, 9.5rem);
  z-index: 1;
}

.video-loader__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.video-loader__track {
  fill: none;
  stroke: var(--color-white-10);
  stroke-width: 4;
}

.video-loader__progress {
  fill: none;
  stroke: var(--color-neon);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.6));
  transition: stroke-dashoffset 0.15s linear;
}

.video-loader__percent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: var(--tracking-tight);
}

.video-loader__label {
  position: relative;
  z-index: 1;
  font-size: var(--text-small);
  color: var(--color-white-50);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin: 0;
}

/* — Vídeo — */
.video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-slow) var(--ease-out),
    visibility var(--duration-slow) var(--ease-out);
  background: var(--color-dark);
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.video-player.is-visible {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* Oculta qualquer interface nativa: duração, tempo, fullscreen, menu e barra. */
.video-player::-webkit-media-controls,
.video-player::-webkit-media-controls-enclosure,
.video-player::-webkit-media-controls-panel,
.video-player::-webkit-media-controls-play-button,
.video-player::-webkit-media-controls-start-playback-button,
.video-player::-webkit-media-controls-current-time-display,
.video-player::-webkit-media-controls-time-remaining-display,
.video-player::-webkit-media-controls-timeline,
.video-player::-webkit-media-controls-fullscreen-button,
.video-player::-webkit-media-controls-mute-button,
.video-player::-webkit-media-controls-volume-slider,
.video-player::-webkit-media-controls-overflow-button,
.video-player::-internal-media-controls-download-button {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.video-player::-webkit-media-controls-enclosure {
  overflow: hidden !important;
}

/* — Ativação de áudio — */
.video-audio-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  max-width: calc(100% - 2rem);
  min-height: 3rem;
  padding: 0.85rem 1.15rem;
  border: 1px solid rgba(0, 255, 136, 0.32);
  border-radius: var(--radius-full);
  background:
    linear-gradient(135deg, rgba(5, 10, 15, 0.78), rgba(8, 15, 24, 0.62)),
    rgba(5, 10, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 28px rgba(0, 255, 136, 0.22),
    0 12px 38px rgba(0, 0, 0, 0.48);
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: clamp(0.8125rem, 2.8vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--duration-base) var(--ease-out),
    visibility var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.video-audio-toggle.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: videoAudioPulse 1.6s ease-in-out infinite;
}

.video-audio-toggle.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
  transform: translate(-50%, -50%) scale(0.96);
}

.video-audio-toggle:hover,
.video-audio-toggle:focus-visible {
  transform: translate(-50%, -50%) scale(1.04);
  box-shadow:
    0 0 0 1px rgba(0, 255, 136, 0.22),
    0 0 34px rgba(0, 255, 136, 0.34),
    0 14px 42px rgba(0, 0, 0, 0.55);
}

.video-audio-toggle__icon {
  font-size: 1.15em;
  line-height: 1;
}

@keyframes videoAudioPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 0 22px rgba(0, 255, 136, 0.2),
      0 12px 38px rgba(0, 0, 0, 0.48);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(0, 255, 136, 0.24),
      0 0 42px rgba(0, 255, 136, 0.38),
      0 16px 46px rgba(0, 0, 0, 0.58);
  }
}

/* — Barra de progresso real do vídeo — */
.video-time-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 0.375rem;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  pointer-events: none;
}

.video-time-progress__bar {
  width: 0%;
  height: 100%;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  background: linear-gradient(90deg, var(--color-neon-dim), var(--color-neon));
  box-shadow:
    0 0 12px rgba(0, 255, 136, 0.7),
    0 0 28px rgba(0, 255, 136, 0.28);
  transition: width 120ms linear;
}

.video-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(1rem, 3vw, 1.4rem);
}

.video-cta-wrap .btn-neon-xl {
  min-width: min(100%, 18rem);
  justify-content: center;
}

/* — Responsivo — */
@media (max-width: 767px) {
  .landing-no-navbar main {
    position: relative;
    display: block;
  }

  .video-section {
    position: relative;
    z-index: var(--z-content);
    padding-block: clamp(0.875rem, 4vw, 1.25rem) 0;
    background:
      linear-gradient(180deg, rgba(5, 10, 15, 0.22) 0%, rgba(5, 10, 15, 0.5) 48%, var(--color-dark) 100%),
      linear-gradient(90deg, rgba(5, 10, 15, 0.48), rgba(5, 10, 15, 0.18), rgba(5, 10, 15, 0.48)),
      url("../images/herobanner.jpg") center top / cover no-repeat,
      var(--color-dark);
    overflow: hidden;
    pointer-events: auto;
  }

  .video-section__bg-grid {
    display: block;
  }

  .video-section__glow--neon {
    top: 20%;
    left: 50%;
    width: 14rem;
    height: 14rem;
    transform: translateX(-50%);
  }

  .video-section__glow--blue {
    right: auto;
    left: 50%;
    bottom: 12%;
    width: 12rem;
    height: 12rem;
    transform: translateX(-50%);
  }

  .video-section__inner {
    pointer-events: auto;
  }

  .video-section__header {
    max-width: 22.5rem;
    margin-bottom: clamp(1rem, 4vw, 1.25rem);
    text-shadow: 0 2px 20px rgba(5, 10, 15, 0.9);
  }

  .video-section__title {
    max-width: 21.5rem;
    font-size: clamp(1.75rem, 8.8vw, 2.45rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin-bottom: 24px;
    color: var(--color-neon);
  }

  .video-section__text {
    max-width: 21rem;
    font-size: clamp(0.875rem, 4vw, 0.9875rem);
    line-height: 1.48;
    text-shadow: 0 1px 16px rgba(5, 10, 15, 0.85);
  }

  .video-scarcity {
    width: min(100%, 22rem);
    margin-bottom: clamp(1rem, 4vw, 1.25rem);
    padding: 0.8rem 0.9rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
  }

  .video-info-list {
    max-width: 100%;
    padding-inline: 0.25rem;
  }

  .video-info-list__item {
    font-size: var(--text-small);
  }

  .video-player-wrap {
    width: min(100%, 23rem);
    height: min(40.8889rem, calc(100svh - 1.5rem));
    max-width: calc(100vw - 1.5rem);
    max-height: none;
    margin-bottom: clamp(1rem, 4vw, 1.5rem);
    border-radius: var(--radius-xl);
    pointer-events: auto;
    box-shadow:
      var(--shadow-card),
      0 0 0 1px rgba(0, 255, 136, 0.2),
      0 0 38px rgba(0, 255, 136, 0.14),
      0 20px 52px rgba(0, 0, 0, 0.58);
  }

  .video-player-wrap::after {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 4;
    border-radius: inherit;
    border: 1px solid rgba(0, 255, 136, 0.22);
    pointer-events: none;
    box-shadow: inset 0 0 24px rgba(0, 255, 136, 0.08);
  }

  .video-cta-wrap {
    display: flex;
    margin-top: 0;
    margin-bottom: clamp(2.5rem, 10vw, 5rem);
    pointer-events: auto;
  }

  .video-cta-wrap .btn-neon-xl {
    width: auto;
    max-width: min(100%, 19.5rem);
    min-height: 2.85rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    border-radius: 0.875rem;
  }

  .landing-no-navbar .hero {
    min-height: auto;
    padding-top: 0;
    padding-bottom: var(--space-3xl);
    overflow: hidden;
  }

  .landing-no-navbar .hero-image-layer {
    position: relative;
    flex-shrink: 0;
    height: auto;
    order: 1;
    z-index: var(--z-hero-photo);
  }

  .landing-no-navbar .hero-image-layer__img-wrap {
    position: relative;
    width: 100%;
    height: clamp(260px, 52vw, 400px);
    inset: auto;
    background: var(--color-dark-2);
  }

  .landing-no-navbar .hero-image-layer img {
    height: 100%;
    opacity: 0.72;
    object-position: center 15%;
  }

  .landing-no-navbar .hero-image-layer__overlay {
    background:
      linear-gradient(180deg, rgba(5, 10, 15, 0.12) 0%, rgba(5, 10, 15, 0.3) 35%, rgba(5, 10, 15, 0.86) 78%, var(--color-dark) 100%),
      linear-gradient(90deg, rgba(5, 10, 15, 0.42), transparent 50%, rgba(5, 10, 15, 0.42));
  }

  .landing-no-navbar .hero__inner {
    position: relative;
    z-index: var(--z-hero-content);
    order: 2;
    flex: 1;
    padding-block: clamp(1.25rem, 4vw, 2rem);
  }

  .landing-no-navbar .hero__content {
    margin-top: -2rem;
  }
}

@media (max-width: 380px) {
  .video-player-wrap {
    width: calc(100vw - 1rem);
    height: calc((100vw - 1rem) * 1.7778);
  }
}

@supports (aspect-ratio: 9 / 16) {
  .video-player-wrap {
    height: auto;
  }

  @media (max-width: 767px) {
    .video-player-wrap {
      height: auto;
    }
  }
}

@media (min-width: 1024px) {
  .video-info-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    gap: var(--space-md) var(--space-xl);
  }

  .video-info-list__item {
    flex: 0 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-loader,
  .video-player,
  .video-audio-toggle,
  .video-loader__progress {
    transition: none;
    animation: none;
  }
}
