@font-face {
  font-family: "Pixelify";
  src: url("assets/fonts/PixelifySans.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  /* brand */
  --ground: #20124D;
  --yellow: #FFD60A;
  --violet: #6D4AFF;
  --white: #FFFFFF;
  /* derived */
  --ground-deep: #170C3A;
  --ground-raise: #2C1A66;
  --line: #43308A;
  --space: #0C0720;
  --yellow-deep: #C9A600;
  --text: #F1ECFF;
  --muted: #B8ACE4;

  --display: "Pixelify", ui-monospace, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 64px;
  /* ordered-dither edge, tinted per use with mask */
  --dither: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 3' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h1v1h-1zM1 1h1v1h-1zM3 1h1v1h-1zM0 2h2v1h-2zM3 2h1v1h-1z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
.pixelated { image-rendering: pixelated; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 4px solid var(--violet); outline-offset: 4px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------- LOGO PARTS ---------- */
.wm-rest, .wm-white { fill: var(--white); }
.wm-omo, .lid { fill: var(--yellow); }
.wm .pupil { fill: var(--ground); }
.lid { visibility: hidden; }
.f-ink, .face .pupil { fill: var(--ground); }
.f-white { fill: var(--white); }
.blinking .lid { visibility: visible; }
.face.blinking .f-white, .face.blinking .pupil { visibility: hidden; }

/* ---------- NAV ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--ground); border-bottom: 4px solid var(--ground-deep); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--nav-h); }
.nav-logo { display: block; padding: 8px 0; }
.nav-logo svg { height: 28px; width: auto; overflow: visible; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { font: 600 17px/1 var(--display); letter-spacing: .5px; text-decoration: none; padding: 10px 12px; }
.nav-links a:hover { background: var(--yellow); color: var(--ground); }

/* ---------- PIXEL BUTTON ---------- */
/* stepped corners and depth are drawn with hard box-shadows */
.btn {
  --bg: var(--ground); --fg: var(--yellow); --sh: #0B0522;
  display: inline-block; margin: 4px 4px 12px; padding: 12px 22px;
  font: 700 20px/1.2 var(--display); letter-spacing: .5px; text-decoration: none;
  color: var(--fg); background: var(--bg); border: 0; cursor: pointer;
  box-shadow:
    0 -4px 0 var(--bg), 0 4px 0 var(--bg), -4px 0 0 var(--bg), 4px 0 0 var(--bg),
    0 8px 0 var(--sh), 0 12px 0 var(--sh), -4px 4px 0 var(--sh), -4px 8px 0 var(--sh), 4px 4px 0 var(--sh), 4px 8px 0 var(--sh);
}
.btn:hover { --bg: var(--violet); --fg: var(--white); }
.btn:active {
  transform: translateY(8px);
  box-shadow: 0 -4px 0 var(--bg), 0 4px 0 var(--bg), -4px 0 0 var(--bg), 4px 0 0 var(--bg);
}
.btn-light { --bg: var(--white); --fg: var(--ground); --sh: var(--yellow-deep); }
.btn-yellow { --bg: var(--yellow); --fg: var(--ground); --sh: #8F7700; }

.eyebrow {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
  font: 600 16px/1 var(--display); letter-spacing: 2px; text-transform: uppercase; color: var(--yellow);
}
.eyebrow::before { content: ""; width: 12px; height: 12px; background: currentColor; }

/* ---------- HERO ---------- */
.hero { position: relative; background: var(--yellow); color: var(--ground); }
.hero::after, .contact::before {
  content: ""; position: absolute; left: 0; right: 0; height: 24px;
  -webkit-mask: var(--dither) 0 0 / 32px 24px repeat-x; mask: var(--dither) 0 0 / 32px 24px repeat-x;
}
.hero::after { bottom: 0; background: var(--ground); }
.hero-in {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
  min-height: min(760px, calc(100svh - var(--nav-h)));
  padding-top: 72px; padding-bottom: 104px;
}
.hero .eyebrow { color: var(--ground); }
.hero h1 { font-size: clamp(46px, 6.6vw, 88px); line-height: .98; }
.hl { display: inline-block; background: var(--ground); color: var(--yellow); padding: 0 .16em .06em; margin-top: .08em; }
.lede { font-size: 20px; line-height: 1.5; max-width: 30em; margin: 26px 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-mascot { position: relative; justify-self: center; width: min(480px, 100%); }
.mascot { display: block; width: 100%; padding: 6% 4%; margin: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mascot .face { width: 100%; overflow: visible; }
.mascot.boop .face { animation: boop .42s steps(1) 1; }
@keyframes boop {
  0% { transform: translateY(0); }
  20% { transform: translateY(-9%); }
  45% { transform: translateY(-14%); }
  70% { transform: translateY(-6%); }
  100% { transform: translateY(0); }
}
.bubble {
  position: absolute; right: 2%; top: -6%;
  padding: 8px 14px; font: 700 22px/1.2 var(--display); color: var(--ground); background: var(--white);
  box-shadow: 0 -4px 0 var(--white), 0 4px 0 var(--white), -4px 0 0 var(--white), 4px 0 0 var(--white);
  pointer-events: none;
}
.bubble::after { content: ""; position: absolute; left: 16px; bottom: -12px; width: 8px; height: 8px; background: var(--white); box-shadow: -8px -4px 0 var(--white), 0 -4px 0 var(--white); }

/* ---------- SECTIONS ---------- */
.section { padding: 104px 0; }
.section-deep { background: var(--ground-deep); }
.section h2, .contact h2 { font-size: clamp(34px, 4.4vw, 56px); }
.section-lede { font-size: 19px; color: var(--muted); max-width: 38em; margin-top: 18px; }

/* ---------- GAME ---------- */
.game {
  --p: var(--space);
  display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center;
  margin: 48px 8px 0; padding: 44px 48px;
  background: var(--p);
  box-shadow: 0 -8px 0 var(--p), 0 8px 0 var(--p), -8px 0 0 var(--p), 8px 0 0 var(--p);
}
.phone {
  --f: #3A2880;
  width: min(250px, 64vw); aspect-ratio: 9 / 16; padding: 8px; margin: 6px;
  background: var(--f);
  box-shadow: 0 -6px 0 var(--f), 0 6px 0 var(--f), -6px 0 0 var(--f), 6px 0 0 var(--f), 14px 14px 0 rgba(109, 74, 255, .35);
}
.phone-screen { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; }
.phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s steps(5); }
.phone-screen img.on { opacity: 1; }

.game-head { display: flex; align-items: center; gap: 18px; }
.game-icon { width: 72px; height: 72px; flex: none; }
.game-logo { height: 62px; width: auto; margin: -8px 0 -10px -12px; }
.genre { font: 600 16px/1.2 var(--display); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.game-desc { margin: 22px 0 26px; max-width: 34em; }

.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 36px; margin-bottom: 26px; }
.stats b { display: block; font: 700 38px/1 var(--display); color: var(--yellow); }
.stats span { font-size: 14px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chips li { font: 600 16px/1 var(--display); letter-spacing: .5px; padding: 8px 12px; border: 2px solid var(--line); }
.chips span { color: var(--muted); margin-left: 6px; }

.slot {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 36px; padding: 22px 26px; border: 4px dashed var(--line); color: var(--muted);
}
.slot b { color: var(--text); font-weight: 600; }
.slot-tag { font: 700 15px/1 var(--display); letter-spacing: 2px; text-transform: uppercase; color: var(--ground); background: var(--muted); padding: 6px 10px; }

/* ---------- STUDIO ---------- */
.reveal { display: flex; align-items: center; gap: clamp(20px, 4vw, 48px); margin: 56px 0 72px; }
.wm-big { flex: 1 1 0; min-width: 0; max-width: 640px; overflow: visible; }
.wm-big .wm-rest { transition: opacity .7s steps(5) .5s; }
.reveal.is-in .wm-rest { opacity: .2; }
.reveal:hover .wm-rest { opacity: 1; transition-delay: 0s; }
.reveal-eq { font: 700 clamp(40px, 6vw, 72px)/1 var(--display); color: var(--muted); }
.reveal-icon { width: clamp(84px, 13vw, 148px); height: auto; flex: none; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 0 8px; }
.principle {
  --p: var(--ground-raise);
  padding: 22px 24px 26px; background: var(--p);
  box-shadow: 0 -8px 0 var(--p), 0 8px 0 var(--p), -8px 0 0 var(--p), 8px 0 0 var(--p);
}
.num { font: 700 16px/1 var(--display); letter-spacing: 2px; color: var(--yellow); }
.principle h3 { font-size: 26px; margin: 12px 0 10px; }
.principle p { color: var(--muted); font-size: 16px; }

/* ---------- CONTACT ---------- */
.contact { position: relative; overflow: hidden; background: var(--yellow); color: var(--ground); padding-top: 24px; }
.contact::before { top: 0; background: var(--ground-deep); transform: scaleY(-1); }
.contact-in { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.contact-copy { padding: 88px 0 96px; }
.contact .eyebrow { color: var(--ground); }
.contact .section-lede { color: var(--ground); margin-bottom: 30px; }
/* the mascot peeks over the footer: only the eyes clear the edge */
.peek { width: min(400px, 38vw); aspect-ratio: 20 / 8.5; overflow: hidden; }
.peek .face { width: 100%; }

/* ---------- FOOTER ---------- */
.footer { background: var(--ground-deep); padding: 36px 0 40px; }
.footer-in { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 32px; }
.footer-logo { height: 22px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font: 600 16px/1.2 var(--display); }
.footer-links a { text-decoration: none; color: var(--muted); }
.footer-links a:hover { color: var(--yellow); }
.copy { margin-left: auto; font-size: 14px; color: var(--muted); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding-top: 40px; padding-bottom: 88px; }
  .hero-mascot { order: -1; width: min(340px, 78%); justify-self: start; }
  .lede { font-size: 18px; }
  .section { padding: 72px 0; }
  .game { grid-template-columns: 1fr; gap: 36px; padding: 32px 22px; }
  .game-media { display: flex; justify-content: center; }
  .stats { grid-template-columns: repeat(2, auto); }
  .principles { grid-template-columns: 1fr; gap: 28px; }
  .reveal { margin: 40px 0 56px; }
  .contact-in { grid-template-columns: 1fr; gap: 0; }
  .contact-copy { padding: 64px 0 48px; }
  .peek { width: min(300px, 70vw); justify-self: end; }
  .copy { margin-left: 0; width: 100%; }
}
@media (max-width: 420px) {
  .nav-logo svg { height: 20px; }
  .nav-links a { font-size: 15px; padding: 8px 7px; }
  .btn { font-size: 18px; padding: 11px 18px; }
  .game-logo { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mascot.boop .face { animation: none; }
  .phone-screen img, .wm-big .wm-rest { transition: none; }
}
