/* The home page: the trailer full screen, the name, and one button. */

:root {
  --text: #f4f1ff;
  --accent: #f5cf47;
  --accent-text: #1b1606;
  --red: #ff5a5f;
  --blue: #4c8dff;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: #0b0a18;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  align-items: end;
  justify-items: center;
  isolation: isolate;
}

.stage__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  background: #0b0a18 url("/media/trailer-poster.jpg") center / cover no-repeat;
}

/* Darken the bottom so the name and button always read, whatever the frame. */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgb(8 7 20 / 0.92) 0%, rgb(8 7 20 / 0.55) 30%, rgb(8 7 20 / 0) 60%),
    radial-gradient(120% 70% at 50% 110%, rgb(8 7 20 / 0.6), transparent 70%);
  pointer-events: none;
}

.stage__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3.5vh, 36px);
  padding: 0 16px max(48px, calc(env(safe-area-inset-bottom) + 32px));
  padding-bottom: max(clamp(40px, 9vh, 96px), calc(env(safe-area-inset-bottom) + 32px));
  text-align: center;
}

.stage__title {
  margin: 0;
  font-size: clamp(3rem, 11vw, 8.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-shadow: 0 6px 40px rgb(0 0 0 / 0.55);
}

.stage__title span {
  background: linear-gradient(90deg, var(--red), #ff9a5a 45%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 18px 54px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 40px rgb(245 207 71 / 0.35), 0 0 0 0 rgb(245 207 71 / 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: pulse 2.6s ease-out infinite;
}

/* a little VR headset before the label */
.enter::before {
  content: "";
  width: 1.5em;
  height: 0.9em;
  margin-right: 0.55em;
  border-radius: 0.3em 0.3em 0.45em 0.45em;
  background:
    radial-gradient(circle at 28% 50%, var(--accent) 0.18em, transparent 0.2em),
    radial-gradient(circle at 72% 50%, var(--accent) 0.18em, transparent 0.2em),
    var(--accent-text);
}

.enter:hover,
.enter:focus-visible { transform: translateY(-2px) scale(1.02); }

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

@keyframes pulse {
  0% { box-shadow: 0 12px 40px rgb(245 207 71 / 0.35), 0 0 0 0 rgb(245 207 71 / 0.45); }
  70% { box-shadow: 0 12px 40px rgb(245 207 71 / 0.35), 0 0 0 18px rgb(245 207 71 / 0); }
  100% { box-shadow: 0 12px 40px rgb(245 207 71 / 0.35), 0 0 0 0 rgb(245 207 71 / 0); }
}


/* Watch (computers only): small, beside the main button. */
.stage__buttons { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.watch {
  display: inline-flex; align-items: center; gap: 0.5em;
  min-height: 56px; padding: 12px 24px; border-radius: 999px;
  background: rgb(11 10 24 / 0.55); color: var(--text); border: 1px solid rgb(255 255 255 / 0.35);
  font-size: 1.1rem; font-weight: 700; text-decoration: none;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.watch[hidden] { display: none; }
/* a little screen before the label */
.watch::before {
  content: ""; width: 1.1em; height: 0.75em; border: 2px solid currentColor; border-radius: 3px;
  box-shadow: 0 0.32em 0 -0.22em currentColor;
}
.watch:hover, .watch:focus-visible { transform: translateY(-2px); border-color: var(--accent); }
.watch:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* The lobby room waits here, invisible and idle, until Enter VR. */
.lobby-holder {
  position: fixed;
  inset: 0;
  z-index: -10;
  opacity: 0;
  pointer-events: none;
}

.lobby-holder a-scene { display: block; width: 100%; height: 100%; }

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

@media (max-width: 600px) {
  .stage__title { font-size: clamp(3.2rem, 17vw, 5rem); }
  .enter { padding: 16px 34px; font-size: 1.25rem; white-space: nowrap; }
  }
