/* Ritmo: página do produto. Paleta Ardósia e IBM Plex, as mesmas do app. */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f7f9fa;
  --surface: #ffffff;
  --sunken: #ecf0f2;
  --border: #1f303821;
  --text: #1f3038;
  --muted: #56646b;
  --accent: #0d7480;
  --accent-hover: #0a5e68;
  --accent-ink: #ffffff;
  --band: #ecf0f2;
  --shadow: 0 1px 2px #1f303814, 0 12px 32px #1f30381f;
  --font: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f3038;
    --surface: #2c3c44;
    --sunken: #18272e;
    --border: #f7f9fa24;
    --text: #f7f9fa;
    --muted: #b4bdc1;
    --accent: #6cc4cd;
    --accent-hover: #8fd3da;
    --accent-ink: #13232a;
    --band: #18272e;
    --shadow: 0 1px 2px #050b0e66, 0 12px 32px #050b0e80;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(36px, 5.2vw, 60px);
  font-weight: 700;
}

h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
}

h3 {
  font-size: 20px;
  font-weight: 600;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- topo ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.top-nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

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

/* ---------- botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: 600 16px var(--font);
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, transform 0.09s;
}

.btn:hover {
  border-color: var(--muted);
}

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

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 15px;
}

.btn span {
  font-weight: 400;
  opacity: 0.85;
}

/* ---------- abertura ---------- */
.hero {
  padding: 72px 0 40px;
}

.hero-text {
  max-width: 720px;
}

.lead {
  margin-top: 20px;
  font-size: 20px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 56ch;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.fine {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.shot {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.hero-shot {
  margin-top: 56px;
}

/* ---------- como funciona ---------- */
.features {
  padding: 48px 0 24px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 56px;
  align-items: center;
  padding: 56px 0;
}

.feature.reverse {
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
}

.feature.reverse .feature-text {
  order: 2;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-text p {
  color: var(--muted);
  font-size: 18px;
}

.feature-text strong {
  color: var(--text);
}

.step {
  font: 400 14px var(--mono);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}

/* ---------- celular ---------- */
.phone-band {
  background: var(--band);
  padding: 88px 0;
  margin: 32px 0;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px;
  align-items: center;
}

.phone-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.phone-text p {
  color: var(--muted);
  font-size: 18px;
}

.ticks {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.ticks li {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.ticks li:last-child {
  border-bottom: 1px solid var(--border);
}

.phones {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.phones img {
  width: min(260px, 45%);
  border-radius: 28px;
  border: 6px solid var(--text);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.phones img + img {
  margin-top: 48px;
}

/* ---------- detalhes ---------- */
.details {
  padding: 24px 0 72px;
}

.detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.detail-list li {
  padding: 20px 20px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.detail-list strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 4px;
}

/* ---------- baixar ---------- */
.download {
  background: var(--band);
  padding: 88px 0;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 32px 0 8px;
}

.download-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.download-item p {
  color: var(--muted);
}

.note {
  font-size: 14px;
}

/* ---------- rodapé ---------- */
.foot {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  font-size: 14px;
  color: var(--muted);
}

.foot-row {
  display: flex;
  justify-content: space-between;
}

/* ---------- telas menores ---------- */
@media (max-width: 900px) {
  .feature,
  .feature.reverse,
  .phone-row {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 0;
  }
  .feature.reverse .feature-text {
    order: 0;
  }
  .phone-band {
    padding: 56px 0;
  }
  .detail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .download-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .wrap {
    width: calc(100% - 32px);
  }
  .top-nav a:not(.btn) {
    display: none;
  }
  .hero {
    padding-top: 40px;
  }
  .lead {
    font-size: 18px;
  }
  .cta .btn {
    width: 100%;
    justify-content: center;
  }
  .hero-shot {
    margin-top: 36px;
  }
  .detail-list {
    grid-template-columns: 1fr;
  }
  .phones img + img {
    margin-top: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}

/* ---------- download aberto ou em breve (troca em main.js) ---------- */
html[data-downloads='soon'] .when-open,
html[data-downloads='open'] .when-soon {
  display: none !important;
}

.soon-box {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
}

.soon-box p {
  flex: 1 1 320px;
  color: var(--muted);
}

button.btn {
  cursor: pointer;
}

/* ---------- lista de espera ---------- */
.waitlist {
  width: min(520px, calc(100% - 32px));
  border: 0;
  border-radius: 14px;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.waitlist::backdrop {
  background: #0b161b80;
}

.waitlist-form,
.waitlist-done {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.waitlist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.waitlist-head h2,
.waitlist-done h2 {
  font-size: 24px;
}

.icon-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-close:hover {
  background: var(--sunken);
  color: var(--text);
}

.waitlist-intro,
.waitlist-done p {
  color: var(--muted);
  font-size: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 15px;
  font-weight: 600;
}

.field em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

.field legend {
  padding: 0;
  margin-bottom: 6px;
}

.field input:not([type='radio']),
.field textarea {
  font: 400 16px var(--font);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  width: 100%;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: transparent;
}

.field input[aria-invalid='true'] {
  border-color: #b3261e;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 400;
}

.choices label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  cursor: pointer;
}

.choices input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  margin: 0;
}

.honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-error {
  color: #b3261e;
  font-size: 15px;
}

@media (prefers-color-scheme: dark) {
  .form-error {
    color: #f2a8a2;
  }
}

.waitlist-foot {
  display: flex;
  justify-content: flex-end;
}

.waitlist-foot .btn[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.waitlist-done .btn {
  align-self: flex-start;
}

/* links internos não escondem o título embaixo da barra do topo */
section[id] {
  scroll-margin-top: 80px;
}

/* o atributo hidden vence o display das caixas da lista de espera */
.waitlist [hidden] {
  display: none !important;
}
