/* ==========================================================================
   E-Fisica Contabilidade — effects.css
   Estilos dos efeitos portados do React Bits (comportamento em effects.js).
   Com prefers-reduced-motion, a regra global de styles.css desliga
   animações e transições; os ajustes específicos ficam no fim do arquivo.
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

/* Threads — linhas em WebGL sobre o lado azul */
.hero > .container { position: relative; z-index: 1; }
.threads {
  position: absolute;
  top: 0; left: 0;
  z-index: 0;
  width: 100%;
  height: min(calc(100% - var(--overlap)), 100svh);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 50%, transparent 92%);
          mask-image: linear-gradient(90deg, #000 0%, #000 50%, transparent 92%);
}
.threads.is-ready { opacity: .75; }
@media (max-width: 767px) {
  .threads { -webkit-mask-image: none; mask-image: none; }
  .threads.is-ready { opacity: .4; }
}

/* CircularText — anel de texto girando em volta do logo */
.logo-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  aspect-ratio: 1;
  color: rgb(255 255 255 / .9);
  cursor: default;
}
.logo-orbit .logo--hero { width: 60px; height: 69px; }
.orbit__ring {
  position: absolute;
  inset: 0;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  will-change: transform;
}
.orbit__char {
  position: absolute;
  left: 50%; top: 0;
  width: 1.2em;
  height: 50%;
  margin-left: -.6em;
  text-align: center;
  transform-origin: 50% 100%;
}
@media (min-width: 768px) {
  .logo-orbit { width: 200px; }
  .logo-orbit .logo--hero { width: 92px; height: 105px; }
  .orbit__ring { font-size: 13.5px; }
}

/* SplitText — título letra a letra */
.is-split .split__word { display: inline-block; white-space: nowrap; }
.split__char {
  display: inline-block;
  animation: split-in .85s var(--ease-out) both;
  animation-delay: calc(.12s + var(--i) * 24ms);
}
@keyframes split-in { from { opacity: 0; transform: translateY(.55em) rotate(5deg); } }
/* evita o “piscar” do título antes do JS quebrar as letras */
@media (scripting: enabled) {
  [data-split]:not(.is-split) { opacity: 0; animation: split-fallback 0s 2s forwards; }
}
@keyframes split-fallback { to { opacity: 1; } }

/* RotatingText — serviço que troca dentro do selo branco */
.hero__rotate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 16px;
  font-size: var(--fs-t1);
  font-weight: 500;
}
.rotate {
  display: inline-flex;
  overflow: hidden;
  padding: .14em .55em;
  border-radius: 6px;
  background: var(--white);
  color: var(--blue);
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 8px 22px -12px rgb(0 0 0 / .45);
}
.rotate__word { display: inline-flex; white-space: pre; }
.rotate__char {
  display: inline-block;
  animation: rot-in .55s var(--ease-out) both;
  animation-delay: calc(var(--i) * 18ms);
}
.rotate__word.is-out .rotate__char {
  animation: rot-out .3s cubic-bezier(.55, 0, 1, .45) forwards;
  animation-delay: calc(var(--i) * 8ms);
}
@keyframes rot-in { from { opacity: 0; transform: translateY(110%); } }
@keyframes rot-out { to { opacity: 0; transform: translateY(-120%); } }

/* Magnet — botão flutuante do WhatsApp puxa na direção do cursor */
.wa-float[data-magnet] { transition: transform .3s var(--ease-out), translate .5s var(--ease-out); }
[data-magnet].is-pulled { transition-duration: .25s, .2s; }

/* ==========================================================================
   TEXTO
   ========================================================================== */

/* ShinyText */
.shiny {
  background: linear-gradient(110deg, currentColor 38%, #b4b9f4 50%, currentColor 62%) 0 0 / 250% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shiny 3.2s linear infinite;
}
@keyframes shiny {
  from { background-position: 100% 0; }
  to { background-position: -150% 0; }
}

/* BlurText — títulos de seção palavra a palavra */
.blur__word { display: inline-block; }
.blur-ready .blur__word { opacity: 0; }
.blur-in .blur__word {
  animation: blur-in .9s var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 85ms);
}
.blur-done .blur__word { opacity: 1; }
@keyframes blur-in {
  0% { opacity: 0; filter: blur(10px); transform: translateY(-.45em); }
  50% { opacity: .5; filter: blur(5px); transform: translateY(.06em); }
  100% { opacity: 1; filter: blur(0); transform: none; }
}

/* ScrollReveal — palavras acendem conforme a rolagem */
.sr__word { opacity: var(--o, .14); transition: opacity .25s linear; }

/* ==========================================================================
   SCROLL VELOCITY — faixa de serviços
   ========================================================================== */
.velocity {
  padding-block: clamp(28px, 4vw, 44px);
  border-block: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
}
.velocity__row { overflow: hidden; }
.velocity__row + .velocity__row { margin-top: clamp(6px, 1vw, 12px); }
.velocity__track {
  display: flex;
  align-items: center;
  width: max-content;
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 1.1rem + 3vw, 4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  white-space: nowrap;
  will-change: transform;
}
.velocity__item { flex: none; color: var(--ink); }
.velocity__row--alt .velocity__item { color: transparent; -webkit-text-stroke: 1.5px var(--blue); }
.velocity__sep {
  flex: none;
  width: .62em;
  aspect-ratio: 1;
  margin-inline: .45em;
  background: var(--blue);
  -webkit-mask: url("img/asterisco.svg") center / contain no-repeat;
          mask: url("img/asterisco.svg") center / contain no-repeat;
}
.velocity__row--alt .velocity__sep { background: var(--lilac); }

/* ==========================================================================
   COUNTER — dígitos que rolam
   ========================================================================== */
.roll { display: inline-flex; align-items: flex-start; }
.roll__affix { line-height: 1.1em; }
.roll__digit { display: inline-block; height: 1.1em; overflow: hidden; }
.roll__strip {
  display: flex;
  flex-direction: column;
  transition: transform 2s cubic-bezier(.16, 1, .3, 1);
  transition-delay: calc(var(--d) * 140ms);
}
.roll__strip > span { height: 1.1em; line-height: 1.1em; text-align: center; }

/* ==========================================================================
   CARDS
   ========================================================================== */

/* SpotlightCard — pilares */
[data-spotlight] { isolation: isolate; }
[data-spotlight] > :not(.spot-wrap) { position: relative; z-index: 1; }
.spot-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.spot {
  position: absolute;
  left: 0; top: 0;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--blue-rgb) / .13) 0%, rgb(var(--blue-rgb) / 0) 65%);
  opacity: 0;
  transform: translate(calc(var(--sx, 0px) - 160px), calc(var(--sy, 0px) - 160px));
  transition: opacity .35s var(--ease-out);
}
[data-spotlight].is-lit .spot { opacity: 1; }

/* GlareHover — brilho que atravessa as fotos */
/* :where() mantém a especificidade zero: as fotos já posicionadas (why__img-*, stack__*) seguem absolutas */
:where(.glare) { position: relative; }
.glare { isolation: isolate; overflow: hidden; border-radius: var(--radius); }
.glare > .media { width: 100%; height: 100%; transition: transform .9s var(--ease-out); }
.glare::after {
  content: "";
  position: absolute;
  inset: -60%;
  z-index: 1;
  background: linear-gradient(115deg, transparent 42%, rgb(255 255 255 / .5) 50%, transparent 58%);
  transform: translateX(-75%);
  pointer-events: none;
}
@media (hover: hover) {
  .glare:hover::after { transform: translateX(75%); transition: transform 1s var(--ease-out); }
  .glare:hover > .media { transform: scale(1.04); }
}

/* BorderGlow — formulário */
[data-border-glow] { position: relative; isolation: isolate; --bx: 50%; --by: 0%; --bo: 0; }
[data-border-glow]::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 2;
  padding: 2px;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--bx) var(--by),
    rgb(138 145 230 / var(--bo)) 0%,
    rgb(var(--blue-rgb) / calc(var(--bo) * .85)) 25%,
    transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

/* DotGrid — fundo interativo do FAQ */
.faq { overflow: hidden; }
.dot-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ==========================================================================
   NAV — PillNav (desktop) e StaggeredMenu (mobile)
   ========================================================================== */
.pill__stack { position: relative; display: block; overflow: hidden; }
.pill__label { display: block; }

@media (min-width: 1024px) {
  .nav__list { gap: 4px; }
  .nav__link {
    isolation: isolate;
    overflow: hidden;
    padding: 8px 16px;
    border-radius: 999px;
  }
  .pill__circle {
    position: absolute;
    z-index: -1;
    left: 50%;
    bottom: -8px;
    width: 150%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--white);
    transform: translate(-50%, 100%) scale(.3);
    transition: transform .5s var(--ease-out);
  }
  .nav.is-scrolled .pill__circle { background: var(--blue); }
  .pill__label { transition: transform .45s var(--ease-out); }
  .pill__label--hover { position: absolute; inset: 0; color: var(--blue); transform: translateY(115%); }
  .nav.is-scrolled .pill__label--hover { color: var(--white); }
  .nav__link:hover .pill__circle,
  .nav__link:focus-visible .pill__circle { transform: translate(-50%, 22%) scale(1.15); }
  .nav__link:hover .pill__label:not(.pill__label--hover),
  .nav__link:focus-visible .pill__label:not(.pill__label--hover) { transform: translateY(-115%); }
  .nav__link:hover .pill__label--hover,
  .nav__link:focus-visible .pill__label--hover { transform: none; }

  /* link ativo: ponto embaixo da pílula */
  .nav__link::after {
    left: 50%;
    bottom: 3px;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    transform: scale(0);
    transform-origin: 50% 50%;
  }
  .nav__link:hover::after { transform: scale(0); }
  .nav__link[aria-current]::after { transform: scale(1); }
}

@media (max-width: 1023px) {
  .pill__circle, .pill__label--hover { display: none; }

  .menu-layer {
    position: fixed;
    top: var(--header-h); right: 0; bottom: 0; left: 0;
    transform: translateX(100%);
    transition: transform .5s var(--ease-out);
  }
  .menu-layer--1 { background: var(--lilac); transition-delay: .1s; }
  .menu-layer--2 { background: var(--blue); transition-delay: .05s; }
  .nav.is-open .menu-layer { transform: none; }
  .nav.is-open .menu-layer--1 { transition-delay: 0s; }
  .nav.is-open .menu-layer--2 { transition-delay: .07s; }

  .nav__menu {
    opacity: 1;
    transform: translateX(100%);
    transition: transform .45s var(--ease-out), visibility 0s .45s;
  }
  .nav.is-open .nav__menu { transform: none; transition: transform .55s var(--ease-out) .14s; }

  .nav__list { counter-reset: menu; }
  .nav__list li { position: relative; overflow: hidden; counter-increment: menu; }
  .nav__list li::after {
    content: counter(menu, decimal-leading-zero);
    position: absolute;
    right: 0; top: 20px;
    color: var(--blue);
    font-size: .75rem;
    font-weight: 600;
    opacity: .7;
  }
  .nav__list .pill__stack {
    transform: translateY(125%) rotate(6deg);
    transform-origin: 0 100%;
    transition: transform .3s var(--ease-out);
  }
  .nav.is-open .nav__list .pill__stack {
    transform: none;
    transition: transform .6s var(--ease-out);
    transition-delay: calc(.32s + var(--i, 0) * 60ms);
  }
  .nav__cta { opacity: 0; transform: translateY(16px); transition: opacity .2s, transform .3s var(--ease-out); }
  .nav.is-open .nav__cta { opacity: 1; transform: none; transition: opacity .4s .7s, transform .5s var(--ease-out) .7s; }
}

/* ==========================================================================
   STICKY SCROLL REVEAL — especialidades (inspirado no Aceternity UI)
   Texto rola à esquerda; painel fixo à direita troca de foto.
   No celular cada item mostra a própria foto, empilhado.
   ========================================================================== */
.esp__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity .8s var(--ease-out);
}
.esp__bg.is-active { opacity: 1; }
.esp__bg--0 { background: var(--white); }
.esp__bg--1 { background: #f2f3fd; }
.esp__bg--2 { background: var(--gray-50); }
.esp__bg--3 { background: #eef0fb; }

.esp__grid { display: grid; gap: 56px; }
.esp__steps { display: grid; gap: 64px; }
.esp__panel { display: none; }

.esp-step__media { width: 100%; height: auto; aspect-ratio: 16 / 10; margin-bottom: 24px; }
.esp-step__tag {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--blue);
  font-family: var(--font-head);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.esp-step__num {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  letter-spacing: .04em;
}
.esp-step__title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
}
.esp-step__body { display: grid; gap: 16px; margin-top: 20px; }
.esp-step .t2 { color: var(--muted); }
.esp-step .esp-step__lead { color: var(--ink); font-weight: 500; }
.esp-checks { display: grid; gap: 10px; }
.esp-check { display: flex; align-items: flex-start; gap: 12px; font-weight: 500; line-height: 1.4; }
.esp-check .ico { color: var(--blue); }
.esp-step__btn { justify-self: start; margin-top: 6px; }

@media (min-width: 960px) {
  .esp { --card-h: min(70vh, 580px); }
  .esp__grid { grid-template-columns: 1fr 1fr; gap: 72px; }
  .esp__steps { gap: 0; }
  .esp-step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 74vh;
    padding-block: 6vh;
    opacity: .25;
    transition: opacity .5s var(--ease-out);
  }
  .esp-step.is-active { opacity: 1; }
  .esp-step__media { display: none; }

  .esp__panel { display: block; }
  .esp__sticky {
    position: sticky;
    top: calc(var(--header-h) + (100vh - var(--header-h) - var(--card-h)) / 2);
    height: var(--card-h);
  }
  .esp-card {
    position: absolute;
    inset: 0 0 52px;
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--navy);
    box-shadow: var(--shadow-float);
    opacity: 0;
    transform: translateY(32px) scale(.97);
    transition: opacity .55s var(--ease-out), transform .75s var(--ease-out);
  }
  .esp-card.is-past { transform: translateY(-32px) scale(.97); }
  .esp-card.is-active { opacity: 1; transform: none; }
  .esp-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(200deg, rgb(var(--blue-rgb) / .12) 0%, rgb(var(--blue-rgb) / .55) 55%, rgb(10 14 63 / .92) 100%);
  }
  .esp-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
    transform: scale(1.08);
    transition: transform 1.4s var(--ease-out);
  }
  .esp-card.is-active .esp-card__img { transform: none; }
  .esp-card__caption {
    position: absolute;
    left: 28px; right: 28px; bottom: 26px;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: center;
    color: var(--white);
  }
  .esp-card__icon {
    grid-row: 1 / 3;
    width: 58px;
    height: 58px;
    padding: 13px;
    border-radius: 14px;
    background: rgb(255 255 255 / .14);
    stroke-width: 1.5;
  }
  .esp-card__num { font-family: var(--font-head); font-size: .8125rem; font-weight: 600; letter-spacing: .14em; opacity: .8; }
  .esp-card__tag { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; line-height: 1.2; }

  .esp__progress {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 32px;
    color: var(--blue);
    font-family: var(--font-head);
    font-size: .875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .esp__track { flex: 1; height: 2px; border-radius: 2px; background: rgb(var(--blue-rgb) / .15); overflow: hidden; }
  .esp__bar {
    display: block;
    height: 100%;
    background: var(--blue);
    transform: scaleX(.25);
    transform-origin: 0 50%;
    transition: transform .5s var(--ease-out);
  }
}

/* ==========================================================================
   CLICK SPARK
   ========================================================================== */
.click-spark {
  position: fixed;
  inset: 0;
  z-index: 90;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ==========================================================================
   MOVIMENTO REDUZIDO — estados finais e estáticos
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .threads { display: none; }
  [data-split]:not(.is-split) { opacity: 1; }
  .blur-ready .blur__word { opacity: 1; }
  .sr__word { opacity: 1; }
  .nav__list .pill__stack, .nav__cta { transform: none; opacity: 1; }
}
