/* Hoply / Madgeeks Games – shared styles. Colors from the game
   (lib/render/brand_art.dart, lib/app/theme.dart). No external resources. */

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

:root {
  --sky-top: #bfe0f5;
  --sky-mid: #e4e4f1;
  --sky-bottom: #fbe0d2;
  --ink: #4a4458;
  --ink-soft: #736a84;
  --lavender: #9d8cf2;
  --outline: #7b63d9;
  --violet: #b79af0;
  --pink: #ff9ec4;
  --peach: #ffc8a2;
  --mint: #8fe3c7;
  --mint-top: #c4f2e2;
  --mint-shade: #5fc2a0;
  --gold: #ffd862;
  --gold-light: #fff0a8;
  --gold-deep: #cf8f2b;
  --brown: #5b3710;
  --card: rgba(255, 255, 255, 0.78);
  --radius: 28px;
  --shadow: 0 18px 40px -18px rgba(74, 68, 88, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Fredoka", ui-rounded, system-ui, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--sky-bottom);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* The sky stays put while the page scrolls, like in the game. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 48%, var(--sky-bottom) 100%);
}

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

a {
  color: var(--outline);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

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

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

/* ------------------------------------------------------------ sky decor */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  opacity: 0.45;
}

.bubble.b1 { width: 320px; height: 320px; top: -80px; right: -60px; background: #dcecfb; }
.bubble.b2 { width: 190px; height: 190px; top: 38%; left: 8%; background: #f3d6de; }
.bubble.b3 { width: 260px; height: 260px; bottom: -70px; left: -60px; background: #ffd9cc; }
.bubble.b4 { width: 150px; height: 150px; bottom: 12%; right: 12%; background: #fff1ea; }

.platform {
  position: absolute;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--mint-top) 0 38%, var(--mint) 38% 100%);
  box-shadow: 0 7px 0 rgba(122, 118, 160, 0.16);
  animation: drift 7s ease-in-out infinite alternate;
}

.coin {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c9 0 18%, var(--gold) 20% 62%, #f0b73c 64%);
  box-shadow: inset 0 0 0 3px #eaa93a;
  animation: spin 2.4s ease-in-out infinite;
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-18px); }
}

@keyframes spin {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(0.25); }
}

/* ------------------------------------------------------------ top bar */

.topbar {
  position: absolute;
  top: 16px;
  right: 16px;
  left: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
}

.topbar .home-link img {
  height: 44px;
  width: auto;
}

.pill {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 15px;
}

.pill a {
  padding: 5px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
}

.pill a[aria-current="true"] {
  background: var(--lavender);
  color: #fff;
}

/* ------------------------------------------------------------ hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 96px 16px 72px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.wordmark {
  position: relative;
  z-index: 1;
  width: min(560px, 88vw);
  margin-bottom: 0;
  filter: drop-shadow(0 10px 16px rgba(123, 99, 217, 0.22));
  animation: pop-in 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.hopper {
  position: relative;
  width: 320px;
  height: 290px;
  margin-top: -6px;
}

.hopper .mochi {
  position: absolute;
  left: 50%;
  bottom: -32px;
  width: 300px;
  margin-left: -150px;
  transform-origin: 50% 74%;
  animation: hop 1.15s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.hopper .pad {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 200px;
  margin-left: -100px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--mint-top) 0 38%, var(--mint) 38% 100%);
  box-shadow: 0 9px 0 rgba(122, 118, 160, 0.18);
}

.hopper .shade {
  position: absolute;
  left: 50%;
  bottom: 42px;
  width: 110px;
  height: 14px;
  margin-left: -55px;
  border-radius: 50%;
  background: rgba(74, 68, 88, 0.16);
  animation: shade 1.15s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

/* Squash on landing, stretch on take-off – like Mochi in the game. */
@keyframes hop {
  0% { transform: translateY(0) scale(1.18, 0.8); }
  12% { transform: translateY(-30px) scale(0.9, 1.12); }
  50% { transform: translateY(-78px) scale(1, 1); }
  88% { transform: translateY(-30px) scale(0.94, 1.08); }
  100% { transform: translateY(0) scale(1.18, 0.8); }
}

@keyframes shade {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.55); opacity: 0.45; }
}

@keyframes pop-in {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.tagline {
  margin: 4px 0 0;
  font-size: clamp(26px, 4.6vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  -webkit-text-stroke: 8px var(--outline);
  paint-order: stroke fill;
  text-shadow: 0 6px 14px rgba(123, 99, 217, 0.28);
  letter-spacing: 0.3px;
}

.lead {
  max-width: 560px;
  margin: 10px auto 0;
  font-size: 20px;
  color: var(--ink);
}

/* ------------------------------------------------------------ buttons */

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 26px 10px 20px;
  border-radius: 999px;
  font-family: inherit;
  text-decoration: none;
  text-align: left;
  line-height: 1.1;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn small {
  display: block;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}

.btn strong {
  display: block;
  font-size: 21px;
  font-weight: 700;
}

.btn svg {
  width: 30px;
  height: 30px;
  flex: none;
}

.btn-juicy {
  color: var(--brown);
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 48%, #f5bd48 100%);
  box-shadow: 0 7px 0 var(--gold-deep), 0 16px 26px -10px rgba(207, 143, 43, 0.6);
}

.btn-juicy:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 var(--gold-deep), 0 20px 30px -10px rgba(207, 143, 43, 0.6);
}

.btn-juicy:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 var(--gold-deep), 0 8px 14px -8px rgba(207, 143, 43, 0.6);
}

.btn-soon {
  color: #fff;
  background: linear-gradient(180deg, #b6a8f7 0%, var(--lavender) 100%);
  box-shadow: 0 7px 0 #7461c9;
  cursor: default;
}

.btn-mint {
  color: #1f5c49;
  background: linear-gradient(180deg, #d4f7ea 0%, var(--mint) 100%);
  box-shadow: 0 7px 0 var(--mint-shade);
}

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

.badge-soon {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: 2px;
}

.scroll-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  color: var(--outline);
  animation: bob 1.6s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ------------------------------------------------------------ sections */

section {
  padding: 56px 0;
}

.title {
  margin: 0 0 8px;
  text-align: center;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  -webkit-text-stroke: 9px var(--outline);
  paint-order: stroke fill;
  text-shadow: 0 6px 14px rgba(123, 99, 217, 0.25);
}

.subtitle {
  max-width: 640px;
  margin: 0 auto 36px;
  text-align: center;
  font-size: 19px;
  color: var(--ink-soft);
}

.card {
  background: var(--card);
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Three steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.step {
  padding: 26px 24px;
  text-align: center;
}

.step .num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  box-shadow: 0 4px 0 var(--gold-deep);
  color: var(--brown);
  font-weight: 700;
  font-size: 22px;
}

.step h3,
.feature h3 {
  margin: 4px 0 6px;
  font-size: 23px;
  font-weight: 700;
}

.step p,
.feature p {
  margin: 0;
  color: var(--ink-soft);
}

/* Screenshots in little phones */
.phones {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 3vw, 34px);
  padding: 10px 0 20px;
}

.phone {
  width: min(250px, 30vw);
  border-radius: 34px;
  border: 8px solid #fff;
  background: #fff;
  box-shadow: 0 30px 50px -24px rgba(74, 68, 88, 0.55);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.phone img {
  border-radius: 26px;
}

.phone:nth-child(1) { transform: rotate(-6deg) translateY(18px); }
.phone:nth-child(2) { transform: translateY(-10px); z-index: 1; width: min(270px, 33vw); }
.phone:nth-child(3) { transform: rotate(6deg) translateY(18px); }
.phone:hover { transform: rotate(0) translateY(-14px) scale(1.03); }

/* Skins */
.skins {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.skin {
  width: 160px;
  margin: 0;
  padding: 14px 10px 14px;
  text-align: center;
}

.skin img {
  width: 140px;
  margin: 0 auto -6px;
  transform-origin: 50% 85%;
  animation: idle 2.4s ease-in-out infinite;
}

.skin:hover img {
  animation: hop-small 0.6s ease-in-out infinite;
}

.skin span {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #f3effd;
  font-weight: 600;
  font-size: 16px;
}

@keyframes idle {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.04, 0.96); }
}

@keyframes hop-small {
  0%, 100% { transform: translateY(0) scale(1.08, 0.92); }
  50% { transform: translateY(-16px) scale(0.96, 1.05); }
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.feature {
  display: flex;
  gap: 16px;
  padding: 22px;
}

.feature .icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.1);
}

.feature .icon svg {
  width: 30px;
  height: 30px;
}

.i-gold { background: linear-gradient(180deg, #ffe38a, #f4b73f); color: var(--brown) !important; }
.i-mint { background: linear-gradient(180deg, #a9ecd6, var(--mint-shade)); }
.i-lav { background: linear-gradient(180deg, #c4b8fb, var(--outline)); }
.i-pink { background: linear-gradient(180deg, #ffc2da, #f27aa9); }
.i-peach { background: linear-gradient(180deg, #ffd9bf, #f59e6a); }
.i-sky { background: linear-gradient(180deg, #bfe3ff, #6fb2ea); }

/* Hoply+ */
.plus {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 26px;
  padding: 30px 34px;
  color: #fff;
  background: linear-gradient(135deg, #b8a6fb 0%, #9d8cf2 45%, #f39cc6 100%);
  border: none;
}

.plus img {
  width: 150px;
}

.plus h3 {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 700;
}

.plus p {
  margin: 0;
  font-size: 19px;
}

/* Final call */
.cta {
  padding: 44px 24px 40px;
  text-align: center;
}

.cta img {
  width: 150px;
  margin: 0 auto;
  animation: hop-small 1.2s ease-in-out infinite;
}

/* Games grid (games.madgeeks.de) */
.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
}

.game {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game .banner {
  aspect-ratio: 1024 / 500;
  object-fit: cover;
  width: 100%;
}

.game .body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 26px;
  flex: 1;
}

.game .head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.game .head img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 6px 12px -4px rgba(74, 68, 88, 0.35);
}

.game h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.game p {
  margin: 0;
  color: var(--ink-soft);
}

.game .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
}

.game .actions .btn {
  min-height: 52px;
  padding: 8px 20px 8px 16px;
}

.game .actions .btn strong {
  font-size: 18px;
}

.game .actions .btn svg {
  width: 24px;
  height: 24px;
}

.game.soon {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.45);
  border: 3px dashed rgba(157, 140, 242, 0.55);
  box-shadow: none;
}

.game.soon img {
  width: 130px;
  margin: 0 auto 6px;
  animation: idle 3s ease-in-out infinite;
  opacity: 0.9;
}

.crowd {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0px, 0.6vw, 6px);
  margin-top: 18px;
}

.crowd img {
  width: clamp(44px, 12vw, 110px);
  transform-origin: 50% 90%;
  animation: hop-small 1.1s ease-in-out infinite;
}

/* ------------------------------------------------------------ footer */

footer {
  padding: 40px 0 48px;
  text-align: center;
  font-size: 16px;
  color: var(--ink-soft);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

footer nav a {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 0 rgba(122, 118, 160, 0.16);
}

footer nav a:hover {
  background: #fff;
}

/* ------------------------------------------------------------ legal */

.legal {
  padding: 110px 0 20px;
}

.legal .card {
  padding: clamp(24px, 5vw, 48px);
}

.legal h1 {
  margin: 0 0 4px;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.15;
  color: var(--outline);
}

.legal h2 {
  margin: 1.8em 0 0.4em;
  font-size: 22px;
  color: var(--outline);
}

.legal p,
.legal td,
.legal th {
  font-size: 17px;
}

.legal .meta {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}

.legal td,
.legal th {
  padding: 8px 10px;
  border: 1px solid #ddd3f5;
  text-align: left;
  vertical-align: top;
}

.legal th {
  background: #f3effd;
}

.legal .en {
  color: var(--ink-soft);
  font-weight: 400;
}

.todo {
  padding: 0 5px;
  border-radius: 6px;
  background: #fff1a8;
  color: #7a5a00;
}

/* ------------------------------------------------------------ small screens */

@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero { padding-top: 84px; }
  .hopper { transform: scale(0.85); margin: -18px 0; }
  /* Screenshots: a row to swipe through instead of three tiny phones. */
  .phones {
    justify-content: flex-start;
    gap: 16px;
    margin-inline: -16px;
    padding: 10px 16px 34px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .phone,
  .phone:nth-child(n) {
    flex: none;
    width: 66vw;
    transform: none;
    scroll-snap-align: center;
  }
  .skin { width: calc(50% - 9px); }
  .hopper { width: 280px; }
  .plus { grid-template-columns: 1fr; text-align: center; }
  .plus img { margin: 0 auto; width: 120px; }
  .btn { min-height: 58px; }
  .btn strong { font-size: 19px; }
}

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