/* ============================================================================
   TREINAMENTO.CSS · Área de treinamentos (senha, lista e vídeo) sobre o mesmo
   campo cirúrgico da home. Carregado depois de style.css só nessas páginas.
   ============================================================================ */

html {
  background: #06100e;
}

body {
  position: relative;
  isolation: isolate;
  background: transparent;
}

/* O campo cirúrgico, fixo: continua no lugar enquanto a página rola. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #06100e url("/assets/cvc-campo.jpg") 62% 50% / cover no-repeat;
}

@media (orientation: portrait) {
  body::before {
    background-image: url("/assets/cvc-campo-retrato.jpg");
    background-position: 50% 30%;
  }
}

/* Véu para leitura: escurece mais no centro, onde ficam os cartões. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 70% at 50% 45%, rgba(6, 16, 14, 0.84) 0%, rgba(6, 16, 14, 0.74) 55%, rgba(6, 16, 14, 0.5) 100%),
    linear-gradient(180deg, rgba(6, 16, 14, 0.45) 0%, rgba(6, 16, 14, 0.15) 30%, rgba(6, 16, 14, 0.45) 100%);
}

header.topo h1 {
  font-family: "Archivo", "Manrope", "Segoe UI", Arial, sans-serif;
  font-variation-settings: "wdth" 114;
  font-weight: 690;
  letter-spacing: -0.012em;
  background: none;
  color: #eef4f1;
  text-shadow: 0 2px 24px rgba(3, 8, 7, 0.7);
}

header.topo p {
  color: #b7c8c1;
  text-shadow: 0 1px 12px rgba(3, 8, 7, 0.8);
}

.marca {
  background: rgba(6, 16, 14, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.card,
.treinamento-item,
.proximo-treino {
  background: linear-gradient(180deg, rgba(14, 29, 26, 0.78), rgba(8, 18, 16, 0.72));
  border-color: rgba(190, 230, 215, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.treinamento-item:hover,
.proximo-treino:hover {
  background: linear-gradient(180deg, rgba(18, 38, 33, 0.86), rgba(10, 22, 19, 0.8));
}

.contagem,
footer {
  text-shadow: 0 1px 10px rgba(3, 8, 7, 0.9);
}

footer {
  color: #8a9a94;
  border-top-color: rgba(190, 230, 215, 0.08);
}

/* --------------------------------------------------------------------------
   Chegada pela transição da home: a luz da veia se abre sobre a tela de senha.
   -------------------------------------------------------------------------- */

@property --abertura {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

.entrada-cvc::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, #5a1223 0%, #2a0710 45%, #12040a 100%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, transparent var(--abertura), #000 calc(var(--abertura) + 14%));
  mask-image: radial-gradient(circle at 50% 45%, transparent var(--abertura), #000 calc(var(--abertura) + 14%));
  animation: abre-lumen 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes abre-lumen {
  0% { --abertura: 0%; opacity: 1; }
  80% { opacity: 1; }
  100% { --abertura: 130%; opacity: 0; }
}

/* --------------------------------------------------------------------------
   Depois da senha: a cabeça de impressão desce e "imprime" a página liberada,
   como os planos da dissecção.
   -------------------------------------------------------------------------- */

.impressao {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
}

.impressao-veu {
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    repeating-linear-gradient(0deg, rgba(62, 224, 176, 0.08) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(45deg, rgba(62, 224, 176, 0.06) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(-45deg, rgba(62, 224, 176, 0.06) 0 1px, transparent 1px 24px),
    rgba(6, 16, 14, 0.95);
  transition: opacity 0.24s ease;
}

.impressao.cobre .impressao-veu {
  opacity: 1;
}

.impressao.imprime .impressao-veu {
  animation: imprime-veu 0.95s cubic-bezier(0.45, 0.05, 0.25, 1) forwards;
}

.impressao-linha {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: #c9fbeb;
  box-shadow: 0 0 10px 2px rgba(62, 224, 176, 0.85), 0 0 46px 10px rgba(62, 224, 176, 0.3);
  opacity: 0;
}

.impressao-linha::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 16px 6px rgba(62, 224, 176, 0.9);
  animation: bico 0.42s ease-in-out infinite alternate;
}

.impressao.imprime .impressao-linha {
  opacity: 1;
  animation: imprime-linha 0.95s cubic-bezier(0.45, 0.05, 0.25, 1) forwards;
}

@keyframes imprime-veu {
  from { clip-path: inset(0 0 0 0); }
  to { clip-path: inset(100% 0 0 0); }
}

@keyframes imprime-linha {
  0% { transform: translateY(0); opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

@keyframes bico {
  from { transform: translateX(8vw); }
  to { transform: translateX(88vw); }
}

@media (prefers-reduced-motion: reduce) {
  .entrada-cvc::after,
  .impressao {
    display: none;
  }
}
