/* Site do Mirante. Tokens de docs/design.md: escuro neutro, verde-água "sinal" só no que está vivo,
   fonte do sistema e mono só em número. Movimento da casa (curvas e escada de entrada das landings). */
:root {
  --bg: #0d0f12;
  --surface: #15181c;
  --raised: #1d2126;
  --line: #262b31;
  --line-strong: #363c44;
  --text: #e8ebee;
  --text-2: #9ba3ad;
  --text-3: #626a74;
  --signal: #4fe3c1;
  --on-signal: #04201a;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.2, 0.64, 1);
  --ios: cubic-bezier(0.32, 0.72, 0, 1);
  --max: 1200px;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-padding-top: 76px; overflow-x: clip; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
::selection { background: var(--signal); color: var(--on-signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

@media (min-width: 761px) and (min-height: 640px) { html { scroll-snap-type: y mandatory; } }
@media (max-width: 760px), (max-height: 639px) { html { scroll-snap-type: y proximity; } }
.snap { scroll-snap-align: start; min-height: calc(100svh - 76px); display: flex; flex-direction: column; justify-content: center; }

/* ---------- Entrada em escada ---------- */
.rise { opacity: 0; transform: translateY(32px); transition: opacity 0.5s var(--ease), transform 0.7s var(--ease); }
.rise.tilt { transform: translateY(32px) rotate(2deg); transform-origin: left bottom; }
.rise.in { opacity: 1; transform: none; }
html.intro-on { overflow: hidden; }

/* ---------- Abertura ---------- */
.intro { position: fixed; inset: 0; z-index: 100; background: var(--bg); pointer-events: none; overflow: hidden; }
.intro.gone { display: none; }
.intro-mark { position: absolute; left: 50%; top: 50%; width: 260px; transform: translate(-50%, -50%); transform-origin: 0 0; }
.intro-mark svg { display: block; width: 100%; overflow: visible; }
.intro-mark .sol { transform-box: fill-box; transform-origin: center; }
.intro-mark .l1, .intro-mark .l2 { transform-box: fill-box; transform-origin: center; }
.intro-band { position: absolute; top: -20vh; left: 0; width: 34vw; height: 140vh; background: var(--signal); transform: translateX(-70vw) skewX(-24deg); }

/* ---------- Cabeçalho ---------- */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease); opacity: 0; transform: translateY(-8px); }
.header.in { opacity: 1; transform: none; transition: opacity 0.5s var(--ease) 75ms, transform 0.5s var(--ease) 75ms, background 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.header.scrolled { background: rgba(13, 15, 18, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header-inner { max-width: var(--max); margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 17px; display: block; overflow: visible; }
.brand-name { font: 700 20px var(--sans); letter-spacing: -0.4px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-size: 15px; font-weight: 500; transition: color 0.3s var(--ease), background 0.3s var(--ease); }
.nav-link:hover { color: var(--text); background: var(--surface); }

/* ---------- Botões: o ícone sai pela esquerda e a seta entra pela direita ---------- */
.btn { position: relative; display: inline-flex; align-items: center; height: 48px; padding: 0 22px 0 18px; border-radius: 10px; font: 600 16px var(--sans); overflow: hidden; white-space: nowrap; transition: background 0.3s var(--ease), transform 0.2s var(--ease); }
.btn:active { transform: scale(0.97); }
.btn .lead, .btn .arrow { width: 20px; height: 20px; flex: none; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.btn .lead svg { width: 20px; height: 20px; display: block; }
.btn .label { margin-left: 10px; transition: transform 0.3s var(--ease); }
.btn .arrow { position: absolute; right: 16px; opacity: 0; transform: translateX(-12px); }
.btn:hover .lead { transform: translateX(-28px); opacity: 0; }
.btn:hover .label { transform: translateX(-28px); }
.btn:hover .arrow { opacity: 1; transform: none; }
.btn-primary { background: var(--signal); color: var(--on-signal); }
.btn-primary:hover { background: #6eebcf; }
.btn-ghost { background: var(--raised); color: var(--text); }
.btn-ghost:hover { background: #262b31; }
.btn-sm { height: 40px; font-size: 15px; padding: 0 18px 0 14px; }
.btn-sm .lead, .btn-sm .arrow, .btn-sm .lead svg { width: 18px; height: 18px; }
.btn-sm .label { margin-left: 8px; }

/* ---------- Herói ---------- */
main { display: block; }
.hero { position: relative; align-items: center; text-align: center; padding: 88px 24px 40px; gap: 0; }
.hero-art { position: relative; width: 100vw; margin: 0 calc(50% - 50vw); touch-action: pan-y; cursor: crosshair; will-change: transform, opacity; }
.hero-art canvas { display: block; }
.hero h1 { margin-top: 8px; font: 700 clamp(36px, 5.6vw, 72px) / 1.04 var(--sans); letter-spacing: -0.035em; max-width: 20ch; }
.hero h1 em { font-style: normal; color: var(--signal); }
.lede { margin-top: 18px; max-width: 600px; color: var(--text-2); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.5; }
.cta-row { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hint { margin-top: 22px; display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; }
.hint-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }

/* ---------- Palco ---------- */
.stage-wrap { max-width: var(--max); margin: 0 auto; padding: 24px 24px 28px; gap: 16px; }
.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.counter { display: flex; align-items: center; gap: 10px; min-width: 0; }
.counter .num { font: 600 22px var(--mono); }
.counter .of { font: 500 14px var(--mono); color: var(--text-3); }
.scene-name { font-size: 15px; font-weight: 600; margin-left: 6px; transition: opacity 0.22s var(--ease), transform 0.22s var(--ease); }
.scene-name.swap { opacity: 0; transform: translateY(6px); }
.steps { display: flex; gap: 4px; margin-left: 8px; }
.steps i { width: 18px; height: 3px; border-radius: 2px; background: var(--line-strong); position: relative; overflow: hidden; }
.steps i::after { content: ""; position: absolute; inset: 0; background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease); }
.steps i.done::after { transform: scaleX(1); }
.live { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.roll { position: relative; display: inline-flex; white-space: pre; }
.roll span { display: inline-block; }
.roll span.out { position: absolute; top: 0; }

.devices { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(16px, 3vw, 44px);
  height: min(560px, calc(100svh - 300px)); min-height: 300px; }
.mac { flex: 0 1 auto; display: flex; flex-direction: column; align-items: center; height: 88%; aspect-ratio: 1512 / 1050; max-width: 66%; }
.mac-screen { width: 100%; aspect-ratio: 1512 / 982; background: #050607; border-radius: 14px 14px 4px 4px; padding: 1.6%; box-shadow: 0 0 0 1px #2a3037, 0 30px 60px rgba(0, 0, 0, 0.45); }
.mac-view { position: relative; width: 100%; height: 100%; border-radius: 6px; overflow: hidden; background: #161a1f; }
.mac-base { width: 116%; height: 3.4%; min-height: 8px; background: #2a3037; border-radius: 0 0 14px 14px; position: relative; }
.mac-base i { position: absolute; left: 50%; top: 0; width: 16%; height: 42%; margin-left: -8%; background: #1c2126; border-radius: 0 0 8px 8px; }
.mac-view iframe, .phone-port iframe, .phone-land iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; background: var(--bg); }

.phone-slot { flex: none; height: 90%; aspect-ratio: 1; display: grid; place-items: center; position: relative; }
.phone { position: relative; height: 96%; aspect-ratio: 409 / 868; border-radius: 13.5% / 6.4%; background: #050607; padding: 2%; box-shadow: 0 0 0 1px #2a3037, 0 30px 60px rgba(0, 0, 0, 0.45); transition: transform 0.9s var(--ios); }
.phone.land { transform: rotate(-90deg); }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 11.5% / 5.4%; overflow: hidden; background: var(--bg); }
.phone-port { position: absolute; inset: 0; transition: opacity 0.35s var(--ease); }
.phone-land { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(90deg); opacity: 0; transition: opacity 0.35s var(--ease); background: #000; }
.phone.land .phone-port { opacity: 0; }
.phone.land .phone-land { opacity: 1; }
.layer { position: absolute; inset: 0; overflow: hidden; }

.finger { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(232, 235, 238, 0.28); border: 2px solid rgba(232, 235, 238, 0.85);
  opacity: 0; pointer-events: none; z-index: 5; transition: opacity 0.25s var(--ease); }
.finger.on { opacity: 1; }
.finger.down { transform: scale(0.78); }
.finger.down::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid var(--signal); animation: tapring 0.55s ease-out both; }
@keyframes tapring { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }

.stage-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.phases { position: relative; display: flex; gap: 2px; padding: 4px; background: var(--surface); border-radius: 12px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.phases::-webkit-scrollbar { display: none; }
.phase-slider { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 9px; background: var(--raised); transition: transform 0.5s var(--spring), width 0.5s var(--spring); }
.phase { position: relative; padding: 9px 16px; border-radius: 9px; color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap; transition: color 0.3s var(--ease); }
.phase.on { color: var(--text); }
.phase:hover { color: var(--text); }
.step-caption { min-height: 1.5em; color: var(--text-2); font-size: 16px; text-align: center; max-width: 620px; transition: opacity 0.22s var(--ease), transform 0.22s var(--ease); }
.step-caption.swap { opacity: 0; transform: translateY(6px); }

/* ---------- Recursos ---------- */
.features { max-width: var(--max); margin: 0 auto; padding: 40px 24px; }
.feat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.sec-title { font: 700 clamp(28px, 3.6vw, 44px) / 1.08 var(--sans); letter-spacing: -0.03em; max-width: 22ch; }
.stats { display: flex; gap: 28px; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { color: var(--text-3); font-size: 13px; }
.stats dd { font-size: 22px; font-weight: 600; }
.grid { margin-top: 36px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cell { background: var(--surface); border-radius: 14px; padding: 22px 20px 24px; transition: background 0.3s var(--ease); }
.cell:hover { background: var(--raised); }
.cell h3 { margin-top: 14px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.cell p { margin-top: 6px; color: var(--text-2); font-size: 14.5px; }
.icon { width: 48px; height: 48px; display: block; fill: none; stroke: var(--text); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.icon * { transform-box: fill-box; transform-origin: center; transition: transform 0.5s var(--spring), stroke 0.3s var(--ease), opacity 0.3s var(--ease); }
.f-tap .ring { stroke: var(--signal); opacity: 0; transform: scale(0.4); }
.cell:hover .f-tap .arrow-c { transform: translate(8px, 10px); }
.cell:hover .f-tap .ring { opacity: 1; transform: scale(1); }
.f-kb .caret { stroke: var(--signal); }
.cell:hover .f-kb .body, .cell:hover .f-kb .keys { transform: translateY(-6px); }
.cell:hover .f-kb .caret { animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cell:hover .f-swap .s1 { transform: translate(22px, 24px); }
.cell:hover .f-swap .s2 { transform: translate(-22px, -24px); stroke: var(--signal); }
.f-pin .on { stroke: var(--signal); }
.f-pin .cur { stroke: var(--signal); }
.cell:hover .f-pin .cur { animation: blink 0.8s steps(1) infinite; }
.cell:hover .f-pin rect:nth-child(1) { transform: translateY(-4px); }
.cell:hover .f-pin rect:nth-child(2) { transform: translateY(-4px); transition-delay: 60ms; }
.cell:hover .f-full .corners { transform: scale(1.12); }
.cell:hover .f-full .scr { transform: scale(1.5); stroke: var(--signal); }
.f-pad .dot { fill: var(--signal); stroke: none; }
.cell:hover .f-pad .dot { transform: translate(20px, -6px); }
.f-home .w1, .f-home .w2 { stroke: var(--signal); opacity: 0.35; }
.cell:hover .f-home .w1 { opacity: 1; }
.cell:hover .f-home .w2 { opacity: 1; transition-delay: 90ms; }
.cell:hover .f-lock .shackle { transform: translateY(-5px); stroke: var(--signal); }

/* ---------- Baixar ---------- */
.download { max-width: var(--max); margin: 0 auto; padding: 40px 24px; }
.dl-lede { margin-top: 12px; color: var(--text-2); font-size: 17px; max-width: 560px; }
.dl-grid { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dl-col { background: var(--surface); border-radius: 14px; padding: 24px; scroll-margin-top: 96px; }
.dl-col:target { box-shadow: 0 0 0 1px var(--line-strong); }
.dl-col h3 { font-size: 20px; font-weight: 600; }
.dl-note { color: var(--text-2); font-size: 14.5px; margin-top: 4px; }
.dl-list { list-style: none; margin-top: 18px; }
.dl-list li { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 14px; min-height: 56px; border-top: 1px solid var(--line); }
.dl-list .os { font-weight: 600; font-size: 16px; }
.dl-list .req { color: var(--text-2); font-size: 14px; }
.dl-list .soon { color: var(--text-3); font-size: 14px; font-weight: 500; }

/* ---------- Perguntas ---------- */
.faq { max-width: 820px; margin: 0 auto; padding: 40px 24px; }
.faq-list { margin-top: 28px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 18px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { position: relative; width: 14px; height: 14px; flex: none; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; border-radius: 1px; background: var(--text-2); transition: transform 0.3s var(--ease); }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i::after { transform: rotate(0); }
.faq .ans { overflow: hidden; }
.faq .ans p { padding: 0 0 20px; color: var(--text-2); font-size: 16px; max-width: 680px; }

/* ---------- Final e rodapé ---------- */
.final { scroll-snap-align: end; }
.closing { max-width: var(--max); margin: 0 auto; padding: 96px 24px 64px; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.closing h2 { font: 700 clamp(34px, 5vw, 64px) / 1.04 var(--sans); letter-spacing: -0.035em; }
.closing h2 em { font-style: normal; color: var(--text-3); }
footer { max-width: var(--max); margin: 0 auto; padding: 32px 24px 0; border-top: 1px solid var(--line); overflow: hidden; }
.links { display: flex; gap: 22px; flex-wrap: wrap; }
.links a { color: var(--text-2); font-size: 15px; transition: color 0.3s var(--ease); }
.links a:hover { color: var(--text); }
.legal { margin-top: 18px; color: var(--text-3); font-size: 13px; max-width: 760px; }
.giant { margin-top: 24px; font: 800 clamp(80px, 22vw, 300px) / 0.8 var(--sans); letter-spacing: -0.06em; color: var(--surface); white-space: nowrap; user-select: none; transform: translateY(12%); }

/* ---------- Página de texto (privacidade) ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 120px 24px 80px; }
.doc h1 { font: 700 clamp(32px, 5vw, 48px) / 1.08 var(--sans); letter-spacing: -0.03em; }
.doc .upd { margin-top: 10px; color: var(--text-3); font-size: 14px; }
.doc h2 { margin-top: 40px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.doc p, .doc li { margin-top: 12px; color: var(--text-2); font-size: 16px; }
.doc ul { padding-left: 20px; }
.doc a { color: var(--signal); }
.doc table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-top: 1px solid var(--line); color: var(--text-2); }
.doc th { color: var(--text); font-weight: 600; }
.doc .back { display: inline-flex; margin-top: 48px; }
body.page-doc .header { opacity: 1; transform: none; }

/* ---------- Telas menores ---------- */
@media (max-width: 1023px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .header-inner { padding: 0 16px; }
  .hide-sm { display: none; }
  .hero { padding: 80px 16px 32px; }
  .stage-wrap, .features, .download, .faq { padding-left: 16px; padding-right: 16px; }
  .devices { flex-direction: column; height: auto; gap: 18px; }
  .mac { width: 92%; max-width: none; height: auto; }
  .mac-base { width: 108%; }
  .phone-slot { height: min(300px, 70vw); }
  .stage-head { flex-wrap: wrap; }
  .steps { display: none; }
  .stats { gap: 18px; flex-wrap: wrap; }
  .stats dd { font-size: 18px; }
  .grid { grid-template-columns: 1fr; gap: 10px; margin-top: 24px; }
  .cell { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; padding: 18px; }
  .cell .icon { grid-row: span 2; }
  .cell h3 { margin-top: 0; }
  .dl-grid { grid-template-columns: 1fr; }
  .dl-col { padding: 18px; }
  .dl-list li { grid-template-columns: 1fr auto; row-gap: 2px; padding: 10px 0; }
  .dl-list .req { grid-column: 1; grid-row: 2; font-size: 13px; }
  .dl-list .soon { grid-column: 2; grid-row: 1 / span 2; }
  .closing { padding: 72px 16px 48px; }
  footer { padding: 28px 16px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rise, .rise.tilt { opacity: 1; transform: none; transition: none; }
  .header { opacity: 1; transform: none; }
  .phone, .phone-port, .phone-land { transition: none; }
}
