@font-face {
  font-family: "Encode Sans";
  src: url("../assets/fonts/EncodeSans-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Encode Sans";
  src: url("../assets/fonts/EncodeSans-Black.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}

:root {
  --ink: #06040f;
  --ink-2: #0d0a1c;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f6ff;
  --muted: #9aa3c7;
  --cyan: #4fd8ff;
  --magenta: #ff5ecb;
  --gold: #ffcc4d;
  --violet: #8b5cff;
  --lime: #7dff9b;
  --display: "Encode Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Nunito", "Avenir Next", system-ui, sans-serif;
  --shell: 74rem;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--cyan);
  color: #041018;
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.shell {
  width: min(100% - 2rem, var(--shell));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(6, 4, 15, 0.72);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 0 0 1px rgba(79, 216, 255, 0.25), 0 0 24px rgba(139, 92, 255, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

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

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 0 1rem;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #7a6bff 55%, var(--magenta));
  color: #081018;
  box-shadow: 0 10px 40px rgba(79, 216, 255, 0.28);
}

.btn-ghost {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}

.btn-sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
}

/* Hero — one composition */
.hero {
  position: relative;
  min-height: min(100vh, 920px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroDrift 18s var(--ease) infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 70% 35%, rgba(139, 92, 255, 0.35), transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(79, 216, 255, 0.22), transparent 55%),
    linear-gradient(180deg, rgba(6, 4, 15, 0.35) 0%, rgba(6, 4, 15, 0.55) 45%, rgba(6, 4, 15, 0.96) 100%);
}

.hero-content {
  width: min(100% - 2rem, var(--shell));
  margin: 0 auto;
  padding: 7.5rem 0 4.5rem;
}

.hero-brand {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.8rem, 8vw, 5.4rem);
  letter-spacing: -0.05em;
  line-height: 0.92;
  background: linear-gradient(100deg, #8be9ff 0%, #c4b5ff 42%, #ffd56a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(79, 216, 255, 0.15);
  animation: brandIn 0.9s var(--ease) both;
}

.hero-line {
  margin: 0 0 0.75rem;
  max-width: 18ch;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  animation: riseIn 0.9s 0.12s var(--ease) both;
}

.hero-support {
  margin: 0 0 1.6rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.08rem;
  animation: riseIn 0.9s 0.2s var(--ease) both;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: riseIn 0.9s 0.28s var(--ease) both;
}

@keyframes heroDrift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.5%, -1%, 0);
  }
}

@keyframes brandIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes floaty {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-10px);
  }
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-kicker {
  margin: 0 0 0.55rem;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.section-title {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.section-copy {
  margin: 0 0 1.75rem;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Games grid */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  font-weight: 800;
  cursor: pointer;
}

.filter-btn.is-active {
  color: #081018;
  background: linear-gradient(135deg, var(--cyan), #9d8cff);
  border-color: transparent;
}

.game-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.game-card {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(79, 216, 255, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(139, 92, 255, 0.15);
}

.game-card__art {
  aspect-ratio: 1;
  background: #12101f;
  overflow: hidden;
}

.game-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.game-card:hover .game-card__art img {
  transform: scale(1.06);
}

.game-card__body {
  padding: 0.85rem 0.95rem 1rem;
}

.game-card__label {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-card__name {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.game-card__blurb {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.grid-empty {
  display: none;
  color: var(--muted);
  padding: 2rem 0;
}

.grid-empty.is-shown {
  display: block;
}

/* Featured studio strip */
.studio-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.studio-pill {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  animation: floaty 3.6s ease-in-out infinite alternate;
}

.studio-pill:nth-child(2n) {
  animation-delay: 0.4s;
}

.studio-pill:nth-child(3n) {
  animation-delay: 0.8s;
}

.studio-pill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Steps / why */
.step-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.step {
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
  font-weight: 900;
  background: rgba(79, 216, 255, 0.15);
  color: var(--cyan);
}

.step h3 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

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

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.why-item {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}

.why-item h3 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 1.15rem;
}

.why-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Purpose / Google */
.purpose-panel {
  border-radius: 28px;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid rgba(79, 216, 255, 0.2);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 94, 203, 0.12), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(79, 216, 255, 0.12), transparent 40%),
    rgba(255, 255, 255, 0.03);
}

.purpose-panel ol {
  margin: 0.75rem 0 1rem;
  padding-left: 1.2rem;
  color: var(--muted);
}

.purpose-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  color: var(--cyan);
  font-weight: 800;
}

.purpose-links a {
  text-decoration: none;
}

.purpose-links a:hover {
  text-decoration: underline;
}

/* FAQ */
.faq {
  display: grid;
  gap: 0.65rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 0.95rem 1.1rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
  font-family: var(--display);
  letter-spacing: -0.01em;
}

.faq p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

/* CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(1.8rem, 4vw, 3rem);
  border: 1px solid rgba(255, 204, 77, 0.25);
  background:
    linear-gradient(120deg, rgba(139, 92, 255, 0.25), rgba(79, 216, 255, 0.12) 45%, rgba(255, 204, 77, 0.12)),
    #100c22;
}

.cta-band h2 {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
}

.cta-band p {
  margin: 0 0 1.2rem;
  color: var(--muted);
  max-width: 34rem;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2.5rem;
  border-top: 1px solid var(--line);
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-family: var(--display);
  font-weight: 900;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

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

.footer-meta {
  width: 100%;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Legal pages */
.legal-top {
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(139, 92, 255, 0.25), transparent 55%),
    var(--ink-2);
  border-bottom: 1px solid var(--line);
}

.legal-top .site-header {
  position: relative;
  background: transparent;
  backdrop-filter: none;
}

.legal-top .header-inner,
.legal-top .site-header {
  width: min(100% - 2rem, var(--shell));
  margin-inline: auto;
}

.legal-hero {
  width: min(100% - 2rem, var(--shell));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
}

.legal-hero h1 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.04em;
}

.legal-hero p {
  margin: 0;
  color: var(--muted);
}

.legal-hero a {
  color: var(--cyan);
}

.legal-body {
  width: min(100% - 2rem, 48rem);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.legal-body h2 {
  margin: 2rem 0 0.7rem;
  font-family: var(--display);
  letter-spacing: -0.02em;
}

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

.legal-body a {
  color: var(--cyan);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible,
html:not(.motion-ok) .reveal {
  opacity: 1;
  transform: none;
}

.not-found-wrap {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1rem;
}

.not-found-title {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  letter-spacing: -0.05em;
  background: linear-gradient(100deg, #8be9ff, #ffd56a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hide-sm {
  display: inline-flex;
}

@media (max-width: 980px) {
  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .studio-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .step-rail,
  .why-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hide-sm {
    display: none !important;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links .btn {
    display: none;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-content {
    padding-top: 6.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media img,
  .studio-pill,
  .brand,
  .hero-line,
  .hero-support,
  .hero-ctas {
    animation: none !important;
  }
}
