/* =========================================================
   Double Wipe Page Transition (library: osmo-code, Double Wipe Page Transition)
   Changes for El Taco Loco: brand colours, flat fills (no gradient),
   works across full page loads, no-JS failsafe.
   ========================================================= */

.transition {
  --transition-panel-1: var(--sys-color-burritos, #F5E304);
  --transition-panel-2: var(--sys-color-primary, #EF3642);

  z-index: 10001; /* El Taco Loco: above the top bar (10000), grain and scroll hint; below the loader (10002) */
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: clip;
}

.transition__panels {
  width: 100%;
  height: 100%;
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
}

.transition__panel-1 {
  background-color: var(--transition-panel-1);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 100%;
}

.transition__panel-2 {
  background-color: var(--transition-panel-2);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 100%;
}

/* El Taco Loco: the page we arrive on starts covered (set before first paint by the inline
   script in <head>), then the JS lifts panel 2 away. If the JS never runs, the failsafe
   animation uncovers the page after 4 s so nobody is stuck on red. */
html[data-wipe-enter] .transition__panel-2 {
  transform: translateY(-100%);
  animation: transition-failsafe 0s 4s forwards;
}

@keyframes transition-failsafe {
  to { transform: translateY(-200%); }
}

/* El Taco Loco: page intro. Elements stay hidden until the JS sets their start state
   (html[data-intro], set in <head>), so they never flash in place first. Failsafe: shown after 3 s. */
html[data-intro] :is([data-transition-title], [data-transition-intro]) {
  visibility: hidden;
  animation: transition-intro-failsafe 0s 3s forwards;
}

@keyframes transition-intro-failsafe {
  to { visibility: visible; }
}
