/* Layout and feel modelled on the classic "big logo, a few links" fan pages. */
:root {
  --ink: #fff;
  --link: #b0e0f5;
  --link-hover: #e6f7ff;
  --accent: #39e6ff;
  --font: "Avenir Next Condensed", "Bahnschrift", "Roboto Condensed", "Arial Narrow", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-height: 100%;
  background: #05080d url("/home/assets/background.jpg") no-repeat center center fixed;
  background-image: image-set(url("/home/assets/background.avif") type("image/avif"), url("/home/assets/background.webp") type("image/webp"), url("/home/assets/background.jpg") type("image/jpeg"));
  background-size: cover;
  scroll-behavior: smooth;
  cursor: url("/home/assets/cursor.svg") 3 2, auto;
}

/* subtle dark overlay + vignette so the logo pops */
html::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .45) 100%),
    rgba(0, 0, 0, .28);
}

body {
  position: relative;
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: .09em;
  overflow-x: hidden;
}

a, button, [role="button"] { cursor: url("/home/assets/cursor-hover.svg") 3 2, pointer; }

/* the first screen: logo, links and the footer line fill exactly one screen; the About/FAQ text follows below it */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column;
}

/* ---------- logo ---------- */
.head { margin-top: 6vh; text-align: center; }

.logo {
  display: block; margin: 0 auto; padding: 0; border: 0; background: none; color: inherit;
  width: min(900px, 72vw); max-width: 92%;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.logo:focus-visible { outline: 1px dashed rgba(176, 224, 245, .5); outline-offset: 8px; }

.logo img, .logo-text { transition: transform .1s; }
.logo:hover img, .logo:hover .logo-text { transform: scale(1.01); }
.logo:active img, .logo:active .logo-text { transform: scale(.99); }

.logo img {
  display: block; width: 100%; height: auto; max-height: 38vh; object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(0, 0, 0, .55));
  -webkit-user-drag: none; user-select: none;
}

/* text logo, used only while assets/logo1..5.png are missing */
.logo-text {
  display: inline-block; font-size: clamp(40px, 12vw, 190px); white-space: nowrap; font-weight: 900; font-style: italic;
  letter-spacing: .02em; line-height: 1;
}
.logo-text em { font-style: italic; margin-left: .12em; }
.logo-text.v1 { color: var(--ink); text-shadow: 0 0 22px rgba(57, 230, 255, .55); }
.logo-text.v1 em { color: var(--accent); }
.logo-text.v2 { color: var(--accent); text-shadow: 0 0 28px rgba(57, 230, 255, .8); }
.logo-text.v2 em { color: var(--ink); }
.logo-text.v3 { color: transparent; -webkit-text-stroke: 2px var(--accent); }
.logo-text.v3 em { -webkit-text-stroke-color: var(--ink); }
.logo-text.v4 { background: linear-gradient(90deg, var(--accent), #0a8cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-text.v5 { color: #0b1020; -webkit-text-stroke: 1px var(--accent); text-shadow: 3px 3px 0 #0a8cff; }

/* ---------- links + text ---------- */
.main {
  margin: 0 auto; padding: 0 16px;
  text-align: center;
  color: rgba(255, 255, 255, .9);
  text-shadow: 0 0 25px #000;
  font-size: clamp(13px, 1.9vh, 18px);
  margin-top: 2vh;
}
.links { list-style: none; margin: 0; padding: 0; }
.links li { font-size: clamp(18px, 3.4vh, 28px); font-weight: 700; margin: 1.6vh 0; }
.main h1.tagline { font-size: inherit; font-weight: 400; margin: 2.4vh 0 1.4vh; letter-spacing: inherit; }
.main a { color: var(--link); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.main a:hover, .main a:focus-visible { color: var(--link-hover); text-shadow: 0 0 14px rgba(57, 230, 255, .6), 0 0 25px #000; outline: none; }
.main p { margin: 1.4vh 0; }
.main p.played { visibility: hidden; }

.foot {
  margin-top: auto;
  padding: 1vh 16px 2vh;
  font-size: 13px; text-align: center;
  color: rgba(255, 255, 255, .7);
  text-shadow: 0 0 6px #000;
}
.foot a { color: var(--link); margin-left: .6em; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.foot a:hover, .foot a:focus-visible { color: var(--link-hover); }

/* ---------- mute ---------- */
.mute {
  position: fixed; top: 18px; right: 22px; z-index: 2;
  background: rgba(0, 0, 0, .25); border: 1px solid rgba(176, 224, 245, .35); border-radius: 4px;
  color: rgba(255, 255, 255, .75); font-family: var(--font); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 10px;
}
.mute:hover, .mute:focus-visible { color: #fff; border-color: var(--link); outline: none; }

/* ---------- small screens ---------- */
@media (max-width: 700px) {
  .head { margin-top: 8vh; }
  .logo { max-width: 92%; }
  .links li { font-size: 19px; margin: 1.4vh 0; }
  .main { font-size: 16px; }
  .foot { font-size: 13px; padding-bottom: 18px; }
}
@media (max-height: 760px) and (min-width: 701px) {
  .head { margin-top: 4vh; }
}

@media (prefers-reduced-motion: reduce) {
  .logo img, .logo-text { transition: none; }
  .logo:hover img, .logo:hover .logo-text, .logo:active img, .logo:active .logo-text { transform: none; }
}

/* ---------- animated 2RP logo: float, light sweep, mouse tilt ---------- */
.logo { perspective: 900px; }
.logo-anim {
  position: relative; display: block; margin: 0 auto;
  width: min(420px, 60vw); aspect-ratio: 1308 / 1203; max-height: 40vh;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .25s ease-out;
  animation: logo-float 5s ease-in-out infinite;
}
.logo-anim img { width: 100%; height: 100%; object-fit: contain; max-height: none;
  filter: drop-shadow(0 0 18px rgba(57, 230, 255, .35)) drop-shadow(0 10px 24px rgba(0, 0, 0, .6)); }
.logo-shine {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url("/home/assets/logo-2rp-840.webp") center / contain no-repeat;
          mask: url("/home/assets/logo-2rp-840.webp") center / contain no-repeat;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .0) 42%, rgba(255, 255, 255, .85) 50%, rgba(170, 245, 255, .0) 58%, transparent 65%);
  background-size: 250% 100%; background-repeat: no-repeat;
  animation: logo-sweep 4.5s ease-in-out infinite;
  mix-blend-mode: screen;
}
@keyframes logo-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes logo-sweep { 0% { background-position: 160% 0; } 55%, 100% { background-position: -60% 0; } }
.logo:hover .logo-anim img { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .logo-anim, .logo-shine { animation: none; }
  .logo-anim { transform: none; }
}

/* ---------- About, how to play, features, FAQ (below the first screen) ---------- */
.info {
  max-width: 780px; margin: 0 auto 6vh; padding: 28px 30px 22px;
  background: rgba(5, 10, 14, .78); border: 1px solid rgba(176, 224, 245, .18); border-radius: 10px;
  color: rgba(255, 255, 255, .88);
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; letter-spacing: 0; font-size: 16px; line-height: 1.6;
}
.info h2, .info h3 { font-family: var(--font); letter-spacing: .06em; }
.info h2 { color: var(--accent); font-size: 24px; margin: 26px 0 10px; }
.info section:first-child h2 { margin-top: 0; }
.info h3 { color: #fff; font-size: 18px; margin: 20px 0 6px; }
.info p, .info ul, .info ol { margin: 0 0 10px; }
.info ul, .info ol { padding-left: 22px; }
.info li { margin: 5px 0; }
.info strong { color: #fff; }
.info a { color: var(--link); text-underline-offset: 3px; }
.info a:hover, .info a:focus-visible { color: var(--link-hover); }
.info-links { margin-top: 24px !important; padding-top: 14px; border-top: 1px solid rgba(176, 224, 245, .2); }
.info-links a { display: inline-block; margin-right: 1.1em; }
.info-note { font-size: 13px; color: rgba(255, 255, 255, .6); }
@media (max-width: 700px) {
  .info { margin: 0 10px 4vh; padding: 20px 18px 16px; font-size: 15px; }
  .info h2 { font-size: 21px; }
}

/* ---------- languages: the switcher after the footer, the suggestion bar (lang.js) ---------- */
.langs { margin: -1.2vh auto 2vh; padding: 0 16px; max-width: 760px; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .7); text-shadow: 0 0 6px #000; }
.langs summary { display: inline-block; list-style: none; padding: 4px 10px; border: 1px solid rgba(176, 224, 245, .3); border-radius: 4px; color: var(--link); }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: ""; display: inline-block; margin-left: .5em; border: 4px solid transparent; border-top-color: currentColor; vertical-align: -1px; }
.langs[open] summary::after { border-top-color: transparent; border-bottom-color: currentColor; vertical-align: 3px; }
.langs summary:hover, .langs summary:focus-visible { color: var(--link-hover); border-color: var(--link); outline: none; }
.langs-label { color: rgba(255, 255, 255, .6); }
.langs ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 10px 0 0; padding: 10px 12px; list-style: none; background: rgba(0, 0, 0, .45); border: 1px solid rgba(176, 224, 245, .2); border-radius: 4px; }
.langs a { color: var(--link); white-space: nowrap; letter-spacing: .04em; }
.langs a:hover, .langs a:focus-visible { color: var(--link-hover); }
.langs a[aria-current] { color: #fff; text-decoration: none; }
.lang-hint { position: relative; z-index: 3; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 7px 120px 7px 16px; background: rgba(0, 0, 0, .7); border-bottom: 1px solid rgba(176, 224, 245, .3); font-size: 14px; letter-spacing: .04em; }
.lang-hint a { color: var(--link); }
.lang-hint a:hover, .lang-hint a:focus-visible { color: var(--link-hover); }
.lang-hint-x { padding: 0 6px; border: 0; background: none; color: rgba(255, 255, 255, .7); font: inherit; font-size: 20px; line-height: 1; }
.lang-hint-x:hover, .lang-hint-x:focus-visible { color: #fff; outline: none; }
@media (max-width: 700px) { .lang-hint { padding: 7px 100px 7px 12px; justify-content: flex-start; } }
