/* Pharaoh's Tomb: the page is only a full-viewport WebGL stage plus a pre-game loader. */
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #04060d;
  color: #f4dfae;
  font-family: Philosopher, 'Cormorant Garamond', Georgia, serif;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

#stage {
  position: fixed;
  inset: 0;
  touch-action: none;
}

#stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  cursor: default;
}

#stage canvas.pointer { cursor: pointer; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 16px;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(10, 6, 2, .55), rgba(4, 3, 1, .92) 75%),
    url('../assets/images/pharaoh-temple.jpg?v=1.2') center / cover no-repeat,
    #0a0603;
  transition: opacity .8s ease, visibility .8s;
}

.loader.done { opacity: 0; visibility: hidden; }

.loader-inner {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 640px;
  text-align: center;
}

.loader-eye {
  font-size: clamp(40px, 9vmin, 84px);
  line-height: 1;
  color: #ffd36a;
  text-shadow: 0 0 24px rgba(255, 190, 80, .8);
  animation: loader-breathe 2.4s ease-in-out infinite;
}

.loader-title {
  margin: 0;
  font: 700 clamp(30px, 7vmin, 64px)/1 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .04em;
  background: linear-gradient(#fff6cf, #ffd36a 35%, #b8781f 60%, #ffe39a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 #2a1200) drop-shadow(0 0 18px rgba(255, 170, 40, .4));
}

.loader-sub {
  margin: 0;
  font: 700 clamp(12px, 2.2vmin, 18px)/1.2 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .3em;
  color: #e9cf91;
}

.loader-bar {
  width: min(420px, 70vw);
  height: 8px;
  margin-top: 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 210, 120, .35);
  overflow: hidden;
}

.loader-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #8a5a18, #ffd36a, #fff3c4);
  box-shadow: 0 0 12px rgba(255, 200, 90, .8);
  transition: width .25s ease;
}

.loader-status { margin: 0; min-height: 1.3em; color: #c9b484; font-size: 15px; }

.loader-enter {
  min-width: 220px;
  margin-top: 6px;
  padding: 14px 40px;
  border: 2px solid #ffe08a;
  border-radius: 99px;
  font: 700 22px/1 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .18em;
  color: #2a1300;
  background: linear-gradient(#fff3c4, #ffd36a 45%, #c48a2a);
  box-shadow: 0 0 0 4px rgba(20, 40, 120, .8), 0 0 30px rgba(255, 190, 80, .55);
  cursor: pointer;
  animation: loader-breathe 1.8s ease-in-out infinite;
}

.loader-enter:focus-visible { outline: 3px solid #8ab4ff; outline-offset: 4px; }

.loader-legal { margin: 10px 0 0; font-size: 13px; color: #8f7d58; }

@keyframes loader-breathe {
  50% { transform: scale(1.05); filter: brightness(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-eye, .loader-enter { animation: none; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Keyboard users get real buttons; focus is mirrored as a ring inside the 3D scene. */
#a11y-controls button { position: absolute; width: 1px; height: 1px; }

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: #04060d;
}
