@font-face {
  font-family: "Onest";
  src: url("assets/onest.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --ink: #000;
  --surface: #0b0b0b;
  --raised: #161616;
  --hover: #222;
  --loop: #1b1b1b;
  --line: rgb(255 255 255 / 0.1);
  --text: #f4f2ec;
  --muted: #a6a39b;
  --paper: #f4f2ec;
  --paper-line: rgb(0 0 0 / 0.12);
  --paper-muted: #57544d;
  --paper-loop: #e3e0d8;
  --live: #f23f43;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --bar-height: 64px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

/* A barra do topo fica presa na tela: o que os links do menu levam até para logo abaixo dela, sem deixar
   aparecer uma faixa da seção anterior. O título de cada seção ainda ganha um respiro próprio. */
html { scroll-behavior: smooth; scroll-padding-top: var(--bar-height); }

.section-title { scroll-margin-top: 40px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 17px/1.55 "Onest", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--text); color: var(--ink); }
.paper ::selection { background: var(--ink); color: var(--paper); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }

html { scrollbar-color: #333 var(--ink); }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

h1, h2, h3, p { margin: 0; }

code { font: 500 0.92em/1 ui-monospace, "SF Mono", Menlo, monospace; }

img { display: block; max-width: 100%; height: auto; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-title {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.section-lead {
  max-width: 52ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.1rem;
  text-wrap: pretty;
}

.note { color: var(--muted); font-size: 0.9rem; }

.paper { background: var(--paper); color: var(--ink); color-scheme: light; }
.paper .section-lead, .paper .note { color: var(--paper-muted); }

/* ---------- Botões ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 180ms, color 180ms, border-color 180ms, transform 180ms var(--ease-out), translate 400ms var(--ease-out);
}

.button:active { transform: translateY(1px); }

.button-solid { background: var(--text); color: var(--ink); }
.button-solid:hover { background: #fff; }

.button-outline { border-color: rgb(255 255 255 / 0.22); color: var(--text); }
.button-outline:hover { border-color: rgb(255 255 255 / 0.5); background: rgb(255 255 255 / 0.05); }

.button-ink { background: var(--ink); color: var(--paper); }
.button-ink:hover { background: #222; }

.button-ink-outline { border-color: rgb(0 0 0 / 0.25); color: var(--ink); }
.button-ink-outline:hover { border-color: var(--ink); }

/* ---------- Topo (o mesmo da sala) ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--bar-height);
  padding: 0 var(--gutter);
  background: rgb(0 0 0 / 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
}

.brand { display: flex; color: var(--text); }
.lockup { width: 92px; height: 29px; fill: currentColor; }

.nav { display: flex; gap: 28px; margin-right: auto; margin-left: 24px; }

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 160ms;
}

.nav a:hover { color: var(--text); }

.presence { display: flex; align-items: center; gap: 10px; }

.avatars { display: flex; }

.avatars span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--raised);
  box-shadow: 0 0 0 3px var(--ink);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.avatars span:first-child { margin-left: 0; box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--live); }

.presence-count { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }

/* ---------- Hero: a sala ---------- */

.hero {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  height: calc(100svh - var(--bar-height));
  min-height: 600px;
  max-height: 1100px;
  padding: 0 var(--gutter) var(--gutter);
}

.stage {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  animation: screen-on 1100ms var(--ease-out) both;
}

/* Laços do fundo: o símbolo inteiro, saindo pelos cantos. Como a forma é completa, mover a camada nunca revela borda cortada. */
.loop {
  position: absolute;
  aspect-ratio: 882 / 860;
  fill: var(--loop);
}

.loop-a { top: -30%; left: -9%; width: clamp(260px, 30vw, 520px); transform: rotate(196deg); }
.loop-b { right: -7%; bottom: -28%; width: clamp(220px, 26vw, 460px); transform: rotate(-24deg); }

.hero-symbol-wrap, .loops-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform;
}

.hero-symbol {
  position: absolute;
  right: -9%;
  bottom: -16%;
  width: min(54vw, 84vh);
  aspect-ratio: 882 / 860;
  fill: var(--text);
  animation: drift 1400ms var(--ease-out) both, breathe 9s ease-in-out 1400ms infinite;
  transform-origin: 60% 60%;
}

.live-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  padding: 6px 12px 6px 11px;
  border-radius: 999px;
  background: rgb(11 11 11 / 0.78);
  backdrop-filter: blur(12px);
  font-size: 0.85rem;
  font-weight: 600;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  animation: blink 1.6s ease-in-out infinite;
}

.live-label { color: var(--live); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }

.live-sep {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid rgb(255 255 255 / 0.16);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero-copy {
  position: relative;
  align-self: end;
  max-width: 760px;
  padding-bottom: 8px;
}

.hero-title {
  font-size: clamp(3rem, 7.4vw, 6rem);
  font-weight: 780;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.hero-lead {
  max-width: 44ch;
  margin-top: 22px;
  color: #d6d3cb;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  text-wrap: pretty;
}

.hero-lead code { padding: 2px 6px; border-radius: 6px; background: rgb(255 255 255 / 0.1); color: var(--text); }

.stage-controls {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  color: rgb(255 255 255 / 0.55);
}

.ctl-end { display: flex; gap: 4px; }

.ctl { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; }

.dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 12px 12px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.dock-status { color: var(--muted); }
.dock-status strong { color: var(--text); font-weight: 650; }

.dock-actions { display: flex; gap: 10px; }

/* ---------- Como funciona ---------- */

.flow { padding: clamp(88px, 12vw, 160px) var(--gutter); }

.flow-inner { max-width: 1240px; margin: 0 auto; }

.flow-head { max-width: 720px; }

/* As quatro etapas lado a lado, com subgrid para os cartões e os textos alinharem entre colunas. */
.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 0 20px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.flow-step {
  position: relative;
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding-top: 28px;
  border-top: 1px solid var(--paper-line);
}

/* Linha do tempo: um ponto em cada etapa, sobre a linha de cima. */
.flow-step::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.flow-step h3 { margin-top: 24px; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
.flow-step > p { margin-top: 8px; color: var(--paper-muted); }

.flow-note { margin-top: 36px; color: var(--paper-muted); font-size: 0.85rem; }

/* Réplica do Discord no tema escuro: as cores são as dele, não as do rhut. */
.dc-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 14px 18px 12px;
  border-radius: 10px;
  background: #313338;
  box-shadow: 0 24px 48px -24px rgb(0 0 0 / 0.45), 0 2px 6px rgb(0 0 0 / 0.1);
  color: #dbdee1;
  font-size: 13px;
  line-height: 1.4;
}

.dc-card {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform 600ms var(--ease-out), box-shadow 600ms var(--ease-out);
}

.dc-card[data-tilting] {
  --lift: -6px;
  box-shadow: 0 40px 60px -28px rgb(0 0 0 / 0.55), 0 2px 6px rgb(0 0 0 / 0.1);
  transition-duration: 120ms, 400ms;
}

.dc-card-ephemeral { background: linear-gradient(rgb(88 101 242 / 0.08), rgb(88 101 242 / 0.08)), #313338; }

/* O canal depois que a sala fecha: o lugar do aviso, vazio. */
.dc-card-cleared {
  justify-content: center;
  align-items: center;
  border: 1px dashed rgb(255 255 255 / 0.14);
  background: #2b2d31;
}

.dc-cleared { max-width: 26ch; color: #949ba4; text-align: center; }

.dc-command { display: flex; align-items: center; gap: 6px; padding-left: 42px; color: #949ba4; font-size: 12px; }
.dc-command b { color: #c4c9ce; font-weight: 600; }

.dc-mini {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #5c5f66;
  color: #f2f3f5;
  font-size: 9px;
  font-weight: 600;
}

.dc-slash { color: #c9cdfb; font-weight: 600; }

.dc-msg { display: grid; grid-template-columns: 32px 1fr; gap: 10px; }

.dc-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #000;
}

.dc-avatar svg { width: 19px; height: 19px; fill: #f4f2ec; }

.dc-body { display: grid; gap: 6px; min-width: 0; }

.dc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; }
.dc-head strong { color: #f2f3f5; font-weight: 600; }

.dc-tag {
  padding: 0 4px;
  border-radius: 4px;
  background: #5865f2;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  line-height: 14px;
}

.dc-time, .dc-edited { color: #949ba4; font-size: 11px; }

.dc-embed {
  padding: 8px 12px 10px 10px;
  border-left: 4px solid var(--bar);
  border-radius: 4px;
  background: #2b2d31;
}

.dc-embed[data-color="open"] { --bar: #5865f2; }
.dc-embed[data-color="live"] { --bar: #da373c; }

.dc-author { display: flex; align-items: center; gap: 6px; color: #f2f3f5; font-size: 12px; font-weight: 600; }

.dc-server {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f4f2ec;
  color: #000;
  font-size: 8px;
  font-weight: 700;
}

.dc-title { margin-top: 6px; color: #f2f3f5; font-weight: 700; }
.dc-desc { margin-top: 4px; }
.dc-desc b { color: #f2f3f5; }

.dc-mention { padding: 0 2px; border-radius: 3px; background: rgb(88 101 242 / 0.3); color: #c9cdfb; }
.dc-stamp { padding: 0 3px; border-radius: 3px; background: rgb(255 255 255 / 0.06); }

.dc-split { display: flex; justify-content: space-between; gap: 10px; }

.dc-thumb {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  margin-top: 6px;
  border-radius: 6px;
  background: #4a4d55;
  color: #f2f3f5;
  font-size: 18px;
  font-weight: 700;
}

.dc-buttons { display: flex; flex-wrap: wrap; gap: 6px; }

.dc-btn {
  padding: 5px 11px;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.dc-primary { background: #5865f2; }
.dc-danger { background: #da373c; }
.dc-link, .dc-secondary { background: #4e5058; }
.dc-success { background: #248046; }

.dc-rows { display: grid; gap: 6px; }

/* Tela de autorização do Discord (OAuth), como aparece na primeira vez que alguém entra. */
.dc-card-auth { align-items: center; justify-content: center; gap: 10px; text-align: center; }
.dc-auth-faces { display: flex; align-items: center; gap: 10px; }
.dc-auth-dots { width: 22px; border-top: 2px dotted #4e5058; }
.dc-auth-me { width: 32px; height: 32px; font-size: 13px; }
.dc-auth-title { color: #f2f3f5; font-size: 15px; font-weight: 700; }
.dc-auth-scope { color: #b5bac1; }

.panel-split { margin-top: clamp(88px, 12vw, 150px); }

.dc-card-panel { width: 100%; max-width: 440px; justify-self: center; }

.dc-text { color: #dbdee1; }
.dc-only { color: #949ba4; font-size: 11px; }

/* ---------- Recursos ---------- */

.features {
  display: grid;
  gap: clamp(72px, 10vw, 140px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(96px, 12vw, 170px) var(--gutter);
}

.features-head { max-width: 720px; }

/* ---------- Mini sala (interativa) ---------- */

.mini-room {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0;
}

/* Modo ambiente de verdade: uma cópia borrada da tela vaza em volta do palco. */
.mr-ambient {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: blur(70px) saturate(1.6);
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 900ms var(--ease-out);
  pointer-events: none;
}

.mini-room[data-ambient] .mr-ambient { opacity: 0.5; }

.mr-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
}

.mr-screen {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: filter 600ms var(--ease-out);
}

.mr-stage:fullscreen { display: grid; place-items: center; border: 0; border-radius: 0; }
.mr-stage:fullscreen .mr-screen { height: 100%; object-fit: contain; }

.mr-stage .live-badge { position: absolute; top: 18px; left: 18px; }

.live-badge[data-flash] { animation: badge-flash 700ms var(--ease-out); }

.mini-avatar {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3a3a3a;
  color: var(--text);
  font-size: 10px;
}

.facecam {
  position: absolute;
  right: 22px;
  bottom: 78px;
  display: grid;
  place-items: center;
  width: clamp(84px, 12vw, 150px);
  aspect-ratio: 1;
  border: 3px solid var(--live);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #4a4a4a, #1e1e1e 70%);
  box-shadow: 0 12px 32px -8px rgb(0 0 0 / 0.7);
  color: var(--text);
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  font-weight: 700;
  animation: float 6s ease-in-out infinite;
}

.mr-controls {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 44px 12px 10px;
  background: linear-gradient(to top, rgb(0 0 0 / 0.72), transparent);
  color: #fff;
}

.mr-volume, .mr-controls-end { display: flex; align-items: center; gap: 4px; }

.mr-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 160ms;
}

.mr-icon:hover { background: rgb(255 255 255 / 0.14); }
#mr-ambient[aria-pressed="false"] { opacity: 0.5; }

.mr-slider {
  --fill: 50%;
  width: 110px;
  height: 20px;
  margin: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
}

.mr-slider::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(to right, #fff var(--fill), rgb(255 255 255 / 0.25) var(--fill)); }
.mr-slider::-moz-range-track { height: 4px; border-radius: 999px; background: linear-gradient(to right, #fff var(--fill), rgb(255 255 255 / 0.25) var(--fill)); }
.mr-slider::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5px; border: 0; border-radius: 50%; background: #fff; appearance: none; transition: transform 160ms var(--ease-out); }
.mr-slider::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.mr-slider:hover::-webkit-slider-thumb { transform: scale(1.2); }

.mr-volume-value { min-width: 4ch; margin-left: 6px; font-size: 0.85rem; font-variant-numeric: tabular-nums; }

.mr-cams { display: flex; gap: 10px; }

.cam {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: clamp(110px, 16vw, 200px);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, #2c2c2c, var(--raised) 70%);
  color: var(--muted);
  font-size: 1.4rem;
  font-weight: 700;
}

.cam-self { animation: pop-in 420ms var(--ease-out); }
.cam-self video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }

.cam em {
  position: absolute;
  left: 8px;
  bottom: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgb(11 11 11 / 0.72);
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.mr-dock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.mr-status { flex: 1; min-width: 0; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }

.mr-button, .mr-quality-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--raised);
  color: var(--text);
  font: 600 0.92rem "Onest", sans-serif;
  cursor: pointer;
  transition: background 160ms, border-color 160ms;
}

.mr-button:hover, .mr-quality-trigger:hover, .mr-quality-trigger[aria-expanded="true"] { background: var(--hover); }
.mr-button[aria-pressed="true"] { border-color: rgb(255 255 255 / 0.4); background: rgb(255 255 255 / 0.1); }

.mr-quality { position: relative; }

.mr-quality-current { display: grid; text-align: left; line-height: 1.15; }
.mr-quality-current small { color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.icon-sm { width: 16px; height: 16px; }

.mr-quality-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  display: grid;
  gap: 2px;
  width: 340px;
  margin: 0;
  padding: 6px;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 12px;
  background: var(--raised);
  box-shadow: 0 24px 48px -16px rgb(0 0 0 / 0.8);
  list-style: none;
  transform-origin: bottom right;
  animation: menu-in 220ms var(--ease-out);
}

.mr-quality-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mr-quality-list button:hover, .mr-quality-list button:focus-visible { background: var(--hover); outline: none; }
.mr-quality-list b { font-weight: 650; font-size: 0.95rem; }
.mr-quality-list small { grid-column: 1; color: var(--muted); font-size: 0.82rem; }
.mr-quality-list .icon { grid-row: 1 / span 2; grid-column: 2; align-self: center; visibility: hidden; }
.mr-quality-list [aria-checked="true"] .icon { visibility: visible; }

.mini-room figcaption { color: var(--muted); font-size: 0.85rem; }

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
  margin: calc(clamp(72px, 10vw, 140px) * -0.5) 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li { padding: 26px 0 34px; border-top: 1px solid var(--line); }
.feature-list h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.feature-list p { margin-top: 8px; color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}

.split-reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split-reverse .split-copy { order: 2; }

.split .note { margin-top: 18px; }

.shot { margin: 0; }

.shot img {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -30px rgb(255 255 255 / 0.08);
}

.shot figcaption { margin-top: 12px; color: var(--muted); font-size: 0.85rem; }

/* ---------- /live ---------- */

.command {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(110px, 16vw, 220px) var(--gutter);
  text-align: center;
}

.loops-paper .loop { fill: var(--paper-loop); }
.loops-paper .loop-a { top: -16%; left: -7%; width: clamp(280px, 34vw, 600px); }
.loops-paper .loop-b { right: -6%; bottom: -20%; width: clamp(260px, 30vw, 540px); }

.command-title {
  position: relative;
  font-size: clamp(6rem, 24vw, 19rem);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.06em;
}

.command-title span {
  display: inline-block;
  transition: font-variation-settings 450ms var(--ease-out), transform 600ms var(--ease-out);
}

.command-lead {
  position: relative;
  margin-top: 28px;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 500;
}

/* ---------- Começar ---------- */

.start {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(96px, 12vw, 170px) var(--gutter);
}

.paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 48px;
}

.path {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: clamp(24px, 3.4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.path-icon { width: 30px; height: 30px; color: var(--text); }
.path h3 { margin-top: 8px; font-size: 1.7rem; font-weight: 720; letter-spacing: -0.03em; }
.path > p { max-width: 44ch; color: var(--muted); }
.path > p code { color: var(--text); }
.path .button { margin-top: auto; }
.path .note { margin-top: -4px; }

.code {
  position: relative;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #000;
}

.code pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  color: #d6d3cb;
  font-size: 0.9rem;
  line-height: 1.75;
  scrollbar-width: thin;
}

/* No canto de baixo, ao lado da última linha (a mais curta), para não cobrir o fim do "git clone". */
.copy {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--raised);
  color: var(--muted);
  font: 600 0.8rem "Onest", sans-serif;
  cursor: pointer;
  transition: color 160ms, background 160ms;
}

.copy .icon { width: 16px; height: 16px; }
.copy:hover { background: var(--hover); color: var(--text); }
.copy[data-copied] { color: var(--text); }

.limits {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 6vw, 88px);
  margin-top: clamp(88px, 11vw, 150px);
}

.limits-title { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 720; line-height: 1.1; letter-spacing: -0.035em; }

.limits-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; }
.limits-list div { padding: 18px 0 24px; border-top: 1px solid var(--line); }
.limits-list dt { font-weight: 650; }
.limits-list dd { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }

.needs { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }

.needs li { display: flex; align-items: center; gap: 10px; }

.needs li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--text);
}

/* ---------- Fechamento ---------- */

.closing {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 78vh;
  padding: clamp(88px, 12vw, 160px) var(--gutter);
}

.closing-symbol {
  position: absolute;
  top: -8%;
  right: -10%;
  width: min(70vw, 820px);
  aspect-ratio: 882 / 860;
  fill: var(--ink);
}

.closing-copy { position: relative; align-self: end; max-width: 1240px; width: 100%; margin: 0 auto; }

.closing-title {
  font-size: clamp(3.4rem, 9vw, 6rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.closing-lead { margin-top: 14px; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 450; letter-spacing: -0.02em; }

.closing-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }

/* ---------- Avisos ---------- */

.toasts {
  position: fixed;
  top: calc(var(--bar-height) + 12px);
  right: var(--gutter);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 8px 16px 8px 8px;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 999px;
  background: var(--raised);
  box-shadow: 0 12px 32px -8px rgb(0 0 0 / 0.6), 0 2px 6px rgb(0 0 0 / 0.35);
  color: var(--text);
  font-size: 0.92rem;
  animation: toast-in 420ms var(--ease-out);
}

.toast strong { font-weight: 650; }
.toast[data-leaving] { animation: toast-out 280ms ease-in forwards; }

.toast-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--hover);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.avatars span[data-arriving] { animation: pop-in 480ms var(--ease-out); }

/* ---------- Rodapé ---------- */

.footer {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px var(--gutter);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer .lockup { width: 72px; height: 23px; color: var(--text); }
.footer p { margin-right: auto; }
.footer a:hover { color: var(--text); }

/* ---------- Movimento ---------- */

/* A tela "liga" como uma sala que começa a transmitir. */
@keyframes screen-on {
  from { clip-path: inset(49.5% 0 49.5% 0 round var(--radius)); filter: brightness(2.2); }
  55% { filter: brightness(1.2); }
  to { clip-path: inset(0 0 0 0 round var(--radius)); filter: none; }
}

@keyframes drift {
  from { transform: translate(8%, 10%) rotate(8deg) scale(0.9); }
}

@keyframes breathe {
  50% { transform: rotate(-2deg) scale(1.025); }
}

@keyframes blink { 50% { opacity: 0.35; } }

@keyframes pop-in { from { transform: scale(0.4); opacity: 0; } }

@keyframes float { 50% { transform: translateY(-8px); } }

@keyframes menu-in { from { transform: translateY(6px) scale(0.97); opacity: 0; } }

@keyframes toast-in { from { transform: translateX(24px); opacity: 0; filter: blur(4px); } }

@keyframes toast-out { to { transform: translateX(24px); opacity: 0; } }

@keyframes badge-flash {
  30% { box-shadow: 0 0 0 3px rgb(255 255 255 / 0.5); transform: scale(1.04); }
}

/* Revelações presas à rolagem: rápidas (terminam antes do meio da tela) e sem esconder nada de quem não tem suporte. */
@keyframes rise { from { transform: translateY(48px); opacity: 0; } }

@keyframes grow { from { transform: scale(0.92); opacity: 0.2; } }

@keyframes dot-in { from { transform: scale(0); } }

@keyframes turn { from { transform: rotate(-18deg) translateY(8%); } to { transform: rotate(10deg) translateY(-4%); } }

@keyframes slide-x { from { transform: translateX(-6%); } to { transform: translateX(6%); } }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .features .section-title, .features .section-lead, .start .section-title, .flow-head,
    .feature-list li, .path, .limits-list div, .split-copy, .shot, .closing-copy {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }

    .flow-step { animation: rise linear both; animation-timeline: view(); }
    .flow-step:nth-child(1) { animation-range: entry 0% entry 55%; }
    .flow-step:nth-child(2) { animation-range: entry 8% entry 63%; }
    .flow-step:nth-child(3) { animation-range: entry 16% entry 71%; }
    .flow-step:nth-child(4) { animation-range: entry 24% entry 79%; }

    .flow-step::before { animation: dot-in linear both; animation-timeline: view(); animation-range: entry 40% entry 90%; }

    .feature-list li:nth-child(3n + 2), .limits-list div:nth-child(2n) { animation-range: entry 8% entry 78%; }
    .feature-list li:nth-child(3n) { animation-range: entry 16% entry 86%; }

    .mini-room { animation: grow linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }

    .closing-symbol { animation: turn linear both; animation-timeline: view(); animation-range: cover; }

    .loops-paper { animation: slide-x linear both; animation-timeline: view(); animation-range: cover; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------- Telas menores ---------- */

@media (max-width: 960px) {
  .nav { display: none; }
  .presence { margin-left: auto; }
  .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 20px; }
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split-reverse { grid-template-columns: 1fr; }
  .split-reverse .split-copy { order: 0; }
  .limits { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  :root { --bar-height: 56px; }
  .lockup { width: 78px; height: 24px; }
  .presence-count { display: none; }
  /* No celular o texto não cabe numa altura fixa: o palco cresce com o conteúdo (ainda ocupando a tela toda
     quando sobra espaço), e o símbolo fica no alto, terminando antes do título em vez de passar por trás dele. */
  .hero { grid-template-rows: 1fr auto; height: auto; min-height: calc(100svh - var(--bar-height)); max-height: none; gap: 10px; }
  .hero-symbol { right: -26vw; bottom: auto; top: -18vw; width: 64vw; }
  .hero-copy { padding-top: 36vw; }
  .live-sep { display: none; }
  .hero-title { font-size: clamp(2.8rem, 13vw, 4rem); }
  .dock { flex-direction: column; align-items: stretch; padding: 12px; }
  .dock-status { display: none; }
  .dock-actions { flex-direction: column-reverse; }
  .dock-actions .button, .path .button, .closing-actions .button { width: 100%; }
  .flow-steps { grid-template-columns: 1fr; gap: 40px; margin-top: 40px; }
  .flow-step { grid-row: auto; grid-template-rows: none; }
  .discord { font-size: 14px; }
  .facecam { bottom: 56px; right: 12px; }
  .mr-slider, .mr-volume-value, .mr-status { display: none; }
  .mr-stage .live-badge { top: 10px; left: 10px; }
  .mr-stage .live-badge .live-sep { display: inline-flex; }
  .mr-stage .live-badge .live-sep:nth-child(3) { display: none; }
  .mr-dock { padding: 8px; }
  .mr-quality { flex: 1; }
  .mr-quality-trigger { width: 100%; }
  .mr-quality-trigger .icon-sm { margin-left: auto; }
  .mr-quality-list { width: min(340px, calc(100vw - 2 * var(--gutter) - 16px)); }
  .mr-button span { display: none; }
  .cam { width: 0; flex: 1; }
  .feature-list { grid-template-columns: 1fr; }
  .paths { grid-template-columns: 1fr; }
  .limits-list { grid-template-columns: 1fr; }
  .closing { min-height: 70vh; }
  .closing-symbol { width: 74vw; right: -22%; top: -3%; }
  .closing { padding-top: 70vw; }
  .footer { flex-wrap: wrap; gap: 12px 20px; }
  .footer p { flex-basis: 100%; order: 2; }
}
