/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Surfaces */
  --bg:        #0a0a0b;
  --surface:   #111113;
  --surface-2: #17171a;
  --line:      #232327;
  --line-2:    #2e2e33;

  /* Text */
  --text:      #ffffff;
  --text-2:    #c4c4cc;   /* light gray body */
  --text-3:    #8a8a94;   /* captions, labels */
  --text-dim:  #4a4a54;   /* large decorative gray */

  /* Brand — dark blue for primary CTAs */
  --blue:       #1d3fd1;
  --blue-hover: #2a50ea;
  --blue-press: #1733aa;
  --blue-soft:  rgba(29, 63, 209, .16);

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --radius:    14px;
  --radius-lg: 24px;
  --gutter:    clamp(16px, 4vw, 48px);
  --ease:      cubic-bezier(.2, .7, .2, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== STARFIELD ===== */
.starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
main, .footer { position: relative; z-index: 1; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
strong { color: var(--text); font-weight: 600; }

::selection { background: var(--blue); color: #fff; }

:focus-visible {
  outline: 2px solid var(--blue-hover);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  height: 52px;
  padding: 0 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 0 0 0 var(--blue-soft);
}
.btn--primary:hover {
  background: var(--blue-hover);
  box-shadow: 0 0 0 6px var(--blue-soft);
}
.btn--primary:active { background: var(--blue-press); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--text-3); background: var(--surface); }

.btn--sm { height: 40px; padding: 0 1.1rem; font-size: .85rem; }

/* ===== NAV ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.nav--scrolled,
.nav--open {
  background: rgba(10, 10, 11, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
}
.logo__mark { width: auto; height: 30px; }
.logo__text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -.01em;
}
.logo__text small {
  font-family: var(--font-body);
  font-size: .62rem;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-top: .3rem;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}
.nav__links a:not(.btn) {
  font-size: .92rem;
  color: var(--text-3);
  transition: color .2s;
  position: relative;
}
.nav__links a:not(.btn):hover,
.nav__links a.active { color: var(--text); }
.nav__links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--text);
}

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav__toggle span {
  width: 16px; height: 1.5px;
  background: var(--text);
  transition: transform .25s var(--ease);
}
.nav--open .nav__toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav--open .nav__toggle span:last-child  { transform: translateY(-3.25px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 120px;
  overflow: hidden;
}


.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, min(8.6vw, 13svh), 7.4rem);
  line-height: .98;
  letter-spacing: -.045em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
}
.hero__line { display: block; }

@keyframes spin { to { rotate: 360deg; } }
.hero__line--split {
  display: flex;
  align-items: center;
  gap: .18em;
}
.hero__muted { color: var(--text-dim); }

/* Orb — circular "window" into a tiny space scene */
.hero__orb {
  position: relative;
  flex: 0 0 auto;
  width: 1.8em;
  height: .88em;
  border-radius: 999px;
  overflow: hidden;
  background: radial-gradient(120% 140% at 30% 20%, #16213f 0%, #0b0f1e 55%, #07080c 100%);
  border: 1px solid var(--line-2);
  isolation: isolate;
}
.orb__stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 72%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 46% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 60%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 34%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 80%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 85%, #fff 50%, transparent 51%);
  opacity: .7;
  animation: drift 30s linear infinite;
}
.orb__planet {
  position: absolute;
  z-index: 1;
  width: .5em; height: auto;
  left: 50%; top: 50%;
  translate: -50% -50%;
  filter: drop-shadow(0 0 .1em rgba(214, 104, 44, .45));
  animation: spin 120s linear infinite;
}
/* Astronaut orbit: x on the wrapper, y on the image, a quarter-turn apart,
   so together they trace an ellipse. It passes behind the planet on the top half. */
.orb__orbit {
  position: absolute;
  left: 50%; top: 50%;
  width: .34em;
  margin: -.17em 0 0 -.17em;
  animation: orbit-x 9s linear infinite;
}
.orb__astronaut {
  display: block;
  width: 100%; height: auto;
  filter: drop-shadow(0 .04em .1em rgba(0, 0, 0, .5));
  animation: orbit-y 9s linear infinite;
}
@keyframes orbit-x {
  0%    { translate: .6em 0;  animation-timing-function: ease-in;  z-index: 2; }
  25%   { translate: 0 0;     animation-timing-function: ease-out; }
  49.9% { z-index: 2; }
  50%   { translate: -.6em 0; animation-timing-function: ease-in;  z-index: 0; }
  75%   { translate: 0 0;     animation-timing-function: ease-out; }
  99.9% { z-index: 0; }
  100%  { translate: .6em 0;  z-index: 2; }
}
@keyframes orbit-y {
  0%   { translate: 0 0;      rotate: 0deg;   animation-timing-function: ease-out; }
  25%  { translate: 0 .15em;  rotate: 90deg;  animation-timing-function: ease-in; }
  50%  { translate: 0 0;      rotate: 180deg; animation-timing-function: ease-out; }
  75%  { translate: 0 -.15em; rotate: 270deg; animation-timing-function: ease-in; }
  100% { translate: 0 0;      rotate: 360deg; }
}
@keyframes drift {
  from { background-position: 0 0; }
  to   { background-position: -200px 0; }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: clamp(1.4rem, 3vw, 2rem);
}

/* Ticker */
.ticker {
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
}
.ticker__track {
  display: flex;
  width: max-content;
  padding: 1.1rem 0;
  animation: ticker var(--ticker-duration, 28s) linear infinite;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
}
.ticker__group { display: flex; flex-shrink: 0; }
/* margin, not gap, so both halves of the track are exactly equal and the loop is seamless */
.ticker__group span { margin-right: 2.5rem; }
.ticker__group span:nth-child(even) { color: var(--text-dim); }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== SECTIONS ===== */
.section { padding: clamp(5rem, 11vw, 9rem) 0; }

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5.4vw, 4.2rem);
  line-height: 1;
  letter-spacing: -.04em;
  text-transform: uppercase;
  color: var(--text);
}
.section__count {
  font-size: .35em;
  vertical-align: top;
  letter-spacing: 0;
  color: var(--text-3);
}
.section__sub {
  color: var(--text-3);
  max-width: 360px;
}

/* ===== GAMES ===== */
.game {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}
.game--flip { grid-template-columns: 1fr 1.15fr; } /* media column stays the wider one */
.game--flip .game__media { order: 2; }

.game__media {
  position: relative;
  aspect-ratio: 1000 / 618; /* matches the Ninja Type video, so both cards are the same size */
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform .5s var(--ease), border-color .3s;
}
.game:hover .game__media { border-color: var(--line-2); transform: scale(1.01); }

.game__index {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-3);
}
.game__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -.035em;
  color: var(--text);
  margin: .5rem 0 1rem;
}
.game__desc {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 460px;
}

.game__specs {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 2.2rem;
  margin: 1.8rem 0 2rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.game__specs dt {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-3);
  margin-bottom: .3rem;
}
.game__specs dd { color: var(--text); font-size: .92rem; font-weight: 500; }

.game__actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* — Space Playground animated solar system (SVG animates itself) — */
.game__media--space { background: #020008; }
.game__art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* — Ninja Type gameplay video — */
.game__media--ninja { background: #0d1112; }
.game__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* — Coming soon — */
.coming {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.6rem;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--text-3);
}
.coming__dot {
  flex: 0 0 auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue-hover);
  box-shadow: 0 0 0 0 rgba(42, 80, 234, .6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(42, 80, 234, .6); }
  100% { box-shadow: 0 0 0 12px rgba(42, 80, 234, 0); }
}

/* ===== ABOUT ===== */
.about__statement {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 3.4vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: -.03em;
  color: var(--text-dim);
  max-width: 1050px;
}
.about__statement strong { color: var(--text); font-weight: 500; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.8rem 1.5rem 0 0;
}
.stat + .stat { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.stat__num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  letter-spacing: -.04em;
  color: var(--text);
  line-height: 1;
}
.stat__label { font-size: .88rem; color: var(--text-3); }

/* ===== CONTACT ===== */
.contact { border-top: 1px solid var(--line); }
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.contact__title { font-size: clamp(2.6rem, 7vw, 5.6rem); margin-bottom: 1.5rem; }

.form { display: flex; flex-direction: column; gap: 1.2rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-3);
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .95rem 1.1rem;
  resize: vertical;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input::placeholder,
.field textarea::placeholder { color: #5a5a63; }
.field input:hover,
.field textarea:hover { border-color: var(--line-2); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-hover);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.form__footer {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: .4rem;
}
.form__success {
  font-size: .92rem;
  color: var(--text-2);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .3s, transform .3s;
}
.form__success.visible { opacity: 1; transform: none; }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(3.5rem, 7vw, 5rem) 0 2rem;
  font-size: .92rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.4fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.footer__brand p { margin-top: 1rem; color: var(--text-3); }
.footer__col { display: flex; flex-direction: column; gap: .65rem; }
.footer__col h4 {
  font-size: .72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-3);
  margin-bottom: .3rem;
}
.footer__col a { color: var(--text-2); transition: color .2s; width: fit-content; }
.footer__col a:hover { color: var(--text); }

.socials { display: flex; gap: .6rem; }
.footer__col .social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--text-2);
  transition: color .2s, border-color .2s, background .2s;
}
.footer__col .social:hover {
  color: #fff;
  border-color: var(--blue-hover);
  background: var(--blue-soft);
}
.social svg { width: 20px; height: 20px; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: .84rem;
}
.footer__top:hover { color: var(--text); }

.footer__links { display: flex; gap: 1.5rem; align-items: center; }
.footer__cookies {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.footer__cookies:hover { color: var(--text); }

/* ===== COOKIE CONSENT ===== */
.consent {
  position: fixed;
  z-index: 60;
  left: var(--gutter);
  right: var(--gutter);
  bottom: var(--gutter);
  max-width: 560px;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 1rem 1rem 1.3rem;
  background: rgba(17, 17, 19, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  font-size: .9rem;
  color: var(--text-2);
}
.consent[hidden] { display: none; }
.consent__actions { display: flex; gap: .5rem; flex-shrink: 0; }

@media (max-width: 560px) {
  .consent { flex-direction: column; align-items: stretch; }
  .consent__actions .btn { flex: 1; }
}

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .game,
  .contact__inner { grid-template-columns: 1fr; }
  .game--flip .game__media { order: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 1.8rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem var(--gutter) 1.5rem;
    background: rgba(10, 10, 11, .96);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav--open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav__links a:not(.btn) {
    padding: 1rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }
  .nav__links a.active::after { display: none; }

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

  /* Phones: content starts near the top instead of floating in a full-height hero,
     the title fills the width, and spacing is tightened */
  /* Poster-style title: each line is sized so it spans the full width.
     The divisors are each line's width in em (measured in Unbounded 500);
     .97 leaves a hair of room for rounding. */
  .hero {
    min-height: 0;
    padding-top: 104px;
    justify-content: flex-start;
  }
  .hero__title { font-size: calc((100vw - 2 * var(--gutter)) / 8.35 * .97); }
  .hero__word { display: block; }
  .hero__word--throw    { font-size: calc((100vw - 2 * var(--gutter)) / 4.594 * .97); }
  .hero__word--yourself { font-size: calc((100vw - 2 * var(--gutter)) / 6.211 * .97); }
  .hero__line--split    { font-size: calc((100vw - 2 * var(--gutter)) / 7.502 * .97); }
  .hero__actions { margin-top: 1.6rem; }
  .ticker { margin-top: 2.5rem; }

  .section { padding: 3.5rem 0; }
  .section__head { margin-bottom: 1.8rem; padding-bottom: 1.2rem; }
  .section__title { font-size: 9vw; }
  .contact__title { font-size: 14vw; margin-bottom: 1rem; }

  .game { gap: 1.4rem; padding: 0; margin-bottom: 3rem; }
  .game__title { margin: .3rem 0 .7rem; }
  .game__desc { font-size: 1rem; }
  .game__specs { grid-template-columns: repeat(3, auto); gap: 1.4rem; margin: 1.4rem 0 1.6rem; padding: 1rem 0; }

  .about__statement { font-size: 6.4vw; }
  .stats { margin-top: 2.2rem; }
  .stat { padding-top: 1.3rem; }

  .contact__inner { gap: 2rem; }
  .footer { padding-top: 3rem; }
  .footer__grid { gap: 2rem; padding-bottom: 2rem; }
}

@media (max-width: 480px) {
  .hero__actions { display: grid; grid-template-columns: 1fr; gap: .7rem; }
  .game__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .game__actions .btn { padding: 0 1rem; }
  .game__actions .btn:only-child { grid-column: 1 / -1; }
  .game__specs { grid-template-columns: auto 1fr auto; gap: 1.1rem; }
  .stat { padding-right: 1rem; }
  .stat + .stat { padding-left: 1rem; }
  .stat:nth-child(3) { padding-left: 0; }
  .stat:nth-child(n+3) { margin-top: 1.3rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__col:nth-child(3) { grid-column: 1 / -1; order: 3; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding-top: 96px; }
  .ticker { margin-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
