/* Vitrine animada do hero (.stage): terminal → codeXa → fechamento → deploy. */

.stage { display: flex; flex-direction: column; transition: transform .5s var(--ease), box-shadow .6s ease, border-color .6s ease; }
.stage[data-scene="1"], .stage[data-scene="2"] { border-color: rgba(46, 230, 160, .45); box-shadow: 0 0 0 1px rgba(46, 230, 160, .08), 0 30px 60px -24px rgba(0, 0, 0, .7), 0 0 60px -14px rgba(46, 230, 160, .5); }
.stage[data-scene="3"] { border-color: rgba(20, 200, 212, .45); box-shadow: 0 0 0 1px rgba(20, 200, 212, .08), 0 30px 60px -24px rgba(0, 0, 0, .7), 0 0 60px -14px rgba(20, 200, 212, .5); }
.stage-title { transition: opacity .25s ease; }
.stage-title.swap { opacity: 0; }
.stage-live { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; font: 500 .68rem var(--mono); font-style: normal; color: var(--green); }
.stage-live b { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }

.stage-body { position: relative; height: 330px; }
.scene {
    position: absolute; inset: 0; padding: 1.2rem 1.3rem; overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(12px) scale(.985); filter: blur(6px);
    transition: opacity .4s ease, transform .5s var(--ease), filter .4s ease, visibility 0s .5s;
}
.scene.active { opacity: 1; visibility: visible; transform: none; filter: none; transition-delay: .12s, .12s, .12s, 0s; }

/* 1 · terminal */
.scene-code { margin: 0; padding: 0; font: 400 .84rem/1.85 var(--mono); color: #CBD5E1; white-space: pre-wrap; }
.scene-code .ln { display: block; min-height: 1.85em; }
.scene-code .pr, .scene-code .ok { color: var(--green); }
.scene-code .tx { color: #E2E8F0; }
.scene-code .dim { color: #8798B2; }

/* 2 · codeXa */
.cx-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.cx-head small { display: block; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.cx-head strong { display: block; font: 700 1.6rem/1.2 var(--mono); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.scene[data-title="codeXa · Fechamento"] .cx-head strong { font: 700 1.15rem var(--font-head); letter-spacing: -0.02em; }
.cx-list, .cx-conf, .cx-pipe { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.cx-list li {
    display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: .75rem;
    padding: .55rem .75rem; background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
    opacity: 0; transform: translateX(16px); transition: opacity .4s ease, transform .5s var(--ease);
}
.cx-list li.in { opacity: 1; transform: none; }
.cx-list li > i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: .85rem; }
.cx-list li > i.in { background: rgba(46, 230, 160, .12); color: var(--green); }
.cx-list li > i.out { background: rgba(251, 113, 133, .12); color: #FB7185; }
.cx-list li span { font-size: .84rem; line-height: 1.25; color: #E2E8F0; }
.cx-list li span small { display: block; color: var(--muted); font: 500 .68rem var(--mono); }
.cx-list li b { font: 600 .84rem var(--mono); font-variant-numeric: tabular-nums; }
.cx-list .up { color: var(--green); }
.cx-list .down { color: #FB7185; }

/* 3 · fechamento */
.cx-conf li {
    display: grid; grid-template-columns: 1fr auto 24px; gap: .75rem; align-items: center;
    padding: .7rem .9rem; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; font-size: .88rem;
    transition: border-color .4s ease;
}
.cx-conf li em { font: 600 .88rem var(--mono); font-style: normal; color: #E2E8F0; }
.cx-conf li i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .72rem; color: #04201A; background: var(--green); transform: scale(0); transition: transform .4s var(--ease); }
.cx-conf li.ok { border-color: rgba(46, 230, 160, .35); }
.cx-conf li.ok i { transform: scale(1); }
.cx-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; min-height: 32px; }
.cx-ok { font: 600 .74rem var(--mono); padding: .3rem .8rem; border-radius: 999px; color: var(--green); background: rgba(46, 230, 160, .1); border: 1px solid rgba(46, 230, 160, .3); opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s var(--ease); }
.cx-ok.show { opacity: 1; transform: none; }
.cx-exp { display: flex; gap: .5rem; }
.cx-exp b { font: 600 .72rem var(--mono); padding: .3rem .75rem; border-radius: 8px; color: #D5DEEA; background: var(--surface-2); border: 1px solid var(--line-bright); opacity: 0; transform: scale(.8); transition: opacity .3s ease, transform .4s var(--ease); }
.cx-exp b.show { opacity: 1; transform: none; }
.cx-exp b.show::before { content: "↓ "; color: var(--green); }

/* 4 · deploy */
.cx-pipe li { display: flex; align-items: center; gap: .8rem; padding: .62rem .9rem; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; font-size: .88rem; color: #8798B2; transition: color .3s ease, border-color .3s ease; }
.cx-pipe li i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-bright); display: grid; place-items: center; font-style: normal; font-size: .66rem; color: transparent; flex: none; transition: background-color .3s ease, border-color .3s ease, color .3s ease; }
.cx-pipe li.run { color: #E2E8F0; border-color: rgba(20, 200, 212, .4); }
.cx-pipe li.run i { border-color: var(--cyan) transparent var(--cyan) var(--cyan); animation: spin .7s linear infinite; }
.cx-pipe li.done { color: #E2E8F0; }
.cx-pipe li.done i { background: var(--green); border-color: var(--green); color: #04201A; }
.cx-pipe li.done i::before { content: "✔"; }
@keyframes spin { to { transform: rotate(360deg); } }
.cx-online::before { content: "● "; }

/* abas */
.stage-nav { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.stage-tab {
    position: relative; padding: .8rem .4rem; background: none; border: 0; cursor: pointer;
    font: 500 .72rem var(--mono); color: #7A8DA9; transition: color .2s ease, background-color .2s ease;
}
.stage-tab:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.stage-tab::after { content: ""; position: absolute; left: 20%; right: 20%; top: -1px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transition: transform .35s var(--ease); }
.stage-tab.active { color: var(--green); }
.stage-tab.active::after { transform: scaleX(1); }
.stage-tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }

@media (max-width: 520px) {
    .stage-body { height: 350px; }
    .scene { padding: 1rem; }
    .cx-head strong { font-size: 1.35rem; }
}
