/* OdontoJourney — animações da subida */

/* ------------------------------------------------ céu que muda com a altitude (--alt: 0 → 1, vem do altímetro) */
.footer-dim-off::before {   /* rodapé: foto original, sem escurecimento por cima */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 10, 30, calc(var(--alt, 0) * .7)) 0%, rgba(3, 10, 30, calc(var(--alt, 0) * .25)) 55%, transparent 80%);
}
.footer .stars {
  position: absolute; left: 0; right: 0; top: 0; height: 46%; pointer-events: none;
  opacity: clamp(0, calc((var(--alt, 0) - .82) * 6), 1);
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent);
}   /* o céu é desenhado em canvas por stars.js */

/* ------------------------------------------------ títulos linha por linha */
.split .ln { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.js-motion .split .ln-i { display: inline-block; transform: translate3d(0, 105%, 0); transition: transform .95s var(--ease); transition-delay: calc(var(--i) * 90ms + 60ms); }
.js-motion .split.is-in .ln-i { transform: none; }
.js-motion .hero h1 .ln-i { transition-delay: calc(var(--i) * 110ms + 200ms); }
.is-loaded .hero h1 .ln-i { transform: none; }

/* header chega no carregamento */
.js-motion .header { opacity: 0; translate: 0 -48px; transition: opacity .7s var(--ease), translate .8s var(--ease), background-color .35s var(--ease); }
.is-loaded .header { opacity: 1; translate: 0 0; }

/* ------------------------------------------------ entradas */
.js-motion .rv { opacity: 0; transform: translate3d(0, 26px, 0); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.js-motion .rv.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------ fotos: parallax interno (o JS move a imagem) */
.o-card .media img { transform: scale(1.1); transition: none; will-change: transform; }
.o-card:hover .media img { transform: scale(1.1); }

/* ------------------------------------------------ sessão 4: lanterna no título + objetos flutuando */
.s4 h2 { background: radial-gradient(circle 360px at var(--sx, 50%) var(--sy, 50%), #f6faf2 0%, #dce4d8 35%, #8c9a80 70%, #546448 100%); -webkit-background-clip: text; background-clip: text; }
.js-motion .s4 h2 { opacity: 0; transition: opacity 1.2s var(--ease); }
.js-motion .s4 h2.is-in { opacity: 1; }
@keyframes drift { from { translate: 0 0; } to { translate: 0 -10px; } }

/* ------------------------------------------------ cume: letras sobem e a bandeira é fincada */
.logo-big .ch { display: inline-block; }
.js-motion .logo-big .ch { opacity: 0; transform: translate3d(0, 28%, 0); transition: opacity .7s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.js-motion .logo-big.is-in .ch { opacity: 1; transform: none; }
.logo-big .j sup { position: relative; display: inline-block; }

/* ------------------------------------------------ botões: brilho que segue o cursor */
.btn-lime, .btn-soft, .btn-forest { position: relative; overflow: hidden; isolation: isolate; }
.btn-lime::after, .btn-soft::after, .btn-forest::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .3s var(--ease);
  background: radial-gradient(90px circle at var(--bx, 50%) var(--by, 50%), rgba(255, 255, 255, .55), transparent 70%);
}
.btn-forest::after { background: radial-gradient(90px circle at var(--bx, 50%) var(--by, 50%), rgba(211, 251, 169, .28), transparent 70%); }
.btn-lime:hover::after, .btn-soft:hover::after, .btn-forest:hover::after { opacity: 1; }

/* ------------------------------------------------ menu Funcionalidades em cascata */
.menu a { opacity: 0; transform: translateY(-6px); transition: opacity .25s var(--ease), transform .25s var(--ease), background-color .2s, color .2s; }
.nav-drop.is-open .menu a { opacity: 1; transform: none; }
.nav-drop.is-open .menu a:nth-child(2) { transition-delay: 40ms; }
.nav-drop.is-open .menu a:nth-child(3) { transition-delay: 80ms; }
.nav-drop.is-open .menu a:nth-child(4) { transition-delay: 120ms; }
.header.menu-open .menu a { opacity: 1; transform: none; }

/* ------------------------------------------------ menos movimento: tudo visível, sem animar */
.no-motion .split .ln-i, .no-motion .rv, .no-motion .logo-big .ch, .no-motion .s4 h2 { opacity: 1 !important; transform: none !important; translate: none !important; transition: none !important; animation: none !important; }
.no-motion .s4 .deco { animation: none; }

.s4 .deco { will-change: transform; }   /* deslize: laço de quadros em motion.js (sem transition, que brigava com a rolagem) */

.no-motion .header, .no-motion .dock { opacity: 1 !important; translate: none !important; }
