/* Every colour, size and timing, defined once. The site is always dark (no light mode). */

/* The base colours. Everything else is worked out from these, so changing a colour here changes it everywhere. */
:root {
  --accent-rgb: 79 216 255;    /* glows, outlines, buttons, links */
  --glow-rgb: 25 118 210;      /* the centre glow */
  --screen-rgb: 12 20 51;      /* header, cards and panels */
  --spark-rgb: 200 243 255;    /* the bright middle of the grid points */
  --page-bg-dark: #10131a;
  --text: #e4f3ff;
  --dim: #8ea2c9;
  --screen-high: #131d45;
  --outline: #2a3b73;
}

:root {
  color-scheme: dark;

  --accent: rgb(var(--accent-rgb));
  --screen-solid: rgb(var(--screen-rgb));
  --screen-bg: rgb(var(--screen-rgb) / .82);
  /* The holo colour split (red/blue edges): part of the holo look in every colour scheme. */
  --fringe-red: rgb(255 46 99 / .55);
  --fringe-blue: rgb(46 107 255 / .55);
  --screen-heading-glow: 0 0 1px rgb(255 255 255 / .6), 0 0 6px rgb(var(--accent-rgb) / .55),
    0 0 16px rgb(var(--accent-rgb) / .35), -1px 0 rgb(255 46 99 / .35), 1px 0 rgb(46 107 255 / .35);

  --page-bg: var(--page-bg-dark);
  --page-text: var(--text);
  --page-dim: var(--dim);
  --link: var(--accent);
  --page-grid: rgb(var(--accent-rgb) / .05);
  --page-glow: rgb(var(--glow-rgb) / .18);
  --heading-glow: var(--screen-heading-glow);

  --radius-panel: 14px;
  --radius-nav: 10px;
  --gutter: 16px;
  --content-width: 1100px;

  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-heading: Arial, Helvetica, sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-hover: 120ms;
  --t-reveal: 600ms;
  --reveal-drift: 8px;
  --reveal-step: 80ms;

  --scan-pitch: 3px;
  --scan-line: rgb(var(--accent-rgb) / .08);
  /* One drift loop moves 4 line spacings (12 px): that lands on whole screen pixels at the usual display scaling
     (100%, 125%, 150%, 175%, 200%), so the loop has no visible jump. 12 s per loop = 1 px per second. */
  --scan-loop: calc(var(--scan-pitch) * 4);
  --scan-drift-time: 12s;

  --grid-step: 40px;
  /* A glowing point on every 3rd grid crossing (3 x 40 px). The flicker script reads this number. */
  --grid-dot-every: 120px;
  --grid-dot-core: rgb(var(--spark-rgb) / .5);
  --grid-dot-halo: rgb(var(--accent-rgb) / .2);
  --grid-flicker-core: rgb(var(--spark-rgb) / .85);
  --grid-flicker-halo: rgb(var(--accent-rgb) / .35);
}

/* Reset and typography. */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--page-text);
  font: 400 1rem/1.6 var(--font-body);
}

h1, h2, h3 {
  margin: 0 0 .6em;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.15rem; }

p, ul, ol { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }

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

:focus-visible {
  outline: 1.5px solid var(--text);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--accent);
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* The page backdrop: a faint blueprint grid, a glowing point on every 3rd crossing (both directions) that pulses
   gently, and a soft blue glow, slightly wider than tall, fixed in the middle of the screen. */
body {
  background-color: var(--page-bg);
  background-image:
    linear-gradient(var(--page-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--page-grid) 1px, transparent 1px);
  background-size: var(--grid-step) var(--grid-step);
  background-position: 0 0;
  position: relative;
  isolation: isolate;
}

/* The centre glow: an oval about 1.35 times wider than tall. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(closest-side, var(--page-glow), transparent 78%) 50% 50% / 118vmin 88vmin no-repeat;
}

/* The grid points, on their own layer so they can pulse together, slowly and slightly. */
body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle, var(--grid-dot-core) 0 1.5px, var(--grid-dot-halo) 2.5px, transparent 12px)
    /* The dot sits in the middle of its tile; shifting the tile by half puts it on a grid crossing. */
    calc(var(--grid-dot-every) / -2 + .5px) calc(var(--grid-dot-every) / -2 + .5px) / var(--grid-dot-every) var(--grid-dot-every);
  animation: grid-pulse 6s ease-in-out infinite alternate;
}
@keyframes grid-pulse {
  from { opacity: .7; }
  to { opacity: 1; }
}

/* The layer the flickers live in: exactly the page's size, cutting off anything past its edges, so a flicker at the
   edge never makes the page bigger (no scrollbars popping up). */
.grid-fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* One grid point flickering now and then (placed by the flicker script on a real crossing). */
.grid-flicker {
  position: absolute;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, var(--grid-flicker-core) 0 2px, var(--grid-flicker-halo) 3.5px, transparent 12px);
  animation: grid-flicker 900ms linear both;
}
@keyframes grid-flicker {
  0% { opacity: 0; }
  12% { opacity: 1; }
  22% { opacity: .25; }
  34% { opacity: .9; }
  46% { opacity: .4; }
  60% { opacity: .8; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .grid-flicker { display: none; }
}

/* Page width, gutters and spacing. */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.stack > * + * { margin-top: 2.5rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Shared holographic building blocks. Any module switches them on with a class or data attribute. */

/* Softly glowing text with a faint red/blue edge (headings and labels only). */
.holo-text { text-shadow: var(--heading-glow); }
.holo-screen .holo-text { text-shadow: var(--screen-heading-glow); }

/* A dark display surface: keeps dark colours in both light and dark mode. */
.holo-screen {
  --page-text: var(--text);
  --page-dim: var(--dim);
  --link: var(--accent);
  color: var(--text);
}

/* Scanlines drifting slowly down inside a box (never over body text on the page). Each line has soft edges, so a
   line sitting between two screen pixels never looks brighter than the others. */
.holo-scan { position: relative; overflow: hidden; }
.holo-scan::after {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--scan-loop)) 0 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom,
    transparent 0, var(--scan-line) 1px, transparent 2px, transparent var(--scan-pitch));
  animation: scan-drift var(--scan-drift-time) linear infinite;
}
@keyframes scan-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, var(--scan-loop), 0); }
}

/* Glow and colour-split edge for boxes. */
.holo-glow {
  box-shadow: 0 0 3px rgb(var(--accent-rgb) / .3), 0 0 7px rgb(var(--accent-rgb) / .18),
    0 0 12px rgb(var(--accent-rgb) / .1), 0 0 18px rgb(var(--accent-rgb) / .06);
}
.holo-fringe {
  box-shadow: -1px 0 0 var(--fringe-red), 1px 0 0 var(--fringe-blue);
}

/* Gentle load fade with a small upward drift; staggered by step. */
.reveal { animation: reveal var(--t-reveal) var(--ease) both; }
.reveal--2 { animation-delay: calc(1 * var(--reveal-step)); }
.reveal--3 { animation-delay: calc(2 * var(--reveal-step)); }
.reveal--4 { animation-delay: calc(3 * var(--reveal-step)); }
.reveal--5 { animation-delay: calc(4 * var(--reveal-step)); }
@keyframes reveal {
  from { opacity: 0; transform: translate3d(0, var(--reveal-drift), 0); }
  to { opacity: 1; transform: none; }
}

/* Glitch: the script lays short-lived copies of an element over it, clipped to thin bands, shifted 2 px, with a red
   or blue edge. Any element with data-glitch can be picked. */
[data-glitch] { position: relative; }
.glitch-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
}
.glitch-layer > * {
  margin: 0 !important;
  width: 100%;
  height: 100%;
  animation: none !important;
  opacity: 1 !important;
  transition: none !important;
}
.glitch-layer--red { filter: drop-shadow(-1px 0 rgb(255 46 99 / .5)); }
.glitch-layer--blue { filter: drop-shadow(1px 0 rgb(46 107 255 / .5)); }

@media (prefers-reduced-motion: reduce) {
  .holo-scan::after { animation: none; }
  .glitch-layer { display: none; }
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 10;
  padding: .6rem 1rem;
  border-radius: 8px;
  background: var(--screen-solid);
  color: var(--text);
}
.skip-link:focus-visible { top: var(--gutter); }

.page-main {
  flex: 1 0 auto;
  padding-top: 3rem;
  padding-bottom: 4rem;
}
.page-main > * + * { margin-top: 3rem; }

@media (max-width: 759px) {
  .page-main { padding-top: 2.5rem; }
}

.page-main--landing {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 3rem 2rem;
}

/* The header bar uses the same dark glass and thin cyan edge as the cards. */
.site-header {
  position: relative;
  z-index: 2;
  overflow: visible;
  background: var(--screen-bg);
  border-bottom: 1px solid rgb(var(--accent-rgb) / .45);
  box-shadow: 0 0 3px rgb(var(--accent-rgb) / .2), 0 0 12px rgb(var(--accent-rgb) / .08);
}
/* Scanlines stay inside the bar. */
.site-header.holo-scan::after { clip-path: inset(var(--scan-loop) 0 0 0); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 88px;
}

.site-header__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  text-decoration: none;
}
.site-header__brand:hover { text-decoration: none; }

/* The emblem fits inside the bar (no overhang). */
.site-header__emblem {
  display: block;
  width: 84px;
  margin-block: 2px;
  flex: none;
}

/* Name and tagline, the tagline centred under the name. */
.site-header__titles { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.05; }

.site-header__name {
  margin: 0;
  font: 700 clamp(1.6rem, 3.4vw, 2.6rem) / 1.05 var(--font-heading);
  letter-spacing: 0;
  color: #fff;
}

.site-header__tagline {
  margin-top: 4px;
  font: 700 clamp(.85rem, 1.5vw, 1.15rem) / 1.2 var(--font-heading);
  color: var(--text);
  text-shadow: 0 0 6px rgb(var(--accent-rgb) / .55), 0 1px 2px rgb(0 0 0 / .5);
}

@media (max-width: 759px) {
  .site-header__inner {
    flex-direction: column;
    gap: 10px;
    padding-block: 12px 14px;
  }
  .site-header__brand { order: -1; }
  .site-header__emblem { width: 72px; margin-block: 0; }
  .site-header__nav { gap: 8px; }
  .site-header__nav .glow-button { padding: 8px 16px; font-size: .95rem; }
}

.site-footer {
  border-top: 1px solid rgb(var(--accent-rgb) / .35);
  box-shadow: 0 -1px 12px rgb(var(--accent-rgb) / .12);
  color: var(--page-dim);
  font-size: .92rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-block: 1.25rem;
}

.site-footer__copy { margin: 0; }

.site-footer__nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-footer__nav a { color: var(--page-dim); }
.site-footer__nav a:hover { color: var(--link); }

.site-footer--minimal {
  border-top: 0;
  box-shadow: none;
  font-size: .85rem;
  opacity: .75;
}
.site-footer--minimal .site-footer__inner { justify-content: center; }

.section__intro {
  max-width: 60ch;
  color: var(--page-dim);
  font-size: 1.05rem;
}

.holo-image { position: relative; }
.holo-image img { width: 100%; height: auto; }

.holo-image--framed {
  padding: 6%;
  background:
    radial-gradient(closest-side, rgb(var(--accent-rgb) / .12), transparent 75%),
    linear-gradient(rgb(var(--accent-rgb) / .05) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgb(var(--accent-rgb) / .05) 1px, transparent 1px) 0 0 / 24px 24px;
}

.holo-image img {
  transition: filter calc(var(--t-hover) * 1.6) var(--ease);
}

.glow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid rgb(var(--accent-rgb) / .8);
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / .22);
  box-shadow: -1px 0 0 var(--fringe-red), 1px 0 0 var(--fringe-blue),
    0 0 8px rgb(var(--accent-rgb) / .5), 0 0 16px rgb(var(--accent-rgb) / .25);
  color: var(--page-text);
  font: 700 1rem/1.1 var(--font-heading);
  letter-spacing: .02em;
  text-decoration: none;
  text-shadow: 0 0 6px rgb(var(--accent-rgb) / .6);
  transition: background-color var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease);
}

.glow-button:hover {
  background: rgb(var(--accent-rgb) / .3);
  box-shadow: -1px 0 0 var(--fringe-red), 1px 0 0 var(--fringe-blue),
    0 0 10px rgb(var(--accent-rgb) / .62), 0 0 21px rgb(var(--accent-rgb) / .32);
  text-decoration: none;
}

.glow-button:active {
  background: rgb(var(--accent-rgb) / .34);
  box-shadow: -1px 0 0 var(--fringe-red), 1px 0 0 var(--fringe-blue),
    0 0 11px rgb(var(--accent-rgb) / .7), 0 0 22px rgb(var(--accent-rgb) / .35);
}

/* The page you are on (menu): pressed in, with a brighter fill and glow. */
.glow-button[aria-current="page"] {
  background: rgb(var(--accent-rgb) / .34);
  box-shadow: -1px 0 0 var(--fringe-red), 1px 0 0 var(--fringe-blue), inset 0 2px 6px rgb(0 0 0 / .35),
    0 0 11px rgb(var(--accent-rgb) / .7), 0 0 22px rgb(var(--accent-rgb) / .35);
}

.glow-button--plain {
  background: rgb(var(--accent-rgb) / .06);
  border-color: rgb(var(--accent-rgb) / .5);
  box-shadow: none;
  text-shadow: none;
}
.glow-button--plain:hover { background: rgb(var(--accent-rgb) / .12); box-shadow: 0 0 8px rgb(var(--accent-rgb) / .3); }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

.glow-panel {
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid rgb(var(--accent-rgb) / .75);
  border-radius: var(--radius-panel);
  background: var(--screen-bg);
  box-shadow: -1px 0 0 var(--fringe-red), 1px 0 0 var(--fringe-blue),
    0 0 3px rgb(var(--accent-rgb) / .3), 0 0 8px rgb(var(--accent-rgb) / .18), 0 0 14px rgb(var(--accent-rgb) / .08);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.glow-panel > :last-child { margin-bottom: 0; }

.pill {
  --pill: var(--dim);
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 12px;
  border: 1px solid color-mix(in srgb, var(--pill) 80%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--pill) 14%, transparent);
  color: var(--pill);
  font: 700 .82rem/1.2 var(--font-heading);
  letter-spacing: .03em;
}
.pill--soon { --pill: var(--accent); box-shadow: 0 0 8px rgb(var(--accent-rgb) / .3); }
.pill--live { --pill: #34d399; }
.pill--dev { --pill: #a78bfa; }
.pill--chip { --pill: var(--dim); font-weight: 400; }

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-card {
  border: 1px solid rgb(var(--accent-rgb) / .45);
  border-radius: var(--radius-panel);
  background: var(--screen-bg);
  box-shadow: 0 0 3px rgb(var(--accent-rgb) / .2), 0 0 12px rgb(var(--accent-rgb) / .08);
  overflow: hidden;
  transition: box-shadow calc(var(--t-hover) * 1.6) var(--ease), border-color calc(var(--t-hover) * 1.6) var(--ease);
}
.project-card:hover, .project-card:focus-within {
  border-color: rgb(var(--accent-rgb) / .8);
  box-shadow: 0 0 4px rgb(var(--accent-rgb) / .35), 0 0 18px rgb(var(--accent-rgb) / .18);
}

.project-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.project-card__link:hover { text-decoration: none; }
.project-card__link:focus-visible { border-radius: var(--radius-panel); }

.project-card__art { position: relative; }
.project-card:hover .holo-image img { filter: brightness(1.08) drop-shadow(0 0 12px rgb(var(--accent-rgb) / .35)); }

/* Title over the art, centred, like the old site's cards. */
.project-card--tile .project-card__name {
  position: absolute;
  inset: auto 0 44%;
  margin: 0;
  padding-inline: 12px;
  text-align: center;
  color: #fff;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  text-shadow: 0 0 2px rgb(0 0 0 / .9), 0 0 10px rgb(0 0 0 / .85), 0 0 6px rgb(var(--accent-rgb) / .6),
    -1px 0 rgb(255 46 99 / .35), 1px 0 rgb(46 107 255 / .35);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px 20px;
}
.project-card__body > p { margin: 0; color: var(--dim); }
.project-card__release { color: var(--text) !important; font-size: 1.05rem; }
.project-card__more { color: var(--accent); font-weight: 700; }

.project-card--wide .project-card__link { flex-direction: row; align-items: center; }
.project-card--wide .project-card__art { flex: 0 0 44%; }
.project-card--wide .project-card__body { padding: 24px 28px; }
.project-card--wide .project-card__name { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }

@media (max-width: 759px) {
  .project-card--wide .project-card__link { flex-direction: column; align-items: stretch; }
  .project-card--wide .project-card__body { padding: 16px 18px 20px; }
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 360px));
  gap: 24px;
}

.store-links__soon { color: var(--page-dim); }

.hero { padding-top: 1rem; }

.hero__lead {
  max-width: 30ch;
  margin-bottom: 1.4rem;
  font: 700 clamp(1.5rem, 3.6vw, 2.25rem) / 1.25 var(--font-heading);
}

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}
.contact-strip__text { margin: 0; font-size: 1.1rem; }
.contact-strip__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.contact-strip__address { color: var(--accent); overflow-wrap: anywhere; }

.prose { max-width: 68ch; font-size: 1.03rem; line-height: 1.65; }
.prose h2 { margin-top: 2rem; font-size: 1.3rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul { padding-left: 1.3rem; }
.prose li + li { margin-top: .35rem; }
.prose .prose__meta { color: var(--page-dim); }

.product-intro {
  display: grid;
  grid-template-columns: 1fr minmax(0, 460px);
  align-items: center;
  gap: 32px;
}
.product-intro__text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.product-intro__text h1 { margin: 0; }
.product-intro__summary { margin: 0; font-size: 1.15rem; color: var(--page-dim); }
.product-intro__art {
  border: 1px solid rgb(var(--accent-rgb) / .45);
  border-radius: var(--radius-panel);
  background: var(--screen-bg);
  overflow: hidden;
}

@media (max-width: 759px) {
  .product-intro { grid-template-columns: 1fr; }
}

.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.landing-hero__emblem { width: min(70vw, 380px); margin-bottom: .5rem; }

.landing-hero__name {
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
}

/* Same colour and glow as the studio name (both use .holo-text and the page text colour), a little smaller. */
.landing-hero__tagline {
  margin: .7rem 0 2rem;
  font: 700 clamp(1.15rem, 2.7vw, 1.6rem) / 1.2 var(--font-heading);
  color: var(--page-text);
  letter-spacing: .03em;
}

.landing-hero__action .glow-button { min-width: 180px; font-size: 1.15rem; padding-inline: 32px; }

.coming-soon {
  display: flex;
  align-items: center;
  gap: 8px 32px;
  border: 1px solid rgb(var(--accent-rgb) / .45);
  border-radius: var(--radius-panel);
  background: var(--screen-bg);
  box-shadow: 0 0 3px rgb(var(--accent-rgb) / .2), 0 0 12px rgb(var(--accent-rgb) / .08);
  overflow: hidden;
}
.coming-soon__art { flex: 0 0 min(42%, 380px); }
.coming-soon__text { padding: 20px 28px 24px 0; }
.coming-soon__title { margin: 0 0 .4rem; font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.coming-soon__text p { margin: 0; color: var(--dim); font-size: 1.15rem; }

@media (max-width: 759px) {
  .coming-soon { flex-direction: column; align-items: stretch; text-align: center; }
  .coming-soon__art { flex-basis: auto; }
  .coming-soon__text { padding: 0 20px 24px; }
}
