/* Infinity Runner site. Colours and type follow the game's Glass design system
   (docs/design-system/project/tokens.css). Dark only, like the game. */

@font-face { font-family: "Lemon Milk"; src: url("fonts/LemonMilk.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lemon Milk"; src: url("fonts/LemonMilkbold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --ground: #1c1c1f;
  --tile-top: #45454b;
  --tile-side: #0f0f11;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(255, 255, 255, 0.14);
  --glass-edge: rgba(255, 255, 255, 0.2);
  --hairline: rgba(255, 255, 255, 0.12);
  --ink: #f5f5f7;
  --ink-muted: #a7a7b0;
  --crystal: #ff3d66;
  --crystal-fill: #e11d4b;
  --crystal-deep: #8f0d2f;
  --gold: #ffc93a;
  --volt: #5cd0ff;
  --mint: #5fd8d4;
  --radius-md: 18px;
  --radius-lg: 26px;
  --font-display: "Lemon Milk", "Avenir Next", "Futura", system-ui, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --page: min(1080px, 100% - 48px);
}

* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.55 var(--font-text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(92, 208, 255, 0.08), transparent 60%),
    radial-gradient(900px 500px at 0% 20%, rgba(255, 61, 102, 0.07), transparent 60%),
    var(--ground);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--crystal); }
:focus-visible { outline: 3px solid var(--volt); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }

.display, h1, h2, h3, .nav a, .label {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
h1, h2, h3 { margin: 0; line-height: 1.05; font-weight: 700; }
.label { font-size: 12px; letter-spacing: 0.12em; color: var(--ink-muted); }

/* Header */
.top {
  width: var(--page);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 1px var(--hairline); }
.brand span { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  font-size: 12px; letter-spacing: 0.1em; text-decoration: none; color: var(--ink-muted);
  padding: 9px 14px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--glass); box-shadow: inset 0 0 0 1px var(--hairline); }

/* Hero */
.hero {
  width: var(--page); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 24px;
  min-height: min(640px, 82vh);
}
.hero h1 { font-size: clamp(44px, 7.4vw, 92px); letter-spacing: 0.01em; }
.hero h1 em { font-style: normal; color: var(--crystal); }
.hero p.lede { font-size: 20px; color: var(--ink-muted); max-width: 30em; margin: 22px 0 30px; }
.hero-art { position: relative; height: min(620px, 78vh); }
.hero-art .road { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-art::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 30%;
  background: linear-gradient(transparent, var(--ground));
  pointer-events: none;
}
.road .ball { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.45)); }
.road .crystal { animation: float 2.4s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(255, 61, 102, 0.6)); }
@keyframes float { 50% { transform: translateY(-6px); } }

/* Store badges */
.badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.badges a { display: inline-block; border-radius: 10px; transition: transform 120ms ease; }
.badges a:hover { transform: translateY(-2px); }
.badges img { height: 54px; width: auto; }
.badges .play img { height: 54px; }
.meta { margin-top: 16px; font-size: 14px; color: var(--ink-muted); }

/* Sections */
section { width: var(--page); margin: 0 auto; padding: 72px 0; }
section > h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
section > p.sub { color: var(--ink-muted); margin: 0 0 32px; max-width: 36em; }

.glass {
  background: var(--glass);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 0 0 1px var(--hairline), 0 18px 40px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
}

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature { padding: 24px; }
.feature img { width: 64px; height: 64px; border-radius: 50%; margin-bottom: 16px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--ink-muted); font-size: 15px; }

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr);
  gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
}
.shots img {
  width: 100%; height: auto; border-radius: 22px; scroll-snap-align: start;
  box-shadow: 0 0 0 1px var(--hairline), 0 18px 40px rgba(0, 0, 0, 0.4);
}

.cta { text-align: center; padding: 48px 24px; }
.cta h2 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 12px; }
.cta p { color: var(--ink-muted); margin: 0 0 26px; }
.cta .badges { justify-content: center; }

/* Text pages */
.doc { width: min(760px, 100% - 48px); margin: 0 auto; padding: 40px 0 72px; }
.doc h1 { font-size: clamp(34px, 6vw, 56px); margin-bottom: 10px; }
.doc .updated { color: var(--ink-muted); font-size: 14px; margin: 0 0 32px; }
.doc h2 { font-size: 20px; margin: 44px 0 12px; }
.doc h3 { font-size: 15px; margin: 28px 0 8px; }
.doc p, .doc li { color: #d9d9df; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .card { padding: 22px 24px; margin: 24px 0; }
.doc .card p { margin: 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
.doc th { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); font-weight: 400; }
.doc code { font-size: 0.9em; background: var(--glass); padding: 1px 6px; border-radius: 6px; }

.button {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; color: #fff;
  background: var(--crystal-fill); padding: 16px 26px; border-radius: var(--radius-md);
  box-shadow: 0 4px 0 var(--crystal-deep), 0 0 24px rgba(255, 61, 102, 0.4);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--crystal-deep); }

details { padding: 18px 22px; margin: 12px 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; float: right; color: var(--ink-muted); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 0; }

/* Footer */
footer {
  width: var(--page); margin: 0 auto; padding: 32px 0 48px;
  border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  color: var(--ink-muted); font-size: 14px;
}
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--ink-muted); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 16px; }
  .hero-art { height: 300px; order: -1; margin-bottom: -40px; }
  .hero p.lede { font-size: 18px; }
  .top { flex-direction: column; align-items: flex-start; }
  section { padding: 52px 0; }
  .shots { grid-auto-columns: 70%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
