/* The home page. Colours are style.css's tokens (the game's bright and dark palette); the art is the game's own:
   the menu's juice-splash backdrop, the title's letters, the pieces and fruit, and the screens inside Apple's iPhone.
   Apple's devices stay upright and still; only the game's jellies move, and not when motion is reduced. */

.home main { max-width: none; padding: 0; }
.home footer { max-width: 1080px; margin: 72px auto 0; }

.skip { position: absolute; left: -9999px; top: 12px; }
.skip:focus { left: 12px; z-index: 20; padding: 8px 14px; border-radius: 999px; background: var(--card); color: var(--ink); }

/* the bar floats over the hero as frosted glass, as the game's chrome does */
.topbar {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1080px, calc(100% - 24px));
  max-width: none;
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow);
}
.topbar nav { align-items: center; font-size: 15px; font-weight: 600; }
.topbar nav a { color: var(--ink); }
.topbar nav a:hover { color: var(--link); }

/* hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  padding: 120px max(24px, calc((100% - 1080px) / 2)) 72px;
  min-height: min(880px, 100vh);
  background: #1681e8 url("img/hero/backdrop.webp") center 40% / cover no-repeat;
}
@media (max-width: 720px) {
  .hero { background-image: url("img/hero/backdrop-720.webp"); }
}
@media (prefers-color-scheme: dark) {
  .hero { background-color: #062e76; background-image: url("img/hero/backdrop-dark.webp"); }
}
@media (prefers-color-scheme: dark) and (max-width: 720px) {
  .hero { background-image: url("img/hero/backdrop-dark-720.webp"); }
}
.hero-copy { text-align: center; }
.hero h1 { margin: 0; }
.hero-logo { width: min(460px, 100%); margin: 0 auto; filter: drop-shadow(0 10px 18px rgba(18, 49, 77, 0.35)); }
.hero-line {
  display: block;
  margin-top: 6px;
  font-size: 48px;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 2px 0 rgba(18, 49, 77, 0.45), 0 6px 22px rgba(18, 49, 77, 0.55);
}
.hero-line em { font-style: normal; color: #ffd65a; }
.hero-card {
  margin: 24px auto 0;
  max-width: 520px;
  padding: 22px 26px 20px;
  border-radius: 28px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 18px 40px rgba(18, 49, 77, 0.28);
}
.hero-sub { margin: 0; font-size: 19px; line-height: 1.5; color: var(--ink); }
.get { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 18px; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { margin: 0; padding: 5px 12px; border-radius: 999px; background: var(--sky); color: var(--ink); font-size: 14px; font-weight: 600; }

.soon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 7px 24px 8px;
  border-radius: 12px;
  border: 1px solid #a6a6a6;
  background: #000;
  color: #fff;
  line-height: 1.15;
  text-decoration: none;
}
.soon small { font-size: 12px; letter-spacing: 0.02em; }
.soon strong { font-family: var(--display); font-weight: 900; font-size: 22px; }
.badge { display: inline-block; line-height: 0; }
.badge img { height: 54px; width: auto; }
.badge .on-dark { display: none; }
/* Google's badge files carry their own clear space, a quarter of the badge's height on every side; at 82px the badge
   inside is as tall as Apple's, as Google asks (the same size as other stores' badges, or larger). */
.badge.play img { height: 82px; }
@media (prefers-color-scheme: dark) {
  .soon { background: #fff; color: #000; }
  .badge .on-light { display: none; }
  .badge .on-dark { display: block; }
}

.hero-phones { display: flex; justify-content: center; align-items: flex-end; }
.hero-phones img { height: auto; filter: drop-shadow(0 24px 30px rgba(18, 49, 77, 0.45)); }
.hero-phones .front { position: relative; z-index: 2; width: 46%; }
.hero-phones .side { width: 36%; margin: 0 -9%; transform: translateY(-6%); }

/* shared section parts */
.home section:not(.hero) { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.home h2 { font-size: 40px; line-height: 1.1; margin: 0 0 10px; }
.home .intro { max-width: 620px; margin: 0 auto; font-size: 19px; color: var(--muted); text-align: center; }
.note { margin: 20px auto 0; text-align: center; font-size: 15px; color: var(--muted); }
.eyebrow { margin: 0 0 6px; font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }

/* how it plays */
.steps { padding-top: 88px !important; text-align: center; }
.steps ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 36px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative;
  margin: 0;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 16px;
  left: 18px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 15px;
  color: var(--muted);
}
.steps img { width: 96px; height: 96px; margin: 0 auto 10px; }
.steps h3 { font-size: 26px; font-weight: 900; }
.steps p { margin: 4px 0 0; color: var(--muted); }

/* feature spotlights */
.spot {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: center;
  gap: 64px;
  margin-top: 28px !important;
  padding: 48px 64px !important;
  border-radius: 40px;
}
.steps + .spot { margin-top: 72px !important; }
.spot.flip { grid-template-columns: minmax(0, 1fr) 250px; }
.spot.flip .device { order: 2; }
.tint-blue { background: var(--sky); }
.tint-warm { background: var(--warm); }
@media (prefers-color-scheme: dark) {
  .tint-blue, .tint-warm { background: var(--card); border: 1px solid var(--line); }
}
.device { margin: 0; }
.device img { width: 100%; height: auto; filter: var(--drop); }
.device figcaption { margin-top: 12px; text-align: center; font-size: 13px; color: var(--muted); }
.spot-text p { font-size: 19px; color: var(--muted); }
.spot-text .eyebrow { font-size: 14px; color: var(--accent); }
.modes { margin: 14px 0 0; }
.modes dt { margin-top: 14px; font-family: var(--display); font-weight: 900; font-size: 22px; line-height: 1.2; }
.modes dd { margin: 2px 0 0; font-size: 17px; color: var(--muted); }
.inline-piece { display: inline; width: 30px; height: 30px; vertical-align: -8px; margin: 0 2px; }

/* fruit */
.fruit { padding-top: 96px !important; text-align: center; }
.fruit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 36px 0 0; padding: 0; list-style: none; }
.fruit-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 22px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.fruit-grid img { width: 84px; height: 84px; margin-bottom: 8px; }
.fruit-grid h3 { font-size: 21px; font-weight: 900; }
.fruit-grid p { margin: 4px 0 12px; font-size: 15px; line-height: 1.45; color: var(--muted); flex: 1; }
.tag { padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--warm); color: var(--accent-2); }
.tag.free { background: var(--sky); color: var(--link); }
@media (prefers-color-scheme: dark) {
  .tag, .tag.free { background: var(--line); }
}

/* gallery */
.gallery { padding-top: 96px !important; text-align: center; }
.shots {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 24px 20px 18px;
  margin: 12px -20px 0;
  scrollbar-width: thin;
  text-align: center;
}
.shots figure { margin: 0; flex: 0 0 220px; scroll-snap-align: center; }
.shots img { width: 220px; height: auto; filter: var(--drop); }
.shots figcaption { margin-top: 12px; font-size: 15px; line-height: 1.35; color: var(--muted); }
.shots figcaption strong { display: block; font-family: var(--display); font-weight: 900; font-size: 18px; color: var(--ink); }
.shots figcaption small { display: block; margin-top: 4px; font-size: 13px; }

/* for iPhone and Android */
.extras { padding-top: 96px !important; text-align: center; }
.extras ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 32px 0 0; padding: 0; list-style: none; text-align: left; }
.extras li {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 14px;
  align-content: start;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
}
.extras img { grid-row: span 2; width: 52px; height: 52px; }
.extras h3 { margin: 2px 0 0; font-size: 18px; font-weight: 900; }
.extras p { margin: 2px 0 0; font-size: 15px; line-height: 1.45; color: var(--muted); }

/* price */
.price { padding-top: 96px !important; text-align: center; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: 18px; margin-top: 32px; text-align: left; }
.plan { padding: 26px 28px; border: 1px solid var(--line); border-radius: 28px; background: var(--card); box-shadow: var(--shadow); }
.plan.full { border: 2px solid var(--juice-blue); }
.plan h3 { font-size: 22px; font-weight: 900; }
.amount { margin: 4px 0 10px; font-family: var(--display); font-weight: 900; font-size: 40px; line-height: 1.1; }
.amount small { font-size: 17px; color: var(--muted); }
.plan ul { margin: 0; padding-left: 20px; }
.plan li { margin: 6px 0; }
.plan li::marker { color: var(--juice-blue); }

/* questions */
.faq { padding-top: 96px !important; }
.faq h2 { text-align: center; }
.faq-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; margin-top: 28px; }
.faq-list h3 { font-size: 19px; font-weight: 900; }
.faq-list p { margin: 4px 0 0; color: var(--muted); }
.more { text-align: center; margin: 28px 0 0; }

/* closing */
.closing {
  margin-top: 96px !important;
  padding: 56px 24px 52px !important;
  border-radius: 40px;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(180deg, #168bfa, #087ccb);
}
@media (prefers-color-scheme: dark) {
  .closing { background: linear-gradient(180deg, #0a1020, #134ba8); border: 1px solid var(--line); }
}
.closing-logo { width: min(340px, 80%); margin: 0 auto 8px; filter: drop-shadow(0 10px 18px rgba(18, 49, 77, 0.35)); }
.home .closing h2 { font-size: 36px; color: #ffffff; }
.closing > p { margin: 0; font-size: 19px; font-weight: 600; }
.closing .follow { display: flex; gap: 10px; justify-content: center; margin: 0; }
.closing .follow a { display: inline-block; padding: 6px 16px; border-radius: 999px; background: #fff8eb; color: #12314d; font-weight: 700; text-decoration: none; }

/* the jellies bob, and squish when touched */
.bob { animation: bob 4.2s ease-in-out infinite; }
li:nth-child(2) > .bob { animation-delay: -1.4s; }
li:nth-child(3) > .bob { animation-delay: -2.8s; }
li:nth-child(4) > .bob { animation-delay: -0.7s; }
li:nth-child(5) > .bob { animation-delay: -2.1s; }
li:nth-child(6) > .bob { animation-delay: -3.5s; }
li:nth-child(7) > .bob { animation-delay: -1.1s; }
li:nth-child(8) > .bob { animation-delay: -2.5s; }
li:hover > .bob { animation: squish 0.6s ease-out; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes squish {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.14, 0.86); }
  60% { transform: scale(0.94, 1.07); }
  100% { transform: scale(1, 1); }
}
@media (prefers-reduced-motion: reduce) {
  .bob, li:hover > .bob { animation: none; }
  .shots { scroll-behavior: auto; }
}

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 104px; min-height: 0; }
  .hero-phones { max-width: 560px; margin: 0 auto; width: 100%; }
  .spot, .spot.flip { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding: 36px 32px !important; }
  .spot.flip .device { order: 0; }
  .fruit-grid { grid-template-columns: repeat(2, 1fr); }
  .extras ul { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .topbar nav .anchor { display: none; }
  .home h2 { font-size: 32px; }
  .hero-line { font-size: 36px; }
  .hero-sub { font-size: 17px; }
  .steps ol { grid-template-columns: 1fr; }
  .spot, .spot.flip { grid-template-columns: 1fr; text-align: center; padding: 32px 22px !important; border-radius: 30px; }
  .spot .device { width: 230px; margin: 0 auto; }
  .modes { text-align: left; }
  .plans, .faq-list, .extras ul { grid-template-columns: 1fr; }
  .closing { border-radius: 30px; }
}
@media (max-width: 480px) {
  .topbar { padding: 8px 16px; }
  .topbar nav { gap: 6px 14px; font-size: 14px; }
  .hero { padding: 92px 16px 48px; }
  .hero-line { font-size: 32px; }
  .hero-card { padding: 18px 18px 16px; border-radius: 24px; }
  .fruit-grid { gap: 10px; }
  .fruit-grid li { padding: 16px 10px 14px; border-radius: 20px; }
  .fruit-grid img { width: 64px; height: 64px; }
  .fruit-grid h3 { font-size: 18px; }
  .shots figure { flex-basis: 180px; }
  .shots img { width: 180px; }
}
