/* Preload da marca (tela de abertura). Independe de tokens.css para pintar no primeiro frame. */
.re-preload {
  --pl-bg: #FAF7F2; --pl-ink: #1F1B18; --pl-accent: #C05621; --pl-track: rgba(31, 27, 24, 0.1);
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: var(--pl-bg); color: var(--pl-ink);
  font-family: Georgia, 'Times New Roman', serif;
  opacity: 1; visibility: visible;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}
:root[data-theme="dark"] .re-preload { --pl-bg: #14110F; --pl-ink: #F3EDE4; --pl-accent: #F08A52; --pl-track: rgba(243, 237, 228, 0.14); }
.re-preload.is-done { opacity: 0; visibility: hidden; }

.re-preload-mark { width: 92px; height: 92px; overflow: visible; animation: pl-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.re-preload-tile { fill: #C05621; }
.re-preload-e { fill: #FAF7F2; font-family: Georgia, 'Times New Roman', serif; font-size: 46px; font-style: italic; font-weight: 700; animation: pl-fade 0.4s ease 0.25s both; }
.re-preload-dot { fill: #FAF7F2; animation: pl-drop 0.9s cubic-bezier(0.28, 0.84, 0.42, 1) 0.45s both; transform-box: fill-box; transform-origin: center; }

.re-preload-name { margin: 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; animation: pl-rise 0.6s ease 0.8s both; }
.re-preload-name em { color: var(--pl-accent); }

.re-preload-bar { width: 132px; height: 3px; border-radius: 3px; background: var(--pl-track); overflow: hidden; animation: pl-fade 0.4s ease 0.9s both; }
.re-preload-bar::after { content: ""; display: block; width: 42%; height: 100%; border-radius: 3px; background: var(--pl-accent); animation: pl-run 1.1s ease-in-out 1s infinite; }

@keyframes pl-pop { from { transform: scale(0.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pl-drop {
  0% { transform: translateY(-34px) scale(0.6); opacity: 0; }
  55% { transform: translateY(0) scale(1, 0.8); opacity: 1; }
  75% { transform: translateY(-7px) scale(1); }
  100% { transform: none; opacity: 1; }
}
@keyframes pl-rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pl-run { from { transform: translateX(-100%); } to { transform: translateX(240%); } }

@media (prefers-reduced-motion: reduce) {
  .re-preload, .re-preload * { animation: none !important; transition-duration: 0.01s !important; }
}
@media print { .re-preload { display: none !important; } }

/* ===== Modelo B: contorno que se desenha, "e" escrito à mão, nome letra a letra, cortina sobe ===== */
.re-preload--b {
  --pl-bg: #C05621; --pl-ink: #FAF7F2; --pl-accent: #FAF7F2; --pl-track: rgba(250, 247, 242, 0.28);
  transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 0.7s; opacity: 1;
}
:root[data-theme="dark"] .re-preload--b { --pl-bg: #C05621; --pl-ink: #FAF7F2; --pl-accent: #FAF7F2; --pl-track: rgba(250, 247, 242, 0.28); }
.re-preload--b.is-done { opacity: 1; transform: translateY(-100%); visibility: hidden; }
.re-preload--b .re-preload-mark { animation: none; width: 104px; height: 104px; }
.re-preload--b .re-preload-tile { fill: #FAF7F2; fill-opacity: 0; stroke: #FAF7F2; stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: 1; animation: plb-draw 0.9s ease-in-out 0.1s forwards, plb-fill 0.45s ease 1s forwards; }
.re-preload--b .re-preload-e { fill: #C05621; animation: plb-write 0.8s ease-in-out 1s both; }
.re-preload--b .re-preload-dot { fill: #C05621; animation: plb-dot 1.1s ease-in-out 1.8s infinite both; }
.re-preload--b .re-preload-name { animation: none; color: #FAF7F2; }
.re-preload--b .re-preload-name em { color: #FAF7F2; }
.re-preload--b .re-preload-name span { display: inline-block; opacity: 0; transform: translateY(0.5em); animation: pl-rise 0.45s ease forwards; animation-delay: calc(1.3s + var(--i) * 0.045s); white-space: pre; }
.re-preload--b .re-preload-bar { animation: pl-fade 0.3s ease 2s both; }

@keyframes plb-draw { to { stroke-dashoffset: 0; } }
@keyframes plb-fill { to { fill-opacity: 1; } }
@keyframes plb-write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes plb-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) {
  .re-preload--b .re-preload-tile { stroke-dashoffset: 0; fill-opacity: 1; }
  .re-preload--b .re-preload-name span { opacity: 1; transform: none; }
}

/* ===== Modelo C: anel orbital ao redor do ícone, ponto que gira, nome com reticências animadas ===== */
.re-preload--c { gap: 26px; transition: opacity 0.6s ease 0.1s, visibility 0s linear 0.7s; }
.re-orbit { position: relative; width: 156px; height: 156px; display: grid; place-items: center; animation: pl-fade 0.5s ease both; }
.re-orbit-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.re-orbit-ring .base { fill: none; stroke: var(--pl-track); stroke-width: 2; }
.re-orbit-ring .arc { fill: none; stroke: var(--pl-accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 90 350; transform-origin: 50% 50%; animation: plc-spin 1.6s cubic-bezier(0.55, 0.15, 0.4, 0.85) infinite; }
.re-orbit-spin { position: absolute; inset: 0; animation: plc-spin 2.4s linear infinite reverse; }
.re-orbit-spin::after { content: ""; position: absolute; top: -5px; left: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: var(--pl-accent); }
.re-preload--c .re-preload-mark { width: 88px; height: 88px; animation: plc-breathe 2.2s ease-in-out infinite; }
.re-preload--c .re-preload-dot { animation: none; }
.re-preload--c .re-preload-name { animation: pl-rise 0.6s ease 0.3s both; }
.re-preload-caption { margin: -6px 0 0; font: 700 0.6875rem/1 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pl-ink); opacity: 0.6; animation: pl-fade 0.4s ease 0.6s both; }
.re-preload-caption i { font-style: normal; display: inline-block; animation: plc-blink 1.2s infinite both; }
.re-preload-caption i:nth-child(2) { animation-delay: 0.2s; }
.re-preload-caption i:nth-child(3) { animation-delay: 0.4s; }
.re-preload--c.is-done .re-preload-mark { transform: scale(1.5); transition: transform 0.7s cubic-bezier(0.5, 0, 0.2, 1); animation: none; }
.re-preload--c.is-done .re-orbit { opacity: 0; transition: opacity 0.3s ease; }

@keyframes plc-spin { to { transform: rotate(360deg); } }
@keyframes plc-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes plc-blink { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .re-orbit-spin, .re-orbit-ring .arc { animation: none !important; } }

/* ===== Modelo D: clean — ícone e nome surgem com um fade suave, linha fina de progresso ===== */
.re-preload--d { gap: 18px; transition: opacity 0.5s ease, visibility 0s linear 0.5s; }
.re-preload--d .re-preload-mark { width: 60px; height: 60px; animation: pl-fade 0.8s ease both; }
.re-preload--d .re-preload-e, .re-preload--d .re-preload-dot { animation: none; }
.re-preload--d .re-preload-name { font-size: 1.375rem; animation: pl-fade 0.8s ease 0.25s both; }
.re-preload--d .re-preload-bar { width: 96px; height: 1px; border-radius: 0; margin-top: 6px; animation: pl-fade 0.6s ease 0.5s both; }
.re-preload--d .re-preload-bar::after { width: 100%; border-radius: 0; transform-origin: left; animation: pld-fill 2s ease-in-out 0.5s both; }
@keyframes pld-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .re-preload--d .re-preload-bar::after { transform: none; } }

/* ===== Modelo E: clean com barra de progresso e ingredientes que "acendem" conforme carrega ===== */
.re-preload--e { gap: 16px; transition: opacity 0.5s ease, visibility 0s linear 0.5s; }
.re-preload--e .re-preload-mark { width: 56px; height: 56px; animation: pl-fade 0.7s ease both; }
.re-preload--e .re-preload-e, .re-preload--e .re-preload-dot { animation: none; }
.re-preload--e .re-preload-name { font-size: 1.375rem; animation: pl-fade 0.7s ease 0.2s both; }
.re-foods { display: flex; gap: 26px; margin-top: 12px; color: var(--pl-ink); }
.re-foods svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.18; animation: ple-on 0.5s ease forwards; animation-delay: calc(0.5s + var(--i) * 0.4s); }
.re-foods svg:nth-child(odd) { color: var(--pl-accent); }
.re-preload--e .re-preload-bar { width: 220px; height: 4px; margin-top: 2px; animation: pl-fade 0.5s ease 0.4s both; }
.re-preload--e .re-preload-bar::after { width: 100%; transform-origin: left; animation: pld-fill 2.4s cubic-bezier(0.45, 0.05, 0.4, 1) 0.5s both; }
.re-preload-caption--e { margin: 0; font: 700 0.6875rem/1 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pl-ink); opacity: 0; animation: ple-cap 0.5s ease 0.7s forwards; }
@keyframes ple-on { to { opacity: 1; } }
@keyframes ple-cap { to { opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) { .re-foods svg { opacity: 1; animation: none; } .re-preload--e .re-preload-bar::after { transform: none; } .re-preload-caption--e { opacity: 0.6; animation: none; } }

/* ===== Modelo F: ingredientes que pulam em onda (sem logomarca) ===== */
.re-preload--f { gap: 30px; transition: opacity 0.5s ease, visibility 0s linear 0.5s; }
.re-hops { display: flex; gap: 20px; align-items: flex-end; color: var(--pl-ink); animation: pl-fade 0.5s ease both; }
.re-hop { position: relative; display: block; padding-bottom: 10px; }
.re-hop::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 22px; height: 4px; margin-left: -11px; border-radius: 50%; background: var(--pl-ink); opacity: 0.12; animation: plf-shadow 1.5s ease-in-out infinite; animation-delay: calc(var(--i) * 0.14s); }
.re-hop svg { display: block; width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; animation: plf-hop 1.5s cubic-bezier(0.3, 0, 0.3, 1) infinite; animation-delay: calc(var(--i) * 0.14s); }
.re-hop:nth-child(odd) svg { color: var(--pl-accent); }
.re-preload-caption--f { margin: 0; font: 700 0.6875rem/1 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pl-ink); opacity: 0.6; animation: pl-fade 0.5s ease 0.3s both; }
@keyframes plf-hop { 0%, 55%, 100% { transform: translateY(0); } 25% { transform: translateY(-16px); } 40% { transform: translateY(0); } 47% { transform: translateY(-3px); } }
@keyframes plf-shadow { 0%, 55%, 100% { transform: scaleX(1); opacity: 0.12; } 25% { transform: scaleX(0.55); opacity: 0.05; } }
@media (prefers-reduced-motion: reduce) { .re-hop svg, .re-hop::after { animation: none; } }
