html {
  scroll-behavior: smooth;
}

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

body {
  font-family: "Inter", sans-serif;
}

.btn-dopamine {
  border: 1px solid rgba(18, 185, 129, 0.45);
  background: #12b981;
  color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(18, 185, 129, 0.28), 0 0 0 1px rgba(18, 185, 129, 0.22);
}

.btn-dopamine:hover {
  transform: translateY(-1px) scale(1.02);
  background: #10a975;
  box-shadow: 0 14px 28px rgba(18, 185, 129, 0.35), 0 0 0 1px rgba(18, 185, 129, 0.4);
}

.btn-dopamine:focus-visible {
  outline: 2px solid rgba(18, 185, 129, 0.7);
  outline-offset: 2px;
}

.launch-badge {
  border: 1px solid rgba(16, 185, 129, 0.55);
  background: linear-gradient(120deg, rgba(16, 185, 129, 0.22), rgba(52, 211, 153, 0.1));
  color: #6ee7b7 !important;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2), 0 6px 20px rgba(16, 185, 129, 0.2);
}

.book-cover-aura {
  box-shadow: 0 20px 45px rgba(6, 12, 35, 0.55), 0 0 35px rgba(13, 148, 136, 0.32), 0 0 65px rgba(59, 130, 246, 0.22);
}

.book-cover-aura:hover {
  box-shadow: 0 24px 52px rgba(6, 12, 35, 0.6), 0 0 45px rgba(16, 185, 129, 0.36), 0 0 75px rgba(59, 130, 246, 0.28);
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.switch-track {
  position: relative;
  width: 62px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid #a8b1c4;
  background: transparent;
  transition: all 0.25s ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  display: flex;
  height: 26px;
  width: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #8893aa;
  color: #e2e8f0;
  font-size: 14px;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.theme-switch[data-state="on"] .switch-track {
  border-color: #2f5fe3;
  background: #2f5fe3;
}

.theme-switch[data-state="on"] .switch-thumb {
  transform: translateX(28px);
  background: #eef4ff;
  color: #2f5fe3;
}

.theme-switch:focus-visible .switch-track {
  outline: 2px solid rgba(18, 185, 129, 0.7);
  outline-offset: 2px;
}

body[data-theme="light"] {
  background: #f4f7fb;
  color: #0f172a;
}

body[data-theme="light"] .bg-navy,
body[data-theme="light"] .bg-\[\#0A1020\],
body[data-theme="light"] .bg-\[\#0D162A\] {
  background-color: #f4f7fb !important;
}

body[data-theme="light"] .bg-graphite {
  background-color: #ffffff !important;
}

body[data-theme="light"] .from-\[\#111B31\],
body[data-theme="light"] .to-\[\#0D162A\] {
  --tw-gradient-from: #e2e8f0 var(--tw-gradient-from-position) !important;
  --tw-gradient-to: #cbd5e1 var(--tw-gradient-to-position) !important;
}

body[data-theme="light"] .text-white,
body[data-theme="light"] .text-slate-100,
body[data-theme="light"] .text-slate-200 {
  color: #0f172a !important;
}

body[data-theme="light"] .text-slate-300,
body[data-theme="light"] .text-slate-400 {
  color: #475569 !important;
}

body[data-theme="light"] .border-white\/10,
body[data-theme="light"] .border-white\/15,
body[data-theme="light"] .border-white\/20 {
  border-color: #cbd5e1 !important;
}

body[data-theme="light"] .bg-navy\/90 {
  background-color: rgba(244, 247, 251, 0.9) !important;
}

body[data-theme="light"] .btn-dopamine {
  border-color: rgba(18, 185, 129, 0.45);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.22), 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.faq-accordion .faq-item {
  overflow: hidden;
}

/* Sanfona: minmax(0, …) evita min-size "auto" do track (0fr sozinho deixa uma linha visível em alguns engines) */
.faq-panel {
  display: grid;
  grid-template-rows: minmax(0, 0fr);
  overflow: hidden;
  transition: grid-template-rows 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-panel > .faq-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.faq-item.is-open .faq-panel {
  grid-template-rows: minmax(0, 1fr);
}

@media (prefers-reduced-motion: reduce) {
  .faq-panel {
    transition-duration: 0.01ms;
  }

  .faq-item .faq-chevron {
    transition-duration: 0.01ms;
  }
}

.faq-item .faq-chevron {
  display: inline-block;
  transition: transform 0.25s ease;
  font-size: 0.65rem;
  line-height: 1;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(-180deg);
}

.faq-item.is-open {
  border-color: rgba(18, 185, 129, 0.45);
  box-shadow: 0 0 0 1px rgba(18, 185, 129, 0.15);
}

body[data-theme="light"] .faq-item.is-open {
  border-color: rgba(5, 150, 105, 0.4);
}

.section-cta-newsletter .newsletter-card input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Newsletter: fundo escuro fixo + texto forçado ao claro global = contraste ruim; no claro vira “ilha” destacada */
body[data-theme="light"] .section-cta-newsletter {
  background: linear-gradient(165deg, #ecfdf5 0%, #f4f7fb 42%, #e2e8f0 100%);
  border-color: rgba(16, 185, 129, 0.35) !important;
}

body[data-theme="light"] .section-cta-newsletter .newsletter-bg-dark {
  display: none;
}

body[data-theme="light"] .section-cta-newsletter .newsletter-card {
  background: #ffffff !important;
  box-shadow:
    0 22px 50px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(15, 23, 42, 0.06);
}

body[data-theme="light"] .section-cta-newsletter .newsletter-card input {
  background: rgba(248, 250, 252, 0.95);
  color: #0f172a;
  border-color: #cbd5e1;
}

body[data-theme="light"] .section-cta-newsletter .newsletter-card input::placeholder {
  color: #64748b;
}

body[data-theme="light"] .launch-badge {
  border-color: rgba(5, 150, 105, 0.45);
  background: linear-gradient(120deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.12));
  color: #047857 !important;
  box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.18), 0 6px 16px rgba(16, 185, 129, 0.16);
}

body[data-theme="light"] .book-cover-aura {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16), 0 0 32px rgba(16, 185, 129, 0.2), 0 0 56px rgba(59, 130, 246, 0.16);
}

.newsletter-success-dialog {
  margin: auto;
}

.newsletter-success-dialog::backdrop {
  background: rgba(2, 8, 23, 0.72);
  backdrop-filter: blur(6px);
}

body[data-theme="light"] .newsletter-success-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
