/* Home page only */
.home .nav {
  background: linear-gradient(rgba(10, 4, 58, 0.85), transparent);
}
.hero {
  min-height: min(100svh, 940px);
  isolation: isolate;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  opacity: 0.55;
  filter: saturate(1.15);
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(14, 5, 76, 0.35), rgba(10, 4, 58, 0.86) 70%), linear-gradient(transparent 60%, var(--navy));
}
.hero .stars {
  z-index: -1;
}
.hero h1 {
  font-size: clamp(3rem, 9.5vw, 7rem);
  max-width: 12ch;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}
.floaters {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.fl {
  position: absolute;
  font-size: clamp(1.8rem, 4.6vw, 3.4rem);
  filter: drop-shadow(0 0 18px rgba(248, 89, 241, 0.55));
  transform: translate3d(var(--tx, 0), var(--ty, 0), 0);
  transition: transform 0.25s ease-out;
  will-change: transform;
}
.fl::after {
  content: "";
  position: absolute;
  inset: 0;
}
@keyframes bob {
  50% {
    translate: 0 -14px;
  }
}
.fl {
  animation: bob 6s ease-in-out infinite;
}
.fl:nth-child(2n) {
  animation-duration: 7.5s;
  animation-delay: -2s;
}
.fl:nth-child(3n) {
  animation-duration: 5s;
  animation-delay: -1s;
}
@media (max-width: 700px) {
  .fl {
    opacity: 0.32;
  }
  .fl:nth-child(n + 5) {
    display: none;
  }
}

.teaser-video {
  position: relative;
  display: block;
  border-radius: 22px;
  overflow: hidden;
  border: 4px solid var(--pink);
  box-shadow:
    0 0 0 6px var(--navy),
    0 0 0 9px var(--cyan),
    0 0 60px rgba(248, 89, 241, 0.4);
  aspect-ratio: 16/9;
}
.teaser-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}
.teaser-video:hover img {
  transform: scale(1.05);
}
.playbadge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(rgba(10, 4, 58, 0.1), rgba(10, 4, 58, 0.5));
}
.playbadge i {
  width: clamp(70px, 10vw, 104px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--yellow);
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 8px rgba(251, 253, 253, 0.25),
    0 0 50px rgba(248, 192, 0, 0.85);
}
.playbadge svg {
  width: 40%;
  margin-left: 8%;
  fill: var(--royal);
}
.playbadge b {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-family: var(--label);
  font-weight: 800;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.65);
  padding: 0.25em 0.7em;
  border-radius: 8px;
}

.games-band {
  background: radial-gradient(ellipse at 80% 50%, rgba(248, 89, 241, 0.18), transparent 60%), var(--navy);
}
.demo {
  display: grid;
  place-items: center;
}
.demo-field {
  position: relative;
  width: min(300px, 80%);
  aspect-ratio: 2/3;
  border-radius: 26px;
  border: 4px solid var(--pink);
  overflow: hidden;
  background: linear-gradient(#0a043a, #1a0a5e);
  box-shadow:
    0 0 0 6px var(--navy),
    0 0 0 9px var(--cyan),
    0 0 60px rgba(248, 89, 241, 0.45);
}
.demo-field .d {
  position: absolute;
  top: -12%;
  left: var(--x);
  font-size: 2rem;
  animation: drop 3.6s linear infinite;
  animation-delay: var(--dl);
}
@keyframes drop {
  to {
    top: 96%;
  }
}
.demo-tray {
  position: absolute;
  bottom: 10px;
  left: 50%;
  translate: -50% 0;
  padding: 0.4em 1.1em;
  border-radius: 12px;
  border: 3px solid var(--pink);
  color: var(--yellow);
  font-family: var(--display);
  background: var(--navy-2);
  box-shadow: 0 0 22px var(--pink);
  animation: sway 3.6s ease-in-out infinite alternate;
}
@keyframes sway {
  from {
    translate: -140% 0;
  }
  to {
    translate: 40% 0;
  }
}

.strip {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(6, 1fr);
}
.strip-item {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid var(--cyan);
  aspect-ratio: 3/4;
  box-shadow: 0 0 22px rgba(0, 192, 248, 0.2);
  transition: transform 0.25s;
}
.strip-item:nth-child(even) {
  border-color: var(--pink);
  margin-top: 22px;
}
.strip-item:hover {
  transform: translateY(-6px) rotate(-1deg);
}
.strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 900px) {
  .strip {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 520px) {
  .strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .strip-item:nth-child(even) {
    margin-top: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fl,
  .demo-field .d,
  .demo-tray {
    animation: none;
  }
  .demo-tray {
    translate: -50% 0;
  }
}

/* hero: Flappy Popcorn plays itself in the background (over the video); Play brings it to the front */
#flappy.hero-game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  z-index: 1;
  background: transparent;
  touch-action: pan-y;
  cursor: default;
}
.home .hero-inner {
  gap: 14px;
  pointer-events: none;
  transition:
    opacity 0.35s,
    translate 0.35s;
}
.home .hero-inner a,
.home .hero-inner button {
  pointer-events: auto;
}
.home .hero-logo {
  width: min(190px, 36vw);
}
.hero-chars {
  max-width: 620px;
}
.hero-chars .fp-char {
  background: rgba(10, 4, 58, 0.55);
  backdrop-filter: blur(3px);
}
.fp-hero-msg {
  background: rgba(10, 4, 58, 0.82);
  border: 2px solid var(--yellow);
  border-radius: 14px;
  padding: 10px 16px;
  color: #fff;
  font-weight: 700;
}
.fp-stop {
  position: absolute;
  top: 84px;
  right: var(--gutter);
  z-index: 4;
  font-size: 1rem;
  padding: 0.55em 1.1em 0.5em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
/* playing: text steps aside, the game takes over the hero */
.hero.is-playing .hero-inner {
  opacity: 0;
  translate: 0 -24px;
}
.hero.is-playing .hero-inner * {
  pointer-events: none !important;
}
.hero.is-playing #flappy.hero-game {
  z-index: 3;
  touch-action: none;
  cursor: pointer;
}
.hero.is-playing .hero-video {
  opacity: 0.35;
}
.hero.is-playing .fp-stop {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 700px) {
  .home .hero-logo {
    display: none;
  }
  .hero-chars .fp-char {
    width: 62px;
  }
  .hero-chars .fp-char img {
    width: 34px;
    height: 40px;
  }
  .hero-chars .fp-char span {
    font-size: 0.6rem;
  }
  .fp-stop {
    top: 74px;
  }
}
/* fit the whole hero (heading, picker, Play) inside one screen */
.home .hero {
  min-height: 100svh;
  padding-top: 84px;
  padding-bottom: 28px;
}
.home .hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.8rem);
  max-width: none;
}
.home .hero p {
  max-width: 52ch;
}
.home .hero-logo {
  width: min(128px, 30vw);
}
.home .hero .hero-chars {
  max-width: none;
  flex-wrap: nowrap;
}
.home .hero .hero-chars .fp-char {
  width: 74px;
}
@media (max-height: 820px) {
  .home .hero-logo {
    display: none;
  }
}
@media (max-width: 700px) {
  .home .hero h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }
  .home .hero p {
    font-size: 0.95rem;
  }
  .home .hero .hero-chars {
    gap: 3px;
  }
  .home .hero .hero-chars .fp-char {
    width: 44px;
    padding: 4px 1px;
  }
  .home .hero .hero-chars .fp-char span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .home .hero .hero-chars .fp-char img {
    width: 34px;
    height: 40px;
  }
}
.home .fp-stop {
  background: rgba(10, 4, 58, 0.85);
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 0 18px rgba(248, 89, 241, 0.45);
}

/* ===== title-screen layout (25 Sep 2026): logo top-left, open sky for the game, controls grouped at the bottom ===== */
.home .hero {
  place-items: end start;
  text-align: left;
  padding: 84px var(--gutter) clamp(26px, 5vh, 56px);
}
.home .hero::after {
  /* soft dark fade behind the controls so they read cleanly over the game */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 58%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(rgba(10, 4, 58, 0), rgba(10, 4, 58, 0.72) 42%, rgba(10, 4, 58, 0.93));
  transition: opacity 0.35s;
}
.hero-corner-logo {
  position: absolute;
  top: 88px;
  left: var(--gutter);
  z-index: 2;
  width: clamp(76px, 9vw, 120px);
  height: auto;
  filter: drop-shadow(0 0 22px rgba(248, 89, 241, 0.5));
  pointer-events: none;
  transition: opacity 0.35s;
}
.home .hero .hero-inner {
  width: min(1200px, 100%);
  margin-inline: auto;
  justify-items: start;
  gap: 12px;
  translate: none;
}
.home .hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  margin-bottom: 4px;
}
.home .hero .cta-row {
  justify-content: flex-start;
  gap: 12px;
}
.fp-playbtn svg {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}
.fp-status {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  font-size: 0.9rem;
  font-weight: 700;
  color: #cfcaf5;
  min-height: 1.4em;
}
.fp-status b {
  color: var(--yellow);
}
#fp-msg {
  color: #fff;
}
.hero.is-playing::after,
.hero.is-playing .hero-corner-logo {
  opacity: 0;
}
.hero.is-playing .hero-inner {
  translate: 0 20px;
}
@media (max-width: 700px) {
  .home .hero {
    place-items: end center;
    text-align: center;
  }
  .home .hero::after {
    height: 64%;
  }
  .hero-corner-logo {
    top: 82px;
    width: 72px;
  }
  .home .hero .hero-inner {
    justify-items: center;
    gap: 10px;
  }
  .home .hero h1 {
    font-size: clamp(2rem, 9.5vw, 2.7rem);
  }
  .home .hero .cta-row {
    justify-content: center;
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 340px);
    gap: 10px;
  }
  .home .hero .cta-row .btn {
    width: 100%;
  }
  .home .hero .cta-row .btn-primary {
    font-size: 1rem;
    padding: 0.62em 1.2em 0.55em;
  }
  .fp-status {
    justify-content: center;
    text-align: center;
    font-size: 0.82rem;
  }
}

/* ===== calls to action (28 Sep 2026) ===== */
.rstars {
  color: var(--yellow);
  letter-spacing: 1px;
}
/* 1. hero: buying is the main action */
.btn-buy {
  font-size: 1.3rem;
  padding: 0.85em 1.6em 0.77em;
  box-shadow:
    0 6px 0 #b38600,
    0 0 0 0 rgba(255, 194, 0, 0.55);
  animation: buy-pulse 2.6s ease-in-out infinite;
}
@keyframes buy-pulse {
  50% {
    box-shadow:
      0 6px 0 #b38600,
      0 0 0 12px rgba(255, 194, 0, 0);
  }
}
.hero-proof {
  font-size: 0.92rem;
  color: #dcd8f7;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
}
.hero-proof a {
  color: #fff;
  font-weight: 700;
}
.hero-proof .sep {
  opacity: 0.5;
}
/* 4. game-over nudge */
#fp-nudge {
  color: var(--yellow);
  font-weight: 800;
}
/* 3. buy banner */
.buy-band {
  background:
    radial-gradient(ellipse at 20% 40%, rgba(248, 89, 241, 0.22), transparent 60%),
    radial-gradient(ellipse at 85% 70%, rgba(0, 192, 248, 0.18), transparent 60%);
}
.buy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 60px);
  align-items: center;
  background: linear-gradient(135deg, var(--navy-2), #1b0b6e);
  border: 4px solid var(--yellow);
  border-radius: 28px;
  padding: clamp(18px, 4vw, 40px);
  box-shadow: 0 0 44px rgba(255, 194, 0, 0.22);
}
.buy-packs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.buy-pack {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 3px solid var(--cyan);
  transition: transform 0.2s;
}
.buy-pack.red {
  border-color: var(--pink);
  rotate: 2deg;
}
.buy-pack.neon {
  rotate: -2deg;
}
.buy-pack:hover {
  transform: translateY(-5px) scale(1.02);
}
.buy-pack img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.buy-pack span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: var(--navy);
  color: #fff;
  font: 800 0.8rem var(--label);
  padding: 4px 10px;
  border-radius: 999px;
}
.buy-copy h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 8px 0 14px;
}
.buy-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: #eceafd;
}
.buy-list li::before {
  content: "\2713";
  color: var(--yellow);
  font-weight: 900;
  margin-right: 10px;
}
.buy-rating {
  margin-bottom: 18px;
  color: #dcd8f7;
}
@media (max-width: 760px) {
  .buy-grid {
    grid-template-columns: 1fr;
  }
  .buy-copy .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
}
/* 2. phone buy bar */
.buy-bar {
  display: none;
}
@media (max-width: 700px) {
  .buy-bar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 8px 8px 16px;
    border-radius: 18px;
    background: rgba(10, 4, 58, 0.94);
    border: 2px solid var(--yellow);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    translate: 0 140%;
    transition: translate 0.3s ease;
  }
  .buy-bar.on {
    translate: 0 0;
  }
  .buy-bar[hidden] {
    display: none;
  }
  .bb-text {
    display: grid;
    line-height: 1.25;
    font-size: 0.8rem;
    color: #dcd8f7;
  }
  .bb-text b {
    color: #fff;
    font-size: 0.9rem;
  }
  .buy-bar .btn {
    font-size: 1rem;
    padding: 0.62em 1.1em 0.55em;
    white-space: nowrap;
  }
  .home .site-foot {
    padding-bottom: 90px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn-buy {
    animation: none;
  }
  .buy-bar {
    transition: none;
  }
}
@media (max-width: 700px) {
  .hero-proof {
    justify-content: center;
    text-align: center;
  }
}
