:root {
  --bg: #08080f;
  --text: #eef0f4;
  --muted: #8b90a0;
  --focus: #5b8cf7;
  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  box-sizing: border-box;
  color-scheme: dark;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Blurs azuis de fundo ── */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
  opacity: 0.18;
}

body::before {
  width: 600px;
  height: 600px;
  background: #1a3fad;
  top: -120px;
  left: -80px;
  animation: drift-1 18s ease-in-out infinite alternate;
}

body::after {
  width: 500px;
  height: 500px;
  background: #1637a0;
  bottom: -60px;
  right: -60px;
  animation: drift-2 22s ease-in-out infinite alternate;
}

/* Terceiro blur via wrapper */
.bg-blur {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: #132e8a;
  top: 45%;
  left: 55%;
  transform: translate(-50%, -50%);
  filter: blur(110px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  animation: drift-3 25s ease-in-out infinite alternate;
}

@keyframes drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.15); }
}
@keyframes drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, -30px) scale(1.1); }
}
@keyframes drift-3 {
  0%   { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-40%, -55%) scale(1.2); }
}

/* ── Layout ── */
main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.sub {
  color: var(--muted);
  margin: 0 0 48px;
  max-width: 52ch;
  font-size: 1.05rem;
}

/* ── Grid de cards ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 28px;
}

/* ── Card: apenas imagem clicável ── */
.card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(59, 108, 245, 0.18),
              0 4px 20px rgba(0, 0, 0, 0.5);
}

.card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

/* ── Capa do ebook (imagem) ── */
.cover {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Acessibilidade: reduzir movimento ── */
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
  body::before, body::after, .bg-blur {
    animation: none;
  }
}

/* ── Responsividade ── */
@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }
  main {
    padding: 40px 16px 60px;
  }
}
