/* The Index list page (home + essays landing): stage, oversized angled names, base footer. */
.page { min-height: 100svh; display: flex; flex-direction: column; gap: 36px; padding: 16px 16px 24px; }

/* ---- the games list (phone first: flat, one tap to play) ---- */
.stage { flex: 1 0 auto; display: flex; }
.games { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; width: 100%; }
.game { display: block; text-decoration: none; }
.status { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; margin-bottom: 6px; }
.name { display: block; font-weight: 900; font-size: clamp(38px, 11vw, 72px); line-height: .9; letter-spacing: .01em; color: var(--n); }
.name span { display: block; }
.desc { display: block; margin-top: 10px; max-width: 34em; font-size: 15px; }

/* ---- 01 play / 02 in the stores: one list at a time, picked by the URL hash ---- */
.apps { display: none; }
.stage:has(#in-the-stores:target) #playable-now { display: none; }
.stage:has(#in-the-stores:target) #in-the-stores { display: flex; }
/* the footer column lists whichever set is NOT on stage */
#play-links { display: none; }
.page:has(#in-the-stores:target) #store-links { display: none; }
.page:has(#in-the-stores:target) #play-links { display: flex; }
.nav a[aria-current="true"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.store-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  font-size: 13px; font-weight: 600; text-decoration: none; min-height: 44px; padding: 0 14px;
  display: inline-flex; align-items: center; border-radius: 999px; border: 1.5px solid var(--f);
}
.chip:hover, .chip:focus-visible { background: var(--f); color: var(--g); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.games > li { animation: rise .5s ease-out backwards; }
.games > li:nth-child(2) { animation-delay: .07s; }
.games > li:nth-child(3) { animation-delay: .14s; }

/* ---- base: logo, intro, stores, contact ---- */
.base { display: flex; flex-direction: column; gap: 22px; }
.intro { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.logo { display: none; font-weight: 600; font-size: 40px; line-height: .85; }
.tag { margin: 0; font-size: 15px; font-weight: 700; }
.blurb { margin: 0; font-size: 15px; }
.cols { display: flex; flex-wrap: wrap; gap: 8px 48px; font-size: 14px; border-top: 1.5px solid var(--f); padding-top: 14px; }
.col { display: flex; flex-direction: column; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.col a { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.col a:hover, .col a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.col a b { font-weight: 700; }
.col .row { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; }
.col .row b { font-weight: 700; }
.note { font-size: 14px; }

.game:focus-visible { outline: 3px solid var(--f); outline-offset: 6px; }

/* a long single word (e.g. "Explorations") scales down so it never overflows a phone */
.name.long { font-size: clamp(24px, 8.4vw, 56px); }

/* ---- desktop with a mouse: the angled index ---- */
@media (min-width: 900px) and (min-height: 600px) and (hover: hover) {
  .page { height: 100svh; padding: 36px 60px 28px; gap: 0; }
  .logo-top, .desc, .store-chips { display: none; }
  @keyframes swing { from { opacity: 0; transform: rotateY(-88deg); } }
  .games > li { animation: none; }
  .name { animation: swing 1.1s cubic-bezier(.075,.82,.165,1) backwards; }
  .games > li:nth-child(2) .name { animation-delay: .08s; }
  .games > li:nth-child(3) .name { animation-delay: .16s; }
  .logo { display: block; }
  .stage { flex: 1 1 auto; min-height: 0; justify-content: flex-end; align-items: center; perspective: 1400px; }
  .games { width: auto; gap: 14px; transform-style: preserve-3d; }
  .game { position: relative; text-align: right; transform-style: preserve-3d; }
  .name {
    font-size: clamp(56px, min(7.2vw, 11vh), 128px); line-height: .88;
    -webkit-text-stroke: 2px var(--n);
    transform-origin: right center; transform: rotateY(-45deg);
    transition: transform 1s cubic-bezier(.075,.82,.165,1), color .3s;
  }
  .status { position: absolute; top: .4em; right: calc(100% + 28px); width: 170px; margin: 0; text-align: right; }
  .name.long { font-size: clamp(56px, min(7.2vw, 11vh), 128px); }
  .game:hover .name, .game:focus-visible .name { transform: rotateY(-22deg); color: transparent; }
  .game:focus-visible { outline: none; }
  .base { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 40px; }
  .intro { gap: 14px; }
  .blurb { min-height: 4.5em; }
  .cols { border-top: 0; padding-top: 0; flex-wrap: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  body, .name { transition: none !important; }
  .games > li, .name { animation: none !important; }
}

.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
