/* Qlip — site. Mesma estrutura do site do Qyrex (moldura central, cantoneiras, seções em faixas),
   com a identidade do app: preto, superfícies grafite e azul. */

:root {
  --bg: #09090b;
  --outer: #050506;
  --card: #111216;
  --sunken: #0b0c0f;
  --ink: #f4f6fa;
  --ink-dim: #a3abb8;
  --ink-mute: #687180;
  --line: rgba(148, 163, 184, 0.09);
  --line-2: rgba(148, 163, 184, 0.17);
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --accent-on: #ffffff;
  --rec: #ef4444;
  --ok: #34d399;
  --tick: rgba(244, 246, 250, 0.4);
  --container: 1240px;
  --pad: clamp(18px, 4vw, 56px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --f-sans: "Geist", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--outer);
  color: var(--ink);
  font: 15px/1.55 var(--f-sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, kbd { font-family: var(--f-mono); font-size: 0.88em; }
code { color: var(--ink); background: var(--sunken); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
kbd { display: inline-block; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 6px; color: var(--ink); background: var(--card); line-height: 1.5; }
.mono { font-family: var(--f-mono); }
.dim { color: var(--ink-mute); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* --- Moldura central com cantoneiras ---------------------------------------- */
.page {
  position: relative;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 8px 8px;
  background-position: center top;
}
.frame {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  background: var(--bg);
  border-inline: 1px solid var(--line);
}
.corner { position: absolute; bottom: -1px; width: 14px; height: 14px; border-bottom: 1.5px solid var(--tick); }
.corner.bl { left: -1px; border-left: 1.5px solid var(--tick); }
.corner.br { right: -1px; border-right: 1.5px solid var(--tick); }
.brk {
  position: absolute; inset: 0; pointer-events: none; z-index: 6;
  --L: 14px; --T: 1.5px; --c: var(--tick);
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--L) var(--T) no-repeat,
    linear-gradient(var(--c), var(--c)) 0 0 / var(--T) var(--L) no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--L) var(--T) no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--T) var(--L) no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / var(--L) var(--T) no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / var(--T) var(--L) no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--L) var(--T) no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--T) var(--L) no-repeat;
}

/* --- Barra do topo ----------------------------------------------------------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 68px; padding-inline: var(--pad);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 15px/1 var(--f-sans); letter-spacing: 0.16em; justify-self: start; }
.brand img { border-radius: 6px; }
.brand.small { font-size: 12px; gap: 8px; }
.nav { display: flex; gap: 2px; }
.nav a { font: 12.5px var(--f-mono); color: var(--ink-dim); padding: 8px 12px; border-radius: 4px; transition: color 0.2s; }
.nav a:hover { color: var(--ink); }
.actions { display: flex; gap: 8px; justify-self: end; }
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  font: 600 13px var(--f-sans); border-radius: 6px; border: 0; cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.btn { background: var(--accent); color: var(--accent-on); box-shadow: 0 6px 24px -10px var(--accent); }
.btn:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink-dim); background: transparent; }
.btn-ghost:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.btn.big, .btn-ghost.big { height: 48px; padding: 0 22px; font-size: 15px; }
.btn kbd { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.3); color: #fff; }

/* --- Hero -------------------------------------------------------------------- */
.hero { position: relative; padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 40px) clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: 42%; width: 70%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 62%); pointer-events: none;
}
.stage { position: relative; width: min(1120px, 100%); margin: 0 auto; aspect-ratio: 1 / 0.52; container-type: inline-size; }
.text-col { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding-top: 2cqw; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 2.4cqw;
  font: 12px var(--f-mono); color: var(--ink-dim);
  padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); z-index: 4;
}
.kicker .dot { width: 7px; height: 7px; background: var(--ok); border-radius: 50%; box-shadow: 0 0 8px var(--ok); }
.word { margin: 0; font: 800 22cqw/0.82 var(--f-sans); letter-spacing: -0.04em; white-space: nowrap; user-select: none; }
.word-back {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, var(--ink), color-mix(in srgb, var(--ink) 35%, var(--bg)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-app {
  position: absolute; z-index: 2; left: 50%; top: 21cqw; margin: 0;
  width: 62cqw; transform: translateX(-50%) rotate(-1.5deg);
  border-radius: 1.2cqw; overflow: hidden; border: 1px solid var(--line-2);
  box-shadow: 0 3cqw 6cqw -2cqw rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 8cqw -2cqw color-mix(in srgb, var(--accent) 45%, transparent);
}
.hero-app img { width: 100%; height: auto; }
.hero-lede {
  position: absolute; z-index: 4; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(640px, 92%); margin: 0; text-align: center; text-wrap: balance;
  font-size: clamp(14px, 1.7cqw, 18px); color: var(--ink-dim);
}
.hero-keys { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; font-size: 12.5px; color: var(--ink-mute); }
.hero-keys kbd { margin-right: 6px; color: var(--accent-2); }

/* --- Janelas e seções ------------------------------------------------------- */
.win-bar {
  display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px;
  background: var(--sunken); border-bottom: 1px solid var(--line); font: 11.5px var(--f-mono); color: var(--ink-mute);
}
.lights { display: inline-flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.lights i:first-child { background: var(--accent); }
.win-title { color: var(--ink-dim); }

.section { position: relative; padding: clamp(48px, 6vw, 88px) var(--pad); border-bottom: 1px solid var(--line); }
.section.flush { padding-inline: 0; padding-bottom: 0; }
.sec-head { max-width: 680px; margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head.pad { padding-inline: var(--pad); }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 11.5px var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: currentColor; border-radius: 2px; }
h2 { margin: 0; font: 700 clamp(28px, 3.8vw, 44px)/1.08 var(--f-sans); letter-spacing: -0.035em; text-wrap: balance; }
.sub { margin: 14px 0 0; max-width: 60ch; color: var(--ink-dim); font-size: 16px; text-wrap: pretty; }
.sub.small { font-size: 14px; }

/* --- Replay interativo ------------------------------------------------------ */
.rp { position: relative; border: 1px solid var(--line); background: var(--sunken); border-radius: 4px; padding: clamp(18px, 3vw, 32px); }
.rp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.rp-status { display: flex; align-items: center; gap: 10px; }
.rp-status b { font-weight: 600; }
.led { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.rp-durations { display: flex; gap: 6px; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-dim); font: 12px var(--f-mono); cursor: pointer; transition: all 0.2s; }
.chip:hover { color: var(--ink); }
.chip.on { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: var(--accent); color: var(--ink); }
.rp-track { position: relative; height: 92px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); overflow: hidden; }
.rp-frames { position: absolute; inset: 14px 0 14px 0; display: flex; gap: 3px; justify-content: flex-end; padding-right: 64px; }
.rp-frames i { flex: 0 0 auto; width: 10px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
.rp-frames i.key { background: color-mix(in srgb, var(--accent-2) 55%, transparent); }
.rp-window {
  position: absolute; top: 6px; bottom: 6px; right: 60px; width: 40%;
  border: 1.5px solid var(--accent); border-radius: 4px; background: color-mix(in srgb, var(--accent) 12%, transparent);
  transition: width 0.5s var(--ease);
}
.rp-window span { position: absolute; top: -1px; left: 8px; transform: translateY(-50%); background: var(--sunken); padding: 0 6px; font-size: 10.5px; color: var(--accent-2); }
.rp-window.flash { animation: flash 0.7s var(--ease); }
@keyframes flash { 0% { background: color-mix(in srgb, var(--accent) 55%, transparent); } 100% { background: color-mix(in srgb, var(--accent) 12%, transparent); } }
.rp-now { position: absolute; right: 0; top: 0; bottom: 0; width: 60px; display: grid; place-items: center; font-size: 10.5px; color: var(--rec); border-left: 1px dashed color-mix(in srgb, var(--rec) 55%, transparent); }
.rp-foot { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px; margin-top: 22px; }
.rp-clips { flex: 1 1 280px; list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; }
.rp-clips li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink-dim); animation: in 0.45s var(--ease); }
.rp-clips li b { color: var(--ink); font-weight: 500; }
.rp-clips li.empty { color: var(--ink-mute); background: transparent; border-style: dashed; }
@keyframes in { from { opacity: 0; transform: translateY(-6px); } }

/* --- Recursos ---------------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.cell { padding: clamp(22px, 3vw, 34px) var(--pad); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.cell:nth-child(3n) { border-right: 0; }
.ck { margin: 0 0 12px; font: 11.5px var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); }
.ck .i { color: var(--accent-2); margin-right: 4px; }
.cell h3 { margin: 0 0 8px; font: 600 19px/1.2 var(--f-sans); letter-spacing: -0.02em; }
.cp { margin: 0 0 20px; color: var(--ink-dim); font-size: 14.5px; }
.mock { margin-top: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--sunken); padding: 14px; min-height: 92px; display: flex; align-items: center; }
.mock > * { width: 100%; }
.pill { font: 11px var(--f-mono); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-dim); }
.m-rec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.m-rec b { font-size: 20px; font-weight: 500; margin-right: auto; }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 10px var(--rec); animation: pulse 1.4s infinite; }
.m-buffer { display: flex; gap: 4px; height: 40px; }
.m-buffer span { width: var(--w); border-radius: 4px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.m-buffer .cut { display: grid; place-items: center; font: 11px var(--f-mono); color: var(--ink); background: color-mix(in srgb, var(--accent) 30%, transparent); border: 1px solid var(--accent); }
.m-audio { display: grid; gap: 12px; }
.m-audio div { display: grid; grid-template-columns: 38px 1fr 42px; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-dim); }
.m-audio i { position: relative; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.m-audio i::before { content: ""; position: absolute; inset: 0; width: var(--w); border-radius: inherit; background: var(--accent); }
.m-audio b { font-weight: 400; font-size: 11.5px; text-align: right; }
.m-screens { display: flex; gap: 8px; }
.m-screens .sc { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 12.5px; color: var(--ink-dim); }
.m-screens .sc em { font-style: normal; font-size: 10.5px; color: var(--ink-mute); }
.m-screens .sc.on { border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.m-frags { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.m-frags i { width: 26px; height: 26px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 30%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.m-frags i.lost { background: transparent; border-style: dashed; border-color: var(--ink-mute); }
.m-frags span { flex-basis: 100%; margin-top: 8px; font-size: 11.5px; color: var(--ok); }
.m-keys { display: flex; gap: 8px; }
.m-keys span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 6px; }
.m-keys em { font-style: normal; font-size: 11px; color: var(--ink-mute); }

/* --- Por dentro ------------------------------------------------------------- */
.shots { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(16px, 2.5vw, 28px); align-items: start; }
.shot { margin: 0; }
.shot.wide { grid-column: 1 / -1; }
.shot img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line-2); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9); }
.shot figcaption { margin-top: 10px; font-size: 11.5px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.08em; }

/* --- Desempenho -------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: 1px solid var(--line); border-radius: 4px; }
.stats > div { padding: 22px; border-right: 1px solid var(--line); }
.stats > div:last-child { border-right: 0; }
.stats dt { font: 11.5px var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-mute); margin-bottom: 10px; }
.stats dd { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.stats b { font: 700 clamp(26px, 3vw, 36px)/1 var(--f-sans); letter-spacing: -0.03em; color: var(--ink); }
.stats span { font-size: 13px; color: var(--ink-dim); }

/* --- Privacidade ------------------------------------------------------------- */
.spec { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.spec > div { display: grid; grid-template-columns: 140px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.spec > div:nth-child(odd) { padding-right: 28px; }
.spec > div:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
.spec dt { font: 12px var(--f-mono); color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px; }
.spec dd { margin: 0; color: var(--ink-dim); font-size: 14.5px; }

/* --- Código ------------------------------------------------------------------ */
.code-sec { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 20px 0 0; padding: 0; }
.stack li { font-size: 11.5px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-dim); }
.term { border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--sunken); }
.term pre { margin: 0; padding: 18px; font-size: 12.5px; line-height: 1.75; overflow-x: auto; color: var(--ink); }
.copy { margin-left: auto; height: 24px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-dim); font: 11px var(--f-mono); cursor: pointer; }
.copy:hover { color: var(--ink); }

/* --- Download ---------------------------------------------------------------- */
.dl-sec { display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: clamp(64px, 8vw, 110px); overflow: hidden; }
.dl-sec::before {
  content: ""; position: absolute; left: 50%; top: 30%; width: 60%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%); pointer-events: none;
}
.dl-icon { position: relative; margin-bottom: 26px; border-radius: 26px; box-shadow: 0 0 60px -10px color-mix(in srgb, var(--accent) 60%, transparent); }
.dl-sec .eyebrow { justify-content: center; }
.dl-title { font-size: clamp(36px, 5.5vw, 64px); }
.dl-sec .sub { margin-inline: auto; }
.dl-btns { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.fine { margin: 18px 0 0; font-size: 11.5px; color: var(--ink-mute); }

/* --- Rodapé ------------------------------------------------------------------ */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px var(--pad); font-size: 12px; }
.foot .brand img { border-radius: 5px; }
.foot a { color: var(--ink-dim); }
.foot a:hover { color: var(--ink); }

/* --- Responsivo -------------------------------------------------------------- */
@media (max-width: 980px) {
  .nav { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cell:nth-child(3n) { border-right: 1px solid var(--line); }
  .cell:nth-child(2n) { border-right: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(2) { border-right: 0; }
  .stats > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .code-sec { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .actions .btn-ghost span { display: none; }
  .stage { aspect-ratio: 1 / 1.02; }
  .word { font-size: 26cqw; }
  .hero-app { top: 34cqw; width: 92cqw; }
  .hero-lede { font-size: 14px; }
  .grid { grid-template-columns: 1fr; }
  .cell { border-right: 0 !important; }
  .shots { grid-template-columns: 1fr; }
  .spec { grid-template-columns: 1fr; }
  .spec > div { grid-template-columns: 1fr; gap: 6px; padding: 18px 0 !important; border-left: 0 !important; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div { padding: 16px; }
  .rp-durations { width: 100%; }
  .rp-durations .chip { flex: 1; }
  .rp-window span { display: none; }
  .foot { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
