/* Galactic Studios: studio shell (space) plus per-game card themes. */

@font-face {
  font-family: "Saira Extra Condensed";
  src: url("/fonts/saira-extra-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Saira Extra Condensed";
  src: url("/fonts/saira-extra-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --black: #000;
  --ink: #eeeae4;
  --muted: #a8a39d;
  --ring: #cdcdcd;
  --g1: #ffa52e;
  --g2: #f71c3d;
  --grad: linear-gradient(90deg, var(--g1), var(--g2));
  --display: "Saira Extra Condensed", "Arial Narrow", sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --focus: var(--g1);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #000;
  font-weight: 700;
  border-radius: 6px;
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: min(100%, var(--wrap));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(0 0 0 / 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgb(205 205 205 / 0.08);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-height: 44px;
}
.brand img {
  height: 46px;
  width: auto;
}
.brand span {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--ring);
}
.nav__links {
  display: flex;
  gap: clamp(8px, 2vw, 28px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 6px;
  text-decoration: none;
  font-weight: 500;
  color: var(--ink);
  background: var(--grad) no-repeat 6px calc(100% - 8px) / 0 2px;
  transition: background-size 0.25s ease;
}
.nav__links a:hover {
  background-size: calc(100% - 12px) 2px;
}
.nav__toggle {
  display: none;
}

@media (max-width: 720px) {
  .brand img {
    height: 40px;
  }
  .brand span {
    font-size: 1.4rem;
  }
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    background: transparent;
    color: var(--ink);
    border: 1px solid rgb(205 205 205 / 0.35);
    border-radius: 999px;
    font: 600 1rem var(--body);
    cursor: pointer;
  }
  .nav__toggle-bars {
    display: grid;
    gap: 4px;
  }
  .nav__toggle-bars i {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bars i:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bars i:nth-child(2) {
    opacity: 0;
  }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bars i:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
  .nav__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #000;
    border-bottom: 1px solid rgb(205 205 205 / 0.12);
    padding: 8px var(--gutter) 20px;
  }
  .js .nav__menu[hidden] {
    display: none;
  }
  .nav__links {
    flex-direction: column;
    gap: 0;
  }
  .nav__links a {
    width: 100%;
    min-height: 52px;
    font-family: var(--display);
    font-size: 1.9rem;
    font-weight: 600;
    border-bottom: 1px solid rgb(205 205 205 / 0.08);
    background-position: 6px calc(100% - 10px);
  }
}
@media (min-width: 721px) {
  .nav__menu[hidden] {
    display: block;
  }
}

/* ---------- Buttons (studio) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: 0;
  font: 700 1.05rem/1 var(--body);
  text-decoration: none;
  cursor: pointer;
}
.btn--studio {
  background: var(--grad);
  color: #000;
  box-shadow: 0 10px 40px -12px rgb(247 28 61 / 0.7);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.btn--studio:hover {
  box-shadow: 0 14px 50px -10px rgb(255 120 50 / 0.85);
  transform: translateY(-2px);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(92svh, 980px);
  display: grid;
  align-items: center;
  padding-block: clamp(56px, 10vh, 120px);
}
.hero__stars {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}
.hero__ring {
  position: absolute;
  z-index: -1;
  width: clamp(420px, 70vw, 1120px);
  aspect-ratio: 1;
  right: clamp(-300px, -10vw, -60px);
  top: 50%;
  mask-image: linear-gradient(180deg, #000 55%, transparent 92%);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 92%);
  translate: 0 -50%;
  border-radius: 50%;
  border: 3px solid rgb(205 205 205 / 0.55);
  background: radial-gradient(circle at 38% 62%, rgb(255 90 50 / 0.22), rgb(247 28 61 / 0.06) 38%, transparent 62%);
}
.hero__orbit {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  animation: orbit 90s linear infinite;
}
.hero__orbit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -11px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 24px rgb(255 110 50 / 0.8);
}
@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}
.hero__title {
  margin: 0;
  max-width: 13ch;
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3.6rem, 10.5vw, 10rem);
  line-height: 0.88;
  letter-spacing: 0.005em;
  color: var(--ink);
  /* a black halo cuts the ring where the words cross it, like the GS in the logo */
  -webkit-text-stroke: 0.14em #000;
  paint-order: stroke fill;
}
.hero__sub {
  margin: clamp(20px, 3vh, 32px) 0 clamp(28px, 4vh, 44px);
  max-width: 34ch;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink);
  text-shadow: 0 0 12px #000, 0 0 4px #000;
}

@media (max-width: 720px) {
  .hero {
    min-height: auto;
    padding-block: 72px 88px;
  }
  .hero__ring {
    width: 128vw;
    right: -74vw;
    top: 42%;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(72px, 11vw, 150px);
}
.section__title {
  margin: 0 0 clamp(28px, 4vw, 52px);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.8rem, 6.4vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
}

/* ---------- Games ---------- */

.games {
  padding-top: clamp(40px, 6vw, 80px);
}
.games__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: clamp(28px, 3vw, 44px);
  align-items: start;
}

.game {
  --bg: #111;
  --surface: #222;
  --accent: #fff;
  --accent-ink: #000;
  --secondary: #fff;
  --secondary-ink: #000;
  --text: #fff;
  --muted: #ccc;
  --line: #fff;
  --font: var(--display);
  --focus: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}
.game:hover {
  transform: translateY(-6px);
}
.game__art {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.game__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}
.game__art img.is-swapping {
  opacity: 0;
}
.game__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
  flex: 1;
}
.game__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}
.game__icon {
  width: 72px;
  height: 72px;
}
.game__platform {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}
.game__name {
  margin: 0;
  font-family: var(--font);
  font-weight: 700;
  line-height: 0.95;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
}
.game__badge {
  align-self: start;
  justify-self: end;
  padding: 6px 12px;
  background: var(--secondary);
  color: var(--secondary-ink);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  white-space: nowrap;
}
.game__hook {
  margin: 4px 0 0;
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  line-height: 1.15;
  color: var(--accent);
}
.game__desc {
  margin: 0;
  max-width: 58ch;
  color: var(--text);
}
.game__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
}
.gbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.gbtn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.gbtn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.gbtn--secondary {
  background: var(--surface);
  color: var(--text);
}

.ip {
  display: inline-flex;
  align-items: stretch;
  min-height: 48px;
}
.ip__value {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: var(--surface);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.ip__label {
  font-weight: 500;
  color: var(--muted);
  margin-right: 8px;
}

/* Lilies: plum, pink and gold, bevelled like its logo */
.game--bevel {
  border-radius: 12px;
  border: 1px solid rgb(255 61 182 / 0.4);
  box-shadow: 0 40px 90px -40px rgb(255 61 182 / 0.55), inset 0 1px 0 rgb(255 255 255 / 0.06);
  overflow: hidden;
}
.game--bevel:hover {
  box-shadow: 0 50px 110px -40px rgb(255 61 182 / 0.75), inset 0 1px 0 rgb(255 255 255 / 0.06);
}
.game--bevel .game__art {
  mask-image: linear-gradient(90deg, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent);
}
.game--bevel .game__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, var(--bg));
}
.game--bevel .game__head {
  margin-top: -64px;
  position: relative;
}
.game--bevel .game__icon {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 6px 20px rgb(255 61 182 / 0.5));
}
.game--bevel .game__name {
  color: #fff;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 0 var(--bg);
}
.game--bevel .game__badge {
  border-radius: 4px;
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.2), inset 0 1px 0 rgb(255 255 255 / 0.45);
}
.game--bevel .gbtn {
  border-radius: 8px;
}
.game--bevel .gbtn--primary {
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.22), inset 0 2px 0 rgb(255 255 255 / 0.35);
}
.game--bevel .gbtn--primary:hover {
  background: #ff66c6;
}
.game--bevel .gbtn--secondary {
  box-shadow: inset 0 0 0 1px rgb(255 61 182 / 0.45);
}
.game--bevel .gbtn--secondary:hover {
  box-shadow: inset 0 0 0 1px var(--accent);
  background: #2c1626;
}
.game--bevel .ip {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgb(255 181 46 / 0.55);
}
.game--bevel .ip .gbtn {
  border-radius: 0;
  background: var(--secondary);
  color: var(--secondary-ink);
}
.game--bevel .ip .gbtn:hover {
  background: #ffc75e;
}

/* Find a Gem: Toybox Dig, chunky outlines and bright gem colours */
.game--toy {
  border-radius: 32px;
  border: 4px solid var(--line);
  box-shadow: 0 10px 0 var(--line);
  background: linear-gradient(180deg, #a6e4ff 0%, var(--bg) 46%);
  font-family: "Fredoka", var(--body);
  font-weight: 500;
}
.game--toy:hover {
  box-shadow: 0 16px 0 var(--line);
}
.game--toy .game__art {
  margin: 14px 14px 0;
  border: 4px solid var(--line);
  border-radius: 22px;
}
.game--toy .game__icon {
  filter: drop-shadow(0 3px 0 var(--line));
}
.game--toy .game__platform {
  display: inline-block;
  padding: 2px 10px;
  margin-bottom: 6px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--line);
  font-size: 0.85rem;
}
.game--toy .game__name {
  color: #fff8e6;
  -webkit-text-stroke: 9px var(--line);
  paint-order: stroke fill;
  letter-spacing: 0.01em;
}
.game--toy .game__badge {
  border: 3px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 3px 0 var(--line);
}
.game--toy .game__hook {
  color: var(--line);
}
.game--toy .gbtn {
  border-radius: 999px;
  border: 3px solid var(--line);
  box-shadow: 0 5px 0 var(--line);
  font-weight: 600;
  font-size: 1.05rem;
}
.game--toy .gbtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--line);
}
.game--toy .gbtn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--line);
}
.game--toy .gbtn--secondary {
  background: #fff;
}
.game--toy .gbtn--primary:hover {
  background: #4be385;
}

.islands {
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.islands__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.islands button {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0;
  border: 3px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--line);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.islands button img {
  width: 100%;
  height: 100%;
  min-height: 42px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.islands button:hover {
  transform: translateY(-2px);
}
.islands button[aria-pressed="true"] {
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--line), 0 4px 0 3px var(--line);
}
.islands__caption {
  margin: 0 0 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- About ---------- */

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: start;
}
.about__lead {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.08;
  max-width: 26ch;
}
.about__text {
  margin: 20px 0 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.15rem;
}
.about__years {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.about__years li {
  display: grid;
  gap: 2px;
}
.about__years strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.about__years span {
  color: var(--muted);
}
@media (max-width: 860px) {
  .about__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Contact ---------- */

.contact {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgb(205 205 205 / 0.1);
}
.contact::before {
  content: "";
  position: absolute;
  width: clamp(360px, 50vw, 760px);
  aspect-ratio: 1;
  left: 50%;
  bottom: 0;
  translate: -50% 62%;
  border-radius: 50%;
  border: 2px solid rgb(205 205 205 / 0.28);
  background: radial-gradient(circle at 50% 30%, rgb(255 90 50 / 0.16), transparent 60%);
  pointer-events: none;
}
.contact__inner {
  position: relative;
  text-align: center;
}
.contact__invite {
  margin: 0 auto 28px;
  max-width: 44ch;
  color: var(--muted);
  font-size: 1.15rem;
}
.contact__mail {
  display: inline-block;
  max-width: 100%;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 7.4vw, 5.6rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 6px 4px 10px;
  border-bottom: 3px solid rgb(255 120 50 / 0.35);
  transition: border-color 0.25s ease;
}
.contact__mail:hover {
  border-color: var(--g2);
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid rgb(205 205 205 / 0.1);
  padding-block: 36px 44px;
  font-size: 0.95rem;
  color: var(--muted);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}
.footer__brand img {
  height: 34px;
  width: 34px;
}
.footer__links {
  display: flex;
  gap: 8px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-underline-offset: 4px;
}
.footer__disclaimer {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.875rem;
}

/* ---------- Legal and 404 ---------- */

.doc {
  padding-block: clamp(48px, 8vw, 110px);
}
.doc__inner {
  max-width: 72ch;
}
.doc h1 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: 0.95;
}
.doc h2 {
  margin: 2.2em 0 0.4em;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.1;
}
.doc p,
.doc li {
  color: #d7d2cb;
}
.doc ul {
  padding-left: 1.2em;
}
.doc a {
  color: #ffb45e;
  text-underline-offset: 3px;
}
.doc__meta {
  color: var(--muted);
  margin: 0 0 2em;
}

.lost {
  min-height: min(80svh, 820px);
}
.lost .hero__title {
  max-width: 12ch;
}

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }
  .hero__orbit {
    animation: none;
  }
  .game,
  .game:hover,
  .gbtn,
  .islands button,
  .btn--studio {
    transition: none;
    transform: none;
  }
  .game--toy .gbtn:hover,
  .game--toy .gbtn:active,
  .islands button:hover,
  .btn--studio:hover {
    transform: none;
  }
}

/* ---------- Phone ---------- */

@media (max-width: 520px) {
  .game__head {
    grid-template-columns: auto 1fr;
  }
  .game__badge {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }
  .game--bevel .game__head {
    margin-top: -48px;
  }
  .game__icon {
    width: 60px;
    height: 60px;
  }
  .game--bevel .game__icon {
    width: 76px;
    height: 76px;
  }
  .game__actions > * {
    flex: 1 1 auto;
  }
  .ip {
    width: 100%;
  }
  .ip__value {
    flex: 1;
  }
  .islands__list {
    gap: 8px;
  }
  .footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
