/* The game selection screens share a dark, branded backdrop with the arcade. */
body:is([data-page="home"], .sample-games:has(#menu:not([hidden]))) {
  min-height: 100vh;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 35% 15%, #17577b 0, transparent 65%),
    radial-gradient(ellipse at 100% 85%, #285b40 0, transparent 60%),
    #0b2536;
}
body:is([data-page="home"], .sample-games:has(#menu:not([hidden])))::before,
body:is([data-page="home"], .sample-games:has(#menu:not([hidden])))::after {
  content: "";
  position: fixed;
  width: clamp(320px, 40vw, 620px);
  aspect-ratio: 730 / 550;
  top: 24vh;
  left: -12vw;
  z-index: -1;
  background: url("ascension-star-white.svg?v=candy-bingo-20260913") center / contain no-repeat;
  opacity: .08;
  pointer-events: none;
}
body:is([data-page="home"], .sample-games:has(#menu:not([hidden])))::after {
  top: 66vh;
  left: auto;
  right: -10vw;
  width: clamp(360px, 46vw, 700px);
  opacity: .06;
}
body[data-page="home"] .site-footer {
  color: #c5d9e2;
  border-top-color: #ffffff26;
}

/* Match the arcade header, with the original logo on its own white pill. */
body[data-page="home"] .site-header {
  height: auto;
  min-height: 108px;
  padding-block: 16px;
  background: #081e2b;
  border-bottom: 1px solid #ffffff1f;
}
body[data-page="home"] .site-header > .brand {
  position: static;
  transform: none;
  max-width: 100%;
}
body[data-page="home"] .brand-logo {
  width: 320px;
  padding: 12px 22px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 14px #00000026;
}
@media (max-width: 860px) {
  body[data-page="home"] .brand-logo { width: 272px; padding: 10px 20px; }
}
@media (max-width: 540px) {
  body[data-page="home"] .site-header { min-height: 90px; padding: 12px; }
  body[data-page="home"] .brand-logo { width: 228px; padding: 10px 18px; }
}

/* A quiet moving brand pattern behind the practice arcade, never its controls. */
#menu .sample-marquee {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 38px -24px 0;
  padding: 28px;
  border: 1px solid #2777a1;
  border-radius: 28px;
  background: linear-gradient(135deg, #105698 0%, #146c87 47%, #447f43 100%);
  box-shadow: 0 12px 30px #103b6314;
}

#menu .star-marquee {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

#menu .star-marquee::before {
  content: "";
  position: absolute;
  top: -90px;
  bottom: -90px;
  left: -420px;
  width: calc(100% + 840px);
  background-image: url("ascension-star-white.svg?v=candy-bingo-20260913");
  background-repeat: repeat;
  background-position: 0 0;
  background-size: 420px 420px;
  opacity: .24;
  animation: acu-star-marquee 70s linear infinite;
}

#menu .sample-marquee > .cards {
  position: relative;
  z-index: 1;
  gap: 26px;
  margin-top: 0;
}

#menu .sample-marquee .cards > a {
  min-width: 0;
  border: 1px solid #ffffffb8;
  border-radius: 18px;
  background: #eff6eaf2;
  box-shadow: 0 5px 0 #103b6324;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

#menu .sample-marquee .cards > a:nth-child(2n) {
  background: #edf3fbf2;
}

#menu .sample-marquee .cards > a:hover {
  border-color: #fff;
  background: #fff;
  box-shadow: 0 8px 0 #103b632d;
  transform: translateY(-3px);
}

#menu .sample-marquee .cards > a:focus-visible {
  outline: 4px solid #ec5f26;
  outline-offset: 4px;
  background: #fff;
}

#menu .sample-marquee .cards > a:active {
  transform: translateY(0);
  box-shadow: 0 2px 0 #103b6324;
}

/* The welcome message and portal form share one continuous card. */
body[data-page="home"] .student-entry {
  width: min(100%, 1040px);
  display: grid;
  grid-template-columns: minmax(0, 472px) minmax(0, 400px);
  gap: 44px;
  justify-content: center;
  align-items: center;
  align-content: start;
}

body[data-page="home"] .entry-mascot {
  position: relative;
  min-width: 0;
  width: 100%;
  justify-self: center;
}

body[data-page="home"] .entry-mascot::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 16%;
  right: 5%;
  height: 22px;
  border-radius: 50%;
  background: #02162960;
  filter: blur(12px);
}

body[data-page="home"] .entry-mascot img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 18px #02172f40);
}

@media (max-width: 860px) {
  body[data-page="home"] .student-entry { gap: 20px; grid-template-columns: minmax(0, 460px) minmax(0, 240px); }
}

@media (max-width: 700px) {
  body[data-page="home"] .student-entry { width: min(100%, 520px); grid-template-columns: minmax(0, 1fr); gap: 26px; }
  body[data-page="home"] .entry-mascot { width: min(65vw, 260px); }
}

body[data-page="home"] .entry-card {
  overflow: hidden;
  border: 1px solid #c5d8e3;
  border-top: 6px solid #6ab14a;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px #041c3433;
}

body[data-page="home"] .entry-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: 28px;
  background: linear-gradient(130deg, #105698, #104a80);
  color: #fff;
}

body[data-page="home"] .entry-intro h1 {
  font-size: clamp(38px, 6vw, 54px);
}

body[data-page="home"] .entry-card .join-panel {
  border: 0;
  border-radius: 0;
  padding: 28px;
  box-shadow: none;
}

@media (max-width: 540px) {
  body[data-page="home"] .entry-intro,
  body[data-page="home"] .entry-card .join-panel {
    padding: 22px;
  }
}

body[data-page="home"] .entry-intro::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  top: -10px;
  right: -68px;
  z-index: 0;
  background: url("ascension-star-white.svg?v=candy-bingo-20260913") center / contain no-repeat;
  opacity: .12;
  pointer-events: none;
}

body[data-page="home"] .entry-intro > * {
  position: relative;
  z-index: 1;
}

body[data-page="home"] .entry-intro .eyebrow,
body[data-page="home"] .entry-intro > p:last-child {
  color: #f0f7fc;
}

body[data-page="home"] .entry-intro .square {
  background: #bce994;
}

body[data-page="home"] .entry-intro h1 em {
  color: #c8f0a7;
}

@keyframes acu-star-marquee {
  to { transform: translateX(-420px); }
}

@media (max-width: 600px) {
  #menu .sample-marquee {
    margin: 28px -8px 0;
    padding: 14px;
    border-radius: 23px;
  }

  #menu .sample-marquee > .cards {
    gap: 20px;
  }

  #menu .sample-marquee .cards > a {
    padding: 26px;
    border-radius: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #menu .star-marquee::before {
    animation: none;
  }

  #menu .sample-marquee .cards > a {
    transition: none;
  }

  #menu .sample-marquee .cards > a:hover {
    transform: none;
  }
}
