/*
  BookRats — folha única do site público.

  As cores NÃO foram escolhidas aqui: são os tokens de lib/core/theme/app_colors.dart,
  copiados um a um. Se o app mudar de paleta, este bloco é o lugar de refletir —
  e o valor tem de continuar batendo com o token de mesmo nome.

  A regra da marca vale igual aqui: o roxo (--primary) é MASSA, preenchimento;
  a lavanda (--lavender) é TRAÇO — ícone, ênfase, borda, foco. Lavanda cheia
  não aceita letra branca.
*/

:root {
  /* Superfícies */
  --background: #08060D;        /* AppColors.background */
  --surface: #120D1C;           /* AppColors.surface */
  --surface-variant: #1C1428;   /* AppColors.surfaceVariant */
  --elevated: #251A35;          /* AppColors.elevated */
  --surface-brand: #3E3453;     /* AppColors.surfaceBrand */
  --divider: #3A3045;           /* AppColors.divider */

  /* Marca */
  --primary: #6D3FD1;           /* AppColors.primary */
  --primary-dark: #45208F;      /* AppColors.primaryDark */
  --lavender: #C4B5FD;          /* AppColors.lavender */
  --on-primary: #F7F2FF;        /* AppColors.onPrimary */

  /* Texto */
  --text-primary: #F7F2FF;      /* AppColors.textPrimary */
  --text-secondary: #C9C0D6;    /* AppColors.textSecondary */
  --inactive: rgba(255, 255, 255, 0.24); /* AppColors.inactive */

  /* Acentos usados no app */
  --gold: #FFD700;              /* AppColors.gold */
  --success: #34D399;           /* AppColors.success */

  /* Geometria — AppRadius */
  --radius-card: 20px;
  --radius-pill: 999px;

  --gutter: 20px;
  --max-width: 1080px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--lavender); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text-primary); }

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

/* Pular para o conteúdo — só aparece no teclado */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--on-primary);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-card) 0;
  z-index: 10;
}
.skip:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Tipografia de display ───────────────────────────────────────────────── */

h1, h2, h3, .display {
  font-family: "Bebas Neue", Inter, sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0;
}

h1 { font-size: clamp(2.75rem, 9vw, 4.75rem); }
h2 { font-size: clamp(1.9rem, 5.5vw, 2.75rem); }
h3 { font-size: 1.35rem; letter-spacing: 0.03em; }

.eyebrow {
  font-family: Inter, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lavender);
  margin: 0 0 14px;
}

.lead {
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 54ch;
}

/* ── Cabeçalho ───────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(8, 6, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--divider);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Bebas Neue", Inter, sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.topbar nav {
  display: flex;
  gap: 22px;
  font-size: 0.92rem;
}
.topbar nav a { color: var(--text-secondary); text-decoration: none; }
.topbar nav a:hover { color: var(--text-primary); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 10vw, 104px) 0 clamp(48px, 8vw, 88px);
}

/* O brilho é o roxo como MASSA, atrás de tudo, sem tocar a legibilidade */
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 20% auto -20%;
  height: 620px;
  background: radial-gradient(closest-side, rgba(109, 63, 209, 0.55), transparent 72%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.hero h1 { margin-bottom: 18px; }
.hero h1 .accent { color: var(--lavender); }

.hero-art {
  justify-self: center;
  width: min(300px, 100%);
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55));
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  min-height: 48px;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover { background: var(--primary-dark); color: var(--on-primary); }

.btn-ghost {
  border-color: var(--surface-brand);
  color: var(--text-primary);
  background: var(--surface);
}
.btn-ghost:hover { border-color: var(--lavender); color: var(--text-primary); }

/* Selo de estado — a loja ainda não tem ficha publicada */
.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-variant);
  border: 1px solid var(--divider);
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 600;
}
.badge-soon::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

/* ── Seções ──────────────────────────────────────────────────────────────── */

section { padding: clamp(48px, 8vw, 88px) 0; }

.section-head { margin-bottom: clamp(28px, 5vw, 48px); }
.section-head h2 { margin-bottom: 12px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  padding: 26px 24px;
}

.card .icon {
  font-size: 1.6rem;
  line-height: 1;
  display: block;
  margin-bottom: 14px;
}

.card h3 { margin-bottom: 8px; color: var(--text-primary); }

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.6;
}

/* Passos */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  counter-reset: passo;
}

.step {
  background: linear-gradient(180deg, var(--surface-variant), var(--surface));
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  padding: 26px 24px;
}

.step .num {
  font-family: "Bebas Neue", Inter, sans-serif;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--lavender);
  display: block;
  margin-bottom: 10px;
}

.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--text-secondary); font-size: 0.96rem; }

/* Faixa de fechamento */

.closer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-card);
  padding: clamp(32px, 6vw, 56px);
  text-align: center;
}
.closer h2 { color: var(--on-primary); margin-bottom: 12px; }
.closer p { color: rgba(247, 242, 255, 0.88); margin: 0 auto 26px; max-width: 46ch; }
.closer .btn-ghost { background: var(--background); border-color: transparent; }

/* ── Rodapé ──────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--divider);
  padding: 44px 0 56px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

footer .fineprint {
  margin: 26px 0 0;
  color: var(--text-secondary);
  opacity: 0.75;
  font-size: 0.85rem;
}

/* ── Páginas de texto (política, termos) ─────────────────────────────────── */

.legal {
  max-width: 720px;
  padding-top: clamp(36px, 6vw, 64px);
}

.legal .updated {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 10px 0 0;
}

.legal h2 {
  font-size: 1.45rem;
  margin: 44px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
}

.legal h2:first-of-type { border-top: 0; padding-top: 0; }

.legal p { color: var(--text-secondary); }

.legal ul {
  color: var(--text-secondary);
  padding-left: 1.2em;
  margin: 12px 0;
}
.legal li { margin-bottom: 10px; }

.legal .callout {
  background: var(--surface);
  border: 1px solid var(--surface-brand);
  border-left: 3px solid var(--lavender);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  margin: 20px 0;
}
.legal .callout p:last-child { margin-bottom: 0; }

.backlink {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* ── Responsivo ──────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: left; }
  .hero-art { order: -1; width: min(210px, 60%); justify-self: start; }
  .topbar nav { gap: 16px; font-size: 0.88rem; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .topbar nav a[data-optional] { display: none; }
  .cta-row .btn { width: 100%; justify-content: center; }
}

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