/* Treasures of Horus: 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: #2a1c0c;
  color: #fbecc8;
  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% 46%, rgba(20, 12, 4, .38), rgba(14, 9, 3, .86) 78%),
    url('../assets/images/horus-palace.jpg?v=1.17') center / cover no-repeat,
    #2a1c0c;
  transition: opacity .8s ease, visibility .8s;
}

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

.loader-inner {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 680px;
  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), 0 0 4px rgba(40, 200, 180, .6);
  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: #9ff0e2;
  text-shadow: 0 1px 2px #0a1a16;
}

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

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

.loader-status { margin: 0; min-height: 1.3em; color: #f2dcae; font-size: 15px; text-shadow: 0 1px 2px #1a0e04; }

.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(8, 90, 80, .85), 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 #4fd8c8; outline-offset: 4px; }

.loader-legal { margin: 10px 0 0; font-size: 13px; color: #d6c094; text-shadow: 0 1px 2px #1a0e04; }

@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: #2a1c0c;
}
