/* ==========================================================================
   Flow Factory — theme (colours sampled from the app icon, the feature graphic and the store screenshots).
   Identity: a ball factory at night. Deep indigo floor, purple machines, gold pipes and gears,
   silver tracks, yellow-and-black hazard edges around every slot, and glossy red and blue balls.
   ========================================================================== */

:root {
  /* Ground and text (a dark page: the factory floor) */
  --page: #171A57;          /* factory indigo */
  --page-deep: #1F2370;     /* gallery floor */
  --ink: #F4F3FF;
  --ink-soft: #C6C8EE;      /* 9.8:1 on --page */
  --link: #FFD15C;

  /* Bands */
  --band: #F6B826;          /* pipe gold */
  --band-ink: #171A57;
  --dark: #0E1040;          /* machine room */
  --dark-ink: #F4F3FF;
  --dark-soft: rgba(244, 243, 255, 0.76);
  --focus: #FFD15C;

  --gold: #FFC83A;
  --purple: #8D55E8;
  --purple-d: #6B33D6;
  --silver: #E9EBF7;
  --red: #EE3F4C;
  --blue: #2F80F5;
  --yellow: #FFC21F;
  --hazard: repeating-linear-gradient(-45deg, #F5C21B 0 10px, #1C1C2A 10px 20px);
}

body {
  background-image:
    radial-gradient(ellipse 70% 45% at 78% 8%, rgba(141, 85, 232, 0.32), transparent 70%),
    radial-gradient(ellipse 50% 40% at 10% 0%, rgba(47, 128, 245, 0.22), transparent 70%);
  background-repeat: no-repeat;
}

/* ---------- Bands: gold pipe band with hazard edges ---------- */
.bar { box-shadow: 0 4px 0 #1C1C2A; }
.bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 6px;
  background: var(--hazard);
  pointer-events: none;
}
.bar .lang:hover { background: #2A2E80; }
.cta { position: relative; }
.cta::before, .cta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background: var(--hazard);
}
.cta::before { top: 0; }
.cta::after { bottom: 0; }

/* ---------- Coming soon note (instead of the Google Play badge) ---------- */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px 0 16px;
  border: 2px dashed var(--gold);
  border-radius: 14px;
  color: var(--gold);
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 16px;
}
.soon__icon { flex: none; width: 20px; height: 20px; fill: currentColor; }
.soon--cta { border-color: var(--band-ink); color: var(--band-ink); background: rgba(255, 255, 255, 0.28); }

/* ---------- Hero ---------- */
.hero__icon { box-shadow: 0 0 0 3px var(--gold), 0 16px 34px -14px rgba(141, 85, 232, 0.9); }
.hero__name { color: var(--gold); text-shadow: 0 0.045em 0 #B9661A, 0 0.09em 0 var(--purple-d); }
.hero__rest { color: #8FC0FF; }
.hero__tagline { color: var(--ink); }
.hero__note { color: var(--ink-soft); }

/* ---------- Hero art: the store feature graphic as a big, gold-framed card (still, no motion) ---------- */
@media (min-width: 961px) {
  .hero__grid { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); }
}
@media (max-width: 960px) {
  .hero__visual { max-width: 640px; }   /* base caps it at 460 px, sized for square boards */
}
.art { position: relative; max-width: 680px; margin-inline: auto; }
.art__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 500;
  border-radius: 22px;
  background: #17195A;      /* navy of the art while it loads */
  box-shadow: 0 0 0 3px var(--gold), 0 28px 50px -18px rgba(5, 6, 30, 0.85);
}

/* ---------- Modes: three steps, each on a slot plate ---------- */
.patches {
  counter-reset: step;
  gap: 20px;
  margin-top: clamp(36px, 5vw, 56px);
}
.patch {
  counter-increment: step;
  padding-top: 0;
  background: #22266F;
  border: 2px solid #3A3F97;
  border-radius: 20px;
  overflow: hidden;
}
.patch__fabric {
  position: relative;
  height: 64px;
  border-bottom: 2px solid #3A3F97;
}
.patch__fabric::after {
  content: counter(step);
  position: absolute;
  left: clamp(20px, 2.6vw, 36px);
  bottom: -22px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--band-ink);
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 20px;
  box-shadow: 0 0 0 4px #22266F;
}
.patch__title { margin-top: 18px; color: var(--ink); }
.patch--place .patch__fabric { background: var(--hazard); }
.patch--rotate .patch__fabric {
  background-color: var(--purple-d);
  background-image: repeating-conic-gradient(from 0deg at 50% 120%, rgba(255, 255, 255, 0.12) 0 8deg, transparent 8deg 16deg);
}
.patch--sort .patch__fabric {
  background-color: #2C3184;
  background-image:
    radial-gradient(circle at 30% 30%, #FFB3B8 0 2px, var(--red) 3px 12px, transparent 12.5px),
    radial-gradient(circle at 30% 30%, #B8D6FF 0 2px, var(--blue) 3px 12px, transparent 12.5px),
    radial-gradient(circle at 30% 30%, #FFE7A0 0 2px, var(--yellow) 3px 12px, transparent 12.5px);
  background-size: 96px 64px;
  background-position: 18px 18px, 50px 18px, 82px 18px;
}

/* ---------- Feature notes: a glossy ball marks each one ---------- */
.note { border-top: 2px solid #2F347F; }
.note__title::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.85) 0 2px, var(--c, var(--red)) 4px 9px, rgba(0, 0, 0, 0.35) 11px);
}
.note--levels { --c: var(--gold); }
.note--tutorial { --c: var(--purple); }
.note--daily { --c: var(--red); }
.note--missions { --c: var(--blue); }
.note--offline { --c: #3CC58A; }
.note--languages { --c: #FF8A3D; }

/* ---------- Gallery ---------- */
.gallery { background: var(--page-deep); border-top: 10px solid transparent; border-image: var(--hazard) 10; }
.shots { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.shot img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 18px;
  border: 4px solid #3A3F97;
  box-shadow: 0 22px 40px -24px rgba(0, 0, 0, 0.8);
}

/* ---------- Tech inside: the blueprint of the machine room ---------- */
.tech {
  background-image:
    linear-gradient(rgba(143, 192, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 192, 255, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}
.spec { border-top: 2px solid rgba(143, 192, 255, 0.22); }
.spec__title { color: #8FC0FF; }

/* ---------- Footer meets the floor ---------- */
.foot { border-top: 1px solid #2F347F; }

/* ---------- Smaller screens ---------- */
@media (max-width: 960px) {
}
@media (max-width: 720px) {
  .patches { gap: 16px; }
  .patch__fabric { height: 52px; }
  .soon { min-height: 48px; font-size: 15px; }
}
