:root {
  --cream: #fff7ee;
  --peach: #ffe6d6;
  --lav: #efe9ff;
  --sky: #e6f6ff;
  --paper: #ffffff;
  --ink: #26214f;
  --ink-soft: #4e4878;
  --ink-mute: #7d77a3;
  --line: #e7e0f7;
  --cyan: #0f9fbf;
  --cyan-bright: #35d6f2;
  --red: #e8445a;
  --yellow: #e9a410;
  --violet: #7b61ff;
  --navy: #1b1745;
  --radius: 26px;
  --display: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif;
  --sans: "Nunito", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--sky); }
body { min-height: 100vh; background-repeat: no-repeat; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream) 0%, var(--peach) 22%, var(--lav) 52%, var(--sky) 100%);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

b { font-weight: 800; }

/* ===== Floating sky decorations ===== */
.sky { position: absolute; inset: 0 0 auto 0; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.spark { position: absolute; width: 22px; height: 22px; animation: twinkle 3.2s ease-in-out infinite; }
.s1 { top: 70px;  left: 6%;  color: #f7b733; }
.s2 { top: 180px; left: 46%; color: #ff8fb1; width: 14px; height: 14px; animation-delay: .8s; }
.s3 { top: 560px; left: 3%;  color: var(--violet); width: 16px; height: 16px; animation-delay: 1.6s; }
.s4 { top: 40px;  right: 8%; color: var(--cyan-bright); width: 18px; height: 18px; animation-delay: 2.1s; }
.s5 { top: 1250px; right: 5%; color: #f7b733; animation-delay: 1.1s; }
.s6 { top: 1900px; left: 4%; color: #ff8fb1; width: 16px; height: 16px; animation-delay: .4s; }
.dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); opacity: .25; }
.d1 { top: 120px; left: 30%; }
.d2 { top: 420px; left: 52%; background: #f7b733; opacity: .45; }
.d3 { top: 900px; left: 8%; background: var(--cyan-bright); opacity: .4; }
.d4 { top: 1500px; right: 12%; }
.d5 { top: 2300px; left: 50%; background: #ff8fb1; opacity: .4; }
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: .9; }
  50% { transform: scale(.55) rotate(45deg); opacity: .45; }
}

.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 32px;
  padding: 56px 0 40px;
  min-height: 640px;
}

.kicker, .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--violet);
}
.kicker {
  background: rgba(255,255,255,.7);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
}
.blip { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan-bright); box-shadow: 0 0 0 0 rgba(53,214,242,.6); animation: blip 2s infinite; }
@keyframes blip { 70% { box-shadow: 0 0 0 9px rgba(53,214,242,0); } 100% { box-shadow: 0 0 0 0 rgba(53,214,242,0); } }

.logo { margin: 0; font-family: var(--display); line-height: .95; }
.logo-main {
  display: block;
  font-size: clamp(2.8rem, 6.6vw, 5rem);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--navy);
  text-shadow: 3px 4px 0 #ffd46b;
}
.logo-sub {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.1rem, 2.3vw, 1.6rem);
  font-weight: 600;
  letter-spacing: .5em;
  text-transform: uppercase;
  color: var(--cyan);
}

.lede { margin: 26px 0 0; max-width: 520px; font-size: 1.14rem; color: var(--ink-soft); }
.lede b { color: var(--ink); }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 30px; }
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px 11px 18px;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 5px 0 #0c0a2a, 0 14px 30px rgba(27,23,69,.25);
}
.appstore-badge .apple { width: 28px; height: 28px; }
.appstore-badge .bt { line-height: 1.15; }
.appstore-badge small { display: block; font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.appstore-badge b { display: block; font-family: var(--display); font-size: 1.3rem; font-weight: 600; }
.platforms { font-weight: 700; color: var(--ink-mute); }

/* Hero art */
.hero-art { position: relative; height: 600px; }
.orbit-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-phone {
  position: absolute;
  top: 30px;
  left: 50%;
  width: 250px;
  margin: 0 0 0 -110px;
  border-radius: 38px;
  padding: 8px;
  background: var(--navy);
  box-shadow: 0 2px 0 8px rgba(255,255,255,.55), 0 30px 60px rgba(38,33,79,.28);
  transform: rotate(5deg);
  animation: float 6s ease-in-out infinite;
}
.hero-phone img { display: block; width: 100%; height: auto; border-radius: 30px; }
@keyframes float {
  0%, 100% { transform: rotate(5deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-12px); }
}
.hero-rocket {
  position: absolute;
  top: 4px;
  right: 18px;
  width: 58px;
  height: 58px;
  color: var(--yellow);
  transform: rotate(35deg);
  animation: rocket 4s ease-in-out infinite;
}
@keyframes rocket {
  0%, 100% { transform: rotate(35deg) translate(0, 0); }
  50% { transform: rotate(38deg) translate(4px, -10px); }
}

.trace {
  stroke: var(--cyan-bright);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trace-glow { stroke: var(--cyan-bright); stroke-width: 16; stroke-linecap: round; opacity: .15; }
.orbit-art .trace { stroke-dasharray: 2 12; animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -28; } }

.bob { animation: bob 5s ease-in-out infinite; transform-box: fill-box; }
.b2 { animation-delay: -1.5s; animation-duration: 4s; }
.b3 { animation-delay: -3s; animation-duration: 6s; }
@keyframes bob { 50% { transform: translateY(-8px); } }

.spin { transform-box: fill-box; transform-origin: center; animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.landing-glow, .pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .32; } }

/* ===== Sections ===== */
.block { padding: 56px 0; }
.section-kicker { display: block; text-align: center; margin-bottom: 6px; }
.block h2 {
  margin: 0 0 34px;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.4vw, 3rem);
  line-height: 1.1;
  color: var(--navy);
}

/* How to play */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  position: relative;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 24px 26px;
  box-shadow: 0 16px 40px rgba(38,33,79,.07);
  transition: transform .2s, box-shadow .2s;
}
.step:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 22px 50px rgba(38,33,79,.11); }
.step:nth-child(2):hover { transform: translateY(-4px) rotate(.4deg); }
.illo {
  height: 170px;
  margin: 0 -8px 16px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-trace .illo { background: linear-gradient(160deg, #e3f8fd, #f4f0ff); }
.step-match .illo { background: linear-gradient(160deg, #fff1e8, #fff9e6); }
.step-obstacles .illo { background: linear-gradient(160deg, #f3edff, #ffeef3); }
.illo svg { width: 100%; height: 100%; overflow: visible; }
.illo .trace { stroke-width: 4.5; stroke-dasharray: 360; stroke-dashoffset: 360; animation: draw 4s ease-in-out infinite; }
@keyframes draw {
  0% { stroke-dashoffset: 360; }
  55%, 85% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.match-line { stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 3 9; animation: march 1s linear infinite; }

.suspects { display: flex; gap: 14px; }
.suspect {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  font-size: 1.8rem;
  border-radius: 50%;
  background: rgba(255,255,255,.75);
  outline: 2.5px dashed var(--red);
  outline-offset: 3px;
  animation: drift 3s ease-in-out infinite;
  animation-delay: var(--d);
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  50% { transform: translate(0, -12px) rotate(5deg); }
}

.num {
  position: absolute;
  top: 168px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 0 0 5px var(--paper);
}
.step-match .num { background: var(--red); }
.step-trace .num { background: var(--cyan); }
.step-obstacles .num { background: var(--violet); }
.step h3 { margin: 6px 0 8px; font-family: var(--display); font-size: 1.4rem; font-weight: 600; line-height: 1.2; color: var(--navy); }
.step p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.step p b { color: var(--ink); }
.c-red { color: var(--red) !important; }
.c-cyan { color: var(--cyan) !important; }
.c-yellow { color: #c98a00 !important; }

.monster {
  max-width: 640px;
  margin: 34px auto 0;
  padding: 14px 22px;
  text-align: center;
  color: var(--ink-soft);
  background: rgba(255,255,255,.6);
  border: 1.5px dashed #cfc5f3;
  border-radius: 999px;
  font-size: .98rem;
}
.monster span { font-weight: 800; color: var(--violet); }

/* ===== Screenshots ===== */
.device-toggle {
  position: relative;
  display: flex;
  width: max-content;
  margin: -12px auto 36px;
  padding: 5px;
  border-radius: 999px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  box-shadow: 0 8px 24px rgba(38,33,79,.08);
}
.device-toggle button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 130px;
  padding: 10px 0;
  font: 700 1rem var(--sans);
  color: var(--ink-mute);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color .25s;
}
.device-toggle button svg { width: 20px; height: 20px; }
.device-toggle button[aria-pressed="true"] { color: #fff; }
.device-toggle button:focus-visible { outline: 3px solid var(--cyan-bright); outline-offset: 2px; }
.toggle-pill {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 130px;
  height: calc(100% - 10px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  box-shadow: 0 6px 16px rgba(123,97,255,.35);
  transition: transform .35s cubic-bezier(.5, 1.6, .5, 1);
}
#shots[data-device="ipad"] .toggle-pill { transform: translateX(130px); }

.shots { display: grid; gap: 30px 22px; }
.shots-iphone, .shots-ipad { display: flex; flex-wrap: wrap; justify-content: center; }
.shots-iphone .shot-fig { width: calc((100% - 66px) / 4); }
.shots-ipad .shot-fig { width: calc((100% - 22px) / 2); }
#shots[data-device="iphone"] .shots-ipad,
#shots[data-device="ipad"] .shots-iphone { display: none; }

.shot-fig { margin: 0; animation: pop .5s both cubic-bezier(.3, 1.4, .5, 1); animation-delay: calc(var(--i) * 70ms); }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.96); } }
.shot {
  display: block;
  width: 100%;
  padding: 6px;
  border: 0;
  border-radius: 30px;
  background: var(--navy);
  box-shadow: 0 0 0 5px rgba(255,255,255,.7), 0 18px 40px rgba(38,33,79,.2);
  cursor: zoom-in;
  transition: transform .2s;
}
.shots-ipad .shot { border-radius: 22px; }
.shot:hover { transform: translateY(-6px) rotate(-1deg); }
.shot-fig:nth-child(even) .shot:hover { transform: translateY(-6px) rotate(1deg); }
.shot:focus-visible { outline: 3px solid var(--cyan-bright); outline-offset: 6px; }
.shot img { display: block; width: 100%; height: auto; border-radius: 24px; }
.shots-ipad .shot img { border-radius: 16px; }
.shot-fig figcaption { margin-top: 16px; text-align: center; line-height: 1.35; }
.cap-head { display: block; font-family: var(--display); font-weight: 600; font-size: 1.06rem; color: var(--navy); }
.cap-head b { color: var(--violet); font-weight: 600; }
.cap-sub { display: block; margin-top: 4px; font-size: .88rem; color: var(--ink-mute); }

.shots-soon {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 44px 24px;
  border: 2px dashed #cfc5f3;
  border-radius: var(--radius);
  background: rgba(255,255,255,.55);
  color: var(--ink-soft);
}
.shots-soon svg { width: 54px; height: 54px; flex: 0 0 auto; transform: rotate(35deg); animation: rocket 4s ease-in-out infinite; }
.shots-soon p { margin: 0; }
.shots-soon b { color: var(--navy); }

/* ===== Free, with bonuses ===== */
.h2-sub { color: var(--violet); }
.unlock-lede { max-width: 640px; margin: -12px auto 34px; text-align: center; color: var(--ink-soft); }
.tiers { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; }
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 28px 28px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1.5px solid var(--line);
  box-shadow: 0 16px 40px rgba(38,33,79,.07);
}
.tier-std { background: linear-gradient(160deg, #e3f8fd, var(--paper) 45%); border-color: #bfeaf5; }
.tier-plat { background: linear-gradient(160deg, #f3edff, var(--paper) 45%); }
.tier-tag { margin: 0 0 4px; font-size: .74rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); }
.tier-plat .tier-tag { color: var(--violet); }
.tier h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--navy);
}
.price { font-size: 1.05rem; color: var(--ink-mute); }
.tier ul { margin: 0; padding: 0; list-style: none; }
.tier li { position: relative; padding-left: 28px; margin: 8px 0; color: var(--ink-soft); }
.tier li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .38em;
  width: 16px;
  height: 16px;
  background: currentColor;
  color: var(--cyan);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c1 7 5 11 12 12-7 1-11 5-12 12-1-7-5-11-12-12 7-1 11-5 12-12z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c1 7 5 11 12 12-7 1-11 5-12 12-1-7-5-11-12-12 7-1 11-5 12-12z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tier-plat li::before { color: var(--violet); }
.tier li b { color: var(--navy); }
.soon {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--cyan);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  vertical-align: 2px;
}
.obstacle-row { display: flex; gap: 12px; margin-top: auto; padding-top: 18px; }
.obstacle-row img {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  max-width: 120px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 0 0 4px rgba(255,255,255,.8), 0 10px 24px rgba(38,33,79,.18);
  transition: transform .2s;
}
.obstacle-row img:hover { transform: translateY(-4px) rotate(-3deg); }
.obstacle-row img:nth-child(2):hover { transform: translateY(-4px) rotate(3deg); }
.credits {
  margin-top: auto;
  padding: 20px 18px;
  border-radius: 20px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 30%, rgba(155,140,242,.35), transparent 45%),
    radial-gradient(1px 1px at 70% 20%, #fff, transparent),
    radial-gradient(1px 1px at 85% 70%, #fff, transparent),
    radial-gradient(1px 1px at 12% 80%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40% 60%, rgba(255,255,255,.8), transparent),
    var(--navy);
  box-shadow: 0 0 0 4px rgba(255,255,255,.8), 0 10px 24px rgba(38,33,79,.18);
}
.tier-plat ul { margin-bottom: 18px; }
.credits p { margin: 0; }
.credits-head { margin-bottom: 10px !important; font-size: .7rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: #b7a9ff; }
.credits-name { font-family: var(--display); font-weight: 600; font-size: 1.02rem; line-height: 1.7; color: rgba(255,255,255,.72); }
.credits-you {
  display: inline-block;
  margin-top: 4px;
  padding: 0 14px;
  border: 1.5px dashed #b7a9ff;
  border-radius: 999px;
  color: #fff;
}
.unlock-note { max-width: 640px; margin: 26px auto 0; text-align: center; font-size: .92rem; color: var(--ink-mute); }

/* ===== Closing ===== */
.closing-card {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 50px 30px 44px;
  text-align: center;
  border-radius: 36px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,212,107,.35), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(53,214,242,.25), transparent 45%),
    var(--paper);
  border: 1.5px solid var(--line);
  box-shadow: 0 20px 50px rgba(38,33,79,.09);
}
.closing-ufo { position: absolute; top: -30px; left: 50%; width: 64px; height: 64px; margin-left: -32px; animation: bob 3s ease-in-out infinite; }
.closing h2 { margin-bottom: 14px; }
.closing h2 span { color: var(--cyan); }
.closing p { margin: 0 auto; max-width: 460px; color: var(--ink-soft); }
.closing .cta { justify-content: center; }

footer { padding: 30px 0 50px; text-align: center; color: var(--ink-mute); font-size: .95rem; }
footer p { margin: 4px 0; }
footer a { color: var(--violet); font-weight: 800; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ===== Lightbox ===== */
.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 94vw;
  max-height: 94vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(27,23,69,.72); backdrop-filter: blur(6px); }
.lightbox img { display: block; max-width: 94vw; max-height: 90vh; border-radius: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.lb-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 40px; min-height: 0; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .cta { justify-content: center; }
  .hero-art { width: 100%; max-width: 440px; height: 560px; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .shots-iphone .shot-fig { width: calc((100% - 44px) / 3); }
  .tiers { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .logo-sub { letter-spacing: .38em; }
  .kicker { font-size: .68rem; letter-spacing: .1em; white-space: nowrap; }
  .suspects { gap: 9px; }
  .suspect { width: 52px; height: 52px; font-size: 1.6rem; }
  .hero-art { height: 500px; }
  .hero-phone { width: 210px; margin-left: -95px; }
  .hero-rocket { right: 0; }
  /* Swipeable screenshot rail on phones */
  .shots-iphone, .shots-ipad {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 62%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -16px;
    padding: 10px 16px 18px;
    scrollbar-width: none;
  }
  .shots-ipad { grid-auto-columns: 84%; }
  .shots-iphone::-webkit-scrollbar, .shots-ipad::-webkit-scrollbar { display: none; }
  .shot-fig, .shots-iphone .shot-fig, .shots-ipad .shot-fig { width: auto; scroll-snap-align: center; }
  .tier { padding: 22px 20px 24px; }
  .shots-soon { grid-column: auto; width: calc(100vw - 32px); }
  .device-toggle button, .toggle-pill { width: 116px; }
  #shots[data-device="ipad"] .toggle-pill { transform: translateX(116px); }
  .monster { border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .illo .trace { stroke-dashoffset: 0; }
}
