/* ============================================================
   ZP Contabilidade — Reset & Base
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&family=DM+Mono&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: var(--text-body);
}

body {
  font-family: var(--font-body);
  color: var(--color-gray-dark);
  background-color: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: var(--text-body);
}

/* --- Utilitários de container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--padding-desktop);
}

@media (max-width: 1024px) {
  .container { padding-inline: var(--space-4); }
}

@media (max-width: 640px) {
  .container { padding-inline: var(--padding-mobile); }
}

/* --- Skip link (acessibilidade) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-blue-deep);
  color: var(--color-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-size: var(--text-small);
  transition: top var(--transition-fast);
}
.skip-link:focus { top: var(--space-2); }

/* --- Visually hidden (acessibilidade) --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   ANIMAÇÕES
   ============================================================ */

/* Respeita preferência por menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- KEYFRAMES ---- */
@keyframes zp-fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

/* ---- HERO ENTRANCE (CSS puro, roda ao carregar a página) ---- */
.hero-content > *,
.irpf-hero .container > *,
.servicos-hero .container > *,
.noticias-hero .container > *,
.contato-hero .container > * {
  animation: zp-fade-up 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-content > *:nth-child(1),
.irpf-hero .container > *:nth-child(1),
.servicos-hero .container > *:nth-child(1),
.noticias-hero .container > *:nth-child(1),
.contato-hero .container > *:nth-child(1) { animation-delay: 0.05s; }

.hero-content > *:nth-child(2),
.irpf-hero .container > *:nth-child(2),
.servicos-hero .container > *:nth-child(2),
.noticias-hero .container > *:nth-child(2),
.contato-hero .container > *:nth-child(2) { animation-delay: 0.18s; }

.hero-content > *:nth-child(3),
.irpf-hero .container > *:nth-child(3),
.servicos-hero .container > *:nth-child(3),
.noticias-hero .container > *:nth-child(3),
.contato-hero .container > *:nth-child(3) { animation-delay: 0.30s; }

.hero-content > *:nth-child(4),
.irpf-hero .container > *:nth-child(4),
.servicos-hero .container > *:nth-child(4),
.noticias-hero .container > *:nth-child(4),
.contato-hero .container > *:nth-child(4) { animation-delay: 0.44s; }

.hero-content > *:nth-child(5),
.irpf-hero .container > *:nth-child(5),
.noticias-hero .container > *:nth-child(5) { animation-delay: 0.58s; }

.hero-visual {
  animation: zp-fade-up 0.80s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---- SCROLL REVEAL (classe aplicada via JS) ---- */
.zp-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.zp-reveal.in-view {
  opacity: 1;
  transform: none;
}
.zp-reveal[data-delay="1"] { transition-delay: 0.10s; }
.zp-reveal[data-delay="2"] { transition-delay: 0.20s; }
.zp-reveal[data-delay="3"] { transition-delay: 0.30s; }
.zp-reveal[data-delay="4"] { transition-delay: 0.40s; }
.zp-reveal[data-delay="5"] { transition-delay: 0.50s; }
