/* Movimento — Achadinhos Linhares
   1) Intro: telas com frases + logo se formando (Lottie) e saída em cortina dupla.
   2) Entrada do hero depois da cortina.
   3) Rolagem: blocos que entram pela esquerda/direita, linhas que se desenham, trilha.
   Tudo é ligado por classes no <html> que só existem com JS e sem movimento reduzido:
   .motion (rolagem ativa) · .intro-play (intro na tela) · .pre (hero escondido) ·
   .enter (hero entrando) · .hero-done (fim da entrada). */

html { scrollbar-gutter: stable; }
/* Lenis (rolagem suave com inércia) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
html.intro-play { overflow: hidden; }

/* ================= INTRO ================= */
.intro { display: none; }
.intro-play .intro, .intro.exit { display: block; }
.intro {
  position: fixed; inset: 0; z-index: 1000; overflow: hidden;
  background: var(--ink); color: #f3ece1;
  font-family: Poppins, sans-serif;
}
.intro.covered { background: transparent; pointer-events: none; }
.intro.covered .intro-stage, .intro.covered .i-ui { visibility: hidden; }

.iscreen {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
  text-align: center; padding: 8vh 6vw;
}
.iscreen .inner { transition: translate .9s cubic-bezier(.7,0,.2,1), opacity .9s; }
.iscreen.leave .inner { translate: 0 -10vh; opacity: .25; }

.s1 { background: var(--ink); color: #f3ece1; }
.s2 { background: var(--accent); color: #fff; clip-path: inset(100% 0 0 0); transition: clip-path .85s cubic-bezier(.76,0,.24,1); }
.s2.on { clip-path: inset(0 0 0 0); }
.s3 {
  background: radial-gradient(circle, rgba(29,26,23,.13) 0 1.2px, transparent 1.75px) 0 0/14px 14px, var(--bg);
  color: var(--ink); clip-path: circle(0% at 50% 46%); transition: clip-path 1.05s cubic-bezier(.76,0,.24,1);
}
.s3.on { clip-path: circle(75% at 50% 46%); }

.i-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  font: 600 13px/1 Inter, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: rgba(243,236,225,.7);
  opacity: 0; translate: 0 12px; transition: opacity .7s, translate .9s var(--ease);
}
.i-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.on .i-eyebrow { opacity: 1; translate: 0 0; }

.i-big { font-weight: 800; font-size: clamp(42px, 9.2vw, 148px); line-height: .94; letter-spacing: -.035em; text-transform: uppercase; }
.i-big .accent { color: var(--accent); }
/* palavras sobem de dentro de uma máscara */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .02em .14em; margin: 0 -.02em -.14em; }
.s2 .i-big { line-height: 1.04; }
.w > span { display: inline-block; transform: translateY(108%) rotate(5deg); transform-origin: 0 100%;
  transition: transform .95s var(--ease) calc(var(--i, 0) * 70ms); }
.on .w > span { transform: none; }
.leave .w > span { transform: translateY(-108%); transition: transform .55s cubic-bezier(.7,0,.84,0) calc(var(--i, 0) * 30ms); }

.hl { position: relative; display: inline-block; }
.lt-slot { position: absolute; pointer-events: none; display: block; line-height: 0; }
.lt-slot svg { display: block; }
.i-under { left: -4%; width: 108%; bottom: -.26em; height: .34em; }
.i-under path, .lt-scribble path, .lt-circle path { vector-effect: non-scaling-stroke; }
.i-under path { stroke-width: clamp(4px, .9vw, 9px); }
.leave .i-under { opacity: 0; translate: 0 -2vh; transition: opacity .35s, translate .6s cubic-bezier(.7,0,.84,0); }

.i-ok { position: relative; width: clamp(84px, 10vw, 128px); aspect-ratio: 1; margin: 0 auto 28px; }
.i-ok .lt-slot { inset: 0; }

.i-logo { display: grid; justify-items: center; gap: 4px; }
.i-mark { position: relative; width: clamp(120px, 15vw, 190px); aspect-ratio: 1; }
.i-mark .lt-slot { inset: 0; }
.i-word { font-weight: 700; font-size: clamp(42px, 7.4vw, 104px); letter-spacing: -.035em; line-height: 1.05;
  overflow: hidden; padding: 0 .06em .08em; white-space: nowrap; }
.i-word .ch { display: inline-block; transform: translateY(105%);
  transition: transform .8s var(--ease) calc(var(--i, 0) * 38ms); }
.i-word .dot { color: var(--accent); transform: translateY(-140%) scale(.4); }
.i-word sup { font-size: .26em; font-weight: 600; letter-spacing: .02em; vertical-align: top; position: relative; top: .55em; margin-left: .08em; }
.word-on .i-word .ch { transform: none; }
.i-tag { margin-top: 18px; font: 600 clamp(11px, 1.1vw, 14px)/1.4 Inter, sans-serif; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-2); opacity: 0; translate: 0 10px; transition: opacity .8s .55s, translate .9s var(--ease) .55s; }
.word-on .i-tag { opacity: 1; translate: 0 0; }

/* barra inferior: contador, cidade e pular */
.i-ui { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 22px clamp(18px, 3vw, 40px); font: 600 13px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(243,236,225,.75); transition: color .5s; }
.intro[data-s="2"] .i-ui { color: rgba(255,255,255,.9); }
.intro[data-s="3"] .i-ui { color: var(--ink-2); }
.i-count { font: 700 clamp(28px, 3.4vw, 46px)/1 Poppins, sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; min-width: 3.2ch; }
.i-count small { font-size: .45em; margin-left: 2px; }
.i-skip { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; padding: 10px 0; border-bottom: 1px solid currentColor; opacity: .85; }
.i-skip:hover { opacity: 1; }
.i-city { display: none; }
@media (min-width: 641px) { .i-city { display: block; } }

/* cortina dupla de saída: terracota sobe, tinta cobre, tinta sai, terracota sai */
.wipe { position: absolute; left: 0; right: 0; top: 0; z-index: 5; height: 130vh; transform: translateY(105vh);
  border-radius: 50% 50% 0 0 / 14vh 14vh 0 0; will-change: transform; pointer-events: none; }
.wipe.a { background: var(--accent); }
.wipe.b { background: var(--ink); }
.intro.exit .wipe.a { animation: wipeIn .62s cubic-bezier(.76,0,.24,1) forwards, wipeOut .7s cubic-bezier(.76,0,.24,1) .98s forwards; }
.intro.exit .wipe.b { animation: wipeIn .62s cubic-bezier(.76,0,.24,1) .1s forwards, wipeOut .7s cubic-bezier(.76,0,.24,1) .8s forwards; }
@keyframes wipeIn { to { transform: translateY(-15vh); border-radius: 0; } }
@keyframes wipeOut {
  from { transform: translateY(-15vh); border-radius: 0; }
  to { transform: translateY(-140vh); border-radius: 0 0 50% 50% / 0 0 14vh 14vh; }
}

/* ================= ENTRADA DO HERO ================= */
.motion .hero-title .ln { display: block; clip-path: inset(-60% -40% 0 -40%); }
.motion .hero-title .ln > span { display: inline-block; }
.hero-done .hero-title .ln { clip-path: none; }
.hero-title .ln { display: block; }

.pre .nav-shell nav { translate: 0 -150%; opacity: 0; }
.pre .page-orbs .orb, .pre .hero-bottom .orb { scale: 0; }
.pre .card-strip { translate: 0 -70px; opacity: 0; }
.pre .card-strip .img img { scale: 1.45; }
.pre .strip .edge { scale: 1 0; }
.pre .strip { border-top-color: transparent; }
.pre .eyebrow { translate: -70px 0; opacity: 0; }
.pre .hero-title .ln > span { translate: 0 112%; }
.pre .hero-side { translate: 140px 0; opacity: 0; }
.pre .hero-side .discover { --dl: 0%; }
.pre .hero-side .happy::before { scale: 0 1; }
.pre .hero-side .stores span, .pre .hero-side p, .pre .hero-side .happy { opacity: 0; translate: 0 14px; }

.enter .nav-shell nav { transition: translate 1.1s var(--ease) .05s, opacity .6s .05s; }
.enter .orb { transition: scale 1.8s var(--ease) .3s; }
.enter .card-strip { transition: translate 1.1s var(--ease) calc(.12s + var(--k, 0) * .09s), opacity .7s calc(.12s + var(--k, 0) * .09s); }
.enter .card-strip .img img { transition: scale 1.6s var(--ease) calc(.12s + var(--k, 0) * .09s), transform .8s var(--ease), filter .5s; }
.card-strip:nth-of-type(2) { --k: 1; } .card-strip:nth-of-type(3) { --k: 2; } .card-strip:nth-of-type(4) { --k: 3; }
.enter .strip .edge { transition: scale 1s var(--ease) .2s; transform-origin: top; }
.enter .strip { transition: border-color .8s .2s; }
.enter .eyebrow { transition: translate 1s var(--ease) .45s, opacity .6s .45s; }
.enter .hero-title .ln > span { transition: translate 1.05s var(--ease) calc(.5s + var(--n, 0) * .1s); }
.hero-title .ln:nth-child(2) { --n: 1; } .hero-title .ln:nth-child(3) { --n: 2; }
.enter .hero-side { transition: translate 1.2s var(--ease) .55s, opacity .7s .55s; }
.enter .hero-side .stores span, .enter .hero-side p, .enter .hero-side .happy { transition: opacity .7s .95s, translate .9s var(--ease) .95s; }
.enter .hero-side p { transition-delay: 1.05s; }
.enter .hero-side .happy { transition-delay: 1.15s; }
.enter .hero-side .discover { transition: background-size 1.2s var(--ease) 1s, color .2s; }
.enter .hero-side .happy::before { transition: scale 1.2s var(--ease) 1.2s; }
/* o círculo em "Linhares" só começa depois da entrada das linhas */
.pre .hero-title .circled path { animation: none; }
.enter .hero-title .circled path { animation-delay: 1.35s; }

/* linha do "Ver os achados" e régua sobre "12 mil+" (desenhadas na entrada) */
.discover { border-bottom: 0; padding-bottom: 15px;
  background: linear-gradient(var(--dl-c, var(--line-2)), var(--dl-c, var(--line-2))) 0 100% / var(--dl, 100%) 1px no-repeat; }
.discover::after { bottom: 0; }
.hero-side.glass-surface .discover { --dl-c: rgba(29,26,23,.22); }
.hero-side .happy { position: relative; }
.hero-side .happy::before { content: ""; position: absolute; left: 0; right: 0; top: -13px; height: 1px;
  background: rgba(29,26,23,.16); transform-origin: left; }
.u-mark { position: relative; display: inline-block; }
.u-mark .lt-scribble { left: -6%; width: 116%; bottom: -.2em; height: .32em; }
.lt-scribble path { stroke-width: 2.6px; }

/* ================= ROLAGEM ================= */
/* rabisco sob a palavra em destaque dos títulos (avança com a rolagem) */
.sec-title em { position: relative; display: inline-block; }
.sec-title em .lt-scribble { left: -3%; width: 106%; bottom: -.2em; height: .32em; }
.sec-title em .lt-scribble path { stroke-width: 3.2px; }
/* volta de caneta em "achados" no CTA */
.cta .display > span { position: relative; display: inline-block; }
.lt-circle { left: -12%; top: -34%; width: 124%; height: 166%; }
.lt-circle path { stroke-width: 2.6px; }
.cta .lt-circle path { stroke: #fff; }

/* linhas que se desenham com a rolagem (--draw vai de 0 a 1) */
.progress .bar { transform: scaleX(var(--draw, 1)); transform-origin: left; }
.copy { border-top: 0; position: relative; }
.copy::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line);
  transform: scaleX(var(--draw, 1)); transform-origin: left; }

/* imagens com leve paralaxe (sobra de 14% para o deslocamento) */
.motion .promo > img, .motion .card-strip .img img, .motion .cta .pic img { scale: 1.14; will-change: translate; }

/* trilha do achado: linha tracejada que percorre a página e termina no CTA */
main { position: relative; }
main > section { position: relative; z-index: 1; }
.trail { position: absolute; left: 0; top: 0; width: 100%; z-index: 0; pointer-events: none; overflow: visible; }
.trail .dots { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 12 9; opacity: .6; }
.trail .head { fill: var(--accent); }
.trail .halo { fill: var(--accent); opacity: .18; }
.trail-pin { position: absolute; z-index: 2; width: 34px; height: 34px; margin: -34px 0 0 -17px; color: var(--accent);
  transform-origin: 50% 100%; scale: 0; transition: scale .5s var(--ease); pointer-events: none; }
.trail-pin.on { scale: 1; }
.trail-pin svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(224,86,31,.35)); }

@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) .intro { display: none !important; }
}
@media print {
  .intro, .trail, .trail-pin { display: none !important; }
}
