/* Wildtype Games: nightshade for the studio, the title screen's sky for Xenosplice. */
:root {
  --night: #0C0A13;
  --night-2: #13101d;
  --lilac: #F1EEFF;
  --lilac-dim: rgba(241, 238, 255, .72);
  --lilac-faint: rgba(241, 238, 255, .12);
  --lime: #B6F23A;
  --violet: #6B58D6;
  --amber: #FFB648;
  --teal: #4FE3D6;
  --bone: #F2EFE6;
  --ink: #07080B;
  --ui: "Bahnschrift", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --header: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); }
body {
  margin: 0;
  background: var(--night);
  color: var(--lilac);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  padding: 8px 14px; background: var(--lime); color: var(--ink);
  font: 600 .9rem var(--ui); text-decoration: none; border-radius: 6px;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ header */
.top {
  position: sticky; top: 0; z-index: 20;
  height: var(--header);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 max(20px, calc((100vw - var(--wrap)) / 2));
  background: rgba(12, 10, 19, .78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--lilac-faint);
}
.brand img { height: 46px; width: auto; margin-left: -8px; }
.top nav { display: flex; align-items: center; gap: 28px; }
.top nav a {
  font: 500 .8rem/1 var(--ui); letter-spacing: .18em; text-transform: uppercase;
  color: var(--lilac-dim); text-decoration: none;
  padding: 8px 0; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.top nav a:hover { color: var(--lilac); border-color: var(--lime); }
.top nav .nav-contact {
  color: var(--lime); border: 1px solid rgba(182, 242, 58, .45); border-radius: 6px; padding: 9px 14px;
}
.top nav .nav-contact:hover { background: rgba(182, 242, 58, .1); border-color: var(--lime); }

/* ------------------------------------------------------------ hero */
.hero {
  --s: 1;
  position: relative; overflow: hidden;
  min-height: calc(100svh - var(--header));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 20px 72px; text-align: center;
  background:
    radial-gradient(ellipse 46% 42% at 50% 46%, rgba(107, 88, 214, .30), rgba(107, 88, 214, 0) 100%),
    var(--night);
}
.emblem {
  position: relative;
  width: 100%; height: calc(300px * var(--s));
}
.emblem .helix {
  position: absolute; left: 50%; top: 0;
  width: calc(3200px * var(--s)); max-width: none; height: calc(300px * var(--s));
  transform: translateX(-50%);
}
.emblem .eye {
  position: absolute; left: 50%; top: 50%;
  width: calc(260px * var(--s)); height: calc(260px * var(--s));
  transform: translate(-50%, -50%);
  overflow: visible;
}
.eye .pupil { transform-origin: 100px 100px; transform-box: view-box; }
.eye .iris { filter: drop-shadow(0 0 10px rgba(182, 242, 58, .45)); }
.wordmark { margin: calc(20px * var(--s)) 0 0; }
.wordmark img { width: calc(300px * var(--s)); height: auto; }
.lede {
  max-width: 34ch; margin: 28px auto 0;
  font-size: 1.15rem; color: var(--lilac-dim);
}
.next {
  margin-top: 40px;
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 .82rem/1 var(--ui); letter-spacing: .18em; text-transform: uppercase;
  color: var(--lime); text-decoration: none;
}
.next svg { transition: transform .25s; }
.next:hover svg { transform: translateY(3px); }

/* ------------------------------------------------------------ the game */
.game {
  position: relative;
  padding: 104px 20px 96px;
  background:
    radial-gradient(ellipse 42% 46% at 72% 78%, rgba(30, 58, 72, .85), rgba(30, 58, 72, 0) 100%),
    url("assets/stars.svg") 0 0 / 900px 900px,
    linear-gradient(135deg, #0a1320, #05070b);
  border-top: 1px solid var(--lilac-faint);
  border-bottom: 1px solid var(--lilac-faint);
}
.game-inner {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center;
}
.eyebrow {
  margin: 0 0 18px;
  font: 500 .78rem/1 var(--ui); letter-spacing: .24em; text-transform: uppercase; color: var(--teal);
}
.eyebrow::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; vertical-align: 1px;
  border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal);
}
.game-title { margin: 0 0 0 -24px; }
.game-title img { width: min(100%, 600px); height: auto; }
.tagline { width: min(100%, 520px); height: auto; margin: 10px 0 0; opacity: .95; }
.pitch { margin: 30px 0 0; max-width: 46ch; color: rgba(242, 239, 230, .84); }
.features {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: grid; gap: 10px;
}
.features li {
  position: relative; padding-left: 26px;
  font: 500 1rem/1.4 var(--ui); letter-spacing: .04em; color: var(--bone);
}
.features li::before {
  content: ""; position: absolute; left: 2px; top: .38em;
  width: 9px; height: 9px; transform: rotate(45deg);
  background: var(--amber); box-shadow: 0 0 8px rgba(255, 182, 72, .6);
}
.features li:nth-child(even)::before { background: var(--teal); box-shadow: 0 0 8px rgba(79, 227, 214, .6); }
.release { margin-top: 34px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.release img { height: 20px; width: auto; }
.platform {
  font: 600 .72rem/1 var(--ui); letter-spacing: .2em;
  color: var(--bone); border: 1px solid rgba(242, 239, 230, .35); border-radius: 4px; padding: 5px 8px;
}
.actions { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 200px; padding: 15px 28px;
  font: 600 .86rem/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  border-radius: 6px;
  transition: transform .15s, box-shadow .2s, background .2s;
}
/* the little rivets at each end, from the game's menu buttons */
.btn::before, .btn::after {
  content: ""; position: absolute; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%;
  background: currentColor; opacity: .8;
}
.btn::before { left: 10px; }
.btn::after { right: 10px; }
.btn-amber { background: var(--amber); color: var(--ink); box-shadow: 0 0 0 1px #ffd08a inset, 0 6px 24px rgba(255, 182, 72, .25); }
.btn-amber:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #ffd08a inset, 0 8px 32px rgba(255, 182, 72, .4); }
.btn-ghost {
  color: var(--bone);
  background: linear-gradient(#211d2c, #0f0d16);
  box-shadow: 0 0 0 1px rgba(242, 239, 230, .28) inset;
}
.btn-ghost:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(79, 227, 214, .6) inset, 0 6px 24px rgba(79, 227, 214, .15); }

.chart { margin: 0; }
.chart svg { width: 100%; height: auto; overflow: visible; }

/* The chart draws itself the first time it scrolls into view (main.js adds .drawn). */
.anim .chart .nd, .anim .chart .mk, .anim .chart .champ { opacity: 0; }
.anim .chart .ln { stroke-dasharray: 1; stroke-dashoffset: 1; }
.chart .bm { stroke-dasharray: .14 1; stroke-dashoffset: .14; opacity: 0; }
.chart .nd, .chart .mk { transform-box: fill-box; transform-origin: center; }
.chart.drawn .nd, .chart.drawn .mk { animation: pop .5s cubic-bezier(.2, .9, .3, 1.25) forwards; }
.chart.drawn .t0 { animation-delay: 0s; }
.chart.drawn .mk.t0 { animation-delay: .35s; }
.chart.drawn .ln.t1.s0 { animation: draw .45s ease-out .6s forwards; }
.chart.drawn .ln.t1.s1 { animation: draw .25s ease-out 1.05s forwards; }
.chart.drawn .nd.t1 { animation-delay: 1.2s; }
.chart.drawn .mk.t1 { animation-delay: 1.55s; }
.chart.drawn .ln.t2.s0 { animation: draw .45s ease-out 1.8s forwards; }
.chart.drawn .ln.t2.s1 { animation: draw .2s ease-out 2.25s forwards; }
.chart.drawn .champ { animation: rise .7s cubic-bezier(.2, .8, .3, 1) 2.35s forwards; }
/* then light keeps travelling from the parents down to the champion */
.chart.drawn .bm { opacity: 1; animation: beam 4.2s linear infinite; }
.chart.drawn .bm.t1.s0 { animation-delay: 3.2s; }
.chart.drawn .bm.t1.s1 { animation-delay: 3.75s; }
.chart.drawn .bm.t2.s0 { animation-delay: 4.05s; }
.chart.drawn .bm.t2.s1 { animation-delay: 4.6s; }
@keyframes pop { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes beam {
  0% { stroke-dashoffset: .14; }
  14% { stroke-dashoffset: -1; }
  100% { stroke-dashoffset: -1; }
}

/* ------------------------------------------------------------ bands */
.band { max-width: var(--wrap); margin: 0 auto; padding: 96px 20px 0; }
.heading {
  margin: 0 0 32px;
  display: flex; align-items: center; gap: 20px;
}
.heading img { height: 22px; width: auto; flex: none; }
.heading::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(107, 88, 214, .8), rgba(107, 88, 214, 0));
}

/* trailer */
.video {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px var(--lilac-faint), 0 24px 80px rgba(107, 88, 214, .22);
}
.video iframe, .poster, .poster img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.poster img { object-fit: cover; transition: transform .6s, filter .3s; }
.poster:hover img { transform: scale(1.02); filter: brightness(.85); }
.play {
  position: absolute; left: 50%; top: 50%;
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--lime);
  background: rgba(12, 10, 19, .72);
  box-shadow: 0 0 0 3px var(--lime), 0 0 30px rgba(182, 242, 58, .55), 0 0 0 12px rgba(182, 242, 58, .12);
  transition: transform .2s, box-shadow .2s;
}
.play svg { width: 56px; height: 56px; margin-left: 4px; }
.poster:hover .play { transform: scale(1.07); box-shadow: 0 0 0 3px var(--lime), 0 0 44px rgba(182, 242, 58, .8), 0 0 0 16px rgba(182, 242, 58, .14); }
.note { margin: 14px 0 0; font-size: .85rem; color: rgba(241, 238, 255, .5); }

/* screens */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px;
}
.gallery a {
  display: block; border-radius: 8px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--lilac-faint);
  transition: transform .2s, box-shadow .25s;
}
.gallery a:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(79, 227, 214, .55), 0 10px 36px rgba(79, 227, 214, .16); }
.gallery img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery p { margin: 12px 2px 0; font-size: .92rem; line-height: 1.45; color: var(--lilac-dim); }

/* studio + contact */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; }
.about p { margin: 0 0 14px; max-width: 44ch; color: var(--lilac-dim); }
.about em { color: var(--lilac); font-style: normal; border-bottom: 1px solid rgba(182, 242, 58, .5); }
.email {
  display: inline-block; margin-top: 4px;
  font: 500 clamp(1.25rem, 3vw, 1.7rem)/1.2 var(--ui); letter-spacing: .02em;
  color: var(--lime); text-decoration: none;
  border-bottom: 2px solid rgba(182, 242, 58, .35);
  transition: border-color .2s, text-shadow .2s;
  overflow-wrap: anywhere;
}
.email:hover { border-color: var(--lime); text-shadow: 0 0 18px rgba(182, 242, 58, .45); }

/* ------------------------------------------------------------ footer */
.foot {
  max-width: var(--wrap); margin: 112px auto 0; padding: 28px 20px 40px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  border-top: 1px solid var(--lilac-faint);
}
.foot img { height: 40px; width: auto; margin-left: -8px; opacity: .9; }
.foot p { margin: 0; font-size: .82rem; color: rgba(241, 238, 255, .48); }

/* ------------------------------------------------------------ lightbox */
.lightbox {
  width: min(96vw, 1600px); max-width: none; max-height: 96vh; padding: 0;
  border: 0; border-radius: 10px; background: #000; overflow: visible;
  box-shadow: 0 0 0 1px var(--lilac-faint), 0 30px 120px rgba(0, 0, 0, .7);
}
.lightbox::backdrop { background: rgba(6, 5, 10, .86); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; height: auto; max-height: 96vh; object-fit: contain; border-radius: 10px; }
.lightbox-close {
  position: absolute; top: -14px; right: -14px;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  color: var(--ink); background: var(--lilac);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
}
.lightbox-close:hover { background: var(--lime); }

/* ------------------------------------------------------------ hero motion */
@media (prefers-reduced-motion: no-preference) {
  .emblem .helix { animation: fade-in 1.6s ease-out both; }
  .emblem .eye { animation: eye-open .9s cubic-bezier(.2, .9, .3, 1.2) .2s both; }
  .eye .pupil { animation: focus 7s ease-in-out 2s infinite; }
  .wordmark, .lede, .next { animation: fade-up .8s ease-out both; }
  .wordmark { animation-delay: .6s; }
  .lede { animation-delay: .8s; }
  .next { animation-delay: 1s; }
  .hero { animation: glow 9s ease-in-out infinite alternate; }
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
@keyframes eye-open { from { opacity: 0; transform: translate(-50%, -50%) scale(.86); } }
/* the slit narrows now and then: something watching */
@keyframes focus {
  0%, 62%, 100% { transform: scaleX(1); }
  68%, 80% { transform: scaleX(.5); }
}
@keyframes glow {
  from { background-color: var(--night); }
  to { background-color: #100d1b; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim .chart .nd, .anim .chart .mk, .anim .chart .champ { opacity: 1; }
  .anim .chart .ln { stroke-dashoffset: 0; }
  .chart .bm { display: none; }
}

/* ------------------------------------------------------------ smaller screens */
@media (max-width: 980px) {
  .game-inner { grid-template-columns: 1fr; gap: 48px; }
  .chart { max-width: 620px; margin: 0 auto; width: 100%; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 760px) {
  .top nav a:not(.nav-contact) { display: none; }
  .hero { --s: .72; }
  .lede { font-size: 1.05rem; }
  .game { padding: 80px 20px 72px; }
  .game-title { margin-left: -14px; }
  .band { padding-top: 76px; }
  .heading img { height: 18px; }
  .play { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
  .play svg { width: 44px; height: 44px; }
}
@media (max-width: 520px) {
  .hero { --s: .58; }
  .gallery { grid-template-columns: 1fr; }
  .btn { min-width: 0; flex: 1 1 100%; }
}
