/* =========================================================
   Bichinhos Caridosos — estilos
   ========================================================= */
:root {
  --bg: #FFF1DC;
  --ink: #3B2418;
  --cream: #FFF1DC;
  --cocoa: #3B2418;
  --honey: #D9904A;
  --teal: #5ED6CB;
  --pink: #FF6F9E;
  --sun: #FFC83D;
  --lilac: #9C7CFF;
  --sky: #5BB8FF;
  --night: #1B1540;

  --f-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-body: "Nunito", system-ui, -apple-system, sans-serif;

  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(16px, 1.05vw + 8px, 20px);
  line-height: 1.55;
  overflow-x: hidden;
  transition: color .6s var(--ease);
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--pink); color: #fff; }

/* ---------- LOADER ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: #FFF1DC;
  color: var(--cocoa);
  clip-path: circle(150% at 50% 50%);
}
.loader__inner { display: grid; justify-items: center; gap: 14px; }
.loader__logo { width: 168px; height: auto; animation: beat 1.1s var(--ease) infinite; filter: drop-shadow(0 18px 30px rgba(217,144,74,.35)); }
.loader__text { font-family: var(--f-display); font-weight: 600; font-size: 20px; margin: 8px 0 0; }
.loader__dots::after { content: ""; animation: dots 1.2s steps(4) infinite; }
.loader__bar { width: 180px; height: 6px; border-radius: 6px; background: rgba(59,36,24,.1); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0%; border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--sun), var(--teal), var(--lilac)); transition: width .3s var(--ease); }
.loader__pct { margin: 0; font-weight: 800; font-size: 13px; letter-spacing: .1em; opacity: .55; }
@keyframes beat { 0%,100% { transform: scale(1) } 18% { transform: scale(1.07) } 32% { transform: scale(.98) } 46% { transform: scale(1.04) } }
@keyframes dots { 0% { content: "" } 25% { content: "." } 50% { content: ".." } 75% { content: "..." } }

/* ---------- CAMADAS FIXAS ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.blob--a { width: 46vmax; height: 46vmax; left: -12vmax; top: -10vmax; background: var(--teal); }
.blob--b { width: 38vmax; height: 38vmax; right: -10vmax; top: 20vh; background: var(--pink); opacity: .4; }
.blob--c { width: 34vmax; height: 34vmax; left: 30vw; bottom: -18vmax; background: var(--sun); opacity: .45; }

#webgl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
main, .footer { position: relative; z-index: 2; }

.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

/* ---------- CURSOR ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
  width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: var(--pink); mix-blend-mode: normal;
  display: grid; place-items: center;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s;
  opacity: 0;
}
.cursor.is-on { opacity: 1; }
.cursor__label { font: 700 13px/1 var(--f-display); color: #fff; white-space: nowrap; opacity: 0; transform: scale(.6); transition: .3s var(--ease); }
.cursor.is-big { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
.cursor.is-big .cursor__label { opacity: 1; transform: scale(1); }
@media (hover: none) { .cursor { display: none; } }

/* coraçõezinhos ao clicar no urso */
.hearts { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.hearts i { position: absolute; font-style: normal; font-size: 26px; will-change: transform, opacity; }

/* ---------- COSTURA / PROGRESSO ---------- */
.stitch { position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 70; pointer-events: none; }
.stitch svg { width: 100%; height: 100%; display: block; overflow: visible; }
.stitch line { stroke: var(--pink); stroke-width: 4; stroke-dasharray: 2 1.2; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.stitch svg { clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0); }
.stitch__needle { position: absolute; top: -6px; left: var(--p, 0%); font-size: 16px; transform: translateX(-50%) rotate(-30deg); }

/* ---------- NAV ---------- */
.nav {
  position: fixed; z-index: 50; left: 0; right: 0; top: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  transition: transform .5s var(--ease);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__brand img { width: 56px; height: auto; transition: transform .5s var(--ease); filter: drop-shadow(0 6px 14px rgba(0,0,0,.15)); }
.nav__brand:hover img { transform: rotate(-8deg) scale(1.06); }
.nav__links {
  display: flex; gap: 4px; padding: 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.nav__links a { text-decoration: none; font: 600 15px/1 var(--f-display); padding: 10px 16px; border-radius: 999px; transition: background .3s, color .3s; }
.nav__links a:hover, .nav__links a.is-active { background: var(--ink); color: var(--bg); }
.nav__actions { display: flex; align-items: center; gap: 10px; }

.sound {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.sound__bars { display: flex; gap: 3px; align-items: center; height: 16px; }
.sound__bars i { width: 3px; height: 4px; border-radius: 2px; background: currentColor; transition: height .3s; }
.sound[aria-pressed="true"] .sound__bars i { animation: eq 1s ease-in-out infinite; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%,100% { height: 4px } 50% { height: 16px } }

.btn {
  --b: var(--ink); --c: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; font: 600 16px/1 var(--f-display);
  background: var(--b); color: var(--c);
  padding: 14px 22px; border-radius: 999px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--b) 70%, transparent);
}
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn--small { padding: 12px 18px; font-size: 15px; }
.btn--big { padding: 26px 44px; font-size: clamp(20px, 2.2vw, 30px); background: var(--pink); color: #fff; --b: var(--pink); }

/* ---------- TIPOGRAFIA ---------- */
.display {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(40px, 6.4vw, 104px); line-height: .98; letter-spacing: -.02em;
  margin: 0;
}
.display--xl { font-size: clamp(46px, 8.6vw, 150px); }
.display--center { text-align: center; }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.display .serif { font-size: 1.08em; }
.hl { position: relative; white-space: nowrap; display: inline-block; }
.hl::after { content: ""; position: absolute; left: -.06em; right: -.06em; bottom: .06em; height: .32em; z-index: -1; border-radius: .2em; transform-origin: left; transform: scaleX(var(--hl, 1)); }
.hl--pink::after { background: var(--pink); opacity: .45; }
.hl--sun::after { background: var(--sun); opacity: .5; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 700 13px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 22px; }
.kicker--center { display: flex; justify-content: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 0 var(--pink); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255,111,158,.6) } 80%,100% { box-shadow: 0 0 0 14px rgba(255,111,158,0) } }
.lead { font-size: clamp(18px, 1.4vw + 8px, 26px); line-height: 1.45; max-width: 34ch; margin: 28px 0 0; }
.lead--center { margin-inline: auto; text-align: center; }

.line-mask { overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }

/* ---------- SEÇÕES BASE ---------- */
section { position: relative; padding: clamp(110px, 16vh, 180px) var(--gutter); }
.chapter__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: clamp(24px, 4vh, 48px); }
.chapter__num { font: 700 14px/1 var(--f-display); padding: 8px 12px; border: 1.5px solid currentColor; border-radius: 999px; }
.chapter__label { font: 600 clamp(16px, 1.3vw, 20px)/1.2 var(--f-display); opacity: .8; }

/* HERO */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 120px; }
.hero__copy { max-width: min(760px, 58vw); position: relative; z-index: 2; }
.hero__title { font-size: clamp(48px, 7.4vw, 128px); }
.hero__lead { font-size: clamp(18px, 1.3vw + 8px, 24px); max-width: 36ch; margin: 28px 0 40px; }
.hero__fallback { display: none; }
.no-webgl .hero__fallback { display: block; position: absolute; right: var(--gutter); bottom: 10vh; width: min(38vw, 420px); }
.scroll-cue { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 700; font-size: 15px; }
.scroll-cue__mouse { width: 26px; height: 40px; border: 2px solid currentColor; border-radius: 14px; display: grid; justify-items: center; padding-top: 7px; }
.scroll-cue__mouse i { width: 4px; height: 8px; border-radius: 2px; background: currentColor; animation: wheel 1.6s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1 } 70% { transform: translateY(10px); opacity: 0 } 100% { opacity: 0 } }

/* CAP 01 — palco fixo: um parágrafo por vez */
.chapter--dark { min-height: 340vh; padding-top: 0; padding-bottom: 0; }
.story-stage {
  position: sticky; top: 0; height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 90px 0 clamp(120px, 22vh, 220px);
}
.story-slot { display: grid; }
.story {
  grid-area: 1 / 1;
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(28px, 4.2vw, 70px); line-height: 1.14; letter-spacing: -.015em;
  max-width: 19ch; margin: 0;
  will-change: transform, opacity, filter;
}
.story--b { justify-self: end; text-align: right; max-width: 17ch; opacity: 0; visibility: hidden; }
.story .word { display: inline-block; opacity: .14; }
.story-progress { display: flex; gap: 8px; margin-top: clamp(28px, 5vh, 48px); }
.story-progress i { width: 34px; height: 4px; border-radius: 4px; background: currentColor; opacity: .2; overflow: hidden; position: relative; }
.story-progress i { opacity: 1; background: rgba(255,241,220,.2); }
.story-progress i::after { content: ""; position: absolute; inset: 0; background: var(--sun); transform: scaleX(var(--fill, 0)); transform-origin: left; border-radius: inherit; }
.stars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .7; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 0%,100% { opacity: .15; transform: scale(.6) } 50% { opacity: .9; transform: scale(1) } }

/* CAP 02 */
.chapter--burst { min-height: 170vh; }
.burst__spacer { height: 70vh; }
.burst__copy { max-width: 900px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.confetti i { position: absolute; display: block; border-radius: 4px; }

/* CAP 03 horizontal */
.how { padding: 0; }
.how__pin { height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: 90px 0 40px; }
.how__intro { padding: 0 var(--gutter); max-width: 1100px; }
.how__intro .display { font-size: clamp(36px, 5vw, 84px); }
.how__track { display: flex; gap: clamp(16px, 2vw, 32px); padding: clamp(28px, 5vh, 56px) var(--gutter) 0; width: max-content; will-change: transform; }
.card {
  position: relative; width: clamp(270px, 30vw, 420px); min-height: clamp(260px, 38vh, 380px);
  padding: clamp(22px, 2.4vw, 36px); border-radius: 32px;
  background: #fff; color: var(--cocoa);
  box-shadow: 0 30px 60px -30px rgba(20, 60, 60, .45);
  display: flex; flex-direction: column; justify-content: flex-end;
  transform-origin: bottom center;
}
.card:first-child { margin-left: clamp(0px, 34vw, 520px); }
.card h3 { font: 600 clamp(24px, 2.2vw, 34px)/1.05 var(--f-display); margin: 0 0 10px; }
.card p { margin: 0; font-size: clamp(15px, 1vw + 6px, 18px); opacity: .8; }
.card__n { position: absolute; top: 24px; right: 28px; font: 700 15px/1 var(--f-display); opacity: .4; }
.card__icon { width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center; font-size: 36px; margin-bottom: auto; }
.card--pink .card__icon { background: #FFE0EA; }
.card--sun .card__icon { background: #FFF0C2; }
.card--lilac .card__icon { background: #E9E1FF; }
.card--sky .card__icon { background: #DCEFFF; }
.card--pink { border-bottom: 10px solid var(--pink); }
.card--sun { border-bottom: 10px solid var(--sun); }
.card--lilac { border-bottom: 10px solid var(--lilac); }
.card--sky { border-bottom: 10px solid var(--sky); }

/* CAP 04 impacto */
.impact .display { max-width: 15ch; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 24px); margin: clamp(40px, 7vh, 80px) 0 clamp(24px, 4vh, 40px); }
.stat, .chart { color: var(--cocoa); }
.stat { padding: 26px 24px; border-radius: 28px; background: #fff; box-shadow: 0 24px 50px -32px rgba(59,36,24,.5); position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; right: -50px; top: -50px; opacity: .22; }
.stat--pink::before { background: var(--pink); } .stat--teal::before { background: var(--teal); }
.stat--sun::before { background: var(--sun); } .stat--lilac::before { background: var(--lilac); }
.stat b { display: block; font: 700 clamp(44px, 4.6vw, 76px)/1 var(--f-display); letter-spacing: -.02em; }
.stat--pink b { color: #F0457F; } .stat--teal b { color: #19A99C; } .stat--sun b { color: #E6A100; } .stat--lilac b { color: #7A55F5; }
.stat p { margin: 10px 0 0; font-size: 15px; line-height: 1.4; opacity: .8; }

.charts { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(12px, 1.6vw, 24px); }
.chart { margin: 0; padding: clamp(22px, 2.6vw, 40px); border-radius: 32px; background: #fff; box-shadow: 0 24px 50px -32px rgba(59,36,24,.5); }
.chart figcaption h3 { font: 600 clamp(22px, 1.8vw, 30px)/1.1 var(--f-display); margin: 0; }
.chart figcaption p { margin: 6px 0 0; font-size: 15px; opacity: .65; }
.donut { position: relative; width: min(100%, 300px); margin: 28px auto 20px; aspect-ratio: 1; }
.donut__svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.donut__svg circle { fill: none; stroke-width: 26; stroke-linecap: round; transition: stroke-width .3s var(--ease); cursor: pointer; }
.donut__svg circle:hover { stroke-width: 32; }
.donut__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut__value { font: 700 clamp(36px, 3.4vw, 54px)/1 var(--f-display); }
.donut__label { font-weight: 700; font-size: 14px; opacity: .65; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; font-size: 15px; }
.legend li { display: flex; align-items: center; gap: 10px; cursor: default; }
.legend i { width: 14px; height: 14px; border-radius: 5px; flex: none; }
.legend b { margin-left: auto; font-family: var(--f-display); }

.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: clamp(10px, 1.6vw, 24px); height: clamp(260px, 36vh, 380px); margin-top: 36px; padding-bottom: 54px; position: relative; }
.bars::before { content: ""; position: absolute; left: 0; right: 0; bottom: 54px; border-top: 2px dashed rgba(59,36,24,.15); }
.bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar__fill { width: 100%; max-width: 92px; border-radius: 22px 22px 10px 10px; height: var(--h); transform-origin: bottom; position: relative; }
.bar__val { font: 700 clamp(18px, 1.6vw, 26px)/1 var(--f-display); margin-bottom: 10px; }
.bar__name { position: absolute; bottom: -42px; font-size: 14px; font-weight: 700; text-align: center; line-height: 1.2; opacity: .75; width: 120%; }
.bar__emoji { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-size: 26px; }
.impact__note { font-size: 13px; opacity: .5; margin: 20px 0 0; }

/* CAP 05 parceiros */
.partners { min-height: 140vh; overflow: hidden; }
.partners .chapter__head { justify-content: center; }
.marquee { margin-top: clamp(40px, 7vh, 80px); transform: rotate(-3deg); width: 120vw; margin-left: calc(-10vw - var(--gutter)); }
.marquee--alt { transform: rotate(2deg); margin-top: 22px; }
.marquee__track { display: flex; gap: 18px; width: max-content; will-change: transform; }
.marquee__track span {
  font: 600 clamp(24px, 3.2vw, 52px)/1 var(--f-display); white-space: nowrap;
  padding: 18px 30px; border-radius: 999px; background: #fff; color: var(--cocoa);
  display: inline-flex; align-items: center; gap: 14px;
}
.marquee__track span::before { content: "♥"; color: var(--pink); font-size: .7em; }
.marquee--alt .marquee__track span { background: var(--cocoa); color: #fff; }
.marquee--alt .marquee__track span::before { color: var(--sun); }
.partners__lead { max-width: 38ch; margin: clamp(50vh, 56vh, 60vh) auto 0; text-align: center; font-size: clamp(18px, 1.3vw + 8px, 24px); }

/* CAP 06 natal */
.natal { min-height: 160vh; }
.natal .display { max-width: 12ch; }
.natal .lead { margin-left: auto; text-align: right; margin-top: 50vh; }

/* FINAL */
.final { min-height: 150vh; text-align: center; }
.final .display { margin-inline: auto; }
.final__spacer { height: 64vh; }
.final__cta { margin-top: 40px; display: flex; justify-content: center; }

/* FOOTER */
.footer { padding: 80px var(--gutter) 60px; background: var(--cocoa); color: var(--cream); text-align: center; display: grid; justify-items: center; gap: 12px; }
.footer img { width: 96px; height: auto; }
.footer__claim { font: 600 clamp(20px, 2vw, 28px)/1.2 var(--f-display); margin: 8px 0 0; }
.footer__meta { font-size: 14px; opacity: .6; margin: 0; }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__brand img { width: 48px; }
  .hero { align-items: flex-start; padding-top: 110px; }
  .hero__copy { max-width: 100%; }
  .hero__lead { margin-bottom: 24px; }
  .hero { min-height: 100svh; padding-bottom: 46svh; }
  .story-stage { justify-content: flex-start; padding-top: 18svh; }
  .story--b { justify-self: start; text-align: left; }
  .stats { grid-template-columns: 1fr 1fr; }
  .charts { grid-template-columns: 1fr; }
  .card:first-child { margin-left: 0; }
  .how__intro .display { font-size: clamp(32px, 8vw, 56px); }
  .card { width: 78vw; }
  .bar__name { font-size: 12px; }
  .natal .lead { text-align: left; margin-left: 0; }
}
@media (max-width: 520px) {
  .stat { padding: 20px 18px; border-radius: 22px; }
  .stat p { font-size: 13px; }
  .legend { grid-template-columns: 1fr; }
  .btn--big { padding: 20px 28px; }
  .nav__actions .btn--small { padding: 10px 14px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .loader__logo, .dot, .stars i { animation: none; }
  .story .word { opacity: 1 !important; }
  .story--b { opacity: 1; visibility: visible; position: relative; }
}
