/*
  web/assets/css/style.css
  Sistema de design da landing page da Sonari.

  Organização:
    1. Tokens (cores, tipografia, espaçamento)
    2. Reset e base
    3. Layout e utilitários
    4. Componentes (header, hero, cards, chat mock, depoimentos, faq, footer)
    5. Animações
    6. Responsivo (mobile-first; ajustes em >=768px e >=1080px)
*/

/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
  /* Paleta da marca — extraída do gradiente da logo (lua) e da estrela */
  --green-100: #eaf3ee;
  --green-200: #cfe3d8;
  --green-300: #9ecab0;
  --green-400: #5fa980;
  --green-600: #3e7a5e;
  --green-700: #336350;
  --green-800: #2c5f49;
  --green-900: #1b3a2c;

  --gold-300: #f3d18f;
  --gold-400: #efc069;
  --gold-500: #e5a83b;
  --gold-600: #c98f2a;

  --cream: #fbf9f4;
  --white: #ffffff;

  --ink: #1b3a2c;
  --ink-muted: #56675e;
  --ink-soft: #7c8c83;

  --moon-gradient: linear-gradient(135deg, var(--green-400) 0%, var(--green-800) 100%);
  --gold-gradient: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-600) 100%);

  /* Tipografia */
  --font-display: "Fredoka", "Nunito Sans", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, sans-serif;

  /* Espaçamento e forma */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-soft: 0 12px 32px -12px rgba(27, 58, 44, 0.22);
  --shadow-card: 0 8px 24px -10px rgba(27, 58, 44, 0.16);
  --container-width: 1120px;
}

/* ============================================================
   2. RESET E BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--green-900);
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 480px) {
  .container { padding: 0 24px; }
}

.section {
  padding: 72px 0;
}

.section--tight { padding: 48px 0; }

.section--alt {
  background: var(--green-100);
}

.section--dark {
  background: var(--green-900);
  color: var(--cream);
}
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark .eyebrow { color: var(--gold-400); }
.section--dark p { color: rgba(251, 249, 244, 0.82); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 14px;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-head p {
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   3. BOTÕES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--green-900);
  color: var(--cream);
  box-shadow: var(--shadow-soft);
}
.btn--primary:hover { background: var(--green-800); }

.btn--gold {
  background: var(--gold-gradient);
  color: var(--green-900);
  box-shadow: 0 10px 26px -10px rgba(201, 143, 42, 0.55);
}
.btn--gold:hover { filter: brightness(1.04); }

.btn--ghost {
  background: transparent;
  color: var(--green-900);
  border: 1.5px solid var(--green-300);
}
.btn--ghost:hover { background: var(--green-100); }

.btn--block { width: 100%; }

.btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.section--dark .btn-note { color: rgba(251, 249, 244, 0.6); }

/* ============================================================
   4. HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 249, 244, 0.88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(27, 58, 44, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand__icon { width: 34px; height: 34px; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--green-900);
  letter-spacing: 0.01em;
}

.site-header .btn { padding: 12px 22px; font-size: 0.92rem; flex-shrink: 0; }

/* Header nunca deve estourar a tela: abaixo de 480px o botão perde o texto
   longo e mostra só "WhatsApp" — visto de verdade num teste em viewport de
   390px, onde "Falar no WhatsApp" cortava a tela. */
.btn--header__short { display: none; }
@media (max-width: 480px) {
  .btn--header__full { display: none; }
  .btn--header__short { display: inline; }
  .site-header .btn--header { padding: 10px 16px; font-size: 0.86rem; }
  .site-header__inner { padding: 12px 16px; }
  .brand__name { font-size: 1.15rem; }
}

/* ============================================================
   5. HERO
   ============================================================ */
.hero {
  padding: 56px 0 72px;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-100);
  color: var(--green-700);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.hero__kicker .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-500);
}

.hero h1 { margin-bottom: 20px; }
.hero h1 .highlight {
  background: var(--moon-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  font-size: 1.14rem;
  color: var(--ink-muted);
  max-width: 52ch;
  margin-bottom: 30px;
}

.hero__cta { display: flex; flex-direction: column; align-items: flex-start; }

.hero__trust {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green-700);
}
.hero__trust-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.hero__visual {
  display: flex;
  justify-content: center;
}

/* ============================================================
   6. MOCK DE CONVERSA NO WHATSAPP (o "gif")
   ============================================================ */
.phone {
  width: 100%;
  max-width: 340px;
  background: var(--green-900);
  border-radius: 40px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.phone__screen {
  background: #e9ddc9;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.35), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(255,255,255,0.25), transparent 40%);
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 520px;
}

.phone__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--green-800);
  color: var(--white);
}
.phone__bar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.phone__bar-avatar img { width: 100%; }
.phone__bar-name { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.phone__bar-status { font-size: 0.72rem; color: var(--green-200); display: flex; align-items: center; gap: 5px; }
.phone__bar-status::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: #6de08a;
  display: inline-block;
}

.phone__chat {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.bubble {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
  opacity: 0;
  transform: translateY(6px);
  animation: bubbleIn 0.35s ease forwards;
}

.bubble--in {
  align-self: flex-start;
  background: var(--white);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.bubble--out {
  align-self: flex-end;
  background: #d9fdd3;
  color: var(--ink);
  border-bottom-right-radius: 4px;
}

.bubble__time {
  display: block;
  margin-top: 4px;
  font-size: 0.66rem;
  color: var(--ink-soft);
  text-align: right;
}

.typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  background: var(--white);
  padding: 11px 14px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  opacity: 0;
  animation: bubbleIn 0.3s ease forwards;
}
.typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-soft);
  animation: typingBounce 1.1s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bubbleIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ============================================================
   7. FAIXA DE CONFIANÇA (logos/selo simples)
   ============================================================ */
.trust-strip {
  padding: 28px 0;
  border-top: 1px solid var(--green-200);
  border-bottom: 1px solid var(--green-200);
}
.trust-strip__row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 36px;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.trust-strip__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green-700);
  font-family: var(--font-display);
}
.trust-strip__item svg { width: 20px; height: 20px; }

/* ============================================================
   8. CARDS DE METODOLOGIA
   ============================================================ */
.method-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-bottom: 40px;
}

.method-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}
.method-card__icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.method-card__icon svg { width: 24px; height: 24px; color: var(--green-700); }
.method-card h3 { margin-bottom: 8px; font-size: 1.08rem; }
.method-card p { color: var(--ink-muted); font-size: 0.95rem; }

.contrast-block {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.contrast-card {
  border-radius: var(--radius-md);
  padding: 26px;
  border: 1.5px solid var(--green-200);
  background: var(--white);
}
.contrast-card--no { border-color: rgba(197, 97, 97, 0.25); }
.contrast-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.contrast-card--no .contrast-card__tag { color: #b25656; }
.contrast-card--yes .contrast-card__tag { color: var(--green-700); }
.contrast-card p { color: var(--ink); font-size: 1rem; }

/* ============================================================
   9. BENEFÍCIOS
   ============================================================ */
.benefit-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.benefit-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 26px;
  text-align: left;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.benefit-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 5px;
  height: 100%;
  background: var(--gold-gradient);
}
.benefit-card__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--green-800);
  margin-bottom: 6px;
}
.benefit-card__label {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--green-900);
}
.benefit-card p { color: var(--ink-muted); font-size: 0.92rem; }

/* ============================================================
   10. DEPOIMENTOS
   ============================================================ */
.testi-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.testi-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.testi-card__stars { display: flex; gap: 3px; }
.testi-card__stars svg { width: 16px; height: 16px; color: var(--gold-500); }
.testi-card p.quote {
  font-size: 0.98rem;
  color: var(--ink);
  flex: 1;
}
.testi-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testi-card__avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}
.testi-card__name { font-weight: 700; font-size: 0.92rem; color: var(--green-900); }
.testi-card__meta { font-size: 0.8rem; color: var(--ink-soft); }

/* ============================================================
   11. FAQ
   ============================================================ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--green-200);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--green-900);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.faq-item summary .plus::before,
.faq-item summary .plus::after {
  content: "";
  position: absolute;
  background: var(--green-700);
  border-radius: 2px;
}
.faq-item summary .plus::before { width: 11px; height: 2px; }
.faq-item summary .plus::after { width: 2px; height: 11px; transition: transform 0.2s ease; }
.faq-item[open] summary .plus::after { transform: rotate(90deg) scaleY(0); }

.faq-item .faq-answer {
  padding: 0 4px 22px;
  color: var(--ink-muted);
  max-width: 68ch;
}

/* ============================================================
   12. CTA FINAL
   ============================================================ */
.final-cta {
  text-align: center;
  padding: 84px 0;
}
.final-cta .container { max-width: 640px; }
.final-cta h2 { margin-bottom: 14px; }
.final-cta p { margin-bottom: 34px; font-size: 1.08rem; }

/* ============================================================
   13. FOOTER
   ============================================================ */
.site-footer {
  background: var(--green-900);
  color: rgba(251, 249, 244, 0.72);
  padding: 44px 0 28px;
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(251, 249, 244, 0.14);
  margin-bottom: 24px;
}
.site-footer .brand__name { color: var(--white); }
.site-footer__tagline {
  font-size: 0.88rem;
  max-width: 320px;
  margin-top: 8px;
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}
.site-footer__links a { font-size: 0.9rem; }
.site-footer__links a:hover { color: var(--white); }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: rgba(251, 249, 244, 0.5);
}

/* ============================================================
   14. REVEAL ON SCROLL
   ============================================================
   Visível por padrão — é o `.reveal` puro (sem JS, JS quebrado, ou o
   IntersectionObserver não disparando por algum motivo) que precisa
   continuar mostrando o conteúdo. Só quando o JS decide, na carga da
   página, que um elemento está fora da tela é que ele ganha
   `.reveal-pending` e passa a depender do scroll para aparecer.
   Ver setupRevealOnScroll em assets/js/main.js. */
.reveal.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.reveal-pending.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   15. PÁGINAS LEGAIS (termos / privacidade)
   ============================================================ */
.legal {
  padding: 56px 0 90px;
}
.legal .container { max-width: 760px; }
.legal__updated {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-bottom: 40px;
}
.legal h2 { margin-top: 2em; font-size: 1.35rem; }
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { margin-top: 1.4em; margin-bottom: 0.5em; font-size: 1.08rem; color: var(--ink); }
.legal p, .legal li { color: var(--ink-muted); }
.legal code {
  background: var(--green-100);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}
.legal ul { padding-left: 1.2em; list-style: disc; margin-bottom: 1em; }
.legal li { margin-bottom: 0.4em; }
.legal .notice {
  background: var(--green-100);
  border-left: 4px solid var(--green-600);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.92rem;
  color: var(--green-800);
  margin-bottom: 36px;
}

/* ============================================================
   16. RESPONSIVO
   ============================================================ */
@media (min-width: 768px) {
  .section { padding: 96px 0; }
  .hero { padding: 76px 0 96px; }
  .hero__cta { flex-direction: row; align-items: center; gap: 20px; }
  .hero__cta .btn-note { margin-top: 0; }
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
  .hero__visual { justify-content: flex-end; }
}
