/* The shared look for every page: the games' candy theme. A pastel pink-to-lavender
   backdrop with floating bubbles, white "marshmallow" cards with a colored edge,
   glossy candy buttons that sit on a darker lip, and sticker titles. Colors match
   each game's palette (Too Slow: game/autoload/config.gd). */

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

:root {
  --bg-top: #ffe0f0;
  --bg-bottom: #e5dcff;
  --text: #4a1d5c;
  --muted: #91709f;
  --line: #ecd6f3;
  --line-lip: #e0c8e8;
  --panel-light: #f3e6fa;
  --pink: #ff4f9a;
  --pink-lip: #c13c75;
  --pink-soft: #ffe2ef;
  --violet: #9b5cf6;
  --violet-lip: #7646bb;
  --blue: #3b9dff;
  --blue-lip: #2d77c1;
  --orange: #ff8a3d;
  --danger: #f43f5e;
  --danger-lip: #b93047;
  --shadow: rgba(74, 28, 92, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom)) fixed;
  color: var(--text);
  font: 500 17px/1.55 "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

main {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 10px; font-weight: 700; }
h2 { font-size: 26px; }
h3 { font-size: 22px; }
p { margin: 0 0 12px; }
a { color: var(--pink-lip); font-weight: 600; }
strong { font-weight: 700; }
ul { padding-left: 22px; margin: 0 0 12px; }
li { margin-bottom: 6px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }

/* Floating bubbles and sparkles behind everything (made by site.js). */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bubble {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.95) 0 11%, rgba(255, 255, 255, 0.2) 12%);
  animation: drift 9s ease-in-out infinite alternate;
}
.sparkle {
  position: absolute;
  background: #fff;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: twinkle 3s ease-in-out infinite alternate;
}
.sparkle.pink { background: var(--pink); opacity: 0.6; }
@keyframes drift { to { transform: translateY(-26px) translateX(8px); } }
@keyframes twinkle { from { opacity: 0.35; transform: scale(0.8); } to { opacity: 1; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .bubble, .sparkle { animation: none; } }

/* The top bar: the site's name on every page, and where you are. */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  flex-wrap: wrap;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.logo .sticker { font-size: 30px; color: var(--violet); }
.candy {
  display: inline-block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #fff 0 9%, transparent 10%),
    radial-gradient(ellipse 34% 14% at 50% 24%, rgba(255, 255, 255, 0.5) 0 99%, transparent 100%),
    var(--pink);
  box-shadow: 0 4px 0 var(--pink-lip);
}
.crumbs { color: var(--muted); font-size: 15px; font-weight: 600; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--pink-lip); }

/* Big bold text with a white outline and a soft shadow, like the games' titles. */
.sticker {
  font-weight: 700;
  -webkit-text-stroke: 0.16em #fff;
  paint-order: stroke fill;
  text-shadow: 0 0.08em 0 rgba(74, 28, 92, 0.16);
  letter-spacing: 0.01em;
}
.violet-text { color: var(--violet); }
.pink-text { color: var(--pink); }
.orange-text { color: var(--orange); }

.hero { text-align: center; margin: 8px 0 28px; }
.hero h1 { font-size: clamp(48px, 13vw, 76px); margin-bottom: 6px; }
.hero p { font-size: 19px; color: var(--muted); font-weight: 600; margin: 0 auto 8px; max-width: 520px; }
.hero .game-icon { width: 128px; height: 128px; margin: 0 auto 10px; }

/* White cards with a pastel edge and a lip under them. */
.card {
  --edge: #d2b5fb;
  --edge-lip: #c6a8f2;
  position: relative;
  background: #fff;
  border: 4px solid var(--edge);
  border-radius: 32px;
  padding: 22px 24px;
  margin: 0 0 26px;
  box-shadow: 0 8px 0 var(--edge-lip), 0 18px 30px var(--shadow);
}
.card.pink { --edge: #ffb0d1; --edge-lip: #f5a2c5; }
.card.blue { --edge: #a7d3ff; --edge-lip: #98c5f3; }
.card.orange { --edge: #ffcaa7; --edge-lip: #f5bc97; }
.card.plain { --edge: var(--line); --edge-lip: var(--line-lip); }
.card.soon {
  border-style: dashed;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}
.card h2, .card h3 { color: var(--text); }

.section-title {
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink);
  font-weight: 700;
  margin: 34px 0 12px;
}

/* Glossy candy buttons on a darker lip; they sink onto it when pressed. */
.button {
  --fill: var(--pink);
  --lip: var(--pink-lip);
  --ink: #fff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  margin: 14px 0 20px;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink);
  font: 700 18px/1.2 "Fredoka", system-ui, sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
  cursor: pointer;
  box-shadow: 0 8px 0 var(--lip), 0 14px 22px var(--shadow);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}
.button::before {
  content: "";
  position: absolute;
  left: 44px;
  right: 34%;
  top: 9px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.42);
}
.button::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}
.button:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--lip), 0 6px 12px var(--shadow); }
.button:focus-visible { outline: 4px solid var(--violet); outline-offset: 4px; }
.button.violet { --fill: var(--violet); --lip: var(--violet-lip); }
.button.blue { --fill: var(--blue); --lip: var(--blue-lip); }
.button.danger { --fill: var(--danger); --lip: var(--danger-lip); }
.button.white { --fill: #fff; --lip: var(--line-lip); --ink: var(--text); border: 3px solid var(--line); text-shadow: none; }
.button.white::before, .button.white::after { display: none; }
.button[disabled] {
  --fill: var(--panel-light);
  --lip: var(--line);
  --ink: var(--muted);
  cursor: not-allowed;
  text-shadow: none;
  box-shadow: 0 8px 0 var(--lip);
  transform: none;
}
.button[disabled]::before, .button[disabled]::after { display: none; }
.buttons { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .buttons.two { grid-template-columns: 1fr 1fr; } }

/* Small candy pills. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.chip {
  padding: 3px 14px;
  border-radius: 99px;
  background: var(--pink-soft);
  color: var(--pink-lip);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 3px 0 #ffc6de;
}
.chip.violet { background: #efe6ff; color: var(--violet-lip); box-shadow: 0 3px 0 #dccbfd; }
.chip.blue { background: #e3f1ff; color: var(--blue-lip); box-shadow: 0 3px 0 #c7e2ff; }

/* A game on the home page. */
.game {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 4px 18px;
  align-items: center;
}
.game .game-icon { width: 96px; height: 96px; }
.game h3 { font-size: 28px; margin: 0 0 4px; }
.game p { margin: 0; }
.game .buttons { grid-column: 1 / -1; margin-top: 10px; }
.game-icon {
  display: block;
  border-radius: 24%;
  box-shadow: 0 6px 0 rgba(74, 28, 92, 0.12), 0 12px 20px var(--shadow);
}

/* The Too Slow dot, drawn in CSS: a glossy candy with a white rim and a countdown ring. */
.dot {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 8px auto 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 26% 30%, #fff 0 6%, transparent 7%),
    radial-gradient(ellipse 36% 17% at 46% 22%, rgba(255, 255, 255, 0.45) 0 99%, transparent 100%),
    radial-gradient(circle at 50% 46%, #ffd166 0 62%, #e8b248 64%);
  box-shadow: 0 0 0 12px #fff, 0 0 0 20px var(--danger), 0 22px 32px var(--shadow);
  color: #3b1047;
  font-size: 40px;
  font-weight: 700;
}

/* A row of phone screenshots that scrolls sideways on small screens. */
.screens {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  margin: 0 -4px 10px;
  scroll-snap-type: x mandatory;
}
.screens img {
  flex: 0 0 auto;
  width: min(62vw, 220px);
  height: auto;
  border-radius: 24px;
  border: 4px solid #fff;
  box-shadow: 0 10px 22px var(--shadow);
  scroll-snap-align: center;
}

.features { display: grid; gap: 14px; }
@media (min-width: 560px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { margin: 0; padding: 18px 20px; }
.feature h3 { font-size: 20px; }
.feature p { margin: 0; color: var(--muted); }

.big { font-size: 42px; font-weight: 700; color: var(--orange); margin: 4px 0; }

input {
  width: 100%;
  padding: 14px 22px;
  border-radius: 999px;
  border: 4px solid var(--line);
  background: #fff;
  color: var(--text);
  font: 600 18px "Fredoka", system-ui, sans-serif;
  outline: none;
}
input:focus { border-color: var(--pink); }

footer {
  margin-top: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 8px; }
footer a { color: var(--muted); font-weight: 600; }
