/* ===================================================================
   Bônus — Animações ambient
   Cada visual finge um pedaço do sistema operando.
   =================================================================== */

.visual--anim {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  height: 280px;
  overflow: visible;
}

.anim {
  width: 100%;
  height: 100%;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-mono);
  position: relative;
  box-shadow: var(--sh-1);
}

.anim-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  color: var(--ink-soft);
  background: var(--paper);
  letter-spacing: 0.04em;
}
.anim-top.dark {
  background: oklch(15% 0.02 60);
  border-bottom-color: oklch(28% 0.03 60);
  color: oklch(70% 0.02 75);
}
.anim-top .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.anim-top.dark .dot { background: oklch(40% 0.04 60); }
.anim-top .anim-label { margin-left: 6px; }
.anim-top .anim-status {
  margin-left: auto;
  color: var(--terra);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.1em;
}
.anim-top.dark .anim-status { color: oklch(72% 0.10 148); }

.anim-foot {
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--paper);
}
.anim-foot .anim-tag { color: var(--terra); }

/* ===== 1 — CARROSSEL LAB ===== */
.anim--carousel .anim-stage {
  flex: 1;
  position: relative;
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, oklch(80% 0.01 75 / 0.35) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, oklch(80% 0.01 75 / 0.35) 23px 24px),
    var(--paper);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.anim--carousel .cslide {
  position: absolute;
  width: 56%;
  aspect-ratio: 4 / 5;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 10px 24px oklch(20% 0.02 60 / 0.10);
  opacity: 0;
  animation: carouselCycle 9s ease-in-out infinite;
}
.anim--carousel .cslide span {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: oklch(86% 0.02 75);
}
.anim--carousel .cslide .hd {
  height: 9px;
  width: 65%;
  background: var(--ink);
  margin-bottom: 4px;
}
.anim--carousel .cslide .sm { width: 40%; }
.anim--carousel .cs1 { animation-delay: 0s; }
.anim--carousel .cs2 { animation-delay: 3s; }
.anim--carousel .cs2 .hd { background: var(--terra); width: 50%; }
.anim--carousel .cs3 { animation-delay: 6s; }
.anim--carousel .cs3 .hd { width: 80%; }
@keyframes carouselCycle {
  0%        { opacity: 0; transform: translateX(50px) rotate(2deg); }
  4%, 30%   { opacity: 1; transform: translateX(0) rotate(0); }
  34%, 100% { opacity: 0; transform: translateX(-50px) rotate(-2deg); }
}

.pager { display: flex; gap: 5px; }
.pager i {
  display: block;
  width: 18px; height: 3px;
  border-radius: 2px;
  background: var(--line);
}
.pager i:nth-child(1) { animation: pagerActive 9s 0s infinite; }
.pager i:nth-child(2) { animation: pagerActive 9s 3s infinite; }
.pager i:nth-child(3) { animation: pagerActive 9s 6s infinite; }
@keyframes pagerActive {
  0%, 100% { background: var(--line); }
  4%, 30%  { background: var(--terra); }
}

/* ===== 2 — BANCO DE SKILLS ===== */
.anim--skills { background: oklch(18% 0.02 55); border-color: oklch(28% 0.03 60); }
.skill-list {
  list-style: none;
  padding: 14px 12px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  flex: 1;
}
.skill-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: oklch(82% 0.02 75);
  opacity: 0;
  animation: skillIn 5s linear infinite;
}
.skill-list li .check {
  width: 13px; height: 13px;
  border: 1px solid oklch(40% 0.04 60);
  border-radius: 3px;
  display: grid;
  place-items: center;
  font-size: 9px;
  color: oklch(72% 0.10 148);
  flex: 0 0 auto;
}
.skill-list li .name { letter-spacing: 0.02em; }
.skill-list li .kbd {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid oklch(40% 0.04 60);
  border-radius: 3px;
  font-size: 9px;
  color: oklch(60% 0.02 75);
}
.skill-list li.prompt { color: oklch(72% 0.10 148); opacity: 1; }
.skill-list li.prompt .caret { font-weight: bold; }
.skill-list li.prompt .name { animation: blink 1s step-end infinite; }
.skill-list li:nth-child(1) { animation-delay: 0.0s; }
.skill-list li:nth-child(2) { animation-delay: 0.3s; }
.skill-list li:nth-child(3) { animation-delay: 0.6s; }
.skill-list li:nth-child(4) { animation-delay: 0.9s; }
.skill-list li:nth-child(5) { animation-delay: 1.2s; }
.skill-list li:nth-child(6) { animation-delay: 1.5s; }
@keyframes skillIn {
  0%, 4%   { opacity: 0; transform: translateX(-6px); }
  10%, 92% { opacity: 1; transform: translateX(0); }
  96%, 100% { opacity: 0; }
}
@keyframes blink { 50% { opacity: 0; } }

/* ===== 3 — MASTERCLASS / VIDEO ===== */
.anim--video .video-frame {
  flex: 1;
  background: linear-gradient(180deg, oklch(28% 0.02 60), oklch(18% 0.025 55));
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.play-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--paper);
  position: relative;
  z-index: 2;
  animation: playPulse 2.4s ease-in-out infinite;
}
.play-circle::before {
  content: "";
  position: absolute;
  top: 50%; left: 56%;
  width: 0; height: 0;
  border-style: solid;
  border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent var(--terra);
  transform: translate(-50%, -50%);
}
@keyframes playPulse {
  0%, 100% { box-shadow: 0 0 0 0 oklch(40% 0.075 148 / 0.45); }
  60%      { box-shadow: 0 0 0 18px oklch(40% 0.075 148 / 0); }
}
.bars {
  position: absolute;
  bottom: 14px; left: 14px; right: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 26px;
  opacity: 0.45;
}
.bars span {
  width: 3px;
  background: var(--paper);
  border-radius: 2px;
  animation: barPulse 1.2s ease-in-out infinite;
}
.bars span:nth-child(1)  { animation-delay: 0.00s; }
.bars span:nth-child(2)  { animation-delay: 0.10s; animation-duration: 1.4s; }
.bars span:nth-child(3)  { animation-delay: 0.20s; }
.bars span:nth-child(4)  { animation-delay: 0.30s; animation-duration: 1.0s; }
.bars span:nth-child(5)  { animation-delay: 0.40s; }
.bars span:nth-child(6)  { animation-delay: 0.15s; animation-duration: 1.5s; }
.bars span:nth-child(7)  { animation-delay: 0.25s; }
.bars span:nth-child(8)  { animation-delay: 0.35s; animation-duration: 1.1s; }
.bars span:nth-child(9)  { animation-delay: 0.50s; }
.bars span:nth-child(10) { animation-delay: 0.05s; animation-duration: 1.3s; }
.bars span:nth-child(11) { animation-delay: 0.45s; }
.bars span:nth-child(12) { animation-delay: 0.20s; animation-duration: 1.6s; }
.bars span:nth-child(13) { animation-delay: 0.30s; }
.bars span:nth-child(14) { animation-delay: 0.10s; animation-duration: 1.0s; }
.bars span:nth-child(15) { animation-delay: 0.40s; }
.bars span:nth-child(16) { animation-delay: 0.25s; animation-duration: 1.4s; }
@keyframes barPulse {
  0%, 100% { height: 4px; }
  50%      { height: 24px; }
}
.video-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.video-bar .track {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.video-bar .fill {
  height: 100%;
  background: var(--terra);
  width: 12%;
  animation: vidProgress 9s linear infinite;
}
@keyframes vidProgress {
  0%   { width: 12%; }
  100% { width: 17%; }
}
.video-bar .vtime {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

/* ===== 4 — DNA CRIATIVO ===== */
.anim--dna .dna-body {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
.dna-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0;
  animation: dnaIn 7s ease-out infinite;
}
.dna-row .key {
  flex: 0 0 44px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dna-row .val {
  background: var(--terra-soft);
  color: var(--ink);
  padding: 2px 8px;
  border-radius: 3px;
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 12px;
  border-left: 2px solid var(--terra);
}
.dna-row:nth-child(1) { animation-delay: 0.3s; }
.dna-row:nth-child(2) { animation-delay: 1.2s; }
.dna-row:nth-child(3) { animation-delay: 2.1s; }
.dna-row:nth-child(4) { animation-delay: 3.0s; }
@keyframes dnaIn {
  0%, 4%    { opacity: 0; transform: translateY(8px); }
  14%, 92%  { opacity: 1; transform: translateY(0); }
  96%, 100% { opacity: 0; }
}
.scanner {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 1px;
  background: var(--terra);
  box-shadow: 0 0 12px var(--terra), 0 0 24px var(--terra);
  animation: scan 4s ease-in-out infinite;
  opacity: 0;
}
@keyframes scan {
  0%        { top: 5%;  opacity: 0; }
  10%, 85%  { opacity: 0.55; }
  100%      { top: 95%; opacity: 0; }
}
.prog { color: var(--terra); font-weight: 500; }

/* ===================================================================
   Responsive: full-width bonus card stacks visual on top
   =================================================================== */
@media (max-width: 900px) {
  .visual--anim { height: 240px; }
}
