/* =============================================================================
   Camada da APRESENTAÇÃO (palco 1920x1080 escalado, tipografia de slide, HUD).
   As telas recriadas do produto ficam em app.css e seguem docs/DESIGN.md.
   ========================================================================== */
@font-face {
  font-family: 'Inter';
  src: url('../assets/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: block;
}

:root {
  --bg: #09090b;
  --card: #101012;
  --line: #26262a;
  --text: #f4f4f5;
  --muted: #9ca3af;
  --dim: #71717a;
  --brand: #6366f1;
  --brand-2: #818cf8;
  --brand-soft: #a5b4fc;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #030304; color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
button { font: inherit; color: inherit; }

#viewport { position: fixed; inset: 0; overflow: hidden; cursor: default; }
#stage {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform-origin: center center;
  overflow: hidden;
  background:
    radial-gradient(1100px 760px at 76% 46%, rgba(99, 102, 241, 0.085), transparent 62%),
    radial-gradient(900px 600px at 8% 100%, rgba(99, 102, 241, 0.05), transparent 60%),
    var(--bg);
}
#stage::before { /* grade pontilhada muito sutil pra dar profundidade */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(1200px 800px at 50% 50%, #000 30%, transparent 85%);
}

.scene { position: absolute; inset: 0; }
.h { opacity: 0; }

/* ------------------------------------------------------------ tipografia */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand-soft);
}
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18); }
.eyebrow.plain::before { display: none; }
.h0 { font-size: 132px; font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; margin: 0; }
.h1 { font-size: 62px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; margin: 0; }
.h2 { font-size: 50px; font-weight: 700; letter-spacing: -0.028em; line-height: 1.06; margin: 0; }
.h3 { font-size: 30px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.15; margin: 0; }
.lead { font-size: 23px; line-height: 1.45; color: #a1a1aa; margin: 0; font-weight: 450; }
.muted { color: var(--muted); }
.brand { color: var(--brand-2); }
.okc { color: var(--ok); } .warnc { color: var(--warn); } .errc { color: var(--err); }
.tab-num { font-variant-numeric: tabular-nums; }

.pts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.pts li { position: relative; padding-left: 30px; font-size: 22px; line-height: 1.35; color: #e4e4e7; font-weight: 500; }
.pts li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.pts li small { display: block; margin-top: 4px; font-size: 17px; color: var(--muted); font-weight: 400; line-height: 1.4; }
.pts li.ok::before { background: var(--ok); }
.pts li.warn::before { background: var(--warn); }
.pts li.err::before { background: var(--err); }

/* ------------------------------------------------------------ layouts */
.split .col {
  position: absolute; left: 96px; top: 0; bottom: 0; width: 520px;
  display: flex; flex-direction: column; justify-content: center; gap: 26px;
}
.split .col .h2 { font-size: 46px; }
.split .side { position: absolute; right: 72px; top: 50%; translate: 0 -50%; }
.split.wide .col { width: 440px; }
.center-col { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 28px; }

/* chip de personagem (quem, papel, hora) */
.persona {
  display: inline-flex; align-items: center; gap: 14px; align-self: flex-start;
  padding: 8px 18px 8px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(16, 16, 18, 0.9);
}
.persona .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; background: rgba(99, 102, 241, 0.18); color: var(--brand-soft); }
.persona .nm { font-size: 17px; font-weight: 600; line-height: 1.2; }
.persona .rl { font-size: 14px; color: var(--muted); }
.persona .tm { margin-left: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--text); padding: 5px 12px; border-radius: 999px; background: #1c1c1f; font-variant-numeric: tabular-nums; }
.persona .tm svg { color: var(--brand-2); }

/* chamada flutuante sobre a tela */
.callout {
  position: absolute; z-index: 60; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 12px;
  background: #16161a; border: 1px solid #34343a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  font-size: 17px; font-weight: 600; color: var(--text); white-space: nowrap;
}
.callout svg { color: var(--brand-2); flex: none; }
.callout.ok svg { color: var(--ok); } .callout.warn svg { color: var(--warn); } .callout.err svg { color: var(--err); }
.callout small { display: block; font-size: 14px; font-weight: 450; color: var(--muted); }

/* badges do app usados fora da tela recriada (em chamadas e pílulas) */
.callout, .pill {
  --secondary: #1c1c1f; --accent: rgba(99, 102, 241, 0.15); --accent-foreground: #a5b4fc;
  --success: #34d399; --success-bg: rgba(5, 150, 105, 0.15); --warning: #fbbf24; --warning-bg: rgba(217, 119, 6, 0.15);
  --danger: #f87171; --danger-bg: rgba(220, 38, 38, 0.15);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); font-size: 16px; font-weight: 600;
}
.pill svg { color: var(--brand-2); }
.pill.ok svg { color: var(--ok); } .pill.warn svg { color: var(--warn); } .pill.err svg { color: var(--err); }

.glow { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(99, 102, 241, 0.22), transparent 65%); }

/* janela de navegador (moldura das telas desktop) */
.win {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid #2c2c31; background: #09090b;
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.win-bar { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #121215; border-bottom: 1px solid #26262a; }
.win-bar .dots { display: flex; gap: 7px; }
.win-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a40; }
.win-bar .url {
  margin: 0 auto; display: flex; align-items: center; gap: 7px; height: 24px; padding: 0 14px; min-width: 360px; justify-content: center;
  border-radius: 7px; background: #0b0b0d; border: 1px solid #222226; font-size: 12.5px; color: #8b8b93;
}
.win-bar .url svg { color: #6b6b73; }
.win-vp { position: relative; overflow: hidden; }
.cam { position: relative; width: 100%; height: 100%; transform-origin: 0 0; }

/* cursor */
.cursor { position: absolute; left: 0; top: 0; z-index: 80; pointer-events: none; opacity: 0; will-change: transform; }
.cursor > svg { display: block; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); transform-origin: 3px 2px; }
.cursor-ripple {
  position: absolute; left: 0; top: 0; z-index: 79; width: 0; height: 0; pointer-events: none;
}
.cursor-ripple::after {
  content: ''; position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid rgba(129, 140, 248, 0.9); animation: ripple 0.6s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes ripple { from { transform: scale(0.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

/* ---------------------------------------------------------------- HUD */
.hud {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; height: 52px;
  display: flex; align-items: center; gap: 20px; padding: 0 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s;
  font-size: 13px; color: #a1a1aa;
}
body.hud-on .hud { opacity: 1; transform: none; }
.hud-left { display: flex; align-items: center; gap: 10px; min-width: 260px; white-space: nowrap; }
.hud-logo { display: inline-flex; align-items: center; }
.hud-logo svg { display: block; height: 15px; width: auto; }
.hud-progress { flex: 1; display: flex; gap: 3px; align-items: center; height: 20px; }
.hud-progress .seg { flex: 1; height: 20px; background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; }
.hud-progress .seg::before { content: ''; }
.hud-progress .seg { position: relative; }
.hud-progress .seg::after { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); }
.hud-progress .seg i { position: absolute; left: 0; right: 0; top: 8px; height: 4px; border-radius: 2px; background: var(--brand-2); transform-origin: left; transform: scaleX(0); transition: transform .35s; z-index: 1; }
.hud-progress .seg:hover::after { background: rgba(255, 255, 255, 0.28); }
.hud-right { display: flex; align-items: center; gap: 6px; }
.hud-count { font-variant-numeric: tabular-nums; margin-right: 8px; min-width: 52px; text-align: right; }
.hud-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(20, 20, 24, 0.8); display: grid; place-items: center; cursor: pointer; color: #d4d4d8; }
.hud-btn:hover { background: rgba(40, 40, 46, 0.9); }
.hud-btn.on { color: #fff; background: var(--brand); border-color: var(--brand); }

.index { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, 0.72); display: grid; place-items: center; backdrop-filter: blur(6px); }
.index[hidden] { display: none; }
.index-in { width: min(1100px, 92vw); max-height: 86vh; overflow: auto; background: #0e0e11; border: 1px solid #26262a; border-radius: 16px; padding: 24px 28px; }
.index-h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.index-h b { font-size: 20px; } .index-h span { color: var(--muted); font-size: 13px; }
.index-list { columns: 2; column-gap: 28px; }
.index-ch { break-after: avoid; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-soft); margin: 14px 0 6px; }
.index-it { display: flex; gap: 12px; width: 100%; text-align: left; padding: 7px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; font-size: 14px; color: #e4e4e7; break-inside: avoid; }
.index-it span { color: var(--dim); font-variant-numeric: tabular-nums; }
.index-it:hover { background: #1c1c20; }
.index-it.cur { background: rgba(99, 102, 241, 0.16); color: #fff; }

.keys { position: fixed; right: 20px; bottom: 64px; z-index: 150; background: #0e0e11; border: 1px solid #26262a; border-radius: 12px; padding: 14px 16px; font-size: 13px; color: #d4d4d8; display: flex; flex-direction: column; gap: 8px; }
.keys[hidden] { display: none; }
kbd { display: inline-block; min-width: 22px; padding: 2px 6px; margin-right: 6px; border-radius: 5px; border: 1px solid #3a3a40; border-bottom-width: 2px; background: #18181b; font: 600 12px/1.3 'Inter', sans-serif; color: #e4e4e7; text-align: center; }

/* modo vídeo (index.html?video): só o palco, sem HUD nem sobreposições */
body.video .hud, body.video .index, body.video .keys { display: none !important; }
body.video #viewport { cursor: none; }

/* embutida no site (iframe): em telas estreitas a barra de controle ocupa demais; o site tem os próprios botões */
@media (max-width: 760px) { body.embed .hud { display: none; } }

/* logotipo (só letras): peças animáveis geradas por aurora-site/tools/logo.mjs (js/logo.js) */
.aurora-logo { display: block; overflow: visible; }
.aurora-logo path { transform-box: fill-box; }
.aurora-logo .lg-l { transform-origin: 50% 100%; }
.aurora-logo .lg-r { transform-origin: 50% 0%; }
.aurora-logo.lg-glow .lg-l { filter: drop-shadow(0 0 22px rgba(129, 140, 248, 0.55)); }

/* no vídeo gravado as dicas de teclado da capa não fazem sentido */
body.video .scene-capa .keys-hint { display: none !important; }
