/* ============================================================
   Julia Chagas — Psicóloga
   Sistema de design: Editorial dark com textura rústica
   ============================================================ */

:root {
  /* Paleta — Dark mode (default) */
  --bg: #15141A;
  --bg-2: #1C1B22;
  --bg-3: #25232C;
  --ink: #ECE7DD;
  --ink-2: #C9C2B5;
  --ink-3: #8B8479;
  --line: rgba(236,231,221,.12);
  --line-2: rgba(236,231,221,.22);
  --accent: #B89BD0;               /* lilás da logo */
  --accent-2: #E8A53D;              /* amarelo da logo */
  --accent-3: #7FA66B;              /* verde da logo */
  --paper: #E8E4DC;
  --paper-warm: #DDD5C4;
  --rust: #8C5A3A;

  /* Tipografia */
  --serif: "Fraunces", "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --serif-alt: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "EB Garamond", "Cormorant Garamond", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  /* Espaçamento */
  --pad-x: clamp(20px, 5vw, 80px);
  --maxw: 1440px;
}

[data-theme="light"] {
  --bg: #F5F1E9;
  --bg-2: #EDE8DD;
  --bg-3: #E2DBCD;
  --ink: #1A1A1F;
  --ink-2: #3D3936;
  --ink-3: #6B655C;
  --line: rgba(26,26,31,.12);
  --line-2: rgba(26,26,31,.25);
  --paper: #1A1A1F;
  --paper-warm: #25232C;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  font-style: normal;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .6s ease, color .6s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: 0; color: inherit; }

/* Grão sutil sobre tudo */
.grain::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Tipografia base */
.display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 0.95;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  text-wrap: balance;
}
.display em {
  font-style: normal;
  color: var(--accent);
  font-weight: 600;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .4; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.2); }
}

/* Seções */
section { position: relative; z-index: 2; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }
.divider {
  height: 1px; background: var(--line);
  max-width: var(--maxw); margin: 0 auto;
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: transform .3s ease, background .3s ease, color .3s ease;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--line-2);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn .arrow {
  transition: transform .3s ease;
}
.btn:hover .arrow { transform: translateX(4px); }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal-stagger.in > * {
  opacity: 1; transform: none;
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .15s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .25s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .35s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .45s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .55s; }

/* Marquee */
.marquee {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  animation: scroll 38s linear infinite;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* SVG dashed/textured borders */
.crop {
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.crop::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: inherit;
  pointer-events: none;
}

/* Scroll smooth */
html { scroll-behavior: smooth; }

/* Selection */
::selection { background: var(--accent); color: var(--bg); }

/* CTA section: estende bg cinza pra cobrir padding-bottom do FAQ acima */
.cta-section {
  /* Espaço cinza acima do conteúdo = padding-top + |margin-top| */
  /* Espaço cinza abaixo do conteúdo = padding-bottom */
  /* Centralizar visualmente: padding-top + 160 ≈ padding-bottom */
  padding-top: 60px;
  padding-bottom: 220px;
  margin-top: -160px;
}

/* ============================================================
   Mobile — ajustes globais
   ============================================================ */
@media (max-width: 900px) {
  /* Reduzir padding vertical das seções */
  section { padding-top: clamp(64px, 12vw, 100px) !important; padding-bottom: clamp(64px, 12vw, 100px) !important; }
  /* Hero não tem padding fixo, é tratado no hero.jsx */
  #top { padding-top: 80px !important; padding-bottom: 0 !important; }

  /* CTA: espaço cinza acima (padding-top + |margin-top|) ≈ espaço abaixo (padding-bottom) */
  .cta-section { margin-top: -64px !important; padding-top: 32px !important; padding-bottom: 96px !important; }

  /* Suavizar título grandão do CTA "chegar" */
  body { font-size: 16px; }
}

@media (max-width: 600px) {
  :root { --pad-x: 18px; }
  /* Reduzir gap das colunas/grids dos heads das seções */
  .pq-head, .esp-head, .quiz-head, .proc-head, .blog-head, .faq-head, .sobre-grid {
    gap: 24px !important; margin-bottom: 48px !important;
  }
}
