/* LighthouseGaming: the night-table palette from Refract. */

@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: "Unbounded";
  src: url("fonts/Unbounded.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --bg: #0b1018;
  --panel: #121a28;
  --raised: #1a2335;
  --line: #26324a;
  --line-hi: #3a4866;
  --fg: #e8ecf4;
  --muted: #8b97ae;
  --amber: #ffb23f;
  --azure: #6e9bff;
  --lamp: #ffd27a;
  --display: "Unbounded", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 500 18px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amber); text-underline-offset: 3px; }
a:hover { color: var(--lamp); }

img { max-width: 100%; display: block; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* --- The hillside header ------------------------------------------------ */

.hero {
  position: relative;
  height: clamp(440px, 78vh, 720px);
  overflow: hidden;
  background: linear-gradient(#070b12, #15203a);
}

.hero svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.beam {
  transform-origin: 600px 90px;
  animation: sweep 7s ease-in-out infinite alternate;
}

@keyframes sweep {
  from { transform: scaleX(1); }
  to { transform: scaleX(-1); }
}

.twinkle { animation: twinkle 4s ease-in-out infinite alternate; }

@keyframes twinkle {
  from { opacity: 1; }
  to { opacity: 0.55; }
}

.wordmark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(28px, 7vh, 64px);
  text-align: center;
  padding-inline: 16px;
}

.wordmark h1 {
  margin: 0;
  font: 700 clamp(30px, 7vw, 64px)/1 var(--display);
  letter-spacing: 0.08em;
}

.wordmark h1 span {
  display: block;
  margin-top: 0.5em;
  color: var(--amber);
  font-weight: 500;
  font-size: max(0.36em, 14px);
  letter-spacing: 0.5em;
  /* The last letter's spacing would push the word off centre. */
  margin-right: -0.5em;
}

.wordmark p {
  margin: 22px auto 0;
  max-width: 34em;
  color: var(--muted);
}

/* --- Games -------------------------------------------------------------- */

main { padding: 72px 0 40px; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font: 700 14px/1 var(--body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.game {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding: 36px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.game-head { display: flex; gap: 18px; align-items: center; }

.game-head img { width: 84px; height: 84px; border-radius: 20px; }

.game h2 {
  margin: 0;
  font: 700 clamp(30px, 4vw, 40px)/1.05 var(--display);
  letter-spacing: 0.02em;
}

.game h2 small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font: 500 16px/1.3 var(--body);
  letter-spacing: 0;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px 48px;
  align-items: start;
}

.game p { margin: 20px 0 0; }

.points { margin: 18px 0 0; padding: 0; list-style: none; }

.points li {
  position: relative;
  padding-left: 22px;
  margin-top: 6px;
  color: var(--muted);
}

.points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

.points li:nth-child(even)::before { background: var(--azure); box-shadow: 0 0 10px var(--azure); }

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--raised);
  border: 1px solid var(--line-hi);
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

a.store { background: var(--fg); color: var(--bg); border-color: var(--fg); }
a.store:hover { background: #fff; color: var(--bg); }

.store .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.shots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.shots img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 2;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.shots img:nth-child(even) { transform: translateY(24px); }

.shots { padding-bottom: 24px; }

/* --- Footer --------------------------------------------------------------- */

footer {
  margin-top: 56px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
}

footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }

footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

footer a { color: var(--fg); }

/* --- Text pages: privacy policy, not found -------------------------------- */

.bar { border-bottom: 1px solid var(--line); }

.bar .wrap { display: flex; align-items: center; min-height: 64px; }

.bar a {
  color: var(--fg);
  font: 700 15px/1 var(--display);
  letter-spacing: 0.08em;
  text-decoration: none;
}

.bar a span { color: var(--amber); font-weight: 500; }

.doc { width: min(720px, 100% - 32px); margin: 0 auto; padding: 48px 0 24px; }

.doc h1 { margin: 0 0 6px; font: 700 clamp(28px, 5vw, 38px)/1.15 var(--display); }

.doc h2 { margin: 40px 0 8px; font: 700 21px/1.3 var(--body); }

.doc .meta { margin: 0; color: var(--muted); }

.doc ul { padding-left: 22px; }

.doc li { margin-top: 6px; }

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 820px) {
  .game { padding: 24px; gap: 28px; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .shots { grid-template-columns: repeat(4, 62%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .shots img { scroll-snap-align: start; }
  .shots img:nth-child(even) { transform: none; }
  main { padding-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .beam, .twinkle { animation: none; }
}
