/* Axon Arcade — shared styles for every page.
   Colours come from Swipe Mania's palette (scripts/core/palette.gd) so the
   studio site and the game look like they belong together. */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0d0f1a;
  --bg-indigo: #3a1096;
  --bg-teal: #185470;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f5f8;
  --muted: #b9bdd0;
  --accent: #8b7bff;
  --pink: #ff4f9a;
  --yellow: #ffd60a;
  --grad: linear-gradient(90deg, #8b7bff 0%, #ff4f9a 100%);
  --rainbow: linear-gradient(90deg, #ffd60a 0 25%, #ff8a1f 25% 50%, #34c759 50% 75%, #3dd5ff 75% 100%);

  /* Game colours, used by the level cards. */
  --c-red: #f0434a;
  --c-blue: #3d8bff;
  --c-green: #34c759;
  --c-yellow: #ffd60a;
  --c-orange: #ff8a1f;
  --c-purple: #a35cff;
  --c-pink: #ff6ec7;
  --c-card: #232838;

  --display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 24px;
  --wrap: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(107, 60, 255, 0.45), transparent 60%),
    radial-gradient(900px 600px at 100% 30%, rgba(255, 79, 154, 0.16), transparent 60%),
    radial-gradient(1000px 700px at 50% 110%, rgba(24, 84, 112, 0.55), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 8px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.6rem, 6vw + 1rem, 4.75rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.9rem, 2.5vw + 1rem, 2.75rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--yellow);
  color: #000;
  padding: 0.6rem 1rem;
  z-index: 10;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------- Header ---------- */

.site-header {
  padding-block: 1.25rem;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
}

.brand {
  white-space: nowrap;
}

.brand img {
  width: 40px;
  height: 40px;
}

.brand .crumb {
  color: var(--muted);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 1.5rem;
  font-weight: 600;
}

.nav a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
}

.nav a:hover {
  color: var(--text);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(255, 79, 154, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-ghost {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-strong);
}

.btn svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.btn-store {
  flex-direction: row;
  line-height: 1.15;
  text-align: left;
  padding-block: 0.7rem;
}

.btn-store small {
  display: block;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ---------- Bits ---------- */

.eyebrow {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 0.75rem;
}

.rainbow-rule {
  width: 120px;
  height: 6px;
  border-radius: 6px;
  background: var(--rainbow);
  margin: 0 0 1.5rem;
}

.lead {
  font-size: clamp(1.1rem, 0.6vw + 1rem, 1.3rem);
  color: var(--muted);
  max-width: 38rem;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head p {
  color: var(--muted);
  max-width: 40rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.chip.new {
  border-color: transparent;
  background: var(--yellow);
  color: #1a1300;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Phone frame around a 9:16 screenshot. */
.phone {
  position: relative;
  border-radius: 34px;
  padding: 10px;
  background: linear-gradient(160deg, #2c2f45, #14162a);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 0 80px -20px rgba(139, 123, 255, 0.45);
}

.phone img {
  border-radius: 26px;
  aspect-ratio: 9 / 16;
  width: 100%;
  object-fit: cover;
}

/* ---------- Home: hero ---------- */

.hero {
  padding-block: clamp(3rem, 8vw, 7rem) clamp(2rem, 5vw, 4rem);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  max-width: 15ch;
}

.hero + .section {
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

/* Three in-game cards mid-swipe, with the colour streaks from the app icon. */
.hero-art {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(closest-side, rgba(139, 123, 255, 0.45), transparent);
}

.big-card {
  position: absolute;
  width: 48%;
  aspect-ratio: 1;
  border-radius: 18%;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.6vw + 0.6rem, 2.3rem);
  line-height: 1.05;
  color: #fff;
  background: var(--c-card);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.3), 0 30px 60px -10px rgba(0, 0, 0, 0.6);
  animation: float 6s ease-in-out infinite;
}

.big-card.outlined {
  -webkit-text-stroke: 2px #111;
  paint-order: stroke fill;
}

.big-card.c1 { left: 2%; top: 6%; rotate: -14deg; animation-delay: -2s; }
.big-card.c2 { right: 0; top: 0; rotate: 11deg; animation-delay: -4s; }
.big-card.c3 { left: 30%; top: 44%; rotate: -4deg; }

.streak {
  position: absolute;
  left: -6%;
  width: 40%;
  height: 4.5%;
  border-radius: 99px;
  rotate: -10deg;
  background: linear-gradient(90deg, transparent, var(--c));
}

.streak.s1 { top: 56%; --c: var(--c-yellow); }
.streak.s2 { top: 64%; left: -10%; --c: var(--c-orange); }
.streak.s3 { top: 72%; --c: var(--c-green); }
.streak.s4 { top: 80%; left: 2%; width: 32%; --c: #3dd5ff; }

.spark {
  position: absolute;
  line-height: 1;
  color: #fff;
}

.spark.k1 { right: 6%; top: 52%; font-size: 2.2rem; color: var(--yellow); }
.spark.k2 { left: 44%; top: -2%; font-size: 1.5rem; }
.spark.k3 { right: 2%; bottom: 2%; font-size: 1.2rem; opacity: 0.8; }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

/* ---------- Home: game card ---------- */

.game-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(600px 400px at 0% 0%, rgba(107, 60, 255, 0.35), transparent 70%),
    linear-gradient(160deg, rgba(58, 16, 150, 0.55), rgba(24, 84, 112, 0.45));
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.game-card .logo {
  width: min(300px, 70%);
  margin-bottom: 1rem;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.45));
}

.game-card h3 {
  font-size: clamp(1.6rem, 1.5vw + 1rem, 2.1rem);
}

.game-card .tagline {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--yellow);
  margin-bottom: 0.75rem;
}

.game-card p {
  color: var(--muted);
  max-width: 34rem;
}

.game-card .phones {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.game-card .phone {
  width: min(220px, 45%);
}

.game-card .phone:nth-child(2) {
  transform: translateY(2rem) rotate(4deg);
}

.game-card .phone:first-child {
  transform: rotate(-3deg);
}

.coming-soon {
  margin-top: 1.5rem;
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  border: 2px dashed var(--line);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.coming-soon strong {
  color: var(--text);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
}

.coming-soon .dots {
  display: flex;
  gap: 6px;
  flex: none;
}

.coming-soon .dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}

.coming-soon .dots span:nth-child(2) {
  animation-delay: 0.2s;
  background: var(--pink);
}

.coming-soon .dots span:nth-child(3) {
  animation-delay: 0.4s;
  background: var(--yellow);
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---------- Game page: hero ---------- */

.game-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  padding-block: clamp(2rem, 5vw, 4rem);
}

.game-hero .logo {
  width: min(380px, 80%);
  margin: 0 0 1.25rem -0.5rem;
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.5));
}

.game-hero .tagline {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.5vw + 1rem, 2.1rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.game-hero .phones {
  position: relative;
  display: flex;
  justify-content: center;
}

.game-hero .phone {
  width: min(300px, 70%);
}

.game-hero .phone.back {
  position: absolute;
  width: min(250px, 58%);
  left: 50%;
  top: 8%;
  transform: translateX(-108%) rotate(-7deg);
  opacity: 0.85;
  z-index: 0;
}

.game-hero .phone.front {
  z-index: 1;
  transform: translateX(18%) rotate(3deg);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-weight: 600;
}

.facts li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* ---------- Game page: steps ---------- */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  position: relative;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  background: var(--grad);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.steps p {
  color: var(--muted);
  margin: 0;
}

/* ---------- Game page: levels ---------- */

.levels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.level {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.level .num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.level .rule {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0.15rem 0 0.3rem;
}

.level .hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* A tiny version of the in-game card, with its four coloured edges. */
.mini {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 16px;
  background: #1a1d3a;
  border: 2px solid rgba(139, 123, 255, 0.35);
}

.mini .card {
  position: absolute;
  inset: 16px;
  border-radius: 10px;
  background: var(--c-card);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1.05;
  color: #fff;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.mini .card.outlined {
  -webkit-text-stroke: 0.6px #111;
  paint-order: stroke fill;
}

.mini .edge {
  position: absolute;
  background: rgba(255, 255, 255, 0.18);
}

.mini .edge.t,
.mini .edge.b {
  left: 28px;
  right: 28px;
  height: 6px;
}

.mini .edge.l,
.mini .edge.r {
  top: 28px;
  bottom: 28px;
  width: 6px;
}

.mini .edge.t { top: 4px; border-radius: 0 0 3px 3px; }
.mini .edge.b { bottom: 4px; border-radius: 3px 3px 0 0; }
.mini .edge.l { left: 4px; border-radius: 0 3px 3px 0; }
.mini .edge.r { right: 4px; border-radius: 3px 0 0 3px; }

.mini .sym {
  position: absolute;
  font-size: 11px;
  line-height: 1;
  color: var(--c, #fff);
}

.mini .sym.t { top: 3px; left: 50%; translate: -50% 0; }
.mini .sym.b { bottom: 3px; left: 50%; translate: -50% 0; }
.mini .sym.l { left: 4px; top: 50%; translate: 0 -50%; }
.mini .sym.r { right: 4px; top: 50%; translate: 0 -50%; }

.bg-red { background: var(--c-red) !important; }
.bg-blue { background: var(--c-blue) !important; }
.bg-green { background: var(--c-green) !important; }
.bg-yellow { background: var(--c-yellow) !important; }
.bg-orange { background: var(--c-orange) !important; }
.bg-purple { background: var(--c-purple) !important; }
.bg-pink { background: var(--c-pink) !important; }
.fg-yellow { color: var(--c-yellow) !important; }
.fg-red { color: var(--c-red) !important; }

/* ---------- Game page: screenshots ---------- */

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(240px, 62vw);
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0 1.5rem;
  margin: 0;
  list-style: none;
  scrollbar-color: var(--accent) transparent;
}

.shots li {
  scroll-snap-align: start;
}

.shots figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Game page: features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}

.feature {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.feature .icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: rgba(139, 123, 255, 0.18);
  color: var(--yellow);
}

.feature .icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.feature h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.feature p {
  color: var(--muted);
  margin: 0;
  font-size: 0.98rem;
}

.cta {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(500px 300px at 50% 0%, rgba(255, 79, 154, 0.3), transparent 70%),
    linear-gradient(160deg, rgba(58, 16, 150, 0.6), rgba(24, 84, 112, 0.5));
  border: 1px solid var(--line);
}

.cta img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto 1.25rem;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
}

.cta .actions {
  justify-content: center;
}

/* ---------- Prose (privacy policy) ---------- */

.prose {
  max-width: 44rem;
  padding-block: clamp(2rem, 5vw, 4rem);
}

.prose h1 {
  font-size: clamp(2.2rem, 3vw + 1rem, 3.2rem);
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.25rem;
}

.prose p,
.prose li {
  color: #d9dbe6;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose .meta {
  color: var(--muted);
}

.prose .summary {
  padding: 1.25rem 1.5rem;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow);
}

/* ---------- 404 ---------- */

.lost {
  text-align: center;
  padding-block: clamp(4rem, 12vw, 9rem);
}

.lost .big {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(5rem, 18vw, 10rem);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.lost .actions {
  justify-content: center;
  margin-top: 2rem;
}

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

.site-footer {
  margin-top: 2rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---------- Wider screens ---------- */

@media (min-width: 600px) {
  .levels {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .levels {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 819px) {
  .game-hero .phone.back {
    display: none;
  }

  .game-hero .phone.front {
    transform: rotate(2deg);
  }
}

@media (min-width: 820px) {
  .hero {
    grid-template-columns: 1.25fr 1fr;
  }

  .hero-art {
    width: min(100%, 440px);
  }

  .game-card {
    grid-template-columns: 1.15fr 1fr;
  }

  .game-hero {
    grid-template-columns: 1.1fr 1fr;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .site-header .wrap {
    flex-wrap: wrap;
  }

  .nav {
    gap: 1rem;
    font-size: 0.95rem;
  }

  .brand .crumb {
    display: none;
  }

  .coming-soon {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Helpers ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.shots figure {
  margin: 0;
}

.cta .lead {
  margin-inline: auto;
}

.lost .lead {
  margin-inline: auto;
}

/* The hero glow can reach past the page edge on mid-size screens. */
body {
  overflow-x: clip;
}
