/* ============================================================
   LANDING PAGE (Mandan) — vitrine pública na raiz do site.
   Usa os tokens do base.css; a aurora vem do tema.js.
   ============================================================ */

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px clamp(14px, 4vw, 40px) 40px;
  overflow-x: clip; /* o M flutuante do hero vaza de propósito; sem scroll lateral */
}

/* ---------- Marca (ícone transparente + nome em texto: funciona nos 2 temas) ---------- */
.ld-marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ld-marca-ico {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.ld-marca-nome {
  display: grid;
  line-height: 1;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.ld-marca-nome small {
  margin-top: 3px;
  color: var(--primary);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---------- Topbar ---------- */
.ld-topbar {
  width: 100%;
  max-width: 1080px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: clamp(30px, 7vh, 70px);
}


.ld-topbar-acoes {
  display: flex;
  align-items: center;
  gap: 10px;
  /* o botão de tema flutua no canto; deixa espaço pra ele */
  margin-right: 56px;
}

/* ---------- Botões (links) ---------- */
.ld-btn-primario,
.ld-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease),
    background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}

.ld-btn-primario {
  color: var(--on-primary);
  background-color: var(--primary);
  background-image: var(--brand);
  box-shadow: var(--shadow-sm);
}

.ld-btn-primario:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: var(--shadow), var(--shadow-primary);
}

.ld-btn-ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.ld-btn-ghost:hover {
  opacity: 1;
  color: var(--primary);
  border-color: var(--primary);
}

.ld-btn-grande {
  min-height: 52px;
  padding: 12px 28px;
  font-size: 1.02rem;
}

/* ---------- Hero ---------- */
.ld-main {
  width: 100%;
  max-width: 1080px;
  display: grid;
  gap: clamp(60px, 10vh, 110px);
}

.ld-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 60px);
}

.ld-hero-texto {
  display: grid;
  gap: 18px;
  justify-items: start;
  animation: ld-sobe 0.6s var(--ease-out) both;
}

.ld-badge-beta {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: var(--primary-soft);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.ld-badge-beta b {
  color: var(--primary);
}

.ld-hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--text);
}

.ld-hero-sub {
  max-width: 520px;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  line-height: 1.65;
}

.ld-hero-sub b {
  color: var(--text);
}

.ld-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.ld-hero-nota {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ---------- Mockup do flashcard ---------- */
.ld-hero-mock {
  position: relative;
  display: grid;
  gap: 14px;
  animation: ld-sobe 0.6s var(--ease-out) 0.12s both;
}

.ld-mock-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.ld-mock-tag {
  justify-self: start;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
}

.ld-mock-pergunta {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
}

.ld-mock-resposta {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.94rem;
}

.ld-mock-nota {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.ld-mock-nota b {
  color: var(--success);
}

.ld-mock-nota i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.ld-mock-mandan {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-left: clamp(10px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ld-mock-avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  box-shadow: 0 10px 22px rgba(56, 189, 248, 0.3);
}

.ld-mock-mandan p {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.55;
}

.ld-mock-logo {
  position: absolute;
  top: -34px;
  right: -18px;
  width: 84px;
  height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 14px 30px rgba(99, 102, 241, 0.35));
  animation: ld-flutua 4s ease-in-out infinite;
}

/* ---------- Seções ---------- */
.ld-secao {
  display: grid;
  gap: 28px;
  justify-items: center;
  text-align: center;
}

.ld-secao > h2 {
  max-width: 640px;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  color: var(--text);
}

.ld-features {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ld-feature {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 26px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease);
}

.ld-feature:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.ld-feature img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  margin-bottom: 4px;
}

.ld-feature h3 {
  color: var(--text);
  font-size: 1.02rem;
}

.ld-feature p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* ---------- Passos ---------- */
.ld-passos {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: passo;
}

.ld-passos li {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 26px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.ld-passo-num {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--on-primary);
  font-weight: 900;
  font-size: 1.15rem;
  background-image: var(--brand);
  box-shadow: var(--shadow-primary);
}

.ld-passos h3 {
  color: var(--text);
  font-size: 1rem;
}

.ld-passos p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* ---------- CTA final ---------- */
.ld-cta-final {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding: clamp(34px, 6vw, 60px) 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(600px 240px at 50% -20%, var(--primary-soft), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}

.ld-cta-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  animation: ld-flutua 4s ease-in-out infinite;
}

.ld-cta-final h2 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--text);
}

.ld-cta-final p {
  max-width: 520px;
  color: var(--text-muted);
  line-height: 1.6;
}

.ld-cta-final b {
  color: var(--primary);
}

/* ---------- Footer ---------- */
.ld-footer {
  width: 100%;
  max-width: 1080px;
  display: grid;
  gap: 12px;
  justify-items: center;
  margin-top: clamp(50px, 8vh, 90px);
  padding-top: 26px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.ld-footer-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.ld-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.ld-footer a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.ld-footer a:hover {
  color: var(--primary);
}

.ld-footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---------- Fundo 3D de partículas (canvas via landing-fx.js) ---------- */
.ld-canvas3d {
  position: fixed;
  inset: 0;
  z-index: -1; /* acima da aurora (que também é -1 mas vem antes no DOM) */
  pointer-events: none;
}

/* ---------- Tilt 3D do mockup ---------- */
.ld-hero-mock {
  perspective: 900px;
}

.ld-tilt {
  position: relative;
  display: grid;
  gap: 14px;
  transform-style: preserve-3d;
  will-change: transform;
}

/* profundidades diferentes: com o tilt, cada peça se move de um jeito (3D real) */
.ld-tilt .ld-mock-card {
  transform: translateZ(12px);
}

.ld-tilt .ld-mock-mandan {
  transform: translateZ(42px);
}

.ld-tilt .ld-mock-logo {
  animation: ld-flutua-z 4s ease-in-out infinite; /* mantém o translateZ no float */
}

@keyframes ld-flutua-z {
  0%, 100% { transform: translateZ(70px) translateY(0) rotate(-3deg); }
  50% { transform: translateZ(70px) translateY(-10px) rotate(3deg); }
}

/* ---------- Reveal ao rolar (bidirecional, via IntersectionObserver) ---------- */
.anim {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
  transition-delay: var(--anim-delay, 0s);
}

.anim.visivel {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .anim {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- Animações ---------- */
@keyframes ld-sobe {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ld-flutua {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .ld-hero {
    grid-template-columns: 1fr;
  }

  .ld-hero-texto {
    justify-items: center;
    text-align: center;
  }

  .ld-hero-sub {
    max-width: 560px;
  }

  .ld-hero-ctas {
    justify-content: center;
  }

  .ld-features,
  .ld-passos {
    grid-template-columns: 1fr;
    max-width: 460px;
  }

  .ld-mock-logo {
    top: -28px;
    right: 0;
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 560px) {
  .ld-topbar {
    flex-direction: column;
    gap: 12px;
  }

  .ld-topbar-acoes {
    margin-right: 0;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .ld-hero-ctas {
    width: 100%;
    flex-direction: column;
  }

  .ld-hero-ctas .ld-btn-grande {
    width: 100%;
  }

  .ld-cta-final .ld-btn-grande {
    width: 100%;
  }
}
