/* sempre.css: abertura do Destampa Sempre (so em /sempre). Tudo aqui e prefixado com dsse.
   O layout poe html.sempre-splash-on antes da primeira pintura; o sempre.js monta a abertura e
   poe html.sempre-splash-running. Sem o sempre.js, a capa some sozinha depois de 4 s (plano B). */

/* ---------- Capa desde o primeiro pixel ---------- */
html.sempre-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: dsse-failsafe 0.45s ease 4s forwards;
}
html.sempre-splash-on.sempre-splash-running::before { animation: none; }
/* Trava a rolagem so com o script rodando: se ele falhar, a pagina nunca fica presa. */
html.sempre-splash-running,
html.sempre-splash-running body { overflow: hidden; }
@keyframes dsse-failsafe { to { opacity: 0; visibility: hidden; } }

/* ---------- Palco ---------- */
.dsse {
  --e-cream: #FFF4E0;
  --e-paper: #FFFBF4;
  --e-ink: #2B1D17;
  --e-cherry: #D3313A;
  --e-cherry-ink: #B8232D;
  --e-teal-deep: #146B63;
  --e-mustard: #F4B63F;
  --e-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;
  flex-direction: column;
  padding: 76px 16px 44px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background-color: #FFF4E0;
  background-image: radial-gradient(ellipse at 50% 40%, #FFFBF4 0%, #FFF4E0 46%, #FBE7C6 100%);
  color: var(--e-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: dsse-in 0.35s ease both;
}
.dsse *,
.dsse *::before,
.dsse *::after { box-sizing: border-box; }
.dsse [hidden] { display: none !important; }
.dsse.is-out { animation: dsse-out 0.38s ease forwards; pointer-events: none; }

.dsse__room { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.dsse__paper {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%232BB3A3' stroke-opacity='.28' stroke-width='2'%3E%3Cellipse cx='50' cy='52' rx='24' ry='8'/%3E%3Cellipse cx='50' cy='52' rx='24' ry='8' transform='rotate(60 50 52)'/%3E%3Cellipse cx='50' cy='52' rx='24' ry='8' transform='rotate(-60 50 52)'/%3E%3C/g%3E%3Ccircle cx='50' cy='52' r='3.4' fill='%23D3313A' fill-opacity='.35'/%3E%3Cpath d='M164 140l3 11 11 3-11 3-3 11-3-11-11-3 11-3z' fill='%23F4B63F' fill-opacity='.55'/%3E%3Cpath d='M156 38l2 7 7 2-7 2-2 7-2-7-7-2 7-2z' fill='%23D3313A' fill-opacity='.22'/%3E%3Cpath d='M34 172q16-20 34 0' fill='none' stroke='%23146B63' stroke-opacity='.22' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}
.dsse__rays {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 240vmax;
  height: 240vmax;
  margin: -120vmax 0 0 -120vmax;
  background: repeating-conic-gradient(from 0deg, rgba(244, 182, 63, 0.42) 0deg 7.5deg, rgba(244, 182, 63, 0) 7.5deg 15deg);
  opacity: 0;
  transition: opacity 0.6s ease;
  animation: dsse-spin 70s linear infinite;
  animation-play-state: paused;
}
.dsse.is-lit .dsse__rays { opacity: 1; animation-play-state: running; }
.dsse__floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  border-top: 3px solid var(--e-ink);
  background-color: var(--e-cream);
  background-image:
    linear-gradient(45deg, var(--e-teal-deep) 25%, transparent 25%, transparent 75%, var(--e-teal-deep) 75%),
    linear-gradient(45deg, var(--e-teal-deep) 25%, transparent 25%, transparent 75%, var(--e-teal-deep) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
}

.dsse__skip {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--e-ink);
  border-radius: 999px;
  background: var(--e-paper);
  color: var(--e-ink);
  font: 800 0.9rem/1 'DM Sans', system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 var(--e-ink);
  cursor: pointer;
}
.dsse__skip:hover { background: #FCE3A6; }
/* base.css carrega depois e arredonda o foco em 4px: aqui o seletor e mais forte. */
.dsse button:focus-visible { outline: 3px solid var(--e-teal-deep); outline-offset: 3px; border-radius: 999px; }

.dsse__stage {
  position: relative;
  z-index: 1;
  margin: auto;
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2.6vh, 26px);
}

/* Quadrinho de revista: moldura grossa, cantos redondos, sombra chapada. */
.dsse__panel {
  width: 100%;
  max-width: 560px;
  width: min(100%, 560px, calc((100vh - 350px) * 1.333));
  width: min(100%, 560px, calc((100dvh - 350px) * 1.333));
  min-width: min(100%, 250px);
  flex: none;
  animation: dsse-panelin 0.8s var(--e-pop) both;
}
.dsse__panelin {
  position: relative;
  overflow: hidden;
  border: 5px solid var(--e-ink);
  border-radius: 22px;
  background: var(--e-cream);
  box-shadow: 8px 8px 0 var(--e-ink);
  rotate: -1.2deg;
}
.dsse.is-turn .dsse__panelin { animation: dsse-nudge 0.5s ease; }
.dsse__svg { display: block; width: 100%; height: auto; }

.dsse__caption {
  width: 100%;
  max-width: 34rem;
  min-height: 11.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dsse__kicker {
  margin: 0;
  font-family: 'Yellowtail', 'Brush Script MT', cursive;
  font-size: clamp(1.6rem, 5.2vw, 2.2rem);
  line-height: 1.1;
  color: var(--e-cherry-ink);
  rotate: -3deg;
}
.dsse__brand { margin: 0; display: flex; align-items: center; justify-content: center; gap: 4px; line-height: 0; }
.dsse__brand img { display: block; width: auto; height: clamp(62px, 17vw, 100px); max-width: 70%; filter: drop-shadow(3px 3px 0 rgba(43, 29, 23, 0.85)); }
.dsse__tag {
  display: inline-block;
  padding: 6px 12px 4px;
  border: 3px solid var(--e-ink);
  border-radius: 10px;
  background: var(--e-cherry);
  color: var(--e-cream);
  font-family: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  line-height: 1;
  letter-spacing: 0.08em;
  box-shadow: 3px 3px 0 var(--e-ink);
  rotate: -6deg;
}
.dsse__main {
  margin: 0;
  font-family: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 9vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--e-ink);
  text-shadow: 3px 3px 0 var(--e-mustard);
}
.dsse-hot { color: var(--e-cherry-ink); }
.dsse__sub {
  margin: 0;
  max-width: 26em;
  font-weight: 800;
  font-size: clamp(1.05rem, 3.8vw, 1.3rem);
  line-height: 1.3;
  color: var(--e-ink);
}
.dsse__caption .is-anim { animation: dsse-cap 0.55s var(--e-pop) both; }
.dsse__cta { margin-top: 10px; display: flex; justify-content: center; }
.dsse__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.9em 1.9em;
  border: 2px solid var(--e-ink);
  border-radius: 999px;
  background: var(--e-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(--e-ink);
  cursor: pointer;
  transition: transform 0.15s var(--e-pop), box-shadow 0.15s;
}
.dsse__btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--e-ink); }
.dsse__btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--e-ink); }

@media (min-width: 560px) and (min-aspect-ratio: 5/4) {
  .dsse { padding: 68px 32px 44px; }
  .dsse__stage { flex-direction: row; justify-content: center; gap: clamp(22px, 4vw, 60px); }
  .dsse__panel {
    width: 56%;
    max-width: 720px;
    width: min(56%, 720px, calc((100vh - 130px) * 1.333));
    width: min(56%, 720px, calc((100dvh - 130px) * 1.333));
  }
  .dsse__caption { flex: 1 1 0; max-width: 30rem; min-height: 0; align-items: flex-start; text-align: left; }
  .dsse__kicker { transform-origin: left bottom; }
  .dsse__brand { justify-content: flex-start; }
  .dsse__brand img { height: clamp(70px, 8.5vw, 116px); }
  .dsse__main { font-size: clamp(2.4rem, 5vw, 4.6rem); }
  .dsse__cta { justify-content: flex-start; }
}

/* ---------- Dentro do quadrinho (SVG) ---------- */
.dsse-sc { display: none; }
.dsse[data-scene="tempo"] .dsse-sc--tempo,
.dsse[data-scene="chef"] .dsse-sc--chef,
.dsse[data-scene="saudade"] .dsse-sc--saudade,
.dsse[data-scene="mercado"] .dsse-sc--mercado,
.dsse[data-scene="deixa"] .dsse-sc--deixa,
.dsse[data-scene="sempre"] .dsse-sc--sempre,
.dsse[data-scene="varia"] .dsse-sc--varia,
.dsse[data-scene="desconto"] .dsse-sc--desconto,
.dsse[data-scene="final"] .dsse-sc--final { display: inline; }

.dsse-fb { transform-box: fill-box; transform-origin: 50% 50%; }
.dsse-pop { animation: dsse-pop 0.5s var(--e-pop) 0.15s both; }
.dsse-d0 { animation-delay: 0.15s; }
.dsse-d1 { animation-delay: 0.45s; }
.dsse-d2 { animation-delay: 0.75s; }
.dsse-d3 { animation-delay: 1.05s; }
.dsse-d4 { animation-delay: 1.35s; }
.dsse-d5 { animation-delay: 1.65s; }
.dsse-rays { animation: dsse-spin 22s linear infinite; }
/* Virada de pagina a cada cena */
.dsse-wipe { transform: translateX(-480px); }
.dsse.is-turn .dsse-wipe { animation: dsse-wipe 0.55s ease-in-out both; }

/* 1. relogio disparado */
.dsse-ring { animation: dsse-ringing 0.14s linear infinite; }
.dsse-hand-m { animation: dsse-spin 0.6s linear infinite; }
.dsse-hand-h { animation: dsse-spin 4.5s linear infinite; }
.dsse-buzz { animation: dsse-flicker 0.3s steps(1) infinite; }
/* 2. fumacinha sem graca */
.dsse-puff { animation: dsse-float 2.2s ease-out 0.3s both, dsse-bob 1.6s ease-in-out 2.5s infinite; }
.dsse-puff2 { animation: dsse-rise 2s ease-out 1s infinite both; }
/* 3. saudade */
.dsse-steam { animation: dsse-steam 1.6s ease-in-out 1s infinite both; }
.dsse-heart { animation: dsse-pop 0.5s var(--e-pop) 1.2s both, dsse-beat 1s ease-in-out 1.7s infinite; }
/* 4. mercado */
.dsse-cart { animation: dsse-rattle 0.18s linear infinite; }
.dsse-wheel { animation: dsse-wobble 0.32s ease-in-out infinite alternate; }
.dsse-orange { animation: dsse-roll 1.7s ease-in 0.9s both; }
/* 5. caixa chegando */
.dsse-box { animation: dsse-drop 0.9s cubic-bezier(0.22, 0.9, 0.32, 1.12) 0.15s both; }
.dsse-shadow { animation: dsse-shadow 0.9s ease 0.15s both; }
.dsse-whoosh { animation: dsse-fadein 0.3s ease 0.7s both; }
/* 6. carimbo e calendario */
.dsse-stamp { animation: dsse-stamp 0.5s var(--e-pop) 0.75s both; }
.dsse-sc--desconto .dsse-stamp { animation-delay: 0.2s; }
.dsse-sc--final .dsse-stamp { animation-delay: 0.6s; }
.dsse-cell { animation: dsse-pop 0.35s var(--e-pop) both; }
.dsse-crate { animation: dsse-crate 0.5s cubic-bezier(0.22, 0.9, 0.32, 1.2) 2s both; }
.dsse-crate--2 { animation-delay: 2.45s; }
.dsse-crate--3 { animation-delay: 2.9s; }
/* 7. riscos e roleta de pratos */
.dsse-strike { stroke-dasharray: 1; stroke-dashoffset: 0; animation: dsse-draw 0.35s ease-out 0.7s both; }
.dsse-s2 { animation-delay: 1s; }
.dsse-s3 { animation-delay: 1.3s; }
.dsse-reel { animation: dsse-reel 2.6s cubic-bezier(0.3, 0.1, 0.3, 1) 0.5s both; }

/* ---------- Versao parada (prefers-reduced-motion) ---------- */
.dsse__card {
  position: relative;
  z-index: 1;
  margin: auto;
  width: 100%;
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 26px;
  background: var(--e-paper);
  border: 3px solid var(--e-ink);
  border-radius: 28px;
  box-shadow: 6px 6px 0 var(--e-ink);
}
.dsse__lead { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--e-ink); }
.dsse__deal { margin: 0; padding: 8px 14px; border: 2px dashed var(--e-ink); border-radius: 12px; background: #FCE3A6; font-weight: 800; }
.dsse__slogan { margin: 4px 0 6px; font-family: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif; font-size: 2.1rem; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; color: var(--e-ink); }
.dsse--static .dsse__main { font-size: clamp(2rem, 8vw, 2.8rem); }

@media (prefers-reduced-motion: reduce) {
  .dsse,
  .dsse *,
  .dsse *::before,
  .dsse *::after { animation: none !important; transition: none !important; }
}

/* ---------- Movimentos ---------- */
@keyframes dsse-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dsse-out { to { opacity: 0; transform: scale(1.02); } }
@keyframes dsse-panelin { from { opacity: 0; transform: translateY(26px) rotate(-6deg) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes dsse-nudge { 0%, 100% { transform: none; } 35% { transform: translateX(-8px) rotate(-1.5deg); } 70% { transform: translateX(4px) rotate(0.6deg); } }
@keyframes dsse-cap { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes dsse-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes dsse-pop { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: scale(1); } }
@keyframes dsse-fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes dsse-wipe { from { transform: translateX(-480px); } to { transform: translateX(480px); } }
@keyframes dsse-ringing { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
@keyframes dsse-flicker { 0% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes dsse-float {
  0% { opacity: 0; transform: translateY(70px) scale(0.3); }
  45% { opacity: 1; transform: translateY(-6px) scale(1.04); }
  70% { transform: translateY(2px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dsse-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes dsse-rise { 0% { opacity: 0; transform: translateY(30px) scale(0.5); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px) scale(1.1); } }
@keyframes dsse-steam { 0% { opacity: 0; transform: translateY(8px); } 40% { opacity: 0.9; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes dsse-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }
@keyframes dsse-rattle {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-1.5px, 0.5px) rotate(-1.2deg); }
  75% { transform: translate(1.5px, -0.5px) rotate(1.2deg); }
}
@keyframes dsse-wobble { from { transform: rotate(-30deg) translateX(-2px); } to { transform: rotate(30deg) translateX(2px); } }
@keyframes dsse-roll {
  0% { opacity: 0; transform: translate(0, -34px) rotate(0deg); }
  12% { opacity: 1; }
  38% { transform: translate(-18px, 0) rotate(-60deg); }
  52% { transform: translate(-34px, -14px) rotate(-110deg); }
  66% { transform: translate(-52px, 0) rotate(-170deg); }
  100% { opacity: 1; transform: translate(-150px, 0) rotate(-420deg); }
}
@keyframes dsse-drop {
  0% { opacity: 0; transform: translateY(-300px) rotate(-8deg); }
  10% { opacity: 1; }
  55% { transform: translateY(0) rotate(2deg) scale(1.06, 0.88); }
  70% { transform: translateY(-22px) rotate(-1deg) scale(0.98, 1.03); }
  85% { transform: translateY(0) scale(1.01, 0.99); }
  100% { opacity: 1; transform: none; }
}
@keyframes dsse-shadow { 0% { transform: scale(0.25); opacity: 0; } 55% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes dsse-stamp { from { opacity: 0; transform: scale(2.6) rotate(-25deg); } to { opacity: 1; transform: scale(1) rotate(0deg); } }
@keyframes dsse-crate { 0% { opacity: 0; transform: translateY(-60px) scale(0.6); } 60% { opacity: 1; transform: translateY(4px) scale(1.1, 0.9); } 100% { opacity: 1; transform: none; } }
@keyframes dsse-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes dsse-reel {
  0%, 8% { transform: translateY(0); }
  30%, 40% { transform: translateY(-124px); }
  62%, 72% { transform: translateY(-248px); }
  94%, 100% { transform: translateY(-372px); }
}
