/* Gatinhos: a abertura da página montada pelos cursores dos gatos (js/build.js) e a seção que
   explica o modo. Cada gato tem a sua cor de cursor; o rosa é o da Luna. */

/* Enquanto a abertura não chega numa peça, ela fica guardada (sem pular o layout). Vale desde o
   primeiro quadro: o script do <head> põe .is-building antes de a página aparecer. */
.is-building [data-build]:not(.is-built) { opacity: 0; }
/* backwards: quando a animação acaba, a peça já está no estado final e nada muda no fim. */
.is-building [data-build].is-built { animation: gk-pop .46s cubic-bezier(.2, .8, .2, 1) backwards; }
.is-building [data-build].is-typed, .is-building [data-build].is-kids { animation: none; }
.is-building .is-kids > * { opacity: 0; }
.is-building .is-kids > .is-on { opacity: 1; animation: gk-pop .4s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes gk-pop { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }
.gk-ch { opacity: 0; transition: opacity .14s; }
.gk-ch.is-on { opacity: 1; }

/* A camada dos cursores, dos esqueletos e dos contornos, sobre a página. */
.gk-layer { position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 70; pointer-events: none; transition: opacity .35s; }
.gk-layer.is-out { opacity: 0; }

/* O cursor do app (Web/src/agent-pointer.js): a seta na cor do gato com borda branca e a pílula. */
.gk-cur { position: absolute; left: 0; top: 0; will-change: transform; transition: opacity .5s; }
.gk-cur.is-leaving { opacity: 0; transition: opacity .6s; }
.gk-cur svg { position: absolute; left: -2px; top: -2px; display: block; filter: drop-shadow(0 2px 3px #0005); }
.gk-pill { position: absolute; width: max-content; left: 15px; top: 17px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 3px; border-radius: 999px; font: 800 12px/1 var(--sans, 'Manrope'); white-space: nowrap; box-shadow: 0 4px 12px #0000002e; }
.gk-pill img { width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.gk-pill em { font-style: normal; font-weight: 700; opacity: .78; }
.gk-pill em::before { content: '· '; }
.gk-code { position: absolute; width: max-content; left: 15px; top: 46px; padding: 4px 8px; border-radius: 7px; background: #111c; color: #FEF1D0; font: 500 11px/1.2 'IBM Plex Mono', ui-monospace, Menlo, monospace; white-space: nowrap; opacity: 0; transform: translateY(-3px); transition: opacity .18s, transform .18s; }
.gk-cur.is-code .gk-code { opacity: 1; transform: none; }
.gk-cur.is-flip .gk-pill, .gk-cur.is-flip .gk-code { left: auto; right: -6px; }
.gk-cur.is-flip .gk-pill { border-top-right-radius: 4px; }

/* Lendo e escrevendo: o contorno tracejado na cor do gato, com o nome em cima. */
.gk-box { position: absolute; border: 1.5px dashed var(--c); border-radius: 12px; background: color-mix(in srgb, var(--c) 5%, transparent); opacity: 0; transition: opacity .25s, background .5s; }
.gk-box.is-on { opacity: 1; }
.gk-box.is-flash { background: color-mix(in srgb, var(--c) 13%, transparent); transition: opacity .25s, background .12s; }
.gk-box b { position: absolute; width: max-content; left: -1.5px; bottom: 100%; margin-bottom: 3px; padding: 3px 8px; border-radius: 8px 8px 8px 0; background: var(--c); color: var(--ink, #fff); font: 800 11px/1.2 var(--sans, 'Manrope'); white-space: nowrap; }
.gk-box.is-below b { bottom: auto; top: 100%; margin: 3px 0 0; border-radius: 0 8px 8px 8px; }

/* A seção. */
.gk-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.gk-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: gk; }
.gk-steps li { counter-increment: gk; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; font-size: 15.5px; line-height: 1.5; color: var(--ink2); }
.gk-steps li::before { content: counter(gk); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--pink-soft); color: var(--pink-ink); font: 800 13px var(--sans, 'Manrope'); }
.gk-steps b { color: var(--ink); }
.gk-real { margin: 22px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; color: var(--ink2); }
.gk-real b { color: var(--ink); }
.gk-again { margin-top: 18px; }
.gk-fine { margin: 10px 0 0; font-size: 12.5px; color: var(--ink3); }

/* A janela que os gatos montam, em volta. */
.gk-win { position: relative; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 60px #2221240f, 0 2px 6px #2221240a; overflow: hidden; }
.gk-win-bar { height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--chat); }
.gk-win-bar .lights { display: inline-flex; gap: 6px; }
.gk-win-bar .lights i { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); }
.gk-url { flex: 1; height: 24px; border-radius: 8px; background: var(--raised); display: flex; align-items: center; padding: 0 10px; font: 500 11.5px 'IBM Plex Mono', monospace; color: var(--ink3); }
.gk-page { position: relative; padding: 18px; display: grid; gap: 12px; min-height: 360px; }
.gk-part { position: relative; border-radius: 12px; background: var(--raised); min-height: 54px; overflow: hidden; }
.gk-part > * { opacity: 0; transition: opacity .35s; }
.gk-part.is-done { background: transparent; }
.gk-part.is-done > * { opacity: 1; }
.gk-part.is-work { outline: 1.5px dashed var(--c); outline-offset: 2px; }
.gk-part .gk-lbl { position: absolute; left: 8px; top: 8px; opacity: 1; font: 800 10.5px var(--sans, 'Manrope'); color: var(--ink3); }
.gk-part.is-done .gk-lbl { opacity: 0; }
.gk-p-hero { min-height: 120px; }
.gk-p-hero .gk-h { margin: 14px 12px 6px; font: 400 24px/1.1 var(--pixel); color: var(--ink); }
.gk-p-hero .gk-s { margin: 0 12px; font-size: 12.5px; color: var(--ink2); }
.gk-p-hero .gk-b { display: inline-block; margin: 12px 12px 0; padding: 7px 12px; border-radius: 999px; background: #D01A5C; color: #fff; font: 800 11.5px var(--sans, 'Manrope'); }
.gk-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gk-card { border-radius: 10px; border: 1px solid var(--line); padding: 10px; font-size: 11.5px; color: var(--ink2); background: var(--surface); }
.gk-card strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 2px; }
.gk-p-foot { min-height: 36px; }
.gk-p-foot p { margin: 10px 12px; font-size: 11px; color: var(--ink3); }

@media (max-width: 900px) {
  .gk-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-build].is-built { animation: none; }
}

/* O título que troca de palavras (js/build.js): a palavra selecionada na cor do gato e o caret. */
.hs-w { border-radius: 6px; transition: background-color .2s, box-shadow .2s; }
.hs-w.is-sel { background: color-mix(in srgb, var(--c) 22%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.hs-w.is-edit { transition: width .55s cubic-bezier(.3, .7, .2, 1); }
.hs-caret { display: inline-block; width: .07em; height: .9em; margin-left: .03em; vertical-align: -.08em; border-radius: 1px; background: var(--c, currentColor); animation: hs-blink 1s steps(1) infinite; }
@keyframes hs-blink { 50% { opacity: 0; } }

/* O rabisco de giz de cera sobre "agentes" (js/build.js): uma folha SVG solta sobre o título. */
.cr-sheet { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
