/* Abertura: o copo da foto de referência sendo montado (intro.js). Só aparece com
   html.intro-active, posto no index.html na primeira visita da sessão.
   Coordenadas do copo: as da foto, 341 × 456 unidades; a marca começa acima dele. */
.intro { display: none; }
html.intro-active { overflow: hidden; }
html.intro-active .intro, .intro.is-leaving {
  /* largura do copo: cabe inteiro (com a marca acima) em qualquer tela, sem esticar */
  --cw: min(50vh, 84vw, 380px);
  --cw: min(50svh, 84vw, 380px);
  display: flex; align-items: center; justify-content: center;
  position: fixed; inset: 0; z-index: 1000;
  background: radial-gradient(120% 90% at 50% 46%, #4b1259 0%, #2c0836 52%, #13031a 100%);
  /* saída segura: se o script não concluir, a abertura some sozinha */
  animation: intro-failsafe 400ms ease 9s forwards;
}
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; } }
.intro.is-leaving { pointer-events: none; }

.intro__stage { position: relative; width: var(--cw); height: calc(var(--cw) * 604 / 341); }
.intro__cup { position: absolute; left: 0; bottom: 0; width: 100%; height: calc(var(--cw) * 456 / 341); }
.intro__cup > * { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.intro__cup svg { overflow: visible; }

/* A mesma marca do começo ao fim: acima do copo e, no final, como rótulo. */
.intro__logo {
  position: absolute; z-index: 6; top: 0;
  left: calc(var(--cw) * (172 - 70) / 341);
  width: calc(var(--cw) * 140 / 341); aspect-ratio: 1;
  border-radius: 50%;
  transform-origin: 50% 50%;
}
.intro__logo img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 10px 22px rgba(10, 0, 15, 0.45)); }
.intro__logo::after {
  /* curvatura e brilho do plástico sobre o rótulo, quando a marca encaixa */
  content: ''; position: absolute; inset: 0; border-radius: 50%; opacity: 0; pointer-events: none;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 36%),
    linear-gradient(90deg, rgba(30, 0, 30, 0.3), rgba(30, 0, 30, 0) 24%, rgba(30, 0, 30, 0) 74%, rgba(30, 0, 30, 0.28));
}
.intro__logo.is-label img { filter: drop-shadow(0 1px 2px rgba(20, 0, 20, 0.35)); }
.intro__logo.is-label::after { opacity: 1; transition: opacity 260ms ease; }

/* Camadas da foto sem as frutas: aparecem conforme o nível sobe (clip-path no JS). */
.ic-base { clip-path: inset(100% 0 0 0); }
/* Frutas, fluxo e superfície: recortados pela parede interna; acima da borda, só a boca. */
.ic-inside {
  clip-path: polygon(19.94% -40%, 81.82% -40%, 81.82% 21.93%, 71.85% 92.76%, 50.4% 93.6%, 28.74% 92.76%, 19.94% 21.93%);
}
.ic-fruit { position: absolute; opacity: 0; transform-origin: 50% 60%; }
.ic-stream {
  position: absolute; left: 46.6%; width: 8%; top: 0; height: 0; opacity: 0;
  border-radius: 999px;
  background-repeat: repeat-y; background-size: 100% auto;
}
.ic-stream::after {
  /* brilho do fluxo */
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.32) 44%, rgba(255, 255, 255, 0) 58%, rgba(0, 0, 0, 0.3));
}
.ic-stream--acai { background-image: url(fluxo-acai.webp); }
.ic-stream--creme { background-image: url(fluxo-creme.webp); }
.ic-surface { position: absolute; left: 18%; width: 64%; top: 0; height: 2.2%; border-radius: 50%; opacity: 0; transform-origin: 50% 50%; }
.ic-surface--acai { background: radial-gradient(60% 80% at 46% 40%, rgba(170, 80, 130, 0.6), rgba(90, 20, 60, 0.15) 70%, rgba(90, 20, 60, 0)); }
.ic-surface--creme { background: radial-gradient(60% 80% at 46% 40%, rgba(255, 252, 240, 0.85), rgba(240, 220, 170, 0.2) 70%, rgba(240, 220, 170, 0)); }

/* Topo cremoso com o respingo (foto, acima da borda). */
.ic-top { height: calc(104 / 456 * 100%) !important; transform-origin: 50% 100%; opacity: 0; }
/* Quadro final: a foto inteira, sem fundo. */
.ic-full { opacity: 0; }

.intro__skip {
  position: absolute; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom));
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.86);
  font: 700 15px/1 system-ui, -apple-system, 'Segoe UI', sans-serif; cursor: pointer;
}
.intro__skip:hover { background: rgba(255, 255, 255, 0.2); }
.intro__skip:focus-visible { outline: 3px solid #c8f04a; outline-offset: 3px; }

/* mesma correção de nitidez do site no Chromium (ver styles.css) */
.is-chromium .intro img { image-rendering: -webkit-optimize-contrast; }
