/* ==========================================================
   Ink Compatível · camada de movimento (v1)
   Especificação: ux/animacoes/especificacao-animacoes.md (aprovada a 6 nov).
   "Tinta a assentar no papel": revelações com desfoque, títulos linha a linha,
   fotos que abrem, entrada do hero, lista de estilos fixa, palavra que roda no CTA,
   wordmark do rodapé que reage ao rato. Lenis para o scroll suave.
   Os estados iniciais só existem com html.mo (motion.js põe a classe),
   por isso sem JS ou com prefers-reduced-motion tudo aparece estático.
   ========================================================== */
:root { --ease-ink: cubic-bezier(.22, 1, .36, 1); --ease-pin: cubic-bezier(.34, 1.56, .64, 1); --t-stag: 60ms; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* 1 · revelação: sobe 32 px, ganha nitidez */
html.mo [data-r] { opacity: 0; translate: 0 32px; filter: blur(6px); transition: opacity .7s var(--ease-ink), translate .9s var(--ease-ink), filter .7s var(--ease-ink); transition-delay: calc(var(--i, 0) * var(--t-stag)); }
html.mo [data-r].in { opacity: 1; translate: 0 0; filter: none; }

/* 2 · títulos h2 linha a linha, por baixo de uma máscara */
/* Room above each line for accents on capitals (Ê, Ã, Í) and below for the cedilla (Ç); the negative
   margins keep the line spacing as it was. */
.ln { display: block; overflow: hidden; padding: .3em 0 .14em; margin: -.3em 0 -.14em; }
.ln > span { display: block; }
html.mo [data-lines] .ln > span { translate: 0 105%; transition: translate .9s var(--ease-ink); transition-delay: calc(var(--l, 0) * 90ms); }
html.mo [data-lines].in .ln > span { translate: 0 0; }

/* 3 · fotos dos bentos: abrem de dentro para fora */
html.mo [data-img] { clip-path: inset(14% 10% 14% 10% round 28px); transition: clip-path 1.1s var(--ease-ink); transition-delay: calc(var(--i, 0) * var(--t-stag)); }
html.mo [data-img] img { scale: 1.18; transition: scale 1.4s var(--ease-ink), transform .7s var(--ease-ink); }
html.mo [data-img].in { clip-path: inset(0 0 0 0 round 24px); }
html.mo [data-img].in img { scale: 1; }

/* 4 · hero: entrada */
@property --ey { syntax: '<length>'; inherits: false; initial-value: 0px; }
.v-hero .v-polaroid, .v-hero .v-doodle, .v-cta .v-polaroid { translate: 0 calc(var(--ey, 0px) + var(--py, 0px)); }
/* On phones an artist's photos sit under the text: they drift a little with the scroll (motion.js keeps it within
   ±22px, inside their own space) and drop in when they come into view, not at page load while still off screen. */
@media (max-width: 900px) {
  html.mo .v-hero.go .ah-photos:not(.in) .v-polaroid { --ey: -16px; opacity: 0; rotate: -6deg; scale: 1.04; }
  html.mo .v-ahero .ah-photos .v-polaroid { transition-delay: .1s; }
  html.mo .v-ahero .ah-photos .ah-p2 { transition-delay: .3s; }
}
html.mo .v-hero .v-hl .v-row { opacity: 0; translate: 0 40%; filter: blur(10px); transition: opacity .8s var(--ease-ink), translate 1s var(--ease-ink), filter .8s var(--ease-ink); }
html.mo .v-hero .v-hl .v-row + .v-row { transition-delay: .12s; }
html.mo .v-hero .v-polaroid { --ey: -70px; opacity: 0; rotate: -10deg; scale: 1.12; transition: opacity .5s ease .7s, --ey .9s var(--ease-pin) .7s, rotate .9s var(--ease-pin) .7s, scale .9s var(--ease-pin) .7s; }
html.mo .v-hero .v-polaroid.pol-b { rotate: 12deg; transition-delay: .85s; }
html.mo .v-hero .v-apill { opacity: 0; scale: .5; transition: opacity .3s ease, scale .7s var(--ease-pin), transform .2s ease; transition-delay: calc(1s + var(--i, 0) * 120ms), calc(1s + var(--i, 0) * 120ms), 0s; }
html.mo .v-hero .v-badge { opacity: 0; scale: .6; rotate: -40deg; transition: opacity .9s var(--ease-pin) 1.3s, scale .9s var(--ease-pin) 1.3s, rotate .9s var(--ease-pin) 1.3s, color .2s ease; }
html.mo .v-hero .v-doodle path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease-ink) 1.1s; }
html.mo .v-hero .v-hero-foot > *, html.mo .v-hero .v-hlead { opacity: 0; translate: 0 20px; transition: opacity .6s ease .9s, translate .8s var(--ease-ink) .9s; }
html.mo .v-hero.go .v-hl .v-row, html.mo .v-hero.go .v-hero-foot > *, html.mo .v-hero.go .v-hlead { opacity: 1; translate: 0 0; filter: none; }
html.mo .v-hero.go .v-polaroid { --ey: 0px; }
html.mo .v-hero.go .v-polaroid, html.mo .v-hero.go .v-apill, html.mo .v-hero.go .v-badge { opacity: 1; rotate: 0deg; scale: 1; }
html.mo .v-hero.go .v-doodle path { stroke-dashoffset: 0; }
/* 5 · foto dentro do título: troca entre desenho e pele */

/* 7 · fitas: param com o rato por cima (a velocidade vem do JS) */
.v-tape:hover .v-mq { animation-play-state: paused; }

/* 9 · Estilos da casa: lista fixa, a foto troca com o scroll */
.v-estilos { height: calc(var(--n, 6) * 80vh + 100vh); padding-top: 40px; }
.v-stick { position: sticky; top: 0; height: 100vh; padding-top: 72px; display: grid; grid-template-columns: 5fr 7fr; gap: 50px; align-items: center; }
.v-elist .v-kicker { margin-bottom: 26px; }
.v-elist ol { list-style: none; margin: 0 0 34px; padding: 0; counter-reset: s; }
.v-elist li { counter-increment: s; display: flex; align-items: baseline; gap: 18px; color: #878179; transition: color .35s ease, translate .5s var(--ease-ink); }
.v-elist li::before { content: counter(s, decimal-leading-zero); font: 500 12px var(--font-mono, 'IBM Plex Mono'), monospace; letter-spacing: .6px; color: var(--grafite); translate: 0 -.6em; }
.v-elist li button { font: 900 clamp(44px, 5.2vw, 84px)/.92 var(--font-display, 'Big Shoulders Display'), sans-serif; text-transform: uppercase; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.v-elist li button:focus-visible { outline: 3px solid var(--vermelho); outline-offset: 4px; }
.v-elist li.on { color: var(--tinta); translate: 14px 0; }
.v-elist li.on::after { content: ""; width: 16px; height: 16px; flex: none; border-radius: 99px; background: var(--vermelho); align-self: center; }
.v-eframe { position: relative; height: 72vh; border-radius: 32px; overflow: hidden; background: var(--tinta); }
.v-eframe figure { position: absolute; inset: 0; margin: 0; opacity: 0; scale: 1.08; pointer-events: none; transition: opacity .6s ease, scale 1.2s var(--ease-ink); }
.v-eframe figure.on { opacity: 1; scale: 1; pointer-events: auto; }
.v-eframe img { width: 100%; height: 100%; object-fit: cover; }
.v-eframe figure::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(180deg, transparent, rgba(20, 18, 19, .7)); pointer-events: none; }
.v-eframe figcaption { position: absolute; z-index: 2; left: 22px; right: 22px; bottom: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; color: #fff; }
.v-eframe figcaption .hand { font-size: 34px; line-height: 1; transform: rotate(-3deg); }
.v-eframe .pill { padding: 8px 16px; border-radius: 999px; background: var(--papel); color: var(--tinta); font-weight: 700; text-decoration: none; white-space: nowrap; }
.v-eframe .prog { position: absolute; z-index: 2; top: 22px; left: 22px; right: 22px; display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); gap: 6px; }
.v-eframe .prog i { height: 4px; border-radius: 9px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.v-eframe .prog b { display: block; height: 100%; width: 0; background: #fff; }
@media (max-width: 820px) {
  .v-estilos { height: calc(var(--n, 6) * 70vh + 100vh); }
  .v-stick { grid-template-columns: 1fr; gap: 18px; align-content: center; padding-top: 64px; padding-bottom: 16px; }
  .v-eframe { height: 46vh; order: -1; }
  .v-elist .v-kicker { margin-bottom: 12px; }
  .v-elist ol { margin: 0; }
  .v-elist li button { font-size: 32px; }
  .v-elist .v-btn { display: none; }
}

/* 10 · teste: a barra da pergunta nova enche; o nome do resultado escreve-se */
.v-bars i { position: relative; overflow: hidden; }
html.mo .v-bars i.fill { background: var(--nevoa); }
html.mo .v-bars i.fill::after { content: ""; position: absolute; inset: 0; background: var(--tinta); transform-origin: left; animation: ink-fill .6s var(--ease-ink) both; }
@keyframes ink-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.typed::after { content: ""; display: inline-block; width: .06em; height: .8em; margin-left: .04em; background: currentColor; vertical-align: -.02em; animation: ink-blink 1s steps(2, start) infinite; }
@keyframes ink-blink { to { visibility: hidden; } }

/* 11 · flash: as cartas abrem em leque a partir do centro; o autocolante cai como um carimbo */
html.mo .v-frows .v-fcard { opacity: 0; translate: var(--fx, 0px) 60px; scale: .9; transition: opacity .4s ease, translate 1s var(--ease-ink), scale 1s var(--ease-ink), transform .25s ease, box-shadow .3s ease; transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s, 0s; }
html.mo .v-frows.in .v-fcard { opacity: 1; translate: 0 0; scale: 1; }
html.mo .v-frows .v-sticker { opacity: 0; scale: 2.4; transition: opacity .2s ease .75s, scale .5s var(--ease-pin) .75s; }
html.mo .v-frows.in .v-sticker { opacity: 1; scale: 1; }
.v-frows .v-fcard:hover { box-shadow: 0 40px 70px rgba(0, 0, 0, .55); }

/* 12 · CTA "Tens uma ___?": a palavra roda, o sublinhado redesenha-se */
.rot { position: relative; display: inline-grid; vertical-align: bottom; grid-template-columns: minmax(0, 1fr); transition: width .42s var(--ease-ink); }
.rot > .w { grid-area: 1 / 1; width: max-content; justify-self: center; white-space: nowrap; }
.rot .w { opacity: 0; translate: 0 22%; filter: blur(6px); transition: opacity .42s var(--ease-ink), translate .42s var(--ease-ink), filter .42s var(--ease-ink); }
.rot .w.on { opacity: 1; translate: 0 0; filter: none; }
.rot .w.out { opacity: 0; translate: 0 -18%; filter: blur(4px); }
.rot svg { position: absolute; left: -2%; bottom: -.06em; width: 104%; height: .22em; overflow: visible; }
html.mo .rot svg path { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.mo .rot svg.draw path { animation: ink-draw .6s var(--ease-ink) .12s both; }
@keyframes ink-draw { to { stroke-dashoffset: 0; } }

/* 13 · wordmark do rodapé: as letras sobem e reagem ao rato */
/* Clip only at the bottom (letters rise in from below); above, letters near the cursor have room to lift. */
.footer-wordmark.wm { display: flex; margin-left: -.031em; overflow: visible; clip-path: inset(-60% 0 0 0); } /* -.031em: the blank space the font leaves before the I */
.footer-wordmark.wm span { display: inline-block; transition: translate .5s var(--ease-ink), color .3s ease; transition-delay: calc(var(--i, 0) * 25ms); }
html.mo .footer-wordmark.wm:not(.in) span { translate: 0 100%; }
.footer-wordmark.wm.live span { transition-delay: 0s; }
/* Í: the font's own accent (only the part above the capital), moved left so it sits centred over the I. */
.footer-wordmark.wm .acute-i { position: relative; }
.footer-wordmark.wm .acute-i::before { content: "\00CD"; position: absolute; top: 0; left: -.055em; clip-path: inset(-1em 0 calc(100% + .055em) 0); pointer-events: none; }
/* After the letters have risen, nothing clips them: letters lifted by the mouse stay whole. */
.footer-wordmark.wm.live { clip-path: none; }

/* 14 · hover nas fotos: 1,05 em 0,7 s */
.v-tile img, .v-acard .ph, .v-prod .img img, .v-igrow img { transition: transform .7s var(--ease-ink); }
.v-tile:hover img, .v-acard:hover .ph, .v-prod:hover .img img, .v-igrow a:hover img { transform: scale(1.05); }
html.mo .v-hero .v-hlead { transition-delay: .45s; }

/* 15 · artistas no topo: flutuam devagar, cada um no seu tempo (o avatar acena); ao tocar, endireitam.
   Só com html.mo, por isso param com prefers-reduced-motion. */
@keyframes tagbob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes avnod { 0%, 100% { rotate: 0deg; } 30% { rotate: -10deg; } 60% { rotate: 6deg; } }
html.mo .v-hero.go .v-apill { animation: tagbob 4.6s ease-in-out infinite; animation-delay: calc(1.8s + var(--i, 0) * 1.1s); }
html.mo .v-hero.go .v-apill .av { animation: avnod 4.6s ease-in-out infinite; animation-delay: calc(2.4s + var(--i, 0) * 1.1s); }
html.mo .v-hero .v-apill:hover, html.mo .v-hero .v-apill:active { transform: rotate(0deg) scale(1.06); transition-delay: 0s; }
