/*
 * The site's entrance overlay (entrance.js marks <html data-entrance>; markup in index.html). Timeline from "play":
 *   0–1000 ms     a line of orange light is drawn out across the middle of the dark, then fades;
 *   300–1100 ms   the dark parts along it, top half up, bottom half down, their edges lit;
 *   500–1200 ms   the dim veil over the page lifts.
 * The page's own parts (header, page, glows, hero) play in global.css. Only transforms and opacity.
 * Ported from nestjs-casinoroyale (globals.css "Site entrance", components/shell/site-entrance.tsx).
 */
.entrance { display: none; }
html[data-entrance] .entrance {
  display: block; position: fixed; inset: 0; z-index: 1000; overflow: hidden; pointer-events: none;
}
.entrance-veil { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
/* The halves overlap by a hair, so no line of the page shows between them before they part. */
.entrance-lid { position: absolute; left: 0; right: 0; height: calc(50% + 1px); background: #07080b; }
.entrance-up { top: 0; }
.entrance-down { bottom: 0; }
.entrance-edge { position: absolute; left: 0; right: 0; height: 64px; opacity: 0; }
.entrance-up .entrance-edge { bottom: 0; }
.entrance-down .entrance-edge { top: 0; transform: rotate(180deg); }
.entrance-edge::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at bottom, rgba(255, 138, 31, .22), transparent 70%);
}
.entrance-edge::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, #ffb347, transparent);
}
.entrance-glow, .entrance-line { position: absolute; left: 0; right: 0; top: 50%; opacity: 0; }
.entrance-glow {
  height: 160px; margin-top: -80px;
  background: radial-gradient(closest-side, rgba(255, 170, 60, .36), rgba(255, 110, 20, .12) 55%, transparent);
}
.entrance-line {
  height: 2px; margin-top: -1px;
  background: linear-gradient(90deg, transparent, #ff8a1f 25%, #fff1dc, #ff8a1f 75%, transparent);
}

html[data-entrance="play"] .entrance-glow,
html[data-entrance="play"] .entrance-line { animation: entrance-flare 1000ms linear both; }
html[data-entrance="play"] .entrance-up { animation: entrance-lid-up 800ms cubic-bezier(.7, 0, .2, 1) 300ms both; }
html[data-entrance="play"] .entrance-down { animation: entrance-lid-down 800ms cubic-bezier(.7, 0, .2, 1) 300ms both; }
html[data-entrance="play"] .entrance-edge { animation: entrance-edge 800ms linear 300ms both; }
html[data-entrance="play"] .entrance-veil { animation: entrance-out 700ms ease-out 500ms both; }

@keyframes entrance-flare {
  0% { opacity: 0; transform: scaleX(.04); animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
  35% { opacity: 1; transform: scaleX(1); animation-timing-function: ease-in; }
  100% { opacity: 0; transform: scaleX(1.15); }
}
@keyframes entrance-lid-up { to { transform: translateY(-100%); } }
@keyframes entrance-lid-down { to { transform: translateY(100%); } }
@keyframes entrance-edge {
  0% { opacity: 0; }
  20% { opacity: 1; animation-timing-function: ease-in; }
  100% { opacity: 0; }
}
@keyframes entrance-out { from { opacity: 1; } to { opacity: 0; } }

@media print { .entrance { display: none !important; } }
