/* ROTLOV — intro
   Linha do tempo (s): tubo CRT 0 · contorno 0.8 · núcleo 1.75 · "play" 2.35 · letras 2.45 · brilho 3.3 · painel 3.45 · checklist 3.8 · botões 4.95 */
:root {
  --amarelo: #ffd400;
  --amarelo-escuro: #e6bf00;
  --preto: #0a0a0a;
  --fonte-ui: 'Chakra Petch', 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-snap: cubic-bezier(.34, 1.56, .64, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: #000; color: #f3f3f1; font-family: var(--fonte-ui); overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }

.stage {
  position: fixed; inset: 0; overflow: hidden;
  display: grid; place-items: center; align-content: center; gap: clamp(18px, 3vh, 34px);
  background: radial-gradient(ellipse 70% 55% at 50% 42%, #1c1705 0%, #0a0904 45%, #000 100%);
  isolation: isolate;
}
.stage.out { animation: warpOut .7s var(--ease-out) forwards; }

/* Poeira dourada (canvas) */
.dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0; }
.play .dust { animation: fadeIn 1.2s ease .4s forwards; }

/* Piso em grade, rolando para frente */
.floor {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%; z-index: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,212,0,.22) 0 2px, transparent 2px 80px),
    repeating-linear-gradient(0deg, rgba(255,212,0,.22) 0 2px, transparent 2px 80px);
  transform: perspective(380px) rotateX(62deg);
  transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 45%, #000 100%);
  opacity: 0;
}
.play .floor { animation: fadeIn 1.4s ease .5s forwards, floorScroll 1.6s linear infinite; }

/* Tubo CRT ligando */
.crt-line {
  position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; z-index: 5;
  background: #fffbe0; box-shadow: 0 0 24px 6px rgba(255,212,0,.7);
  transform: scaleX(0); opacity: 0; pointer-events: none;
}
.play .crt-line { animation: crtOn .75s cubic-bezier(.7,0,.3,1) forwards; }

/* Logo */
.logo-wrap { position: relative; z-index: 2; width: min(1080px, 90vw); }
.logo { display: block; width: 100%; height: auto; overflow: visible; }

.draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.play .outer { animation: draw .9s cubic-bezier(.65,0,.35,1) .8s forwards; }
.play .inner { animation: draw .8s cubic-bezier(.65,0,.35,1) 1.1s forwards; }

.core, .burst, .mark, .ltr { transform-box: fill-box; }
.core { transform-origin: 0% 50%; transform: scaleX(0); opacity: 0; }
.play .core { animation: charge .38s var(--ease-out) 1.75s forwards; }

.burst { transform-origin: 50% 50%; transform: scale(0) rotate(-120deg); }
.play .burst { animation: burstIn .5s var(--ease-snap) 2s forwards; }

.mark { transform-origin: 50% 50%; }
.play .mark { animation: press .55s var(--ease-out) 2.35s; }

.ltr { opacity: 0; transform: translateX(60px) skewX(-25deg); transform-origin: 0 100%; }
.play .ltr { animation: ltrIn .6s var(--ease-out) calc(2.45s + var(--i) * .07s) forwards; }

.shine { transform: skewX(-20deg) translateX(0); opacity: 0; }
.play .shine { animation: shine 1s ease-in-out 3.3s forwards; }

/* Onda de choque do "play" (centro do símbolo no SVG: 268/1780, 268/512) */
.shock {
  position: absolute; left: 15%; top: 52%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border: 3px solid var(--amarelo); border-radius: 50%; opacity: 0; pointer-events: none;
}
.play .shock { animation: shock .9s var(--ease-out) 2.4s; }

/* Identificação do painel + checklist de inicialização */
.panel-id { position: relative; z-index: 2; display: grid; justify-items: center; gap: 16px; width: min(460px, 90vw); }
.kicker { margin: 0; display: flex; align-items: center; gap: 14px; width: 100%; color: var(--amarelo); font-weight: 700; font-size: clamp(13px, 1.5vw, 17px); letter-spacing: .38em; text-transform: uppercase; white-space: nowrap; }
.kicker::before, .kicker::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--amarelo)); transform: scaleX(0); }
.kicker::before { transform-origin: 100% 50%; }
.kicker::after { background: linear-gradient(270deg, transparent, var(--amarelo)); transform-origin: 0 50%; }
.kicker span { opacity: 0; letter-spacing: .9em; }
.play .kicker span { animation: kickerIn .7s var(--ease-out) 3.45s forwards; }
.play .kicker::before, .play .kicker::after { animation: lineGrow .6s var(--ease-out) 3.55s forwards; }

.boot { list-style: none; margin: 0; padding: 0; width: 100%; font-size: 13.5px; letter-spacing: .12em; text-transform: uppercase; }
.boot li { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; color: #b9b3a1; opacity: 0; transform: translateX(-8px); }
.boot li::before { content: '›'; color: var(--amarelo); }
.boot .dots { flex: 1; border-bottom: 2px dotted #3d3a31; transform: translateY(-4px); transform-origin: 0 50%; }
.boot .st { font-weight: 700; opacity: 0; min-width: 7.5em; text-align: right; }
.boot .ok { color: var(--amarelo); }
.boot .pendente { color: #77725f; }
.boot .erro { color: #ff5a4a; }
.play .boot li { animation: rise .3s var(--ease-out) calc(3.8s + var(--k) * .22s) forwards; }
.play .boot .dots { animation: dotsGrow .25s linear calc(3.85s + var(--k) * .22s) both; }
.play .boot .st { animation: fadeIn .01s linear calc(4.05s + var(--k) * .22s) forwards; }

/* Controles */
.controls { position: relative; z-index: 3; display: grid; justify-items: center; gap: 18px; margin-top: clamp(8px, 3vh, 30px); opacity: 0; transform: translateY(12px); }
.play .controls { animation: rise .6s var(--ease-out) 4.95s forwards; }
.enter {
  cursor: pointer; border: 0; padding: 14px 40px 14px 34px;
  background: var(--amarelo); color: var(--preto);
  font-weight: 700; font-size: clamp(17px, 1.6vw, 21px); letter-spacing: .22em; text-transform: uppercase;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  transition: transform .2s var(--ease-out), background .2s, box-shadow .2s;
}
.enter span { display: inline-block; transition: transform .2s var(--ease-out); }
.enter:hover { background: #fff1a0; transform: translateY(-2px); }
.enter:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--preto), inset 0 0 0 5px var(--amarelo); }
.enter:hover span { transform: translateX(5px); }
.hints { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 12.5px; letter-spacing: .08em; color: #8d877a; }
.hints button { background: none; border: 0; padding: 4px 2px; cursor: pointer; color: inherit; transition: color .15s; }
.hints button:hover, .hints button:focus-visible { color: var(--amarelo); outline: none; }
kbd { font-family: inherit; font-size: 11px; padding: 1px 6px; border: 1px solid #4a463c; border-bottom-width: 2px; border-radius: 3px; color: #cfc9b8; margin-right: 4px; }
.hints b { color: #cfc9b8; font-weight: 700; }

/* Camadas de tela */
.flash { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0; background: radial-gradient(circle at 25% 50%, #fff7c2, rgba(255,212,0,.35) 40%, transparent 70%); mix-blend-mode: screen; }
.play .flash { animation: flash .6s ease-out 2.38s; }
.scanlines { position: absolute; inset: 0; z-index: 7; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.vignette { position: absolute; inset: 0; z-index: 7; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.75) 100%); }

/* Estado ocioso, depois que a intro termina */
.done .shine { animation: shineIdle 7s ease-in-out infinite; }
.done .mark { animation: glowIdle 3.2s ease-in-out infinite; }

/* Depois de "Entrar" */
.after { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; background: #0a0a0a; color: #c9c9c9; letter-spacing: .08em; animation: fadeIn .5s ease; }
.after[hidden] { display: none; }
.after button { cursor: pointer; background: none; border: 1px solid #3a3a3a; padding: 8px 18px; color: var(--amarelo); letter-spacing: .1em; }
.after button:hover { border-color: var(--amarelo); }

/* Keyframes */
@keyframes fadeIn { to { opacity: 1; } }
@keyframes floorScroll { to { background-position: 0 80px, 0 80px; } }
@keyframes crtOn {
  0%   { opacity: 1; transform: scaleX(0) scaleY(1); }
  45%  { opacity: 1; transform: scaleX(1) scaleY(1); }
  75%  { opacity: .9; transform: scaleX(1) scaleY(90); background: rgba(255,240,170,.08); box-shadow: none; }
  100% { opacity: 0; transform: scaleX(1) scaleY(300); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes charge { 0% { opacity: 1; transform: scaleX(0); } 70% { transform: scaleX(1.06); } 100% { opacity: 1; transform: scaleX(1); } }
@keyframes burstIn { to { transform: scale(1) rotate(0deg); } }
@keyframes press { 0% { transform: scale(1); } 25% { transform: scale(.9); } 60% { transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes ltrIn {
  0%   { opacity: 0; transform: translateX(60px) skewX(-25deg); }
  60%  { opacity: 1; transform: translateX(-4px) skewX(4deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes shine { 0% { opacity: 1; transform: skewX(-20deg) translateX(0); } 100% { opacity: 1; transform: skewX(-20deg) translateX(1500px); } }
@keyframes shineIdle {
  0%, 70%  { opacity: 1; transform: skewX(-20deg) translateX(0); }
  92%, 100% { opacity: 1; transform: skewX(-20deg) translateX(1500px); }
}
@keyframes glowIdle { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes shock { 0% { opacity: .9; transform: scale(1); border-width: 6px; } 100% { opacity: 0; transform: scale(70); border-width: .3px; } }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes kickerIn { to { opacity: 1; letter-spacing: .38em; } }
@keyframes lineGrow { to { transform: scaleX(1); } }
@keyframes dotsGrow { from { transform: translateY(-4px) scaleX(0); } to { transform: translateY(-4px) scaleX(1); } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes warpOut { to { opacity: 0; transform: scale(1.25); filter: blur(6px) brightness(1.6); } }

@media (max-width: 640px) {
  .kicker { letter-spacing: .22em; }
  .boot { font-size: 12px; }
  .hints { font-size: 11.5px; gap: 4px 14px; }
}

/* Modo gravação: sem dicas de teclado */
.capture .hints { visibility: hidden; }
