/* VG Retorno · experiência cinematográfica. Preto e grafite profundos, verde-água e turquesa. Sem fontes externas, sem estilos inline. */
:root { --bg: #04080a; --glass: rgba(8, 24, 27, .66); --line: rgba(110, 231, 183, .28); --aqua: #2dd4bf; --mint: #6ee7b7; --brand: #34d399; --text: #e6faf6; --muted: #9fbab5; --warn: #f5b84b; --on: #02130f;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --card-h: 220px; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none; }
.sprite { position: absolute; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, a { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 10px; }

.stage { position: fixed; inset: 0; overflow: hidden; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline-offset: -4px; }
#cv:active { cursor: grabbing; }

/* barra superior */
.hud { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left)); pointer-events: none; }
.hud > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; letter-spacing: -.01em; font-size: 1.05rem; }
.glyph { width: 26px; height: 26px; fill: none; stroke: var(--brand); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(52, 211, 153, .55)); }
.b-vg { color: var(--aqua); } .b-rt { color: var(--text); font-weight: 650; }
.hud-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
[data-phase="opening"] .hud-btns { visibility: hidden; }

.pill, .ico, .chip { min-height: 44px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--text); cursor: pointer; transition: background .2s, border-color .2s, transform .15s; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-size: .88rem; font-weight: 600; }
.pill:hover, .ico:hover, .chip:hover { background: rgba(20, 60, 60, .75); border-color: rgba(110, 231, 183, .6); }
.pill:active, .ico:active, .btn:active { transform: scale(.97); }
.pill[disabled] { opacity: .38; cursor: default; }
.pill-strong { background: var(--aqua); border-color: var(--aqua); color: var(--on); font-weight: 800; }
.pill-strong:hover { background: var(--mint); border-color: var(--mint); }
.ico { width: 44px; padding: 0; display: grid; place-items: center; border-radius: 14px; }
.ico-sm { width: 40px; min-height: 40px; border-radius: 12px; }

/* abertura */
#opening { position: absolute; inset: 0; z-index: 4; display: grid; grid-template-rows: 1fr auto auto auto; place-items: center; padding: 0 20px max(22px, env(safe-area-inset-bottom)); pointer-events: none; }
#opening[hidden] { display: none; }
#opening > .op-note { margin: 0 0 10px; max-width: 30rem; text-align: center; font-size: .78rem; color: var(--muted); min-height: 1.2em; }
.op-actions { pointer-events: auto; }
.op-logo { align-self: center; display: grid; justify-items: center; gap: 12px; text-align: center; }
.op-glyph { width: clamp(84px, 22vw, 132px); fill: none; stroke: var(--brand); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; filter: drop-shadow(0 0 18px rgba(52, 211, 153, .7)); }
.op-word { margin: 0; font-size: clamp(2rem, 9vw, 3.6rem); font-weight: 800; letter-spacing: .2em; padding-left: .2em; opacity: 0; text-shadow: 0 0 36px rgba(45, 212, 191, .45); }
.op-by { margin: 0; color: var(--muted); letter-spacing: .38em; text-transform: uppercase; font-size: .72rem; opacity: 0; }
.play .op-glyph { animation: draw 2.1s cubic-bezier(.5, 0, .2, 1) .5s forwards, glyphfade .9s ease .5s forwards; }
.play .op-word { animation: wordin 1.6s ease 1.5s forwards; }
.play .op-by { animation: fade 1s ease 2.4s forwards; }
.cap { margin: 0 0 14px; min-height: 3.2em; max-width: 34rem; text-align: center; font-size: clamp(1rem, 3.6vw, 1.25rem); line-height: 1.45; color: var(--text); text-shadow: 0 2px 14px #000; opacity: 0; transition: opacity .5s; }
.cap.on { opacity: 1; } .cap.off { visibility: hidden; }
.op-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes glyphfade { to { opacity: 1; } }
@keyframes wordin { from { opacity: 0; letter-spacing: .5em; filter: blur(8px); } to { opacity: 1; letter-spacing: .2em; filter: none; } }
@keyframes fade { to { opacity: 1; } }

/* cena: controles */
.tools, .hint, .badge, #info, #story { transition: opacity .35s, transform .35s; }
.tools { position: absolute; z-index: 3; left: max(14px, env(safe-area-inset-left)); bottom: calc(var(--card-h) + 18px + env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.hint { position: absolute; z-index: 3; top: 70px; left: 0; right: 0; margin: 0; text-align: center; font-size: .8rem; color: var(--muted); pointer-events: none; padding: 0 16px; }
.hint b { color: var(--text); font-weight: 600; }
.hint.gone { opacity: 0; }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); margin-left: 3px; animation: ping 1.6s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(110, 231, 183, .7); } 100% { box-shadow: 0 0 0 10px rgba(110, 231, 183, 0); } }
.badge { position: absolute; z-index: 2; right: max(14px, env(safe-area-inset-right)); bottom: calc(var(--card-h) + 26px + env(safe-area-inset-bottom)); margin: 0; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: .8; pointer-events: none; }
[data-phase="opening"] .tools, [data-phase="opening"] .hint, [data-phase="opening"] .badge, [data-phase="opening"] #story, [data-phase="opening"] #info { opacity: 0; visibility: hidden; }

/* explicação ao tocar */
#info { position: absolute; z-index: 6; left: 12px; right: 12px; bottom: calc(var(--card-h) + 74px + env(safe-area-inset-bottom)); padding: 16px 52px 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(6, 22, 24, .86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); animation: pop .3s ease; }
#info[hidden] { display: none; }
#info h2 { margin: 2px 0 6px; font-size: 1.05rem; letter-spacing: -.01em; }
#info p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.5; }
#info .info-tag { color: var(--warn); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; margin: 0; }
#info .ico { position: absolute; top: 8px; right: 8px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* cartão da narrativa */
#story { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; padding: 18px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: grid; gap: 10px; background: linear-gradient(180deg, rgba(4, 8, 10, 0), rgba(4, 8, 10, .82) 26%, rgba(4, 8, 10, .94)); }
.kicker { margin: 0; color: var(--aqua); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.st-t { margin: 0; font-size: clamp(1.28rem, 5.2vw, 2rem); line-height: 1.18; letter-spacing: -.02em; font-weight: 750; max-width: 30ch; text-wrap: balance; outline: none; }
.st-s { margin: 0; color: var(--muted); font-size: clamp(.92rem, 3.4vw, 1.05rem); line-height: 1.5; max-width: 46ch; }
.st-s[hidden] { display: none; }
.st-s.late { animation: rise .8s ease both; }
.swap .kicker, .swap .st-t, .swap .st-s:not(.late) { animation: rise .7s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.chips[hidden] { display: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; font-size: .78rem; font-weight: 650; letter-spacing: .05em; }
.chip[aria-pressed="true"] { background: var(--aqua); border-color: var(--aqua); color: var(--on); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dots { display: flex; gap: 2px; }
.dot { width: 26px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(159, 186, 181, .4); transition: .25s; }
.dot[aria-current="step"]::after { background: var(--aqua); width: 22px; border-radius: 6px; box-shadow: 0 0 12px rgba(45, 212, 191, .7); }
#st-next[hidden] { display: none; }
.cta { display: grid; gap: 10px; }
.cta[hidden] { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 14px 22px; border-radius: 14px; border: 1px solid var(--aqua); text-decoration: none; font-weight: 800; letter-spacing: .04em; font-size: .95rem; text-align: center; transition: transform .15s, background .2s; }
.btn-main { background: var(--aqua); color: var(--on); box-shadow: 0 0 34px rgba(45, 212, 191, .35); animation: glowbtn 2.4s ease-out infinite; }
.btn-main:hover { background: var(--mint); }
.btn-ghost { background: rgba(8, 24, 27, .6); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--mint); background: rgba(20, 60, 60, .6); }
@keyframes glowbtn { 0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, .45); } 100% { box-shadow: 0 0 0 18px rgba(45, 212, 191, 0); } }
.nojs { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-content: center; gap: 12px; padding: 24px; text-align: center; }

@media (max-width: 560px) {
  .hud-btns .pill { width: 44px; padding: 0; } .hud-btns .pill span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .badge { left: 170px; right: 14px; bottom: calc(var(--card-h) + 22px + env(safe-area-inset-bottom)); text-align: right; font-size: .6rem; line-height: 1.35; }
  .hint { font-size: .74rem; }
}
@media (max-height: 660px) { .btn { min-height: 48px; padding: 10px 16px; font-size: .82rem; } #story { gap: 7px; padding-top: 12px; } .st-t { font-size: 1.15rem; } .st-s { font-size: .85rem; } .hint { display: none; } }
@media (min-width: 760px) {
  #story { left: 50%; right: auto; bottom: 22px; width: min(720px, calc(100% - 48px)); transform: translateX(-50%); padding: 22px 26px; border-radius: 22px; border: 1px solid var(--line); background: rgba(5, 18, 20, .74); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 24px 70px rgba(0, 0, 0, .55); }
  .cta { grid-template-columns: 1fr 1fr; }
  .hint { top: 70px; }
  #info { left: auto; right: 24px; bottom: auto; top: 96px; width: 340px; }
  .tools { left: 24px; bottom: 34px; }
  .badge { left: 24px; right: auto; bottom: 90px; max-width: 230px; }
  .btn { letter-spacing: .02em; font-size: .9rem; }
}
@media (max-height: 520px) { .st-t { font-size: 1.1rem; } .st-s { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .op-glyph, .op-word, .op-by { opacity: 1; stroke-dashoffset: 0; }
}
