/* extras.css: animacao da primeira entrada em Sobremesas e em Bebidas (Bebidas e sobremesas).
   Tudo prefixado com dsx; sem html.extras-splash-on nada aqui age. O layout poe a classe antes
   da primeira pintura; o extras.js monta o cartao e poe html.extras-splash-running, e a capa
   creme da lugar a pagina escurecida atras do cartao. Sem o extras.js, a capa some sozinha
   depois de 4 s (plano B). */

/* ---------- Capa desde o primeiro pixel ---------- */
html.extras-splash-on::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483000;
  background-color: #FFF4E0;
  background-image: radial-gradient(ellipse at 50% 40%, #FFFBF4 0%, #FFF4E0 46%, #FBE7C6 100%);
  animation: dsx-gone 0.45s ease 4s forwards;
}
html.extras-splash-on.extras-splash-running::before { animation: dsx-coverout 0.4s ease forwards; }
/* Trava a rolagem so com o script rodando: se ele falhar, a pagina nunca fica presa. */
html.extras-splash-running,
html.extras-splash-running body { overflow: hidden; }
/* Desktop com barra de rolagem: a pagina escurecida nao pula para o lado, e a faixa da barra
   fica da cor do veu (creme sob o veu da borda) em vez de uma tira clara. */
html.extras-splash-running.extras-splash-gutter { scrollbar-gutter: stable; background-color: #66594F; }
@keyframes dsx-gone { to { opacity: 0; visibility: hidden; } }
@keyframes dsx-coverout { to { opacity: 0; visibility: hidden; } }

/* ---------- Veu e cartao ---------- */
.dsx {
  --x-cream: #FFF4E0;
  --x-paper: #FFFBF4;
  --x-ink: #2B1D17;
  --x-ink-soft: #6A5245;
  --x-cherry: #D3313A;
  --x-cherry-ink: #B8232D;
  --x-teal-deep: #146B63;
  --x-mustard: #F4B63F;
  --x-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483001;
  display: flex;
  align-items: flex-start;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: radial-gradient(ellipse at 50% 45%, rgba(43, 29, 23, 0.5) 0%, rgba(43, 29, 23, 0.72) 100%);
  color: var(--x-ink);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  animation: dsx-in 0.3s ease both;
}
.dsx *,
.dsx *::before,
.dsx *::after { box-sizing: border-box; }
/* Aba em segundo plano: o desenho fica parado ate o script dar o play (o veu nao, para a pagina
   nunca aparecer sem escurecer quando a capa sai). */
.dsx:not(.is-play) * { animation-play-state: paused !important; }
.dsx.is-out { animation: dsx-out 0.3s ease forwards; pointer-events: none; }
.dsx.is-out .dsx__card { animation: dsx-cardout 0.3s ease forwards; }

/* O cartao cresce para baixo quando a frase final abre: o topo fica parado, mais ou menos no
   lugar em que um cartao ja aberto ficaria centralizado. */
.dsx__card {
  position: relative;
  margin: max(0px, calc(50vh - 340px)) auto auto;
  margin: max(0px, calc(50dvh - 340px)) auto auto;
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  background: var(--x-paper);
  border: 4px solid var(--x-ink);
  border-radius: 24px;
  box-shadow: 8px 8px 0 var(--x-ink);
  animation: dsx-cardin 0.55s var(--x-pop) 0.05s both;
}
@media (min-width: 900px) and (min-height: 720px) {
  .dsx__card { max-width: 520px; }
}

/* Faixa do topo, como o rotulo da caixa de TV dinner. */
.dsx__band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  border-bottom: 4px solid var(--x-ink);
  background: var(--x-cherry);
  text-align: left;
}
.dsx[data-linha="bebidas"] .dsx__band { background: var(--x-teal-deep); }
.dsx__title {
  margin: 0;
  font-family: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
  font-weight: 400;
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--x-cream);
  text-shadow: 2px 2px 0 var(--x-ink);
}
.dsx__skip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 16px;
  border: 2px solid var(--x-ink);
  border-radius: 999px;
  background: var(--x-paper);
  color: var(--x-ink);
  font: 800 0.85rem/1 'DM Sans', system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 var(--x-ink);
  cursor: pointer;
}
.dsx__skip:hover { background: #FCE3A6; }
/* base.css carrega depois e arredonda o foco em 4px: aqui o seletor e mais forte. */
.dsx button:focus-visible { outline: 3px solid var(--x-teal-deep); outline-offset: 3px; border-radius: 999px; }
.dsx .dsx__skip:focus-visible { outline-color: var(--x-paper); }

.dsx__win { overflow: hidden; border-bottom: 4px solid var(--x-ink); background: var(--x-cream); }
.dsx .dsx__svg { display: block; width: 100%; max-width: none; height: auto; }
/* Celular: o desenho cresce e as beiradas (so fundo) ficam de fora. */
@media (max-width: 500px) {
  .dsx .dsx__svg { width: 125%; margin-left: -12.5%; }
}

.dsx__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 20px;
}
.dsx__kicker {
  margin: 0;
  font-family: 'Yellowtail', 'Brush Script MT', cursive;
  font-size: clamp(1.5rem, 5.6vw, 1.85rem);
  line-height: 1.1;
  color: var(--x-cherry-ink);
  rotate: -3deg;
  animation: dsx-word 0.5s var(--x-pop) 0.25s both;
}
.dsx__main {
  margin: 0;
  font-family: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 8.4vw, 2.75rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--x-ink);
  text-shadow: 3px 3px 0 var(--x-mustard);
}
.dsx[data-linha="sobremesas"] .dsx__main { font-size: clamp(1.8rem, 7.4vw, 2.45rem); }
.dsx__w { display: inline-block; animation: dsx-word 0.42s var(--x-pop) both; }
/* Frase final e botao: fechados (altura zero) ate a ultima cena, depois abrem. */
.dsx__end {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  visibility: hidden;
  transition: grid-template-rows 0.45s cubic-bezier(0.3, 0.8, 0.3, 1);
}
.dsx.is-end .dsx__end { grid-template-rows: 1fr; visibility: visible; }
.dsx__endin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
  /* folga para a sombra e o contorno de foco do botao */
  margin: -2px -12px -12px;
  padding: 4px 12px 12px;
}
.dsx__sub {
  margin: 0;
  max-width: 28em;
  font-weight: 700;
  font-size: clamp(0.98rem, 3.7vw, 1.06rem);
  line-height: 1.38;
  color: var(--x-ink);
  opacity: 0;
}
.dsx.is-end .dsx__sub { opacity: 1; animation: dsx-word 0.45s var(--x-pop) both; }
.dsx__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.9em 1.9em;
  border: 2px solid var(--x-ink);
  border-radius: 999px;
  background: var(--x-cherry);
  color: #fff;
  font: 800 1rem/1.1 'DM Sans', system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--x-ink);
  cursor: pointer;
  opacity: 0;
  transition: transform 0.15s var(--x-pop), box-shadow 0.15s;
}
.dsx.is-end .dsx__btn { opacity: 1; animation: dsx-word 0.45s var(--x-pop) 0.15s both; }
.dsx__btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--x-ink); }
.dsx__btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--x-ink); }

/* Tela baixa e larga (celular deitado): desenho ao lado do texto. */
@media (max-height: 560px) and (min-width: 600px) {
  .dsx__card { max-width: 780px; }
  .dsx__body { display: flex; align-items: center; }
  .dsx__win { flex: 0 0 54%; align-self: stretch; display: flex; align-items: center; border-bottom: 0; border-right: 4px solid var(--x-ink); }
  .dsx__text { flex: 1 1 0; min-width: 0; }
}

/* ---------- Dentro do desenho (SVG) ---------- */
.dsx-fb { transform-box: fill-box; transform-origin: 50% 50%; }
.dsx-spk { animation: dsx-pop 0.45s var(--x-pop) both; }

/* Sobremesas */
.dsx-freezer,
.dsx-bank { opacity: 0; animation: dsx-fade 0.5s ease 1.7s both; }
.dsx-twinkle { animation: dsx-twinkle 0.9s ease-in-out 2 both; }
.dsx-rise { animation: dsx-rise 0.7s ease-out 0.35s both; }
.dsx-shiver { animation: dsx-shiver 0.1s linear 1.05s 6; }
.dsx-puff { opacity: 0; animation: dsx-puff 0.9s ease-out 0.55s both; }
.dsx-puff--2 { animation-delay: 0.7s; }
.dsx-clock { opacity: 0; animation: dsx-badge 1.3s ease 1.75s both; }
.dsx-hand-m { animation: dsx-spin 0.4s linear 1.85s 3; }
.dsx-hand-h { animation: dsx-spin 1.2s linear 1.85s; }
.dsx-frost { opacity: 0; animation: dsx-fade 0.6s ease 1.95s both; }
.dsx-drip { opacity: 0; animation: dsx-drip 0.8s ease-in 2.1s both; }
.dsx-drip--2 { animation-delay: 2.35s; }
.dsx-lid { opacity: 0; transform: translate(150px, -170px) rotate(220deg); animation: dsx-lid 0.75s ease-out 3s both; }
.dsx-dome { animation: dsx-dome 0.5s var(--x-pop) 3.08s both; }
.dsx-cherry { animation: dsx-pop 0.4s var(--x-pop) 3.35s both; }
.dsx-burst { animation: dsx-stamp 0.45s var(--x-pop) 3.02s both; }
.dsx-spoon { transform: translateY(-55px); animation: dsx-spoon 1.1s ease-in-out 3.5s both; }
.dsx-scoop { animation: dsx-pop 0.3s var(--x-pop) 4.12s both; }
.dsx[data-linha="sobremesas"] .dsx-spk--1 { animation-delay: 4.45s; }
.dsx[data-linha="sobremesas"] .dsx-spk--2 { animation-delay: 4.6s; }

/* Bebidas */
.dsx-bagdrop { animation: dsx-drop 0.6s ease-out 0.3s both; }
.dsx-bagshadow { opacity: 0; animation: dsx-bagshadow 2s ease 0.3s both; }
.dsx-tear { opacity: 0; transform: translate(-10px, -18px) rotate(-16deg); animation: dsx-tear 0.3s ease-out 0.95s both; }
.dsx-bagtip { opacity: 0; transform: translate(-60px, -150px) rotate(60deg); animation: dsx-bagtip 1.25s ease-in-out 1s both; }
.dsx-bagcubes { opacity: 0; animation: dsx-fade 0.4s ease 1.4s both; }
.dsx-fall { animation: dsx-fall 0.42s cubic-bezier(0.45, 0, 0.8, 0.6) both; }
.dsx-cubesout,
.dsx-waterout { opacity: 0; animation: dsx-fade 0.5s ease 3.35s both; }
.dsx-pitcher { opacity: 0; animation: dsx-pitcher 1.1s ease-in-out 2s both; }
.dsx-stream { opacity: 0; animation: dsx-window2 0.6s linear 2.42s both; }
.dsx-stream--glass { animation-delay: 4.45s; }
.dsx-pour { stroke-dasharray: 1; stroke-dashoffset: -1; animation: dsx-pour 0.6s linear 2.42s both; }
.dsx-stream--glass .dsx-pour { animation-delay: 4.45s; }
.dsx-waterlvl { animation: dsx-fill 0.5s ease-out 2.47s both; }
.dsx-lidon { animation: dsx-lidon 0.3s cubic-bezier(0.5, 0, 0.7, 1.4) 2.95s both; }
.dsx-lidoff { opacity: 0; transform: translate(-90px, -110px) rotate(-200deg); animation: dsx-lidoff 0.45s ease-out 4.05s both; }
.dsx-shake { animation: dsx-shake 0.1s linear 3.2s 9; }
.dsx-vortexwin { opacity: 0; animation: dsx-window 0.9s linear 3.2s both; }
.dsx-vspin { animation: dsx-spin 0.25s linear 3.2s 4; }
.dsx-moves { opacity: 0; animation: dsx-flick 0.15s steps(1) 3.2s 6; }
.dsx-light { opacity: 0; animation: dsx-flick 0.2s steps(1) 3.2s 4; }
.dsx-smoothin { animation: dsx-appear 0.6s ease 3.35s both; }
.dsx-drain { transform: scaleY(0.55); animation: dsx-drain 0.55s ease-in-out 4.45s both; }
.dsx-tilt { animation: dsx-tilt 1s ease-in-out 4.15s both; }
.dsx-glassfill { animation: dsx-fill 0.55s ease-out 4.5s both; }
.dsx-straw { animation: dsx-straw 0.35s cubic-bezier(0.3, 0.7, 0.4, 1.3) 5s both; }
.dsx-sfx { opacity: 0; animation: dsx-sfx 0.65s ease 2.5s both; }
.dsx-sfx--vrum { animation-duration: 0.85s; animation-delay: 3.25s; }
.dsx[data-linha="bebidas"] .dsx-spk--1 { animation-delay: 5.1s; }
.dsx[data-linha="bebidas"] .dsx-spk--2 { animation-delay: 5.22s; }

/* ---------- Versao parada (prefers-reduced-motion): o cartao ja no quadro final ---------- */
.dsx--static,
.dsx--static *,
.dsx--static *::before,
.dsx--static *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  html.extras-splash-on.extras-splash-running::before { animation: none; opacity: 0; visibility: hidden; }
  .dsx,
  .dsx *,
  .dsx *::before,
  .dsx *::after { animation: none !important; transition: none !important; }
}

/* ---------- Movimentos ---------- */
@keyframes dsx-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dsx-out { to { opacity: 0; } }
@keyframes dsx-cardin { from { opacity: 0; transform: translateY(28px) rotate(-3deg) scale(0.86); } to { opacity: 1; transform: none; } }
@keyframes dsx-cardout { to { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes dsx-word { from { opacity: 0; transform: translateY(0.35em) scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes dsx-fade { from { opacity: 1; } to { opacity: 0; } }
@keyframes dsx-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes dsx-window2 { 0% { opacity: 0; } 3%, 96% { opacity: 1; } 100% { opacity: 0; } }
@keyframes dsx-pop { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: none; } }
@keyframes dsx-stamp { from { opacity: 0; transform: scale(2.4) rotate(-20deg); } to { opacity: 1; transform: none; } }
@keyframes dsx-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes dsx-twinkle { 0%, 100% { transform: scale(0.75) rotate(0deg); } 50% { transform: scale(1.15) rotate(30deg); } }
@keyframes dsx-rise {
  0% { transform: translateY(150px); }
  65% { transform: translateY(-12px); }
  82% { transform: translateY(3px); }
  100% { transform: none; }
}
@keyframes dsx-shiver { 0%, 100% { transform: none; } 25% { transform: translateX(-2px) rotate(-1.5deg); } 75% { transform: translateX(2px) rotate(1.5deg); } }
@keyframes dsx-puff { 0% { opacity: 0; transform: scale(0.3); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-28px) scale(1.35); } }
@keyframes dsx-badge {
  0% { opacity: 0; transform: scale(0.3); }
  16% { opacity: 1; transform: scale(1.1); }
  24% { transform: scale(1); }
  84% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.6); }
}
@keyframes dsx-drip { 0% { opacity: 0; transform: none; } 15%, 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(32px); } }
@keyframes dsx-lid {
  0% { opacity: 1; transform: none; }
  18% { opacity: 1; transform: translateY(4px) scale(1.04, 0.86); }
  38% { opacity: 1; transform: translate(12px, -34px) rotate(20deg); }
  100% { opacity: 0; transform: translate(150px, -170px) rotate(220deg); }
}
@keyframes dsx-dome { from { transform: scale(0.4, 0); } to { transform: none; } }
@keyframes dsx-spoon {
  0% { opacity: 0; transform: translateY(-170px); }
  12% { opacity: 1; }
  40% { transform: translateY(0); }
  58% { transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(-55px); }
}
@keyframes dsx-drop {
  0% { transform: translateY(-210px); }
  60% { transform: translateY(0) scale(1.08, 0.9); }
  80% { transform: translateY(-8px) scale(0.97, 1.03); }
  100% { transform: none; }
}
@keyframes dsx-bagshadow { 0% { opacity: 0; } 20%, 32% { opacity: 1; } 42%, 100% { opacity: 0; } }
@keyframes dsx-bagtip {
  0% { opacity: 1; transform: none; }
  32% { opacity: 1; transform: translate(130px, -114px) rotate(150deg); }
  44% { transform: translate(130px, -114px) rotate(162deg); }
  56% { transform: translate(130px, -114px) rotate(144deg); }
  70% { opacity: 1; transform: translate(130px, -114px) rotate(152deg); }
  100% { opacity: 0; transform: translate(-60px, -150px) rotate(60deg); }
}
@keyframes dsx-tear { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(-10px, -18px) rotate(-16deg); } }
@keyframes dsx-fall {
  0% { opacity: 0; transform: translate(var(--fx), var(--fy)) rotate(var(--fr)); }
  10% { opacity: 1; }
  82% { transform: translateY(2px); }
  100% { opacity: 1; transform: none; }
}
@keyframes dsx-pitcher {
  0% { opacity: 0; transform: translate(90px, -50px); }
  25% { opacity: 1; transform: none; }
  40% { transform: rotate(-45deg); }
  78% { opacity: 1; transform: rotate(-45deg); }
  100% { opacity: 0; transform: translate(90px, -50px); }
}
@keyframes dsx-pour { 0% { stroke-dashoffset: 1; } 25%, 75% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
@keyframes dsx-fill { from { transform: scaleY(0); } to { transform: none; } }
@keyframes dsx-lidon { 0% { opacity: 0; transform: translateY(-50px); } 30% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes dsx-lidoff {
  0% { opacity: 1; transform: none; }
  30% { opacity: 1; transform: translateY(-14px) rotate(-8deg); }
  100% { opacity: 0; transform: translate(-90px, -110px) rotate(-200deg); }
}
@keyframes dsx-shake { 0%, 100% { transform: none; } 25% { transform: translate(-1.6px, 0.6px) rotate(-1.4deg); } 75% { transform: translate(1.6px, -0.6px) rotate(1.4deg); } }
@keyframes dsx-window { 0% { opacity: 0; } 12%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes dsx-flick { 0% { opacity: 1; } 50% { opacity: 0.15; } }
@keyframes dsx-drain { from { transform: none; } to { transform: scaleY(0.55); } }
@keyframes dsx-tilt { 0%, 100% { transform: none; } 30%, 75% { transform: rotate(32deg); } }
@keyframes dsx-straw { from { opacity: 0; transform: translateY(-60px); } to { opacity: 1; transform: none; } }
@keyframes dsx-sfx {
  0% { opacity: 0; transform: scale(0.3); }
  25% { opacity: 1; transform: scale(1.12); }
  40% { transform: scale(1); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
