/* =========================================================
   Keprovar Açaí — BIO PRIME
   Direção: o copo em corte. Cada cena é uma camada do copo,
   separada por uma borda espessa e ondulada. O creme claro é o
   leite condensado; o roxo é o da logo; o açaí enche o nome.
   ========================================================= */

:root {
  /* Cor — logo (#34015D e o traço violeta do K) e o próprio copo */
  --leite: #FBF2E4;            /* fundo claro: leite condensado */
  --acai: #3A0B3C;             /* tinta sobre o creme e o açaí que enche o nome */
  --acai-claro: #7A2A78;       /* segunda onda do açaí (profundidade do líquido) */
  --roxo: #34015D;             /* cenas escuras, o fundo da logo */
  --roxo-fundo: #27003F;       /* rodapé */
  --violeta: #B023FE;          /* ação principal (texto branco: 4,6:1) */
  --violeta-press: #9A12E6;
  --violeta-tinta: #7A12C4;    /* link e foco sobre o creme (6,9:1) */
  --leite-soft: rgba(251, 242, 228, 0.82);
  --linha-clara: rgba(251, 242, 228, 0.22);

  /* Tipografia — uma display gorda e cremosa, uma de leitura */
  --display: "Bagel Fat One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Espaço e forma (raio por papel) */
  --gutter: 20px;
  --scene: 64px;
  --r-acao: 999px;
  --r-foto: 22px;
  --onda: 22px;                /* altura da borda ondulada entre camadas */

  /* Motion */
  --motion-instant: 80ms;
  --motion-fast: 140ms;
  --motion-standard: 220ms;
  --motion-emphasis: 320ms;
  --motion-scene: 420ms;
  --motion-assinatura: 1500ms;
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-standard: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-viscoso: cubic-bezier(0.55, 0, 0.2, 1);   /* creme grosso: começa pesado e assenta devagar */
  --shift-cta: 14px;
  --press-scale: 0.97;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --shift-cta: 0px;
    --press-scale: 1;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--roxo-fundo);
}

body {
  margin: 0;
  background: var(--leite);
  color: var(--acai);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

.page {
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--leite);
}

:focus-visible {
  outline: 3px solid var(--foco, var(--violeta-tinta));
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 12px;
  top: calc(12px + var(--safe-top));
  z-index: 40;
  padding: 12px 18px;
  border-radius: var(--r-acao);
  background: var(--acai);
  color: var(--leite);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* marco invisível: passou dele, a pessoa começou a rolar */
.marco-scroll {
  position: absolute;
  top: 160px;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.titulo {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 8.6vw, 38px);
  line-height: 1.08;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

/* ---------- Camadas: borda ondulada entre cenas ---------- */

.camada {
  position: relative;
  background: var(--c);
  color: var(--tinta);
  padding: calc(var(--scene) - 8px) var(--gutter) var(--scene);
}

.camada::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(1px - var(--onda));
  height: var(--onda);
  background: var(--c);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 22' preserveAspectRatio='none'%3E%3Cpath d='M0 13C14 13 20 3 42 3s30 13 52 13 26-10 44-9c10 1 15 6 22 6v9H0z'/%3E%3C/svg%3E") 0 100% / 160px 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 22' preserveAspectRatio='none'%3E%3Cpath d='M0 13C14 13 20 3 42 3s30 13 52 13 26-10 44-9c10 1 15 6 22 6v9H0z'/%3E%3C/svg%3E") 0 100% / 160px 100% repeat-x;
  pointer-events: none;
}

.camada--roxo {
  --c: var(--roxo);
  --tinta: var(--leite);
  --foco: var(--leite);
}
.camada--leite {
  --c: var(--leite);
  --tinta: var(--acai);
  --foco: var(--violeta-tinta);
}

/* ---------- Botões ---------- */

.btn,
.copo,
.cta-flutuante,
.ancora,
.link-claro,
.hero__ig,
.final__contato a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 22px;
  border: 2px solid transparent;
  border-radius: var(--r-acao);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.btn i { font-size: 20px; }

.btn--violeta {
  background: var(--violeta);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(176, 35, 254, 0.75);
}
.btn--violeta:active { background: var(--violeta-press); }

.btn--leite {
  background: var(--leite);
  color: var(--acai);
}
.btn--leite i { color: var(--violeta-tinta); }
.btn--leite:active { background: #EFE2CC; }

.btn--linha {
  border-color: var(--linha-clara);
  color: var(--leite);
  background: transparent;
}
.btn--linha:active { background: rgba(251, 242, 228, 0.1); }

.btn:active,
.copo:active,
.cta-flutuante:active,
.ancora:active,
.link-claro:active,
.hero__ig:active,
.final__contato a:active {
  transform: scale(var(--press-scale));
}

/* ---------- Cena 1: Hero ---------- */

.hero {
  padding: calc(14px + var(--safe-top)) var(--gutter) calc(var(--scene) + 4px);
  background: var(--leite);
}

.hero__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero__logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 0 0 3px var(--leite), 0 0 0 5px var(--violeta);
}

.hero__ig {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid rgba(58, 11, 60, 0.16);
  border-radius: var(--r-acao);
  font-weight: 500;
  text-decoration: none;
}
.hero__ig i { color: var(--violeta-tinta); font-size: 18px; }

/* a foto tem o fundo do próprio copo: recorte com fundo arredondado de copo */
.hero__copo {
  width: min(74%, 400px);
  margin: 18px 0 0 auto;
  aspect-ratio: 532 / 640;
  overflow: hidden;
  border-radius: 26px 26px 42% 42% / 26px 26px 16% 16%;
  background: #1A031C;
}
.hero__copo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* O nome. Sem JS: açaí sólido. Com JS: as letras são o copo e o açaí sobe dentro delas. */
.nome {
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(54px, 17.4vw, 84px);
  line-height: 1;
  letter-spacing: 0.01em;
}

.nome__txt {
  display: inline-block;
  padding: 0.04em 0.04em 0.08em;
  color: var(--acai);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .js .nome__txt {
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 2px var(--acai);
    /* frente: açaí; fundo: onda mais clara, um pouco à frente (profundidade do líquido) */
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 200' preserveAspectRatio='none'%3E%3Cpath fill='%233A0B3C' d='M0 100c20-12 40-12 60 0s40 12 60 0v100H0z'/%3E%3C/svg%3E"),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 200' preserveAspectRatio='none'%3E%3Cpath fill='%237A2A78' d='M0 90c20 12 40 12 60 0s40-12 60 0v110H0z'/%3E%3C/svg%3E");
    background-size: 1.6em 240%, 1.9em 240%;
    background-repeat: repeat-x;
    background-position: 0 0%, 0 0%;          /* vazio: só o contorno do copo */
    -webkit-background-clip: text;
    background-clip: text;
    /* garantia: se o script falhar, o nome enche sozinho em 2,6s */
    animation: revela-seguro 0s linear 2.6s forwards;
  }

  .abertura .nome__txt { animation: enche var(--motion-assinatura) var(--ease-viscoso) forwards; }
  .sem-abertura .nome__txt { animation: enche 600ms var(--ease-viscoso) forwards; }
  .nome-pronto .nome__txt {
    animation: none;
    background-position: 0 100%, 0 100%;
  }
  .nome-pronto .nome__txt.is-balanca { animation: balanca 760ms var(--ease-viscoso); }
}

@keyframes enche {
  from { background-position: 2.4em 0%, -1.9em 0%; }
  to   { background-position: 0 100%, 0 100%; }
}

@keyframes balanca {
  0%   { background-position: 0 100%, 0 100%; }
  45%  { background-position: -0.9em 72%, 0.8em 76%; }
  100% { background-position: -1.6em 100%, 1.9em 100%; }
}

@keyframes revela-seguro {
  to { background-position: 0 100%, 0 100%; }
}

.hero__lead {
  max-width: 30ch;
  margin-top: 12px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
}

.hero__where {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 16px;
}
.hero__where i { color: var(--violeta-tinta); }

.ancora {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 8px;
  color: var(--violeta-tinta);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* ---------- Cena 2: tamanhos ---------- */

.tamanhos__lead {
  max-width: 34ch;
  margin-top: 12px;
  color: var(--leite-soft);
}

.copos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  align-items: end;
  margin-top: 28px;
}

.copo {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 4px 12px;
  border-radius: 20px;
  text-align: center;
  text-decoration: none;
}
.copo:active { background: rgba(251, 242, 228, 0.08); }

/* altura proporcional ao peso: 300, 500 e 700g */
.copo__vidro {
  position: relative;
  width: min(76%, 92px);
  height: calc(var(--nivel) * 150px);
  min-height: 52px;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
  border-radius: 4px 4px 0 0;
  background: rgba(251, 242, 228, 0.14);
}

.copo__acai {
  position: absolute;
  inset: 9% 0 0;
  background: linear-gradient(180deg, var(--violeta) 0%, #8E14D9 100%);
  transform-origin: 50% 100%;
}
/* a cobertura cremosa no topo */
.copo__acai::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 10px;
  background: var(--leite);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 10' preserveAspectRatio='none'%3E%3Cpath d='M0 0h40v4c-5 0-6 6-11 6s-5-5-9-5-4 4-8 4S6 4 0 4z'/%3E%3C/svg%3E") 0 0 / 40px 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 10' preserveAspectRatio='none'%3E%3Cpath d='M0 0h40v4c-5 0-6 6-11 6s-5-5-9-5-4 4-8 4S6 4 0 4z'/%3E%3C/svg%3E") 0 0 / 40px 100% repeat-x;
}

/* os copos enchem uma vez ao entrar na tela; o estado vazio só existe se o script o criou */
.copos--espera .copo__acai { transform: scaleY(0); }
.copos--enche .copo__acai {
  transform: none;
  transition: transform 900ms var(--ease-viscoso);
}
.copos--enche li:nth-child(2) .copo__acai { transition-delay: 140ms; }
.copos--enche li:nth-child(3) .copo__acai { transition-delay: 280ms; }

.copo__nome {
  margin-top: 12px;
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.1;
}
.copo__peso {
  font-size: 15px;
  color: var(--leite-soft);
}
.copo__preco {
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: var(--r-acao);
  background: var(--leite);
  color: var(--acai);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.monta {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--linha-clara);
}
.monta img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}
.monta__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
}
.monta p {
  margin-top: 4px;
  color: var(--leite-soft);
}

.link-claro {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 20px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.link-claro i { color: #D9A2FF; }

/* ---------- Cena 3: frutas ---------- */

.frutas > p {
  margin-top: 8px;
}

.frutas__lista {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.frutas__lista li {
  display: grid;
  justify-items: start;
  gap: 2px;
}
.frutas__lista img {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  background: #fff;
}
.frutas__nome {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.1;
}
.frutas__preco {
  font-weight: 700;
  color: var(--violeta-tinta);
}

/* ---------- Cena 4: de perto ---------- */

.perto {
  padding: 8px 0 calc(var(--scene) + 8px);
  background: var(--leite);
}
.perto__head {
  padding: 0 var(--gutter);
}
.perto__head p {
  margin-top: 10px;
  max-width: 36ch;
}

.trilho {
  margin-top: 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
  --foco: var(--violeta-tinta);
}
.trilho::-webkit-scrollbar { display: none; }

.trilho__lista {
  display: flex;
  gap: 12px;
  width: max-content;
  padding: 0 var(--gutter);
}
.trilho__lista li {
  flex: none;
  width: min(68vw, 280px);
  scroll-snap-align: start;
}
.trilho__lista img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-foto);
  background: #E9D9EA;
}

/* ---------- Cena 5: clube ---------- */

.clube__lead {
  max-width: 32ch;
  margin-top: 12px;
  font-size: 18px;
}

.semanas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 26px;
}
.semanas li {
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--leite-soft);
}
.semanas__copo {
  width: 34px;
  height: 46px;
  clip-path: polygon(0 0, 100% 0, 86% 100%, 14% 100%);
  background:
    linear-gradient(180deg, var(--leite) 0 18%, var(--violeta) 18% 100%);
}

.clube__preco {
  margin-top: 26px;
  font-size: 18px;
}
.clube__preco strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: 46px;
  line-height: 1;
  margin-right: 6px;
}
.clube__conta {
  margin: 8px 0 24px;
  color: var(--leite-soft);
}

/* ---------- Cena 6: entrega ---------- */

.entrega__head {
  display: grid;
  grid-template-columns: minmax(120px, 42%) 1fr;
  gap: 18px;
  align-items: end;
}
.entrega__foto {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-foto) var(--r-foto) 40% 40% / var(--r-foto) var(--r-foto) 14% 14%;
  background: #E9D9EA;
}

.passos {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}
.passos li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}
.passos i {
  margin-top: 3px;
  font-size: 18px;
  color: var(--violeta-tinta);
  text-align: center;
}

/* ---------- Cena 7: CTA final ---------- */

.final {
  display: grid;
  gap: 14px;
  padding-bottom: 48px;
}
.final__titulo { font-size: clamp(36px, 11vw, 46px); }
.final > p {
  margin-bottom: 10px;
  color: var(--leite-soft);
  font-size: 18px;
}

.final__contato {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 6px;
}
.final__contato a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.final__contato i { color: #D9A2FF; }

/* ---------- Rodapé ---------- */

.rodape {
  padding: 28px var(--gutter) calc(28px + var(--safe-bottom));
  background: var(--roxo-fundo);
  color: var(--leite);
  text-align: center;
  --foco: var(--leite);
}
.rodape__copy {
  font-size: 14px;
  color: var(--leite-soft);
}

.credito {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin: 18px auto 0;
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
  color: var(--leite);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.credito-txt strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.selo-b2 {
  --seal-ink: currentColor;
  --seal-accent: var(--violeta);
  --seal-ring: 2.2 1.6;          /* tracejado largo: o pingo do leite condensado */
  --seal-font: var(--text);
  flex: none;
  width: 72px;
  height: 72px;
  overflow: visible;
  transition: rotate 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.selo-borda,
.selo-anel { fill: none; stroke: var(--seal-ink); }
.selo-borda { stroke-width: 1; }
.selo-anel { stroke-width: 0.7; stroke-dasharray: var(--seal-ring); opacity: 0.75; }
.selo-texto {
  fill: var(--seal-ink);
  font-family: var(--seal-font);
  font-size: 6.3px;
  font-weight: 600;
  letter-spacing: 0.8px;
}
.selo-b { fill: var(--seal-ink); }
.selo-acento { fill: var(--seal-accent); }

.credito:active .selo-b2 { rotate: -10deg; }

.selo-giro {
  transform-box: view-box;
  transform-origin: 50px 50px;
}
@keyframes selo-gira { to { transform: rotate(360deg); } }
@keyframes selo-flutua {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}
@media (prefers-reduced-motion: no-preference) {
  .selo-giro { animation: selo-gira 24s linear infinite; }
  .selo-b2 { animation: selo-flutua 4.8s ease-in-out infinite; }
  .selo-b2.is-still,
  .selo-b2.is-still .selo-giro,
  .is-page-hidden .selo-b2,
  .is-page-hidden .selo-giro { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .credito:active .selo-b2 { rotate: none; }
}

/* ---------- CTA flutuante (Regra do CTA) ---------- */

.cta-flutuante {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--safe-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  border-radius: var(--r-acao);
  background: var(--violeta);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 14px 30px -12px rgba(52, 1, 93, 0.7);
  --foco: var(--acai);
  translate: -50% var(--shift-cta);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--motion-standard) var(--ease-exit),
    translate var(--motion-standard) var(--ease-exit),
    visibility 0s linear var(--motion-standard),
    transform var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}
.cta-flutuante i { font-size: 22px; }
.cta-flutuante:active { background: var(--violeta-press); }

.cta-flutuante.is-visivel {
  translate: -50% 0;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 280ms var(--ease-enter),
    translate 280ms var(--ease-enter),
    visibility 0s,
    transform var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

/* ---------- Telas maiores ---------- */

@media (min-width: 560px) {
  :root { --gutter: 28px; }
  .page { box-shadow: 0 0 0 1px rgba(52, 1, 93, 0.08); }
}

@media (hover: hover) and (pointer: fine) {
  .btn--violeta:hover,
  .cta-flutuante:hover { background: var(--violeta-press); }
  .copo:hover { background: rgba(251, 242, 228, 0.06); }
}

/* ---------- Reduced motion: estados finais, sem deslocamento ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .nome__txt,
  .abertura .nome__txt,
  .sem-abertura .nome__txt,
  .nome-pronto .nome__txt.is-balanca {
    animation: none;
    background-position: 0 100%, 0 100%;
  }
  .copos--espera .copo__acai { transform: none; }
  .copos--enche .copo__acai { transition: none; }
}
