/* Ball Rolling – page styles (no framework). Colours taken from the game's neon look. */
:root {
  --bg: #0b1030;
  --bg-2: #0f1640;
  --panel: #121a4a;
  --grid: rgba(130, 150, 255, 0.07);
  --line: #f4f2ff;
  --text: #eef0ff;
  --muted: #a7aed6;
  --glow: 0 0 6px rgba(255, 255, 255, 0.55), 0 0 18px rgba(170, 180, 255, 0.35);
  --red: #ff4f7b;
  --blue: #4b8dff;
  --green: #3ee08f;
  --gray: #a3a8c3;
  --radius: 18px;
  --pixel: "Silkscreen", "Courier New", monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
}
body.has-cookie { padding-bottom: 96px; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--line); color: var(--bg); padding: 8px 14px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 16, 48, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand__home { width: 22px; height: 22px; fill: currentColor; }
.socials { display: flex; gap: 6px; }
.socials a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.socials a:hover { border-color: var(--line); box-shadow: var(--glow); }
.socials img, .socials svg { width: 20px; height: 20px; }

/* Hero */
.hero { padding: 72px 0 56px; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.eyebrow {
  font-family: var(--pixel); font-size: 0.9rem; letter-spacing: 0.08em;
  color: var(--green); text-transform: uppercase;
}
.logo {
  margin-top: 14px;
  font-family: var(--pixel); font-weight: 400;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  letter-spacing: 0.06em; line-height: 1.05; text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.55), 0 0 30px rgba(140, 160, 255, 0.45);
}
.hero__lead { margin-top: 20px; max-width: 34ch; font-size: 1.2rem; color: var(--muted); }
.hero__actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.play-badge { display: inline-block; border-radius: 12px; transition: transform 0.2s; }
.play-badge img { width: 200px; height: auto; }
.play-badge:hover { transform: translateY(-2px); }

.hero__art { position: relative; }
.hero__ball {
  position: absolute; left: 8%; right: 8%; bottom: -34px; height: 40px;
  pointer-events: none;
}
.hero__ball .platform {
  position: absolute; left: 0; right: 0; bottom: 0; height: 6px; border-radius: 3px;
  background: var(--line); box-shadow: var(--glow);
}
.hero__ball .ball {
  position: absolute; bottom: 6px; left: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--line); box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 28px rgba(170, 180, 255, 0.5);
  animation: roll 7s ease-in-out infinite alternate;
}
@keyframes roll {
  0%   { left: 0; }
  40%  { left: 45%; transform: translateY(0); }
  48%  { transform: translateY(-34px); }
  56%  { transform: translateY(0); }
  100% { left: calc(100% - 28px); }
}
@media (prefers-reduced-motion: reduce) { .hero__ball .ball { animation: none; left: 30%; } }

.screen {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35), 0 0 40px rgba(110, 130, 255, 0.3), 0 30px 60px rgba(0, 0, 0, 0.45);
  background: var(--bg-2);
}
.screen img { width: 100%; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 1rem var(--sans); color: var(--bg); text-decoration: none;
  background: var(--line); border: 0; border-radius: 999px; padding: 12px 22px; cursor: pointer;
  box-shadow: var(--glow); transition: transform 0.2s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost {
  color: var(--text); background: transparent; border: 2px solid rgba(255, 255, 255, 0.85);
  padding: 13px 24px;
}
.btn__play {
  width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent currentColor;
}

/* Round buttons drawn like the in-game HUD buttons */
.round-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 76px; height: 76px; border-radius: 50%;
  border: 3px solid var(--line); color: var(--line); background: rgba(11, 16, 48, 0.6);
  box-shadow: var(--glow), inset 0 0 12px rgba(255, 255, 255, 0.12);
}
.round-btn svg {
  width: 44%; height: 44%; fill: none; stroke: currentColor;
  stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.round-btn--big { width: 88px; height: 88px; }
.round-btn--small { width: 48px; height: 48px; border-width: 2px; cursor: pointer; transition: transform 0.15s, box-shadow 0.2s; }
.round-btn--small:hover { box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 24px rgba(170, 180, 255, 0.5); }
.round-btn--small:active { transform: scale(0.94); }

/* Sections */
.section { padding: 88px 0; }
.section--alt {
  background: linear-gradient(180deg, rgba(18, 26, 74, 0.55), rgba(18, 26, 74, 0.25));
  border-block: 1px solid rgba(255, 255, 255, 0.06);
}
.section__title {
  font-family: var(--pixel); font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em;
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}
.section__lead { margin-top: 12px; max-width: 60ch; color: var(--muted); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }

/* How to play */
.controls { margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.control {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 28px 18px; border-radius: var(--radius);
  background: rgba(18, 26, 74, 0.6); border: 1px solid rgba(255, 255, 255, 0.08);
}
.control .round-btn { margin-bottom: 8px; }
.control h3 { font-family: var(--pixel); font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.1rem; }
.control p { color: var(--muted); font-size: 0.98rem; }

/* Checkered finish gate */
.gate {
  width: 46px; height: 88px; margin-bottom: 8px; border-radius: 6px;
  border: 3px solid var(--green);
  background-color: rgba(62, 224, 143, 0.15);
  background-image:
    linear-gradient(45deg, rgba(62, 224, 143, 0.55) 25%, transparent 25%, transparent 75%, rgba(62, 224, 143, 0.55) 75%),
    linear-gradient(45deg, rgba(62, 224, 143, 0.55) 25%, transparent 25%, transparent 75%, rgba(62, 224, 143, 0.55) 75%);
  background-size: 14px 14px; background-position: 0 0, 7px 7px;
  box-shadow: 0 0 10px rgba(62, 224, 143, 0.7), 0 0 26px rgba(62, 224, 143, 0.35);
}

/* Colours */
.colours { margin-top: 40px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.colour {
  --c: var(--line);
  border-radius: var(--radius); overflow: hidden;
  background: rgba(11, 16, 48, 0.7);
  border: 2px solid color-mix(in srgb, var(--c) 70%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 25%, transparent);
}
.colour--red { --c: var(--red); }
.colour--blue { --c: var(--blue); }
.colour--green { --c: var(--green); }
.colour--gray { --c: var(--gray); }
.colour img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.colour__body { padding: 20px 22px 24px; }
.colour h3 {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--pixel); font-weight: 400; text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 1.15rem; color: var(--c);
}
.colour p { margin-top: 8px; color: var(--muted); }
.swatch {
  width: 28px; height: 8px; border-radius: 4px; background: var(--c);
  box-shadow: 0 0 8px var(--c);
}

/* Worlds */
.worlds__inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.worlds { margin-top: 36px; display: grid; gap: 28px; position: relative; }
.world { display: flex; align-items: center; gap: 20px; position: relative; }
.world:not(:last-child)::after {
  content: ""; position: absolute; left: 33px; top: 68px; width: 6px; height: 28px; border-radius: 3px;
  background: var(--line); box-shadow: var(--glow);
}
.world__tile {
  display: grid; place-items: center; flex: none;
  width: 72px; height: 72px; border-radius: 14px;
  font-family: var(--pixel); font-size: 1.6rem;
  border: 3px solid var(--green); background: var(--bg);
  box-shadow: 0 0 10px rgba(62, 224, 143, 0.7), 0 0 24px rgba(62, 224, 143, 0.3);
}
.world h3 { font-family: var(--pixel); font-weight: 400; text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.2rem; }
.world p { color: var(--muted); }

/* Screenshot strip */
.scroller-nav { display: flex; gap: 12px; }
.shots {
  margin-top: 32px; display: flex; gap: 18px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 10px max(16px, (100% - 1120px) / 2) 24px;
  scroll-padding-inline: max(16px, (100% - 1120px) / 2);
}
.shots::-webkit-scrollbar { display: none; }
.shots li { flex: 0 0 min(520px, 82vw); scroll-snap-align: start; }
.shots button {
  display: block; width: 100%; padding: 0; border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 14px;
  overflow: hidden; background: var(--bg-2); cursor: zoom-in;
  transition: box-shadow 0.2s, transform 0.2s;
}
.shots button:hover { box-shadow: var(--glow); transform: translateY(-3px); }

/* Video */
.video {
  margin-top: 32px; position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 0 0 40px rgba(110, 130, 255, 0.25);
  background: var(--bg-2);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__poster { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; cursor: pointer; background: none; color: var(--text); }
.video__poster img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); transition: filter 0.2s; }
.video__poster:hover img { filter: brightness(0.75); }
.video__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 96px; height: 96px; border-radius: 50%;
  border: 3px solid var(--line); background: rgba(11, 16, 48, 0.55);
  box-shadow: var(--glow);
}
.video__play::after {
  content: ""; position: absolute; left: 38px; top: 30px;
  border-style: solid; border-width: 18px 0 18px 28px;
  border-color: transparent transparent transparent var(--line);
}
.video__label {
  position: absolute; left: 0; right: 0; bottom: 22px; text-align: center;
  font-family: var(--pixel); text-transform: uppercase; letter-spacing: 0.06em;
}

/* Closing */
.cta__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.cta__icon { width: 112px; height: 112px; border-radius: 24px; box-shadow: 0 0 24px rgba(140, 160, 255, 0.4); }
.cta__title {
  margin-top: 6px; font-family: var(--pixel); font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em;
  font-size: clamp(1.7rem, 4vw, 2.4rem); text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}
.cta p { color: var(--muted); }
.cta .play-badge { margin-top: 8px; }

/* Footer */
.footer { padding: 28px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); color: var(--muted); font-size: 0.95rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer__links { display: flex; gap: 22px; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--text); text-decoration: underline; }

/* Cookie notice */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40;
  max-width: 760px; margin-inline: auto;
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px 16px 22px; border-radius: 16px;
  background: rgba(15, 22, 64, 0.96); border: 1.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 18px rgba(140, 160, 255, 0.25), 0 16px 40px rgba(0, 0, 0, 0.45);
  font-size: 0.95rem;
}
.cookie[hidden] { display: none; }
.cookie p { flex: 1; color: var(--muted); }
.cookie .btn { padding: 10px 26px; }

/* Lightbox */
.lightbox {
  width: min(1200px, 100% - 32px); max-height: calc(100% - 32px); padding: 0; border: 0;
  background: transparent; overflow: visible;
}
.lightbox::backdrop { background: rgba(5, 8, 26, 0.88); }
.lightbox img { width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.7); }
.lightbox .round-btn { position: absolute; }
.lightbox__close { top: -60px; right: 0; }
.lightbox__prev { left: 0; bottom: -64px; }
.lightbox__next { right: 0; bottom: -64px; }

/* Back to top */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.15s;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
body.has-cookie .to-top { bottom: 112px; }

/* Responsive */
@media (max-width: 960px) {
  .hero { padding-top: 48px; }
  .hero__inner, .worlds__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__text { text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .controls { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .colours { grid-template-columns: 1fr; }
  .controls { gap: 14px; }
  .control { padding: 22px 12px; }
  .round-btn { width: 64px; height: 64px; }
  .round-btn--big { width: 72px; height: 72px; }
  .round-btn--small { width: 44px; height: 44px; }
  .section__head { flex-wrap: wrap; }
  .hero__actions { flex-direction: column; }
  .hero__actions .play-badge img, .hero__actions .btn { width: 200px; }
  .hero__actions .btn { justify-content: center; }
  .cookie { flex-direction: column; align-items: stretch; text-align: center; }
  .video__play { width: 72px; height: 72px; }
  .video__play::after { left: 28px; top: 22px; border-width: 14px 0 14px 22px; }
  .video__label { bottom: 12px; font-size: 0.85rem; }
}
