/* Kubonauts website: direction D of the design canvas (night sky and route, A's sky window and white cards,
   C's realm keycaps). Mobile first; one breakpoint for wide screens. */

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

:root {
  --night: #0c1033;
  --panel: #161c4d;
  --rim: #2b3478;
  --text: #eef0ff;
  --soft: #c3c9f0;
  --gold: #f2b33d;
  --gold-edge: #a8730f;
  --gold-ink: #2a1d00;
  --ink: #283058;
  --ink-soft: #4a5180;
  --card-edge: #d3d6ee;
  --green: #3f9a3a;
  --green-edge: #2a6b26;
  --coral: #d9574a;
  --coral-edge: #9c3a30;
  --wrap: 1120px;
}

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

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

body {
  margin: 0;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--night);
  line-height: 1.5;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 40px 0 20px; }

.eyebrow {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}
.h2 { margin: 6px 0 8px; font-size: clamp(30px, 3.8vw, 44px); font-weight: 700; }
.lead { margin: 0 0 28px; font-size: 18px; color: var(--soft); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 14px; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 600;
}
.skip:focus { top: 12px; }

/* Keys: the game's keycaps. A press sinks the key onto its edge. */
.key {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: 16px;
  font: inherit; font-weight: 600; font-size: 17px; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.key:active { transform: translateY(4px); }
.key--white { background: #fff; color: var(--ink); box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 5px 0 #9aa2d6; }
.key--white:active { box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 1px 0 #9aa2d6; }

/* Store keys: stand-ins until the stores' own badges and links (see docs/WEBSITE.md). */
.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 60px; min-width: 176px; padding: 6px 18px; border-radius: 14px;
  background: #05071c; color: var(--text); text-decoration: none;
  box-shadow: inset 0 0 0 2px #7d87c9, 0 6px 0 #03040f;
}
.store small { font-size: 13px; color: var(--soft); line-height: 1.2; }
.store strong { font-size: 21px; font-weight: 600; line-height: 1.2; }

/* Header and hero */
.hero { position: relative; overflow: hidden; padding-bottom: 48px; }
.hero__sky, .hero__sky img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__sun { position: absolute; right: -90px; top: -80px; width: clamp(220px, 30vw, 420px); }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background: linear-gradient(rgba(12,16,51,0), var(--night));
}
.hero .wrap { position: relative; z-index: 1; padding-top: 16px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 20px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 4px 0 #050720; }
.hero__body { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 48px; padding-top: 36px; }
.hero__text { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hero__text h1 { margin: 0; }
.hero__title { width: 100%; max-width: 540px; height: auto; filter: drop-shadow(0 0 18px rgba(120,140,255,.35)); }
.hero__claim { margin: 0; font-size: clamp(26px, 3.4vw, 38px); font-weight: 600; line-height: 1.15; }
.hero__pitch { margin: 0; font-size: 18px; color: var(--soft); }
.hero__note { margin: 0; font-size: 16px; color: var(--soft); }
.hero__art { flex: 1 1 320px; min-width: 0; position: relative; display: flex; justify-content: center; padding: 20px 0; }
.hero__island { width: 100%; max-width: 560px; height: auto; filter: drop-shadow(0 24px 22px rgba(0,0,0,.45)); }
.hero__ship { position: absolute; left: -4%; bottom: 0; width: 26%; height: auto; transform: rotate(-28deg); }

/* The route: one stop per planet, a dashed gold line between them */
.route { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.stop { display: flex; gap: 14px; align-items: stretch; }
.stop__rail { flex: 0 0 60px; display: flex; flex-direction: column; align-items: center; }
.stop__rail img { width: 60px; height: 60px; object-fit: contain; }
.stop__rail::after { content: ""; flex: 1; border-left: 3px dashed var(--gold); margin-top: 8px; }
.stop--half .stop__rail::after { opacity: .5; }
.stop--last .stop__rail::after { display: none; }
.stop__card { flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--rim); border-radius: 24px; padding: 18px 16px 22px; }
.stop--paid .stop__card { border: 2px solid var(--gold); }
.stop--coming { opacity: .6; }
.stop__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.stop__head h3 { margin: 0; font-size: 24px; font-weight: 600; }
.tag { font-size: 14px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.tag--free { background: var(--green); color: #fff; }
.tag--paid { background: var(--gold); color: var(--gold-ink); }
.tag--coming { background: #3a4280; color: var(--text); }
.stop__text { margin: 6px 0 16px; font-size: 16px; color: var(--soft); }
.stop__text:last-child { margin-bottom: 0; }

/* Realm keycaps: the realm's sky inside a white bevel, sides in its colour, a hard edge under it */
.realms {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(96px, 18vw, 220px), 1fr)); gap: 20px 12px;
}
.realm { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.realm__cap {
  position: relative; width: 100%; height: 0; padding-bottom: 62.5%; border-radius: 20px;
  background: var(--side);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 8px 0 var(--edge), 0 14px 18px rgba(0,0,0,.45);
}
.realm__face { position: absolute; inset: 8px; border-radius: 13px; border: 4px solid #fff; overflow: hidden; }
.realm__face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.realm__name { font-size: 17px; font-weight: 600; color: var(--name); text-align: center; }

/* How to play: a window of the worlds screen's painted sky with white cards */
.window {
  position: relative; overflow: hidden; border-radius: 34px; padding: 30px 18px 26px;
  box-shadow: 0 0 0 4px var(--rim), 0 18px 40px rgba(0,0,0,.45);
}
.window__sky { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.window__island {
  position: absolute; right: -40px; top: -6px; width: clamp(150px, 22vw, 260px); height: auto;
  filter: drop-shadow(0 16px 14px rgba(40,40,100,.35));
}
.window__body { position: relative; }
.window .eyebrow { color: var(--ink); }
.window .h2 { color: #fff; text-shadow: 0 3px 0 rgba(30,40,90,.45); max-width: 60%; margin-bottom: 20px; }
.steps { display: flex; flex-wrap: wrap; gap: 18px; }
.step { flex: 1 1 280px; min-width: 0; background: #fff; color: var(--ink); border-radius: 22px; overflow: hidden; box-shadow: 0 6px 0 var(--card-edge); }
.step img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.step__body { padding: 0 18px 20px; }
.coin {
  position: relative; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid #fff; color: #fff; font-size: 22px; font-weight: 700;
  background: var(--coin); box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 4px 0 var(--coin-edge);
}
.step h3 { margin: 8px 0 4px; font-size: 22px; font-weight: 600; }
.step p { margin: 0; font-size: 16px; color: var(--ink-soft); }

/* Islands and the ways pieces break */
.islands {
  list-style: none; margin: 0; padding: 4px 0 6px; display: flex; gap: 6px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.islands::-webkit-scrollbar { display: none; }
.islands > li { flex: 0 0 200px; scroll-snap-align: start; }
.island { margin: 0; display: flex; flex-direction: column; align-items: center; }
.island img { width: 100%; height: auto; filter: drop-shadow(0 16px 14px rgba(0,0,0,.5)); }
.island figcaption { font-size: 15px; font-weight: 600; color: var(--soft); text-align: center; }
.chips { list-style: none; margin: 0; padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 14px 10px; }
.chip {
  padding: 9px 14px; border-radius: 12px; font-weight: 600; font-size: 16px; color: var(--night);
  background: var(--bg); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 5px 0 var(--edge);
}

/* Features */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 28px; }
.feature { display: flex; gap: 12px; }
.feature svg { flex: 0 0 22px; margin-top: 2px; }
.feature h3 { margin: 0; font-size: 18px; font-weight: 600; }
.feature p { margin: 2px 0 0; font-size: 16px; color: var(--soft); line-height: 1.45; }

/* Screenshots */
.shot-main { border-radius: 24px; overflow: hidden; box-shadow: 0 0 0 4px #fff, 0 10px 0 4px #9aa2d6; }
.shot-main img { width: 100%; height: auto; }
.shots { list-style: none; margin: 0; padding: 26px 0 4px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; }
.shots li { flex: 0 0 auto; scroll-snap-align: start; }
.shots img { height: 150px; width: auto; border-radius: 14px; }

/* Lift-off */
.liftoff { position: relative; overflow: hidden; padding: 56px 20px 64px; margin-top: 40px; text-align: center; background: var(--panel); }
.liftoff__venus { position: absolute; left: -40px; bottom: -40px; width: 160px; opacity: .9; }
.liftoff__saturn { position: absolute; right: -50px; top: 10px; width: 200px; opacity: .9; }
.liftoff__body { position: relative; max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.liftoff__ship { width: 72px; height: auto; transform: rotate(18deg); }
.liftoff h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); font-weight: 700; }
.liftoff p { margin: 0; font-size: 18px; color: var(--soft); }
.liftoff .stores { justify-content: center; padding-top: 4px; }

/* Footer */
.footer { padding: 24px 0 34px; border-top: 1px solid var(--rim); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 15px; color: #b5bce8; }
.footer nav { display: flex; gap: 20px; }
.footer a { color: #fff; }

/* Privacy policy */
.page-head { position: relative; overflow: hidden; padding: 16px 0 72px; }
.page-head .wrap { position: relative; z-index: 1; max-width: 800px; }
.page-head h1 { margin: 36px 0 0; font-size: clamp(34px, 5vw, 52px); font-weight: 700; text-shadow: 0 3px 0 rgba(5,7,32,.5); }
.policy { position: relative; max-width: 800px; margin: -44px auto 0; padding: 0 16px 48px; }
.policy article {
  background: #fff; color: #3b416e; border-radius: 24px; padding: 24px 22px 30px;
  box-shadow: 0 6px 0 var(--card-edge); font-size: 17px; line-height: 1.6;
}
.policy .byline { margin: 0; color: var(--ink-soft); }
.policy .short { margin: 18px 0 8px; padding: 16px 18px; border-radius: 18px; background: #e4f4e2; color: #1f4d1c; font-weight: 500; }
.policy .short strong { font-weight: 600; }
.policy .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; padding: 0; list-style: none; }
.policy .toc a { display: inline-block; padding: 8px 12px; border-radius: 12px; background: #eef0fa; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.policy h2 { margin: 28px 0 8px; font-size: 24px; font-weight: 600; color: var(--ink); scroll-margin-top: 16px; }
.policy p { margin: 0 0 8px; }
.policy ul { margin: 0 0 8px; padding-left: 22px; }
.policy li { margin-bottom: 6px; }
.policy li strong { font-weight: 600; color: var(--ink); }
.policy a { color: #2b5fb8; }

@media (min-width: 900px) {
  .section { padding-top: 56px; }
  .window { padding: 40px 36px 36px; }
  .islands > li { flex: 1 1 0; min-width: 0; }
  .islands { overflow: visible; }
  .shots img { height: 170px; }
}

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