/* O FILME DO AIRYA PONTO ELETRÔNICO — apresentação e manual, sobrepostos, em estilo vídeo.
   Serve à vitrine (/site) e ao sistema. Tokens com prefixo --aa- para não
   brigar com os da casa (style.css) nem com os da vitrine. Nasceu do molde do Airya Folha. */
:root {
  --aa-ouro: #d8a847; --aa-ouro-claro: #f1cf82; --aa-ciano: #43d1c0; --aa-perigo: #e0645c; --aa-ok: #3fbf98;
  --aa-noite: #050915; --aa-escuro: #0d1530; --aa-texto: #eef1fa; --aa-suave: rgba(238,241,250,.72);
  --aa-fonte: Candara, 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.aa-fundo {
  position: fixed; inset: 0; z-index: 2147483000; color: var(--aa-texto); font-family: var(--aa-fonte);
  background: radial-gradient(1100px 700px at 70% 10%, #1d2b60 0%, var(--aa-escuro) 42%, var(--aa-noite) 100%);
  /* clip, e não hidden: o chão 3D é mais largo que a tela, e um focus() rolava a
     sobreposição de lado (conteúdo cortado à esquerda) — clip não rola nunca. */
  display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; overflow: clip; cursor: pointer;
  animation: aa-abre .5s cubic-bezier(.2,.7,.3,1);
}
.aa-fundo.saindo { animation: aa-fecha .32s ease forwards; }
@keyframes aa-abre { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes aa-fecha { to { opacity: 0; transform: scale(.98); filter: blur(4px); } }
.aa-fundo canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* Faixas de cinema e varredura: é o que dá o "estilo vídeo". */
.aa-fundo::before, .aa-fundo::after { content: ''; position: absolute; left: 0; right: 0; height: 5vh; background: #000; z-index: 1; pointer-events: none; }
.aa-fundo::before { top: 0; } .aa-fundo::after { bottom: 0; }
.aa-varredura { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
.aa-chao {
  position: absolute; left: -50%; right: -50%; bottom: -40%; height: 75%; pointer-events: none;
  background-image: linear-gradient(rgba(67,209,192,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(67,209,192,.2) 1px, transparent 1px);
  background-size: 60px 60px; transform: rotateX(76deg); transform-origin: center top;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  animation: aa-chao 3s linear infinite;
}
@keyframes aa-chao { to { background-position: 0 60px, 0 0; } }

.aa-topo, .aa-meio, .aa-rodape { position: relative; z-index: 2; width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.aa-topo { display: flex; align-items: center; gap: 14px; padding: calc(5vh + 14px) 0 8px; }
.aa-marca { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.aa-marca img { width: 30px; height: 30px; filter: drop-shadow(0 0 12px rgba(216,168,71,.6)); }
.aa-marca em { font-style: normal; color: var(--aa-ouro); }
.aa-contador { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 13px; letter-spacing: .12em; opacity: .7; }
.aa-rec { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
.aa-rec::before { content: ''; width: 8px; height: 8px; border-radius: 999px; background: var(--aa-perigo); animation: aa-pisca 1.4s steps(2) infinite; }
@keyframes aa-pisca { 50% { opacity: .15; } }
.aa-botao {
  cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--aa-texto);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 8px 16px;
}
.aa-botao:hover { border-color: var(--aa-ciano); }
.aa-botao.cheio { background: linear-gradient(135deg, var(--aa-ouro-claro), var(--aa-ouro)); color: #1b1405; border-color: transparent; }
.aa-botao:focus-visible { outline: 2px solid var(--aa-ciano); outline-offset: 3px; }

.aa-meio { display: grid; grid-template-columns: .95fr 1.05fr; gap: 40px; align-items: center; min-height: 0; perspective: 1600px; }
.aa-texto { cursor: default; }
.aa-sobre { font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--aa-ciano); font-weight: 700; }
.aa-texto h2 { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.1; margin: 10px 0 14px; letter-spacing: -.5px; }
.aa-texto h2 span { background: linear-gradient(90deg, var(--aa-ouro-claro), var(--aa-ouro) 50%, var(--aa-ciano)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.aa-texto p { font-size: 16px; line-height: 1.6; color: var(--aa-suave); margin: 0 0 16px; max-width: 52ch; }
.aa-pontos { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.aa-pontos li { display: flex; gap: 10px; }
.aa-pontos li::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 999px; background: var(--aa-ouro); box-shadow: 0 0 10px var(--aa-ouro); }
.aa-entra { opacity: 0; animation: aa-entra .7s cubic-bezier(.2,.7,.3,1) forwards; animation-delay: calc(var(--i, 0) * .12s + .1s); }
@keyframes aa-entra { from { opacity: 0; transform: translateY(14px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }

.aa-palco { position: relative; aspect-ratio: 7 / 5; max-height: 58vh; justify-self: center; width: 100%; transform-style: preserve-3d; }
.aa-cena {
  position: absolute; inset: 0; border-radius: 22px; overflow: hidden;
  background: radial-gradient(420px 280px at 50% 35%, rgba(40,60,130,.55), rgba(13,21,48,.35) 70%);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 50px 100px rgba(0,0,0,.5), inset 0 0 60px rgba(67,209,192,.06);
  transition: transform .5s cubic-bezier(.2,.7,.3,1); animation: aa-cena .8s cubic-bezier(.2,.7,.3,1);
}
@keyframes aa-cena { from { opacity: 0; transform: rotateY(-28deg) translateZ(-120px) scale(.92); } to { opacity: 1; transform: none; } }
.aa-cena svg { width: 100%; height: 100%; display: block; }
.aa-cena::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.12) 48%, transparent 58%); transform: translateX(-120%); animation: aa-varre 6s ease-in-out 1s infinite; }
@keyframes aa-varre { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }

.aa-rodape { display: flex; align-items: center; gap: 16px; padding: 10px 0 calc(5vh + 14px); flex-wrap: wrap; }
.aa-pontinhos { display: flex; gap: 7px; }
.aa-pontinho { width: 9px; height: 9px; border-radius: 999px; border: 0; padding: 0; background: rgba(255,255,255,.25); cursor: pointer; transition: width .3s ease, background .3s ease; }
.aa-pontinho.agora { width: 28px; background: var(--aa-ouro); }
.aa-progresso { flex: 1; min-width: 100px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.aa-progresso span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--aa-ouro), var(--aa-ciano)); animation: aa-corre var(--aa-dur, 9s) linear forwards; }
.aa-progresso.parado span { animation-play-state: paused; }
.aa-progresso.estatico span { animation: none; width: 100%; }
@keyframes aa-corre { to { width: 100%; } }
.aa-dica { font-size: 12px; opacity: .55; letter-spacing: .04em; }
.aa-setas { display: flex; gap: 8px; }
.aa-seta { width: 40px; height: 40px; border-radius: 999px; cursor: pointer; font-size: 17px; color: var(--aa-texto); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2); }
.aa-seta:disabled { opacity: .3; cursor: default; }

/* ── AS CENAS (SVG). Também usadas pelas páginas em sequência. ── */
.s-traco { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 1.2; }
.s-ouro { fill: var(--aa-ouro); } .s-ciano { fill: var(--aa-ciano); } .s-ok { fill: var(--aa-ok); }
.s-ouro-t { fill: none; stroke: var(--aa-ouro); stroke-width: 1.6; } .s-ciano-t { fill: none; stroke: var(--aa-ciano); stroke-width: 1.6; }
.s-caixa { fill: rgba(255,255,255,.06); stroke: rgba(255,255,255,.18); stroke-width: 1; }
.s-caixa-on { fill: rgba(216,168,71,.14); stroke: var(--aa-ouro); stroke-width: 1.3; }
.s-caixa-ciano { fill: rgba(67,209,192,.1); stroke: var(--aa-ciano); stroke-width: 1.3; }
.s-rot { fill: #e7ebf6; font: 600 12.5px var(--aa-fonte); }
.s-rot-p { fill: rgba(231,235,246,.7); font: 11px var(--aa-fonte); }
.s-rot-n { fill: #fff; font: 700 15px var(--aa-fonte); font-variant-numeric: tabular-nums; }
.s-rot-g { fill: #fff; font: 700 17px var(--aa-fonte); }
.s-perigo { fill: var(--aa-perigo); } .s-perigo-t { fill: none; stroke: var(--aa-perigo); stroke-width: 1.8; stroke-linecap: round; }
.s-pulso { transform-box: fill-box; transform-origin: center; animation: spulso 2.4s ease-in-out infinite; }
@keyframes spulso { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.18); opacity: .45; } }
.s-gira { transform-box: view-box; transform-origin: 210px 130px; animation: sgira 18s linear infinite; }
.s-gira.b { animation-duration: 26s; animation-direction: reverse; }
@keyframes sgira { to { transform: rotate(360deg); } }
.s-entra { opacity: 0; animation: sentra .6s cubic-bezier(.2,.7,.3,1) forwards; animation-delay: calc(var(--i, 0) * .22s + .15s); }
@keyframes sentra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.s-corre { stroke-dasharray: 5 7; animation: scorre 1.4s linear infinite; }
@keyframes scorre { to { stroke-dashoffset: -24; } }
.s-desenha { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sdesenha 1.6s ease forwards; animation-delay: calc(var(--i, 0) * .3s + .2s); }
@keyframes sdesenha { to { stroke-dashoffset: 0; } }
/* O relógio do ponto: os ponteiros andam (o de horas, devagar). */
.s-ponteiro { animation: sgiraP 6s linear infinite; }
.s-ponteiro.lento { animation-duration: 72s; }
@keyframes sgiraP { to { transform: rotate(360deg); } }
.s-cresce { transform-box: fill-box; transform-origin: bottom; animation: scresce .9s cubic-bezier(.2,.7,.3,1) both; animation-delay: calc(var(--i, 0) * .12s + .1s); }
@keyframes scresce { from { transform: scaleY(0); } to { transform: none; } }

/* ── O MANUAL: índice de capítulos, "como fazer" e "o que não faz" ── */
.aa-sem-clique { cursor: default; }
.aa-acoes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.aa-com-indice .aa-texto { max-height: 100%; overflow-y: auto; padding-right: 8px; scrollbar-width: thin; scrollbar-color: rgba(216,168,71,.45) transparent; }
.aa-meio { min-height: 0; }
.aa-bloco { margin: 0 0 12px; }
.aa-bloco > b { display: block; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--aa-ouro-claro); margin-bottom: 7px; }
.aa-bloco.passos ol { counter-reset: passo; }
.aa-bloco.passos li { counter-increment: passo; }
.aa-bloco.passos li::before { content: counter(passo); width: 20px; height: 20px; margin-top: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #1b1405; background: var(--aa-ouro); box-shadow: none; }
.aa-bloco.nao li::before { background: var(--aa-perigo); box-shadow: 0 0 10px var(--aa-perigo); }
.aa-indice { position: absolute; z-index: 4; top: calc(5vh + 64px); bottom: calc(5vh + 8px); left: max(16px, calc(50% - 590px)); width: 290px; overflow-y: auto; padding: 12px; border-radius: 16px; cursor: default;
  background: rgba(8,14,34,.92); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 70px rgba(0,0,0,.5); backdrop-filter: blur(10px); animation: aa-entra .35s ease; }
.aa-indice input { width: 100%; box-sizing: border-box; margin-bottom: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: var(--aa-texto); font: inherit; font-size: 16px; }
.aa-indice-grupo { margin-bottom: 10px; }
.aa-indice-grupo b { display: block; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--aa-ciano); padding: 6px 8px; }
/* !important: o layout da casa (/api/layout.css) estiliza todo botão; o índice é superfície do filme. */
.aa-indice { scrollbar-width: thin; scrollbar-color: rgba(216,168,71,.45) transparent; }
.aa-indice button { display: flex !important; justify-content: flex-start !important; gap: 9px; width: 100%; text-align: left !important; padding: 7px 8px !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; box-shadow: none !important; color: var(--aa-suave) !important; font: inherit; font-size: 13.5px !important; cursor: pointer; min-height: 0 !important; }
.aa-indice button i { font-style: normal; font-variant-numeric: tabular-nums; opacity: .5; }
.aa-indice button:hover { background: rgba(255,255,255,.06) !important; color: var(--aa-texto) !important; }
.aa-indice button.agora { background: rgba(216,168,71,.16) !important; color: var(--aa-ouro-claro) !important; }
.aa-com-indice.indice-aberto .aa-meio { padding-left: 300px; }

@media (max-width: 860px) {
  .aa-com-indice.indice-aberto .aa-meio { padding-left: 0; }
  .aa-indice { left: 16px; right: 16px; width: auto; }
  .aa-topo { flex-wrap: wrap; gap: 8px; }
  .aa-topo .aa-rec { display: none; }
  .aa-meio { grid-template-columns: 1fr; gap: 16px; overflow-y: auto; overflow-x: hidden; align-content: start; scrollbar-width: thin; scrollbar-color: rgba(216,168,71,.45) transparent; }
  .aa-palco { max-height: 34vh; order: -1; }
  .aa-texto h2 { font-size: 24px; }
  .aa-texto p { font-size: 14.5px; }
  .aa-dica { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .aa-fundo *, .aa-fundo, .aa-fundo::before, .aa-fundo::after, .s-entra, .s-desenha, .s-ponteiro, .s-cresce { animation: none !important; transition: none !important; }
  .aa-entra, .s-entra { opacity: 1; }
  .s-desenha { stroke-dashoffset: 0; }
}
