/* Acabamento premium (21/11/2026): vale para o site, a história e a página de links.
   1. transição entre páginas  2. abertura (uma vez por visita)  3. luz que segue o mouse
   4. estações da história acendendo  5. tipografia, foco e toque */

/* 1. Transição entre páginas (Chrome, Edge e Safari 18.2+; nos outros a troca é normal) */
@view-transition{navigation:auto}
::view-transition-old(root){animation:pc-sai .32s cubic-bezier(.4,0,1,1) both}
::view-transition-new(root){animation:pc-entra .46s cubic-bezier(.2,.7,.2,1) both}
@keyframes pc-sai{to{opacity:0;translate:0 -10px}}
@keyframes pc-entra{from{opacity:0;translate:0 14px}}
.barra .marca{view-transition-name:pc-marca}
::view-transition-group(pc-marca){animation-duration:.5s;animation-timing-function:cubic-bezier(.2,.7,.2,1)}

/* 2. Abertura: a classe .intro entra pelo script do <head> só na primeira página da visita */
@keyframes pc-sobe{from{opacity:0;translate:0 22px}}
@keyframes pc-cortina{from{clip-path:inset(0 0 100% 0);translate:0 .18em}to{clip-path:inset(-10% -4% -12% -4%)}}
@keyframes pc-torre{0%{opacity:0;translate:0 -.5em;scale:.7}70%{opacity:1;translate:0 .02em;scale:1.02}100%{translate:0 0;scale:1}}
@keyframes pc-foto{from{clip-path:inset(8% 8% 8% 8% round 4px);opacity:0;scale:1.04;rotate:-1.4deg}to{clip-path:inset(0 0 0 0 round 0);opacity:1}}
@keyframes pc-placa{from{opacity:0;translate:28px 0}}
@keyframes pc-letra{from{opacity:0;translate:0 .35em;filter:blur(6px)}}
@keyframes pc-ergue{from{opacity:0;translate:0 40px}}
@keyframes pc-cai{0%{opacity:0;translate:0 -26px;rotate:-2deg}70%{opacity:1;translate:0 3px;rotate:.4deg}100%{translate:0 0;rotate:0deg}}

@media (prefers-reduced-motion:no-preference){
  /* site */
  .intro .capa h1{animation:pc-cortina .9s cubic-bezier(.2,.7,.2,1) .1s both}
  .intro .capa h1 svg{animation:pc-torre .8s cubic-bezier(.2,.7,.2,1) .7s both;transform-origin:50% 100%}
  .intro .capa-lead{animation:pc-sobe .7s cubic-bezier(.2,.7,.2,1) .45s both}
  .intro .capa-acoes{animation:pc-sobe .7s cubic-bezier(.2,.7,.2,1) .55s both}
  .intro .capa-pe{animation:pc-sobe .7s cubic-bezier(.2,.7,.2,1) .65s both}
  .intro .capa .retrato{animation:pc-foto 1.1s cubic-bezier(.2,.7,.2,1) .25s both}
  .intro .capa .esmalte{animation:pc-placa .8s cubic-bezier(.2,.7,.2,1) .85s both}
  .intro .barra{animation:pc-sobe .6s cubic-bezier(.2,.7,.2,1) both}
  /* história */
  .intro .hx-topo h1{animation:pc-cortina .9s cubic-bezier(.2,.7,.2,1) .1s both}
  .intro .hx-topo h1 svg{animation:pc-torre .8s cubic-bezier(.2,.7,.2,1) .7s both;transform-origin:50% 100%}
  .intro .hx-resumo{animation:pc-sobe .8s cubic-bezier(.2,.7,.2,1) .5s both}
  .intro .hx-retrato{animation:pc-foto 1.1s cubic-bezier(.2,.7,.2,1) .25s both}
  /* página de links */
  .intro .hero .paris span{animation:pc-letra .8s cubic-bezier(.2,.7,.2,1) both}
  .intro .hero .paris span:nth-child(1){animation-delay:.05s}
  .intro .hero .paris span:nth-child(2){animation-delay:.12s}
  .intro .hero .paris span:nth-child(3){animation-delay:.19s}
  .intro .hero .paris span:nth-child(4){animation-delay:.26s}
  .intro .hero .paris span:nth-child(5){animation-delay:.33s}
  .intro .hero .torre{animation:pc-ergue 1.1s cubic-bezier(.2,.7,.2,1) .2s both}
  .intro .hero .placa{animation:pc-cai .9s cubic-bezier(.2,.7,.2,1) .75s both}
  .intro .hero .horas,.intro .hero .langs,.intro .hero .tiktok{animation:pc-sobe .6s cubic-bezier(.2,.7,.2,1) 1s both}
}

/* 3. Luz quente que acompanha o mouse (só computador) */
.lanterna{position:fixed;inset:0;z-index:60;pointer-events:none;opacity:0;transition:opacity .6s ease-out;
  background:radial-gradient(520px circle at var(--mx,50%) var(--my,30%),rgba(255,214,150,.16),rgba(255,214,150,.05) 40%,transparent 70%);
  mix-blend-mode:soft-light}
.lanterna.on{opacity:1}
@media (hover:none),(pointer:coarse),(prefers-reduced-motion:reduce){.lanterna{display:none}}

/* 4. História: cada estação acende quando o capítulo chega na tela */
.hx-parada::before{transition:background-color .5s ease-out,box-shadow .5s ease-out,scale .5s cubic-bezier(.2,.7,.2,1)}
.js-premium .hx-cap .hx-parada::before{background:#f6efdd}
.js-premium .hx-cap.lido .hx-parada::before{background:var(--verde);box-shadow:0 0 0 4px rgba(27,94,63,.14),0 0 18px rgba(27,94,63,.35);scale:1.12}
@media (prefers-reduced-motion:reduce){.hx-parada::before{transition:none}}

/* 5. Tipografia, foco e toque */
html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
h1,h2,h3{text-wrap:balance}
p,li,figcaption,blockquote{text-wrap:pretty}
.horas b,.seg-odo,[data-seg],.esmalte b{font-variant-numeric:tabular-nums}
:focus-visible{outline:2px solid #e3c27c;outline-offset:3px;border-radius:4px}
::selection{background:rgba(227,194,124,.45);color:inherit}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  .bt,.btn{transition:scale .15s ease-out,translate .2s ease-out,box-shadow .2s ease-out,filter .2s ease-out}
  .bt:hover,.btn:hover{translate:0 -1px;filter:brightness(1.04)}
  .bt:active,.btn:active{translate:0 0}
}
