/* ===========================================
   PUBLISH SALES — LANDING PAGE
   Identidade Publish Digital
   =========================================== */

:root {
  /* Cores Publish */
  --azul: #1A8CFF;
  --azul-claro: #E4F0FE;
  --azul-escuro: #0066D9;
  --preto: #0A0E1A;
  --cinza-texto: #4B5563;
  --cinza-suave: #9CA3AF;
  --cinza-borda: #E5E7EB;
  --branco: #FFFFFF;
  --bg: #FAFBFD;
  --bg-card: #FFFFFF;
  --verde: #10B981;
  --vermelho: #EF4444;

  /* Tipografia */
  --font-titulo: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-corpo: 'Inter', system-ui, sans-serif;

  /* Espaçamento */
  --container-max: 1200px;
  --pad-x: 24px;
  --gap-secao: 96px;

  /* Sombras */
  --sombra-sm: 0 1px 3px rgba(10, 14, 26, 0.06);
  --sombra-md: 0 4px 12px rgba(10, 14, 26, 0.08);
  --sombra-lg: 0 16px 40px rgba(10, 14, 26, 0.12);
  --sombra-livro: 0 24px 60px rgba(26, 140, 255, 0.25);

  /* Transições */
  --easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tema escuro */
html.dark {
  --preto: #F4F6FA;
  --cinza-texto: #C0C7D4;
  --cinza-suave: #6B7280;
  --cinza-borda: #1F2937;
  --branco: #0A0E1A;
  --bg: #0A0E1A;
  --bg-card: #111827;
  --azul-claro: #1E293B;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-corpo);
  background: var(--bg);
  color: var(--preto);
  line-height: 1.6;
  font-size: 16px;
  transition: background 0.3s var(--easing), color 0.3s var(--easing);
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ============== TIPOGRAFIA ============== */

h1, h2, h3, h4 {
  font-family: var(--font-titulo);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--preto);
}

.kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--azul);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.highlight {
  color: var(--azul);
}

/* ============== TOPBAR ============== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 251, 253, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cinza-borda);
  transition: background 0.3s var(--easing);
}

html.dark .topbar {
  background: rgba(10, 14, 26, 0.85);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 180px;
  gap: 32px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--preto);
  transition: opacity 0.2s var(--easing);
}

.logo-link:hover {
  opacity: 0.85;
}

.logo-img {
  height: 160px;
  width: auto;
  display: block;
  max-width: 480px;
  object-fit: contain;
}

.logo-img-footer {
  height: 180px;
  width: auto;
  display: block;
  max-width: 540px;
  object-fit: contain;
  margin-bottom: 12px;
  /* No tema escuro do footer (preto), inverte caso a logo seja escura */
  filter: brightness(0) invert(1);
}

html.dark .logo-img-footer {
  filter: none;
}

/* Fallback textual (quando ainda não tem o PNG da logo) */
.logo-text-fallback {
  font-family: var(--font-titulo);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--preto);
}

.logo-text-fallback .logo-azul {
  color: var(--azul);
}

.logo-azul {
  color: var(--azul);
}

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

.nav a {
  color: var(--cinza-texto);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s var(--easing);
}

.nav a:hover {
  color: var(--azul);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--cinza-borda);
  color: var(--preto);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--easing);
}

.theme-toggle:hover {
  background: var(--azul-claro);
  border-color: var(--azul);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

/* ============== BUTTONS ============== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-family: var(--font-corpo);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--easing);
  text-decoration: none;
  white-space: nowrap;
}

.btn-pequeno {
  padding: 8px 18px;
  font-size: 14px;
  background: var(--azul);
  color: white !important;
  border-radius: 10px;
}

.btn-pequeno:hover {
  background: var(--azul-escuro);
  transform: translateY(-1px);
}

.btn-principal {
  width: 100%;
  background: var(--azul);
  color: white;
  padding: 18px 32px;
  font-size: 17px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(26, 140, 255, 0.35);
}

.btn-principal:hover {
  background: var(--azul-escuro);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 140, 255, 0.5);
}

.btn-principal:active {
  transform: translateY(0);
}

.btn-principal:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-grande {
  padding: 22px 48px;
  font-size: 19px;
  width: auto;
  max-width: 400px;
  margin: 16px auto;
}

/* ============== HERO ============== */

.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 140, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-left {
  max-width: 600px;
}

.badge {
  display: inline-block;
  background: var(--azul-claro);
  color: var(--azul-escuro);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.hero-titulo {
  font-size: clamp(36px, 5vw, 60px);
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.hero-subtitulo {
  font-size: 19px;
  line-height: 1.5;
  color: var(--cinza-texto);
  margin-bottom: 32px;
}

.hero-bullets {
  list-style: none;
  margin-bottom: 40px;
}

.hero-bullets li {
  padding: 8px 0;
  font-size: 16px;
  color: var(--cinza-texto);
  font-weight: 500;
}

.hero-prova {
  display: flex;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--cinza-borda);
}

.prova-numero {
  display: flex;
  flex-direction: column;
}

.prova-numero .num {
  font-family: var(--font-titulo);
  font-size: 28px;
  font-weight: 800;
  color: var(--azul);
  line-height: 1;
}

.prova-numero .lab {
  font-size: 13px;
  color: var(--cinza-suave);
  margin-top: 4px;
}

/* Livro mockup */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.livro-mockup {
  position: relative;
  perspective: 1200px;
}

.livro-img {
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: 4px 12px 12px 4px;
  box-shadow:
    -8px 0 0 -2px rgba(0, 0, 0, 0.05),
    -4px 0 0 -1px rgba(0, 0, 0, 0.05),
    var(--sombra-livro);
  transform: rotateY(-8deg) rotateX(2deg);
  transition: transform 0.5s var(--easing);
}

.livro-mockup:hover .livro-img {
  transform: rotateY(-4deg) rotateX(1deg) scale(1.02);
}

/* ============== FORM SECTION ============== */

.form-section {
  padding: 60px 0;
  position: relative;
}

.form-wrapper {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--cinza-borda);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: var(--sombra-lg);
  position: relative;
}

.form-wrapper::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--azul) 0%, transparent 50%, var(--azul) 100%);
  border-radius: 26px;
  z-index: -1;
  opacity: 0.3;
}

.form-header {
  text-align: center;
  margin-bottom: 32px;
}

.form-header h2 {
  font-size: 32px;
  margin-bottom: 8px;
}

.form-header p {
  color: var(--cinza-texto);
  font-size: 16px;
}

.campo {
  margin-bottom: 20px;
}

.campo label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--preto);
  margin-bottom: 8px;
}

.campo input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--cinza-borda);
  border-radius: 10px;
  font-family: var(--font-corpo);
  font-size: 16px;
  background: var(--bg);
  color: var(--preto);
  transition: all 0.2s var(--easing);
}

.campo input:focus {
  outline: none;
  border-color: var(--azul);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(26, 140, 255, 0.15);
}

.campo input.invalid {
  border-color: var(--vermelho);
}

.erro {
  display: block;
  font-size: 13px;
  color: var(--vermelho);
  margin-top: 6px;
  min-height: 18px;
}

.hint {
  display: block;
  font-size: 13px;
  color: var(--cinza-suave);
  margin-top: 6px;
}

.form-footer {
  text-align: center;
  font-size: 13px;
  color: var(--cinza-suave);
  margin-top: 16px;
}

/* ============== SECTION HEADERS ============== */

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.section-header p {
  font-size: 18px;
  color: var(--cinza-texto);
}

/* ============== CONTEÚDO (5 partes) ============== */

.conteudo {
  padding: var(--gap-secao) 0;
  background: var(--bg-card);
}

html.dark .conteudo {
  background: var(--bg);
}

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

.part-card {
  background: var(--bg);
  border: 1px solid var(--cinza-borda);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s var(--easing);
  position: relative;
  overflow: hidden;
}

html.dark .part-card {
  background: var(--bg-card);
}

.part-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-lg);
  border-color: var(--azul);
}

.part-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--azul);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--easing);
}

.part-card:hover::before {
  transform: scaleX(1);
}

.part-num {
  font-family: var(--font-titulo);
  font-size: 56px;
  font-weight: 800;
  color: var(--azul);
  line-height: 1;
  display: block;
  margin-bottom: 12px;
}

.part-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.part-card p {
  color: var(--cinza-texto);
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.6;
}

.part-caps {
  font-size: 13px;
  color: var(--cinza-suave);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.part-card-bonus {
  background: linear-gradient(135deg, var(--azul-claro), var(--bg));
  border-color: var(--azul);
}

html.dark .part-card-bonus {
  background: linear-gradient(135deg, rgba(26, 140, 255, 0.1), var(--bg-card));
}

/* ============== AUTOR ============== */

.autor {
  padding: var(--gap-secao) 0;
  position: relative;
  overflow: hidden;
}

.autor::before {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 140, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.autor-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: center;
  position: relative;
}

.autor-foto {
  position: relative;
}

.autor-img {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 20px;
  box-shadow: var(--sombra-lg);
}

.autor-texto h2 {
  font-size: 48px;
  margin-bottom: 4px;
}

.autor-texto h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--azul);
  margin-bottom: 24px;
}

.autor-texto p {
  font-size: 17px;
  color: var(--cinza-texto);
  line-height: 1.7;
  margin-bottom: 20px;
}

.autor-frase {
  font-family: var(--font-titulo);
  font-style: italic;
  font-size: 24px !important;
  color: var(--azul) !important;
  font-weight: 500;
  border-left: 4px solid var(--azul);
  padding-left: 20px;
  margin-top: 32px !important;
}

/* ============== DEPOIMENTOS ============== */

.depoimentos {
  padding: var(--gap-secao) 0;
  background: var(--bg-card);
}

html.dark .depoimentos {
  background: var(--bg);
}

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

.depo-card {
  background: var(--bg);
  border: 1px solid var(--cinza-borda);
  border-radius: 16px;
  padding: 32px;
  position: relative;
}

html.dark .depo-card {
  background: var(--bg-card);
}

.depo-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: var(--font-titulo);
  font-size: 80px;
  color: var(--azul);
  opacity: 0.15;
  line-height: 1;
}

.depo-texto {
  font-size: 16px;
  color: var(--preto);
  line-height: 1.6;
  margin-bottom: 24px;
  font-style: italic;
  position: relative;
  z-index: 1;
}

.depo-pessoa {
  border-top: 1px solid var(--cinza-borda);
  padding-top: 16px;
}

.depo-pessoa strong {
  display: block;
  color: var(--preto);
  font-size: 15px;
}

.depo-pessoa span {
  display: block;
  color: var(--cinza-suave);
  font-size: 13px;
  margin-top: 2px;
}

/* ============== CTA FINAL ============== */

.cta-final {
  padding: var(--gap-secao) 0;
  text-align: center;
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-escuro) 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-final::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
}

.cta-final h2 {
  color: white;
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 16px;
}

.cta-final p {
  font-size: 19px;
  opacity: 0.95;
  margin-bottom: 32px;
}

.cta-final .btn-principal {
  background: white;
  color: var(--azul-escuro);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta-final .btn-principal:hover {
  background: var(--bg);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.cta-prova {
  margin-top: 32px;
  font-size: 14px;
  opacity: 0.85;
}

/* ============== FOOTER ============== */

.footer {
  background: var(--preto);
  color: var(--cinza-texto);
  padding: 64px 0 32px;
}

html.dark .footer {
  background: var(--bg-card);
  border-top: 1px solid var(--cinza-borda);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .logo-text-fallback {
  color: white;
  margin-bottom: 12px;
  display: inline-flex;
  font-family: var(--font-titulo);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  gap: 4px;
}

html.dark .footer-brand .logo-text-fallback {
  color: var(--preto);
}

.footer-brand .logo-text-fallback span:first-child {
  color: white;
}

html.dark .footer-brand .logo-text-fallback span:first-child {
  color: var(--preto);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  margin-top: 8px;
}

html.dark .footer-brand p {
  color: var(--cinza-suave);
}

.footer-links h4 {
  color: white;
  font-size: 15px;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

html.dark .footer-links h4 {
  color: var(--preto);
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  transition: color 0.2s var(--easing);
}

html.dark .footer-links a {
  color: var(--cinza-texto);
}

.footer-links a:hover {
  color: var(--azul);
}

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 32px;
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

html.dark .footer-bottom {
  border-color: var(--cinza-borda);
  color: var(--cinza-suave);
}

/* ============== LOADING OVERLAY ============== */

.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 26, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  text-align: center;
  color: white;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============== RESPONSIVE ============== */

@media (max-width: 968px) {
  :root {
    --gap-secao: 64px;
  }

  .nav a:not(.btn) {
    display: none;
  }

  .hero {
    padding: 48px 0 32px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-left {
    max-width: 100%;
  }

  .hero-bullets {
    text-align: left;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-prova {
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
  }

  .hero-titulo {
    font-size: 36px;
  }

  .livro-img {
    max-width: 280px;
  }

  .form-wrapper {
    padding: 32px 24px;
  }

  .autor-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .autor-foto {
    display: flex;
    justify-content: center;
  }

  .autor-img {
    max-width: 220px;
  }

  .autor-frase {
    text-align: left;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    --pad-x: 16px;
  }

  .topbar-inner {
    height: 130px;
  }

  .logo-img {
    height: 110px;
    max-width: 320px;
  }

  .logo-img-footer {
    height: 130px;
    max-width: 380px;
  }

  .logo-text-fallback {
    font-size: 22px;
  }

  .hero-titulo {
    font-size: 32px;
  }

  .hero-subtitulo {
    font-size: 16px;
  }

  .form-wrapper {
    padding: 24px 20px;
  }

  .form-header h2 {
    font-size: 24px;
  }

  .part-card {
    padding: 24px;
  }
}
