@font-face {
  font-family: "Pixelify Sans";
  src: url("/fonts/pixelify-sans-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e0f1a;
  --bg-raised: #171829;
  --bg-sunken: #0a0b14;
  --line: #2a2b47;
  --text: #f4f4f8;
  --text-muted: #a6a7c4;
  --accent: #ff2e88;
  --accent-ink: #0e0f1a;
  --accent-2: #7f78ff;
  --accent-3: #2de2e6;
  --pixel: "Pixelify Sans", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 4px;
  --wrap: 1080px;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.pixel-art {
  image-rendering: pixelated;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 3px solid var(--accent-3);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 30px;
  width: auto;
}

.brand-mark {
  display: none;
  width: 34px;
  height: 34px;
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--pixel);
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius);
}

.nav a:hover {
  color: var(--text);
  background: var(--bg-raised);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 104px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 40%, transparent 0%, var(--bg) 70%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero-logo {
  margin: 0 0 28px;
}

.hero-logo img {
  width: min(560px, 100%);
  height: auto;
}

.tagline {
  font-family: var(--pixel);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 16px;
}

.tagline .hl {
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--pixel);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 4.5rem);
}

h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
}

h3 {
  font-size: 1.4rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 34em;
  margin: 0 0 32px;
}

.btn {
  display: inline-block;
  font-family: var(--pixel);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 12px 22px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--accent-2);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  color: var(--accent-ink);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--accent-2);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--line);
}

.btn-ghost:hover {
  color: var(--text);
  box-shadow: inset 0 0 0 2px var(--text-muted);
  transform: none;
}

.actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Mascot: standard pose with the blink frame stacked on top */

.mascot {
  position: relative;
  justify-self: center;
  width: 216px;
  height: 180px;
}

.mascot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.mascot .blink {
  opacity: 0;
  animation: blink 4s steps(1, end) infinite;
}

/* 4s cycle, eyes closed for 150ms (3.75%) */
@keyframes blink {
  0% { opacity: 0; }
  94% { opacity: 1; }
  97.75% { opacity: 0; }
}

/* Peek: the axolotl head looking over an edge */

.peek {
  position: absolute;
  bottom: 100%;
  width: 108px;
  height: 48px;
  image-rendering: pixelated;
  pointer-events: none;
}

.bubble,
.card .bubble {
  position: absolute;
  margin: 0;
  bottom: calc(100% + 18px);
  left: 148px;
  font-family: var(--pixel);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--accent-ink);
  background: var(--text);
  padding: 6px 12px;
  box-shadow:
    0 -3px 0 0 var(--text),
    0 3px 0 0 var(--text),
    -3px 0 0 0 var(--text),
    3px 0 0 0 var(--text);
}

.bubble::before {
  content: "";
  position: absolute;
  left: -15px;
  bottom: -3px;
  width: 9px;
  height: 9px;
  background: var(--text);
  box-shadow: -6px 3px 0 -3px var(--text);
}

/* Sections */

.section {
  position: relative;
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.section-sunken {
  background: var(--bg-sunken);
}

.section-head {
  max-width: 40em;
  margin-bottom: 40px;
}

.section-head p {
  color: var(--text-muted);
  margin: 0;
}

.section > .peek {
  bottom: auto;
  top: -49px;
  right: max(20px, calc((100% - var(--wrap)) / 2 + 40px));
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.grid-peek {
  margin-top: 88px;
}

.card {
  position: relative;
  background: var(--bg-raised);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.card > .peek {
  left: 20px;
  margin-bottom: 2px;
}

.card p {
  color: var(--text-muted);
  margin: 0;
}

.card-game {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-game .thumb {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, rgb(255 255 255 / 0.03) 12px 24px),
    var(--bg-sunken);
  border: 2px dashed var(--line);
  display: grid;
  place-items: center;
  font-family: var(--pixel);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 1.6rem;
}

.tag {
  align-self: flex-start;
  font-family: var(--pixel);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: var(--radius);
  color: var(--accent-ink);
  background: var(--accent-2);
}

.tag-pink {
  background: var(--accent);
}

.card h3 {
  margin: 0 0 8px;
}

.card-game h3 {
  margin: 0;
}

.icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  image-rendering: pixelated;
}

.contact {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}

.contact-mail {
  font-family: var(--pixel);
  font-weight: 600;
  font-size: clamp(1.3rem, 4vw, 2rem);
  word-break: break-all;
}

/* Legal pages */

.legal {
  padding: 64px 0 88px;
}

.legal .wrap {
  max-width: 760px;
}

.legal h1 {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  margin-bottom: 32px;
}

.legal h2 {
  font-size: 1.6rem;
  margin: 48px 0 12px;
  color: var(--accent);
}

.legal h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 28px 0 8px;
}

.legal p,
.legal li {
  color: var(--text);
}

.legal ul {
  padding-left: 1.2em;
}

.legal address {
  font-style: normal;
}

.legal .note {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 32px;
  flex-wrap: wrap;
}

.footer-logo {
  height: 22px;
  width: auto;
  margin-bottom: 12px;
}

.footer-copy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
}

.footer-bye {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--pixel);
  font-weight: 600;
  color: var(--text);
}

.footer-bye img {
  width: 36px;
  height: 30px;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--text);
}

/* 404 */

.notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px 0;
}

.notfound .mascot {
  margin: 0 auto 32px;
}

.notfound .code {
  font-family: var(--pixel);
  font-weight: 600;
  color: var(--accent);
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.notfound h1 {
  font-size: clamp(2rem, 6vw, 3rem);
}

.notfound .lead {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 760px) {
  .hero {
    padding: 56px 0 72px;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero .mascot {
    order: -1;
    width: 144px;
    height: 120px;
  }

  .section {
    padding: 64px 0;
  }

  .contact {
    grid-template-columns: 1fr;
  }

  .contact .btn {
    justify-self: start;
  }

  .site-header .wrap {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .nav a {
    padding: 6px 6px;
    font-size: 0.95rem;
  }

  .brand-logo {
    display: none;
  }

  .brand-mark {
    display: block;
  }

  .bubble {
    left: 136px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .mascot .blink {
    animation: none;
  }

  .btn {
    transition: none;
  }
}
