:root {
  --bg: #05070b;
  --text: #eef4f6;
  --muted: rgba(238, 244, 246, 0.68);
  --accent: #3ec7b2;
  --coral: #ff6b5a;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
}

[data-page] .site {
  display: none;
}

[data-page="hub"] .site[data-show="hub"],
[data-page="easy"] .site[data-show="easy"],
[data-page="faces"] .site[data-show="faces"],
[data-page="mahjong"] .site[data-show="mahjong"],
[data-page="whodat"] .site[data-show="whodat"],
[data-page="bitcoin"] .site[data-show="bitcoin"] {
  display: flex;
}

.site {
  position: relative;
  min-height: 100dvh;
  flex-direction: column;
  overflow: hidden;
}

.hub-hero,
.product-wrap,
.shelf,
.beats,
.site-foot,
.cta-dock,
.legal-links {
  position: relative;
  z-index: 1;
}

.cta-dock {
  display: none;
}

.hub-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(62, 199, 178, 0.2), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(255, 107, 90, 0.16), transparent 26%),
    #05070b;
}

.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.07;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.55) 2px 3px
  );
}

.ticker {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-bottom: 1px solid rgba(62, 199, 178, 0.28);
  background: rgba(5, 7, 11, 0.65);
}

.ticker__track {
  display: flex;
  gap: 1.75rem;
  width: max-content;
  padding: 0.55rem 0;
  animation: ticker 22s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.ticker__track span:nth-child(odd) {
  color: var(--coral);
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

.hub-hero {
  text-align: left;
  padding: 3.2rem 8vw 1.5rem;
}

.eyebrow {
  font-family: var(--font-mono);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--coral);
  margin: 0 0 0.65rem;
}

.hub-hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.94;
  margin: 0 0 1rem;
  max-width: 11ch;
}

.lede {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.5;
  font-weight: 500;
}

.shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: min(1100px, calc(100% - 4rem));
  margin: 0.5rem auto 2.5rem;
}

.card {
  position: relative;
  background: #0b1016;
  border: 1px solid rgba(62, 199, 178, 0.38);
  border-radius: 0.35rem;
  box-shadow: 0 0 0 1px rgba(255, 107, 90, 0.08), 0 0 40px rgba(62, 199, 178, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 3px 3px 0 var(--coral), 0 0 40px rgba(62, 199, 178, 0.16);
}

.card__hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  width: 100%;
  padding: 1.1rem;
  color: inherit;
  text-decoration: none;
  text-align: left;
}

.card__live {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
}

.card__live::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 8px var(--coral);
  animation: live-pulse 1.4s ease-in-out infinite;
}

.card__soon {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

@keyframes live-pulse {
  50% {
    opacity: 0.35;
  }
}

.card__icon {
  width: 100%;
  height: 10.4rem;
  object-fit: cover;
  border-radius: 0.2rem;
  background: #081018;
}

.card__icon--wide {
  object-fit: contain;
  background: #000;
}

.kicker {
  margin: 0.4rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.card h2 {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 700;
}

.blurb {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.chip {
  margin-top: 0.45rem;
  padding: 0.38rem 0.7rem;
  border-radius: 0.18rem;
  background: var(--coral);
  color: #140806;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chip--soon {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(62, 199, 178, 0.55);
}

.site-foot {
  margin-top: auto;
  padding: 1.25rem 8vw 2rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.product-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 11, 0.18) 0%, rgba(5, 7, 11, 0.86) 54%, #05070b 100%),
    var(--hero) center / cover no-repeat;
}

.product-bg--easy {
  --hero: url("/apps/assets/easy-hero.jpg");
}
.product-bg--faces {
  --hero: url("/apps/assets/faces-hero.jpg");
}
.product-bg--mahjong {
  --hero: url("/apps/assets/mahjong-hero.jpg");
}
.product-bg--whodat {
  --hero: url("/apps/assets/whodat-hero.jpg");
}
.product-bg--bitcoin {
  --hero: url("/apps/assets/bitcoin-hero.jpg");
}

.product-wrap {
  width: min(1080px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 1.6rem 0 2.5rem;
}

.back {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.back::before {
  content: "◀ ";
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2.4rem;
  align-items: center;
  padding: 0.4rem 0 1.8rem;
}

.product-icon,
.product-icon--wide {
  width: 100%;
  max-height: 22rem;
  object-fit: contain;
  border-radius: 0.4rem;
  background: #000;
  border: 1px solid rgba(62, 199, 178, 0.3);
}

.product-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.9rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.subtitle {
  margin: 0.4rem 0 0.7rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.product-copy .lede {
  max-width: 32rem;
}

.pull {
  margin: 0.9rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral);
}

.cta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  margin-top: 1.15rem;
  padding: 0.9rem 1.2rem;
  background: var(--coral);
  color: #140806;
  text-decoration: none;
  font-weight: 700;
  border-radius: 0.22rem;
  box-shadow: 4px 4px 0 #9a2e24;
}

.cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #9a2e24;
}

.cta span {
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0.75;
}

.cta--soon {
  margin: 1.15rem 0 0;
  cursor: default;
  pointer-events: none;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(62, 199, 178, 0.45);
  box-shadow: 4px 4px 0 rgba(62, 199, 178, 0.22);
}

.cta--soon:hover {
  transform: none;
  box-shadow: 4px 4px 0 rgba(62, 199, 178, 0.22);
}

.beats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin: 0;
  padding: 1.6rem 0 0;
  border-top: 1px solid rgba(62, 199, 178, 0.25);
  list-style: none;
}

.beats h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.beats li:nth-child(1) h3::before,
.beats li:nth-child(2) h3::before,
.beats li:nth-child(3) h3::before {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--coral);
}

.beats li:nth-child(1) h3::before {
  content: "STAGE 1 · ";
}
.beats li:nth-child(2) h3::before {
  content: "STAGE 2 · ";
}
.beats li:nth-child(3) h3::before {
  content: "STAGE 3 · ";
}

.beats p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.legal-links {
  margin: 1.6rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-links a {
  color: var(--muted);
  text-decoration: none;
}

.legal-links a:hover {
  color: var(--accent);
}

/* Documents */
.doc {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 0%, rgba(62, 199, 178, 0.16), transparent 36%),
    #05070b;
  color: var(--text);
}

.doc__nav {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.4rem 1.5rem 0;
}

.doc__nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.doc__nav a:hover {
  color: var(--accent);
}

.doc__nav a::before {
  content: "◀ ";
}

.doc__main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.6rem 1.5rem 4rem;
}

.doc__main h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.doc__updated {
  margin: 0 0 1.6rem;
  color: var(--coral);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc__main h2 {
  margin: 2rem 0 0.7rem;
  font-size: 1.15rem;
}

.doc__main h3 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1.02rem;
}

.doc__main code {
  font-family: var(--font-mono);
  font-size: 0.86em;
}

.doc__main p,
.doc__main li {
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.55;
}

.doc__main p {
  margin: 0 0 1rem;
}

.doc__main ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.doc__main li {
  margin-bottom: 0.55rem;
}

.doc__main li strong {
  color: var(--text);
}

.doc__main hr {
  border: none;
  border-top: 1px solid rgba(62, 199, 178, 0.25);
  margin: 2.5rem 0 1.5rem;
}

.doc__main a {
  color: var(--accent);
}

@media (max-width: 720px) {
  .hub-hero {
    padding: 2.2rem 1.15rem 1.1rem;
  }

  .hub-hero h1 {
    font-size: 2.05rem;
    max-width: 14ch;
  }

  .shelf,
  .beats,
  .product-hero {
    grid-template-columns: 1fr;
  }

  .shelf,
  .product-wrap {
    width: calc(100% - 1.5rem);
  }

  .card:hover {
    transform: none;
  }

  .card__hit {
    flex-direction: row;
    align-items: center;
    gap: 0.95rem;
    padding: 0.9rem;
  }

  .card__live,
  .card__soon {
    display: none;
  }

  .card__icon,
  .card__icon--wide {
    width: 5.4rem;
    height: 5.4rem;
    flex-shrink: 0;
  }

  .card__copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .kicker {
    margin-top: 0;
  }

  .product-copy h1 {
    font-size: 2.15rem;
  }

  .product-icon,
  .product-icon--wide {
    width: min(58%, 12rem);
    margin: 0 auto;
  }

  .product-copy .cta {
    display: none;
  }

  .cta-dock {
    display: block;
    padding: 0.35rem 0.9rem 1.5rem;
  }

  .cta-dock .cta {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    margin-top: 0;
  }

  .hub-hero,
  .site-foot {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track,
  .card__live::before,
  .card,
  .cta {
    animation: none;
    transition: none;
  }
}
