/* Landing do yondo. Tokens de cor e fontes iguais ao painel (server/web/painel.css)
   e ao YondoTheme.kt do app — mudou lá, muda aqui. */

@font-face {
  font-family: "Newsreader";
  src: url("/fontes/newsreader.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fontes/geist.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fontes/geist_mono.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f5f2ec;
  --surface: #ffffff;
  --line: #e4ded3;
  --ink: #1f1d1a;
  --ink-soft: #4a453e;
  --muted: #6a645a;
  --faint: #9c968b;
  --brand: #22406e;
  --brand-soft: #e4eaf3;
  --on-brand: #f5f2ec;
  --sage: #3d7a5b;
  --sage-soft: #e3eee7;
  --signal: #c2502d;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Geist", system-ui, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --surface: #1e1c19;
    --line: #2e2b27;
    --ink: #eeeae2;
    --ink-soft: #cfc9be;
    --muted: #a29c91;
    --faint: #6f695f;
    --brand: #9db7e4;
    --brand-soft: #1c2638;
    --on-brand: #141311;
    --sage: #7bc29c;
    --sage-soft: #1e3328;
    --signal: #ee7a55;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

main, .topo, .rodape {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--mono); font-size: .9em; }

.oculto {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* ------------------------------------------------------------------ topo */

.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
}

.logo { height: 30px; width: auto; fill: var(--ink); }
.logo .logo-do { fill: var(--brand); }

.topo-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
}
.topo-link:hover { color: var(--brand); }

/* ------------------------------------------------------------------ hero */

.hero { padding: 72px 0 48px; max-width: 760px; }

.pilula {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage);
  font-size: 14px;
  font-weight: 500;
}
.pilula .ponto {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulsa 1.6s ease-in-out infinite;
}
@keyframes pulsa { 50% { opacity: .35; transform: scale(.8); } }

h1 {
  margin: 0 0 24px;
  font: 500 clamp(40px, 6.5vw, 68px)/1.05 var(--serif);
  letter-spacing: -.02em;
}
h1 em { font-style: italic; color: var(--brand); }

.sub {
  margin: 0 0 36px;
  max-width: 600px;
  color: var(--ink-soft);
  font-size: 19px;
}

.botao {
  display: inline-block;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font: 600 16px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.botao:hover { transform: translateY(-1px); }
.botao:disabled { opacity: .6; cursor: default; transform: none; }

/* ----------------------------------------------------------------- demo */

.demo { margin: 24px 0 96px; }

.demo-quadro {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg);
  box-shadow: 0 24px 60px -30px rgb(0 0 0 / .35);
}
/* tamanhos do painel gravado: 820×520 deitado, 460×760 em pé. Sem JS o
   <source> escolhe pela largura; com JS manda o data-formato do botão. */
.demo-quadro video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 820 / 520;
}
@media (max-width: 600px) {
  .demo-quadro:not([data-formato]) video { aspect-ratio: 460 / 760; }
}
.demo-quadro[data-formato="celular"] { max-width: 380px; margin: 0 auto; }
.demo-quadro[data-formato="celular"] video { aspect-ratio: 460 / 760; }

.demo-controles {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-aparelhos {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.demo-aparelhos button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.demo-aparelhos button:hover { color: var(--ink); }
.demo-aparelhos button[aria-pressed="true"] {
  background: var(--brand-soft);
  color: var(--brand);
}
.demo-aparelhos svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-rodape {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.demo-som {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 500 14px var(--sans);
  cursor: pointer;
}
.demo-som:hover { border-color: var(--faint); }
.demo-som svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.demo-som svg path:first-child { fill: currentColor; stroke: none; }
.demo-som .onda { display: none; }
.demo-som[aria-pressed="true"] .onda { display: inline; }
.demo-som[aria-pressed="true"] .risco { display: none; }

.demo-legenda {
  margin: 0;
  color: var(--faint);
  font-size: 14px;
}

/* ---------------------------------------------------------------- passos */

h2 {
  margin: 0 0 32px;
  font: 500 clamp(30px, 4vw, 40px)/1.15 var(--serif);
  letter-spacing: -.01em;
}
h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }

.passos { margin-bottom: 96px; }
.passos ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.passos p, .recursos p { margin: 0; color: var(--ink-soft); }

.num {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font: 600 15px var(--mono);
}

/* -------------------------------------------------------------- recursos */

.recursos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  margin-bottom: 96px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--line);
}
.recursos div { padding: 28px; background: var(--surface); }

/* ---------------------------------------------------------------- espera */

.espera {
  margin-bottom: 96px;
  padding: 56px 40px;
  border-radius: 28px;
  background: var(--brand-soft);
  text-align: center;
}
.espera h2 { margin-bottom: 12px; }
.espera > p { margin: 0 0 28px; color: var(--ink-soft); }

#form-espera {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
}
#form-espera input[type="email"] {
  flex: 1 1 260px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 16px var(--sans);
}

.aviso { min-height: 1.5em; margin: 16px 0 0; font-size: 15px; }
.aviso.ok { color: var(--sage); }
.aviso.erro { color: var(--signal); }

/* ---------------------------------------------------------------- rodapé */

.rodape {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 28px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.rodape p { margin: 0; }

@media (max-width: 560px) {
  .hero { padding-top: 40px; }
  .demo-quadro { border-radius: 14px; }
  .demo-legenda { font-size: 13px; }
  .demo-rodape { flex-wrap: wrap; }
  .demo-controles { margin-left: auto; }
  .espera { padding: 40px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pilula .ponto { animation: none; }
}
