/* ============================================================
   Animações modernas — camada extra (não altera style.css)
   ============================================================ */

/* ---------- Fundo de luz (canvas) + grade de pontos ---------- */
#fx-luz { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.95; }
.fx-pontos { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); }
body > section, body > header, body > main, body > footer, body > .marquee { position: relative; z-index: 1; }

/* Seções ficam translúcidas para a luz aparecer por trás */
.dor { background: transparent; }
.servicos, .footer { background: transparent; }
.solucao { background: linear-gradient(150deg, rgba(21,122,56,0.55), rgba(15,61,36,0.25) 70%); }
.marquee { background: rgba(14,42,51,0.6); backdrop-filter: blur(10px); }
.mock-janela { background: rgba(12,36,44,0.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.servico-card, .portfolio-card { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* Transições suaves entre seções (sem linhas duras) */
.hero { -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); }
.solucao { -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 91%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 91%, transparent 100%); }
.sobre-photo { -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%); mask-image: linear-gradient(to bottom, #000 75%, transparent 100%); }
.marquee { border-bottom: none; }
.footer { border-top: none; }

/* Palavra de destaque em serif itálico */
.tsec-title span.w, .cta-meio .tsec-title span.w { color: inherit; }
.tsec-title > span:not(.w) { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; letter-spacing: 0; font-size: 1.1em; }
.tsec-title > span:not(.w) { white-space: nowrap; } /* destaque em itálico nunca se parte entre linhas */

/* ---------- Intro ---------- */
.intro { position: fixed; inset: 0; z-index: 3000; background: #071519; display: flex; align-items: center; justify-content: center; transition: opacity 0.6s ease 0.35s, visibility 0s linear 1s; }
.intro-box { width: 132px; height: 132px; border-radius: 36px; background: #8BF573; display: flex; align-items: center; justify-content: center; animation: introPop 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; transition: transform 0.95s cubic-bezier(0.7, 0, 0.2, 1), border-radius 0.95s; }
.intro-box img { width: 54px; height: 54px; transition: opacity 0.25s; }
@keyframes introPop { from { transform: scale(0.2) rotate(-12deg); border-radius: 66px; } to { transform: scale(1) rotate(0); border-radius: 36px; } }
.intro.sai { opacity: 0; visibility: hidden; }
.intro.sai .intro-box { transform: scale(22); border-radius: 4px; }
.intro.sai .intro-box img { opacity: 0; }

/* ---------- Barra de progresso ---------- */
.fx-progresso { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 2500; background: linear-gradient(90deg, #157A38, #8BF573); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px rgba(139,245,115,0.7); pointer-events: none; }

/* ---------- Entrada do hero ---------- */
.hero-copy > a, .hero-sub { opacity: 0; filter: blur(12px); translate: 0 24px; transition: opacity 1s, filter 1s, translate 1s cubic-bezier(0.22, 1, 0.36, 1); }
.hero-photo { opacity: 0; scale: 1.08; transition: opacity 1.4s ease, scale 1.8s cubic-bezier(0.22, 1, 0.36, 1); transform-origin: 70% 30%; }
body.pronto .hero-copy > a, body.pronto .hero-sub { opacity: 1; filter: none; translate: 0 0; }
body.pronto .hero-sub { transition-delay: 0.55s; }
body.pronto .hero-photo { opacity: 1; scale: 1; }

/* ---------- Títulos palavra a palavra (blur → nítido) ---------- */
.fx-split .w { display: inline-block; opacity: 0; filter: blur(10px); translate: 0 0.45em; transition: opacity 0.8s, filter 0.8s, translate 0.9s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: calc(var(--i) * 55ms); }
.fx-split.vis .w, body.pronto .hero h1.fx-split .w { opacity: 1; filter: none; translate: 0 0; }
body.pronto .hero h1.fx-split .w { transition-delay: calc(150ms + var(--i) * 55ms); }

/* ---------- Parágrafos que acendem com o scroll ---------- */
.fx-scrub .pw { opacity: 0.14; filter: blur(3px); transition: opacity 0.5s ease, filter 0.5s ease; transition-delay: calc(var(--i, 0) * 18ms); }
.fx-scrub.on .pw { opacity: 1; filter: none; }

/* ---------- Revelação genérica ao rolar ---------- */
.rv { opacity: 0; filter: blur(10px); translate: 0 40px; transition: opacity 0.9s ease, filter 0.9s ease, translate 1s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: calc(var(--d, 0) * 90ms); }
.rv.vis { opacity: 1; filter: none; translate: 0 0; }

/* ---------- Mockup em perspectiva (endireita com o scroll) ---------- */
.solucao-mock { perspective: 1400px; }
.mock-janela { transform-origin: 50% 100%; will-change: transform; }

/* ---------- CTA que expande de um bloco ---------- */
.cta-meio { will-change: clip-path; }

/* ---------- Spotlight nos cards ---------- */
.servico-card, .portfolio-card, .dor-card { position: relative; }
.servico-card::after, .portfolio-card::after, .dor-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.35s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(139,245,115,0.16), transparent 60%); }
.dor-card::after { background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(30,154,70,0.16), transparent 60%); }
.servico-card:hover::after, .portfolio-card:hover::after, .dor-card:hover::after { opacity: 1; }
.portfolio-card .print img { transition: scale 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.portfolio-card:hover .print img { scale: 1.05; }

/* ---------- Portfólio em leque ---------- */
.portfolio.fan-on .portfolio-track, .portfolio.fan-on .portfolio-tabs, .portfolio.fan-on .portfolio-nav { display: none; }
.portfolio.fan-on .portfolio-head { justify-content: center; text-align: center; padding-bottom: 20px; }
.fan { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 0 16px 56px; overflow: hidden; }
.fan-stage { position: relative; width: 100%; max-width: 90rem; height: 46rem; display: flex; align-items: center; justify-content: center; touch-action: pan-y; user-select: none; }
.portfolio-card.fan-card { position: absolute; flex: none; width: 430px; opacity: 0; cursor: pointer; background: rgba(12,34,41,0.92); box-shadow: 0 30px 70px rgba(0,0,0,0.5); transition: border-color 0.25s; backdrop-filter: none; -webkit-backdrop-filter: none; contain: layout paint; }
.portfolio-card.fan-card.fora { visibility: hidden; }
.portfolio.fan-on .fan .portfolio-tabs { display: flex; justify-content: center; padding: 0; margin: 0; position: relative; z-index: 30; }
.fan-ctrl { display: flex; align-items: center; gap: 16px; }
.fan-btn { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); backdrop-filter: blur(16px); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color 0.3s, color 0.3s, background 0.3s; }
.fan-btn:hover { border-color: #8BF573; color: #8BF573; }
.fan-btn[data-dir="right"] { background: var(--grad-cta); border: none; color: #0A1F26; box-shadow: 0 10px 30px rgba(139,245,115,0.4); }
.fan-btn[data-dir="right"]:hover { color: #0A1F26; }
.fan-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; max-width: 50vw; }
.fan-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.18); transition: background 0.3s, transform 0.3s; }
.fan-dots span.on { background: #8BF573; transform: scale(1.35); }
@media (max-width: 1023px) { .fan-stage { height: 42rem; } .portfolio-card.fan-card { width: 360px; } }
@media (max-width: 767px) { .portfolio.fan-on .fan .portfolio-tabs { flex-direction: column; align-items: stretch; width: 100%; max-width: 280px; } .portfolio.fan-on .fan .portfolio-tab { text-align: center; } }
@media (max-width: 767px) { .fan-stage { height: 36rem; } .portfolio-card.fan-card { width: 300px; } .portfolio-card.fan-card .nome { font-size: 22px; } }
@media (max-width: 479px) { .fan-stage { height: 32rem; } .portfolio-card.fan-card { width: 260px; } .fan { padding-bottom: 64px; } .fan-dots { display: none; } }

/* ---------- Cursor ---------- */
.fx-cursor { position: fixed; top: 0; left: 0; z-index: 2800; pointer-events: none; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid rgba(139,245,115,0.8); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1), height 0.35s cubic-bezier(0.22, 1, 0.36, 1), margin 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.35s, background 0.3s, border-color 0.3s, opacity 0.3s; opacity: 0; }
.fx-cursor span { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 13px; color: #0A1F26; opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.fx-cursor.on { opacity: 1; }
.fx-cursor.link { width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 18px; background: #8BF573; border-color: #8BF573; }
.fx-cursor.link span { opacity: 1; }
.fx-cursor.ver { width: 86px; height: 86px; margin: -43px 0 0 -43px; border-radius: 26px; background: #8BF573; border-color: #8BF573; }
.fx-cursor.ver span { opacity: 1; }
@media (hover: none), (max-width: 940px) { .fx-cursor { display: none; } }

/* ---------- Acessibilidade ---------- */
@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  .rv, .fx-split .w, .hero-copy > a, .hero-sub, .hero-photo { opacity: 1 !important; filter: none !important; translate: none !important; scale: none !important; transition: none !important; }
  .cta-meio { clip-path: none !important; }
  .mock-janela { transform: none !important; }
}

/* ---------- Ícones animados dos cards de dor ---------- */
.dor-card .icone svg * { transform-box: fill-box; transform-origin: center; }
.ic-site .a-linha { stroke-dasharray: 100; animation: icDesenho 2.6s ease-in-out infinite; }
.ic-site .a-cursor { animation: icPisca 1.1s steps(2, jump-none) infinite; }
.ic-alvo .a-onda { animation: icOnda 2.2s ease-out infinite; }
.ic-alvo .a-onda.o2 { animation-delay: 0.35s; }
.ic-carrinho .a-carro { animation: icCarro 2.4s cubic-bezier(0.45, 0, 0.25, 1) infinite; }
.ic-ia .a-estrela { animation: icEstrela 2.8s ease-in-out infinite; }
.ic-ia .a-brilho { animation: icBrilho 1.4s ease-in-out infinite; }
.ic-marca .a-tinta { animation: icTinta 2.4s ease-in-out infinite; }
.ic-marca .a-tinta:nth-of-type(2) { animation-delay: 0.3s; }
.ic-marca .a-tinta:nth-of-type(3) { animation-delay: 0.6s; }
.dor-card:hover .icone { animation: icPulo 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes icDesenho { 0% { stroke-dashoffset: 100; } 45%, 75% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
@keyframes icPisca { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes icOnda { 0% { transform: scale(0.75); opacity: 0.3; } 50% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(0.75); opacity: 0.3; } }
@keyframes icCarro { 0%, 100% { transform: translateX(0); } 35% { transform: translateX(3px) rotate(-4deg); } 55% { transform: translateX(-1px); } 70% { transform: translateX(0); } }
@keyframes icEstrela { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(0.82) rotate(18deg); } }
@keyframes icBrilho { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.2; transform: scale(0.6); } }
@keyframes icTinta { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.6); } 60% { transform: scale(1); } }
@keyframes icPulo { 50% { transform: translateY(-4px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .dor-card .icone, .dor-card .icone svg * { animation: none !important; } }
