/* ==========================================================
   Depois da tempestade — pré-venda
   Conceito: a página percorre o livro, da tempestade (noite,
   gravura em negativo) ao arco-íris (dia, capa original).
   A única cor saturada é o arco-íris.
   ========================================================== */

:root {
  --storm: #2E2A35;      /* céu de tempestade */
  --storm-2: #3B3643;
  --mist: #ECEAEF;       /* névoa depois da chuva */
  --paper: #F8F7F9;      /* papel */
  --ink: #26222B;        /* tinta */
  --plum: #5A1F45;       /* ameixa do título da capa */
  --lilac: #6E6479;      /* texto secundário (AA sobre papel) */
  --line: #D8D4DE;
  --on-storm: #EFEDF2;
  --on-storm-2: #B9B2C4;

  /* arco-íris aquarelado da capa */
  --rainbow: linear-gradient(90deg, #E98A8A 0%, #EFB07A 20%, #EDD67E 38%, #9FCB8E 56%, #86B4DA 76%, #A994CF 100%);

  --serif: "Alegreya", Georgia, "Times New Roman", serif;
  --caps: "Alegreya SC", "Alegreya", Georgia, serif;
  --sans: "Alegreya Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* saídas e entradas */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* traço do desenho, movimento na tela */
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --measure: 34rem;
  --dock-h: 4.5rem;
}

/* ---------- base / mobile baseline ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--serif);
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; } /* hidden vence display: grid/flex */
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
a, button, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid #86B4DA; outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--paper); color: var(--ink); padding: .75rem 1rem; border-radius: .5rem;
  font-family: var(--sans);
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: 68rem; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--text { max-width: calc(var(--measure) + 2 * var(--gutter)); }

h2 {
  font-family: var(--caps);
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: .01em;
  color: var(--plum);
  margin-bottom: 1rem;
}

/* ---------- botões ---------- */
.btn {
  --h: 3.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--h); padding: 0 1.5rem;
  border-radius: 999px; border: 0;
  font: 700 1.0625rem/1 var(--sans); letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform 120ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms;
}
.btn:active { transform: scale(.97); }

/* O arco-íris: o único elemento colorido da página */
.btn--rainbow {
  position: relative; isolation: isolate;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 24px -10px rgba(90, 31, 69, .55);
}
.btn--rainbow::before {
  content: ""; position: absolute; inset: -3px; z-index: -1;
  border-radius: inherit; background: var(--rainbow);
}
.btn--rainbow::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; background: var(--paper);
}
/* sobre fundo claro o botão ganha corpo: ameixa da capa, anel de arco-íris */
.btn--solid { color: #fff; }
.btn--solid::after { background: var(--plum); inset: 3px; }
.btn--block { width: 100%; --h: 3.5rem; }
.btn--small {
  --h: 2.5rem; padding: 0 1.1rem; font-size: .95rem;
  background: transparent; color: var(--on-storm);
  box-shadow: inset 0 0 0 1.5px rgba(239, 237, 242, .45);
}
@media (hover: hover) and (pointer: fine) {
  .btn--rainbow:hover { box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 12px 30px -10px rgba(90, 31, 69, .7); transform: translateY(-1px); }
  .btn--small:hover { box-shadow: inset 0 0 0 1.5px var(--on-storm); }
}

/* ---------- barra superior ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: calc(.6rem + env(safe-area-inset-top, 0px)) var(--gutter) .6rem;
  color: var(--on-storm);
  transition: background-color 240ms, color 240ms, box-shadow 240ms;
}
.topbar__brand { text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.topbar__title { font: 500 1.05rem/1 var(--caps); letter-spacing: .02em; opacity: 0; transition: opacity 240ms; }
.topbar.is-solid {
  background: rgba(248, 247, 249, .92);
  -webkit-backdrop-filter: saturate(1.2) blur(12px); backdrop-filter: saturate(1.2) blur(12px);
  color: var(--ink); box-shadow: 0 1px 0 var(--line);
}
.topbar.is-solid .topbar__title { opacity: 1; }
.topbar.is-solid .btn--small { color: var(--plum); box-shadow: inset 0 0 0 1.5px var(--plum); }

/* ---------- HERO: a tempestade ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;
  background: var(--storm);
  color: var(--on-storm);
  display: flex; align-items: center;
  padding: calc(3.75rem + env(safe-area-inset-top, 0px)) var(--gutter) 3rem;
}
/* a gravura da capa em negativo: o mesmo lugar, à noite */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("../img/capa-paisagem.webp") center 30% / cover no-repeat;
  filter: invert(1) grayscale(1) contrast(1.1);
  mix-blend-mode: screen;
  opacity: .13;
}
.hero::after { /* chuva fina, nas hachuras do céu */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(46,42,53,.2) 0%, rgba(46,42,53,0) 40%, rgba(46,42,53,.85) 100%);
}
.hero__inner {
  position: relative; z-index: 1;
  width: 100%; max-width: 68rem; margin-inline: auto;
  display: grid; gap: 1.25rem; justify-items: center; text-align: center;
}
.hero__book { margin: 0; width: min(42vw, 15rem); }
.hero__book img { filter: drop-shadow(0 28px 40px rgba(0,0,0,.45)); }

.hero__kicker {
  display: inline-block;
  font: 500 1rem/1 var(--sans); letter-spacing: .02em;
  color: var(--on-storm-2); margin-bottom: .6rem;
}
.hero__title {
  font-family: var(--caps); font-weight: 500;
  font-size: clamp(2.1rem, 1.2rem + 4.6vw, 4.25rem);
  line-height: 1.02; letter-spacing: .005em;
  color: #fff;
}
.hero__title span { display: block; }
.hero__by { margin-top: .75rem; font: italic 400 1.15rem/1.4 var(--serif); color: var(--on-storm-2); }
.hero__lede { margin: 1rem auto 0; max-width: 30rem; color: var(--on-storm); font-size: 1.0625rem; line-height: 1.55; }

.hero__buy { margin-top: 1.5rem; display: grid; gap: .9rem; justify-items: center; }
@media (max-width: 30rem) {
  /* no celular, preço e botão precisam caber na primeira tela */
  .hero__lede { display: none; }
}
.hero__event { font: 400 1rem/1.5 var(--sans); color: var(--on-storm-2); max-width: 24rem; }
.hero__event strong { color: var(--on-storm); font-weight: 500; }
.hero__dates { display: block; color: var(--on-storm); font-weight: 500; }
.steps__dates { display: block; }
.countdown { display: block; margin-top: .35rem; color: var(--on-storm); }

.price { display: grid; gap: .15rem; justify-items: inherit; }
.price__value { font: 700 2rem/1 var(--sans); letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.price__note { font: 400 .95rem/1.3 var(--sans); color: var(--on-storm-2); }
.price__note:empty { display: none; }

/* entrada única e orquestrada: o livro emerge, o título surge linha a linha */
@media (prefers-reduced-motion: no-preference) {
  .hero__book { animation: rise 750ms var(--ease-out) both; }
  .hero__title span { animation: clear 600ms var(--ease-out) both; }
  .hero__title span:nth-child(1) { animation-delay: 120ms; }
  .hero__title span:nth-child(2) { animation-delay: 200ms; }
  .hero__title span:nth-child(3) { animation-delay: 280ms; }
  .hero__by, .hero__lede, .hero__buy, .hero__kicker { animation: clear 600ms var(--ease-out) 360ms both; }
}
/* sem opacity no livro: ele é o LCP e precisa ser pintado de imediato */
@keyframes rise { from { transform: translateY(18px) scale(.98); } }
@keyframes clear { from { opacity: 0; filter: blur(6px); transform: translateY(6px); } }

/* ---------- DEDICATÓRIA: o céu começa a abrir ---------- */
.dedication {
  background: linear-gradient(180deg, var(--storm) 0%, var(--storm-2) 45%, var(--mist) 100%);
  color: var(--on-storm);
  padding: 4rem var(--gutter) 9rem;
}
.dedication blockquote { margin: 0 auto; max-width: 32rem; text-align: center; }
.dedication p { font: italic 400 clamp(1.35rem, 1.1rem + 1.2vw, 1.75rem)/1.45 var(--serif); }
.dedication__end { margin-top: 1.25rem; font-size: 1.1rem !important; color: var(--on-storm-2); }

/* ---------- SOBRE ---------- */
.about { background: var(--mist); padding: 1rem 0 4rem; }
.about__lead { font-size: 1.2rem; line-height: 1.65; }
.note { margin: 2.5rem 0 0; padding-left: 1.25rem; border-left: 2px solid var(--plum); }
.note blockquote { margin: 0; }
.note p { font-style: italic; font-size: 1.15rem; line-height: 1.7; }
.note p + p { margin-top: .9rem; }
.note figcaption { margin-top: 1rem; font: 400 .95rem/1.3 var(--sans); color: var(--lilac); }

/* ---------- O CAMINHO ---------- */
.journey { background: linear-gradient(180deg, var(--mist), var(--paper)); padding: 4rem 0 3rem; }
.journey__intro { color: var(--lilac); font-family: var(--sans); margin-bottom: 2.5rem; }
.parts { list-style: none; margin: 0; padding: 0; position: relative; }
/* a trilha de pedrinhas da capa liga as partes */
.parts::before {
  content: ""; position: absolute; left: 1.05rem; top: 1rem; bottom: 1rem; width: 2px;
  background: radial-gradient(circle, var(--line) 1.2px, transparent 1.6px) center top / 2px 10px repeat-y;
}
.part {
  position: relative;
  display: grid; grid-template-columns: 2.2rem 1fr; column-gap: 1rem; row-gap: 1rem;
  padding-bottom: 3rem;
}
.part__num {
  position: relative; z-index: 1;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--plum);
  font: 500 .95rem/1 var(--caps); color: var(--plum);
}
.part h3 { font: 500 1.45rem/1.2 var(--caps); color: var(--ink); margin-top: .2rem; }
.part__poems { margin-top: .4rem; font: italic 400 1.05rem/1.5 var(--serif); color: var(--lilac); }
.part__img {
  grid-column: 2; width: 100%; max-width: 20rem; max-height: 16rem; object-fit: contain; object-position: left center;
  mix-blend-mode: multiply;
}
.part:last-child { padding-bottom: 0; }
.part:last-child .part__num { background: var(--rainbow); box-shadow: none; color: var(--ink); }

@media (min-width: 48rem) {
  .parts::before { left: 50%; transform: translateX(-1px); }
  .part { grid-template-columns: 1fr 2.6rem 1fr; column-gap: 2.5rem; align-items: center; padding-bottom: 4rem; }
  .part__num { grid-column: 2; grid-row: 1; width: 2.6rem; height: 2.6rem; }
  .part__body { grid-column: 3; grid-row: 1; }
  .part__img { grid-column: 1; grid-row: 1; justify-self: end; object-position: right center; }
  .part:nth-child(even) .part__body { grid-column: 1; text-align: right; }
  .part:nth-child(even) .part__img { grid-column: 3; justify-self: start; object-position: left center; }
}

/* ---------- DESENHOS ---------- */
.drawings { background: var(--paper); padding: 3rem 0 3.5rem; }
.drawings__hint { color: var(--lilac); font-family: var(--sans); }
.gallery {
  list-style: none; margin: 1.5rem 0 0; padding: 0 var(--gutter) .5rem;
  display: flex; gap: 1rem;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.gallery li { flex: 0 0 auto; scroll-snap-align: start; }
.gallery figure { margin: 0; }
.gallery__frame {
  display: block; background: #fff; border-radius: 2px; padding: 1rem;
  box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line);
}
.gallery img { height: 13rem; width: auto; max-width: calc(78vw - 2rem); object-fit: contain; }
.gallery figcaption { margin-top: .6rem; font: italic 400 1rem/1.3 var(--serif); color: var(--lilac); }
@media (min-width: 68rem) {
  .gallery { justify-content: center; overflow: visible; }
}

/* ---------- TRECHO ---------- */
.excerpt { background: var(--paper); padding: 3rem 0 5rem; }
.poem { font: italic 400 1.3rem/1.65 var(--serif); }
.poem p + p { margin-top: 1.25rem; }

/* ---------- COMPRA: o arco-íris ---------- */
.buy {
  position: relative;
  padding: 0 var(--gutter) 4rem;
  background: var(--paper);
  display: grid; justify-items: center;
}
/* a capa original, de dia, com o arco-íris de verdade */
.buy__sky {
  width: min(100%, 36rem); aspect-ratio: 1000 / 1000;
  background: url("../img/capa-paisagem.webp") center 18% / cover no-repeat;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 45%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 45%, transparent 75%);
}
.buy__card {
  position: relative; z-index: 1;
  width: min(100%, 30rem); margin-top: -8rem;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px rgba(46, 42, 53, .35);
}
.buy__card h2 { margin-bottom: .5rem; }
.buy__what { font-size: 1.05rem; color: var(--lilac); }
.buy__what cite { font-style: italic; color: var(--ink); }
.price--big { margin: 1.25rem 0 1.5rem; justify-items: start; }
.price--big .price__value { font-size: 2.6rem; color: var(--ink); }
.price--big .price__note { color: var(--lilac); }

.steps { list-style: none; counter-reset: s; margin: 0 0 1.75rem; padding: 0; display: grid; gap: 1rem; }
.steps li {
  counter-increment: s; position: relative; padding-left: 2.5rem;
  font: 400 1.0625rem/1.45 var(--sans); color: var(--lilac);
}
.steps li strong { display: block; color: var(--ink); font-weight: 700; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: .05rem;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 .9rem/1 var(--sans); color: var(--plum);
  box-shadow: inset 0 0 0 1.5px var(--plum);
}
.qty { border: 0; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .6rem; }
.qty legend { padding: 0; margin-bottom: .6rem; font: 700 1.0625rem/1.3 var(--sans); }
.qty__opt {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem;
  min-height: 3.5rem; padding: .7rem 1rem; border-radius: .9rem; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font: 500 1.0625rem/1.3 var(--sans);
  transition: box-shadow 160ms var(--ease-out), background-color 160ms;
}
.qty__opt small { display: block; font-weight: 400; font-size: .9rem; color: var(--lilac); }
.qty__opt input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--plum); }
.qty__price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qty__opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--plum); background: #FBF8FA; }
.qty__opt:has(input:focus-visible) { outline: 3px solid #86B4DA; outline-offset: 2px; }
.buy__secure { margin-top: .85rem; text-align: center; font: 400 .95rem/1.4 var(--sans); color: var(--lilac); }
.buy__error {
  margin-top: 1rem; padding: .85rem 1rem; border-radius: .75rem;
  background: #F6EEF3; color: var(--plum); font: 500 1rem/1.4 var(--sans);
}

/* ---------- FAQ ---------- */
.faq { background: var(--paper); padding: 1rem 0 4.5rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 3.5rem; padding: .75rem 0;
  font: 500 1.125rem/1.35 var(--sans);
  user-select: none; -webkit-user-select: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: 0 0 auto; width: .6rem; height: .6rem;
  border-right: 2px solid var(--plum); border-bottom: 2px solid var(--plum);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.faq details p { padding: 0 0 1.25rem; font: 400 1.0625rem/1.6 var(--sans); color: #4A4352; max-width: 34rem; }
.faq a { color: var(--plum); text-underline-offset: 2px; }

/* ---------- RODAPÉ ---------- */
.footer {
  background: var(--storm); color: var(--on-storm-2);
  padding: 3rem 0 calc(3rem + var(--dock-h) + env(safe-area-inset-bottom, 0px));
  font: 400 1rem/1.6 var(--sans);
}
.footer__care { color: var(--on-storm); font-size: 1.05rem; }
.footer__care a { color: #fff; }
.footer__pub { margin-top: 2.5rem; display: grid; gap: 1rem; justify-items: start; }
.footer__pub img { height: 3rem; width: auto; filter: grayscale(1) brightness(1.9); opacity: .85; }
.footer__pub p { font-size: .9rem; }
.footer__social a { color: #fff; text-underline-offset: .2em; }

/* ---------- CTA fixo (celular) ---------- */
.dock {
  position: fixed; inset: auto 0 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem var(--gutter) calc(.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(248, 247, 249, .94);
  -webkit-backdrop-filter: saturate(1.2) blur(14px); backdrop-filter: saturate(1.2) blur(14px);
  box-shadow: 0 -1px 0 var(--line);
  transform: translateY(110%);
  transition: transform 320ms var(--ease-out);
}
.dock.is-visible { transform: none; }
.dock__price { font: 700 1.35rem/1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dock .btn { flex: 1 1 auto; max-width: 17rem; }
@media (prefers-reduced-motion: reduce) { .dock { transition: none; } }

/* ---------- desktop ---------- */
@media (min-width: 56rem) {
  .hero__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4rem; text-align: left; justify-items: start; align-items: center; }
  .hero__book { width: 100%; max-width: 25rem; justify-self: end; }
  .hero__lede { margin-left: 0; }
  .hero__buy { justify-items: start; }
  .price { justify-items: start; }
  .dock { display: none; }
  .footer { padding-bottom: 3rem; }
  .footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: end; }
  .footer__pub { margin-top: 0; justify-items: end; text-align: right; }
}

/* ==========================================================
   MOVIMENTO
   Tudo conta a mesma história: a chuva cai no topo e para
   conforme se rola, o caminho se preenche parte a parte, os
   desenhos são traçados, e no fim o arco-íris ganha cor.
   Os estados iniciais só valem com JS (html.js), para quem
   não tem JS nunca ficar sem conteúdo.
   ========================================================== */

/* ---------- chuva sobre a gravura noturna ---------- */
.hero__rain {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.hero__rain::before, .hero__rain::after {
  content: ""; position: absolute; left: -10%; right: -10%; top: -260px; bottom: 0;
  background-repeat: repeat;
  will-change: transform;
}
/* camada próxima: gotas mais longas e rápidas */
.hero__rain::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='260'%3E%3Cg stroke='%23EFEDF2' stroke-linecap='round' stroke-width='1.4'%3E%3Cpath d='M20 10v26M95 70v30M150 30v22M60 140v28M130 170v26M15 200v24M170 120v20M80 230v22'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 180px 260px;
  opacity: .3;
  transform: rotate(8deg);
}
/* camada distante: gotas curtas e lentas */
.hero__rain::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='260'%3E%3Cg stroke='%23EFEDF2' stroke-linecap='round' stroke-width='1'%3E%3Cpath d='M10 20v12M70 60v14M40 110v12M100 150v12M25 190v14M85 230v10'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 260px;
  opacity: .22;
  transform: rotate(8deg);
}
@media (prefers-reduced-motion: no-preference) {
  .hero__rain::before { animation: rain-near 900ms linear infinite; }
  .hero__rain::after  { animation: rain-far 1600ms linear infinite; }
}
@keyframes rain-near { from { transform: rotate(8deg) translateY(0); } to { transform: rotate(8deg) translateY(260px); } }
@keyframes rain-far  { from { transform: rotate(8deg) translateY(0); } to { transform: rotate(8deg) translateY(260px); } }

/* a chuva diminui conforme se sai da tempestade (onde o navegador suporta) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero__rain { animation: rain-stop linear both; animation-timeline: view(); animation-range: exit 0% exit 70%; }
  }
}
@keyframes rain-stop { to { opacity: 0; } }

/* ---------- o caminho se preenche ---------- */
.parts::after {
  content: ""; position: absolute; left: 1.05rem; top: 1rem; bottom: 1rem; width: 2px;
  background: linear-gradient(var(--plum), #A994CF 85%, #86B4DA);
  transform-origin: top; transform: scaleY(0);
}
@media (min-width: 48rem) { .parts::after { left: 50%; margin-left: -1px; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .parts::after { animation: path-fill linear both; animation-timeline: --parts; animation-range: entry 40% exit 60%; }
    .parts { view-timeline-name: --parts; }
  }
}
@keyframes path-fill { to { transform: scaleY(1); } }

/* cada parte alcançada acende o numeral */
.part__num { transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out), box-shadow 300ms var(--ease-out); }
.js .part.is-reached .part__num { background: var(--plum); color: #fff; }
.js .part:last-child.is-reached .part__num { background: var(--rainbow); color: var(--ink); }

/* ---------- desenhos traçados da esquerda para a direita ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-draw] {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1400ms var(--ease-in-out);
  }
  .js [data-draw].is-in { clip-path: inset(0 0 0 0); }
}

/* ---------- o poema chega estrofe por estrofe ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .poem[data-reveal] p {
    opacity: 0; transform: translateY(10px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  }
  .js .poem[data-reveal].is-in p { opacity: 1; transform: none; }
  .js .poem[data-reveal].is-in p:nth-child(2) { transition-delay: 450ms; }
  .js .poem[data-reveal].is-in p:nth-child(3) { transition-delay: 900ms; }
}

/* ---------- "e, com ele, as cores também": o arco-íris ganha cor ---------- */
.js .buy__sky[data-reveal] {
  filter: grayscale(1) brightness(.92);
  transition: filter 1800ms var(--ease-out) 200ms;
}
.js .buy__sky[data-reveal].is-in { filter: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .buy__sky[data-reveal] { transform: scale(1.03); transition: filter 1800ms var(--ease-out) 200ms, transform 2000ms var(--ease-out); }
  .js .buy__sky[data-reveal].is-in { transform: none; }
}

/* ---------- brilho lento no anel do botão de pagamento ---------- */
@property --ring { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.btn--shimmer::before {
  background: conic-gradient(from var(--ring), #E98A8A, #EFB07A, #EDD67E, #9FCB8E, #86B4DA, #A994CF, #E98A8A);
}
@media (prefers-reduced-motion: no-preference) {
  .btn--shimmer::before { animation: ring 6s linear infinite; }
}
@keyframes ring { to { --ring: 360deg; } }
