/* ==========================================================================
   Team Triad — shared styles
   Tokens mirror the "Triad" variable collection in the Figma file.
   ========================================================================== */

/* "PKMN Mystery Dungeon" by David Fens (FontStruct Non-Commercial License).
   It has no á í ó ú ñ ¿ ¡ · & /, so those fall back to Pixelify Sans. */
@font-face {
  font-family: "PKMN Mystery Dungeon";
  src: url("assets/fonts/pkmn-mystery-dungeon.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  /* Its glyphs are drawn small for their em box; scale up to the size the layout was designed for */
  size-adjust: 128%;
}

:root {
  /* Surfaces */
  --ink-950: #07081a;
  --ink-900: #0b0d22;
  --ink-800: #12152f;
  --ink-700: #1a1e40;

  /* Borders */
  --line: #2a2f5e;
  --line-strong: #454c8c;

  /* Text */
  --text: #f4f1e6;
  --text-muted: #a5aad0;
  --text-on-accent: #0b0d22;

  /* Brand (logo colours) */
  --blue: #2e8bff;
  --red: #ff4a5c;
  --green: #36d27f;

  /* Projects */
  --sp0: #b9a3ff;
  --s7: #ffc94a;

  /* Type */
  --font-display: "PKMN Mystery Dungeon", "Pixelify Sans", "Courier New", monospace;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Layout */
  --content: 1200px;
  --gutter: 16px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --press: 160ms;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* The pixel font has a single weight; don't let browsers fake bold on it */
  font-synthesis: none;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

.pixel {
  image-rendering: pixelated;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--text-on-accent);
  font-family: var(--font-display);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: calc(var(--content) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eyebrow, var(--green));
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  font-size: clamp(2.5rem, 6vw, 4rem);
  text-wrap: balance;
}

.heading {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  font-size: clamp(2rem, 4.2vw, 3rem);
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 62ch;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.wordmark .team {
  color: var(--blue);
}

.wordmark .triad {
  color: var(--red);
}

/* ---------- Buttons ---------- */

.btn {
  --accent: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  transition:
    transform var(--press) var(--ease-out),
    background-color 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--accent);
  color: var(--text-on-accent);
}

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

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent);
  }

  .btn--ghost:hover {
    border-color: var(--text-muted);
    background: var(--ink-700);
  }
}

.btn--sp0 {
  --accent: var(--sp0);
}

.btn--s7 {
  --accent: var(--s7);
}

.badge-beta,
.badge-full {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--s7);
  color: var(--text-on-accent);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
}

.badge-full {
  background: var(--sp0);
}

/* ---------- Language toggle ---------- */

/* One link that always goes to the other language; the knob marks the current one */
.lang-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 200ms ease,
    transform var(--press) var(--ease-out);
}

.lang-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--text);
  transition: transform 240ms var(--ease-out);
}

.lang-toggle[data-active="es"]::before {
  transform: translateX(100%);
}

.lang-opt {
  position: relative;
  min-width: 40px;
  padding: 4px 12px;
  color: var(--text-muted);
  font-family: "Pixelify Sans", "Courier New", monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  transition: color 240ms var(--ease-out);
}

.lang-toggle[data-active="en"] .lang-opt--en,
.lang-toggle[data-active="es"] .lang-opt--es {
  color: var(--text-on-accent);
}

.lang-toggle:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .lang-toggle:hover {
    border-color: var(--text-muted);
  }

  .lang-toggle[data-active="en"]:hover .lang-opt--es,
  .lang-toggle[data-active="es"]:hover .lang-opt--en {
    color: var(--text);
  }
}

/* ---------- Navigation ---------- */

.nav-list {
  display: flex;
  align-items: center;
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  position: relative;
  display: inline-block;
  padding-block: 6px 12px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 200ms ease;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 24px;
  height: 4px;
  background: var(--green);
  transform: translateX(-50%) scaleX(0);
  transition: transform 200ms var(--ease-out);
}

.nav-list a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.nav-list a[aria-current="page"]::after {
  transform: translateX(-50%) scaleX(1);
}

@media (hover: hover) and (pointer: fine) {
  .nav-list a:hover {
    color: var(--text);
  }
}

.nav-toggle {
  display: none;
  padding: 9px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--press) var(--ease-out);
}

.nav-toggle:active {
  transform: scale(0.97);
}

/* Six menu items only fit in one row from 1024px; below that they fold into the Menu button */
@media (max-width: 1023px) {
  .nav-toggle {
    display: inline-flex;
  }

  .hero .site-nav {
    top: 64px;
  }

  .page-header .hero-actions {
    margin-left: auto;
  }

  .hero-nav {
    padding-block: 0 28px;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: var(--gutter);
    left: var(--gutter);
    z-index: 20;
    padding: 8px;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--ink-800);
    box-shadow: 0 24px 48px rgb(3 4 16 / 0.6);
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.96) translateY(-4px);
    transition:
      opacity 180ms var(--ease-out),
      transform 180ms var(--ease-out),
      visibility 0s linear 180ms;
  }

  .site-nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity 180ms var(--ease-out),
      transform 180ms var(--ease-out);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list a {
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius-md);
  }

  .nav-list a::after {
    left: 16px;
    bottom: 8px;
    transform: scaleX(0);
    transform-origin: left;
  }

  .nav-list a[aria-current="page"] {
    background: var(--ink-700);
  }

  .nav-list a[aria-current="page"]::after {
    transform: scaleX(1);
  }
}

/* ---------- Home header / hero ---------- */

.hero {
  position: relative;
  padding-top: 20px;
  background:
    radial-gradient(60% 55% at 12% 0%, rgb(46 139 255 / 0.28), transparent 70%),
    radial-gradient(60% 55% at 88% 0%, rgb(255 74 92 / 0.24), transparent 70%),
    radial-gradient(40% 40% at 50% 12%, rgb(54 210 127 / 0.12), transparent 70%),
    var(--ink-950);
}

.hero-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 28px;
  text-decoration: none;
}

.hero-brand img {
  width: 132px;
}

.hero-brand .wordmark {
  font-size: 1.875rem;
}

.hero-nav {
  display: flex;
  justify-content: center;
  padding-block: 28px 48px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-projects {
  padding-bottom: 112px;
  background: var(--ink-950);
}

/* Desktop: tighter hero so the project covers sit higher. The tagline /
   language bar floats over the top edge instead of taking its own row. */
@media (min-width: 768px) {
  .hero > .container {
    position: relative;
  }

  .hero-bar {
    position: absolute;
    top: 0;
    right: var(--gutter);
    left: var(--gutter);
    pointer-events: none; /* let clicks reach the logo underneath */
  }

  .hero-bar > * {
    pointer-events: auto;
  }

  .hero-bar .hero-actions {
    margin-left: auto;
  }

  .hero {
    padding-top: 12px;
  }

  .hero-brand {
    gap: 2px;
    padding-top: 0;
  }

  .hero-brand img {
    width: 88px;
  }

  .hero-brand .wordmark {
    font-size: 1.5rem;
    line-height: 1.15;
  }

  .hero-nav {
    padding-block: 6px 14px;
  }

  .hero-nav .nav-list a {
    padding-block: 4px 10px;
  }

  /* Higher specificity than the base card rules defined further down */
  .hero-projects .project-card {
    gap: 14px;
    padding-top: 12px;
  }
}

/* Not enough room beside the centred logo for the tagline on small laptops/tablets */
@media (min-width: 768px) and (max-width: 1099px) {
  .hero-tagline {
    display: none;
  }
}

@media (max-width: 767px) {
  .hero-projects {
    padding-bottom: 64px;
  }

  .hero-tagline {
    display: none;
  }

  .hero-brand {
    padding-block: 20px 32px;
  }

  .hero-brand img {
    width: 110px;
  }

  .hero-brand .wordmark {
    font-size: 1.625rem;
  }

  .hero-nav {
    padding: 0;
  }
}

/* ---------- Project cards (home) ---------- */

.projects {
  display: grid;
  gap: 20px;
}

@media (min-width: 900px) {
  .projects {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

.project-card {
  --accent: var(--green);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 14px 14px 28px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--ink-800);
  box-shadow: 0 24px 60px rgb(3 5 20 / 0.55);
}

.project-card--sp0 {
  --accent: var(--sp0);
}

.project-card--s7 {
  --accent: var(--s7);
}

.project-card {
  transition:
    transform 320ms var(--ease-out),
    border-color 250ms ease,
    box-shadow 320ms var(--ease-out);
}

.cover-link {
  display: block;
  overflow: hidden;
  border-radius: 10px;
}

.project-card .cover {
  transition: transform 600ms var(--ease-out);
}

.project-card:focus-within {
  border-color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .project-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow:
      0 32px 72px rgb(3 5 20 / 0.6),
      0 0 48px color-mix(in srgb, var(--accent) 22%, transparent);
  }

  .project-card:hover .cover {
    transform: scale(1.03);
  }
}

.project-card .cover {
  width: 100%;
  aspect-ratio: 568 / 470;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding-inline: 14px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project-meta .num {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.project-meta .sep {
  width: 4px;
  height: 4px;
  background: var(--text-muted);
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
}

.project-desc {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

@media (max-width: 767px) {
  .project-card {
    gap: 16px;
    padding: 10px 10px 20px;
    border-radius: 14px;
  }

  .project-card .cover {
    aspect-ratio: 370 / 300;
    border-radius: var(--radius-sm);
  }

  .cover-link {
    border-radius: var(--radius-sm);
  }

  .project-body {
    padding-inline: 8px;
  }

  .project-meta .sep {
    display: none;
  }

  .project-actions .btn {
    flex: 1;
  }
}

/* ---------- Team teaser (home) ---------- */

.section {
  padding-block: 96px 56px;
}

.team-teaser {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 1000px) {
  .team-teaser {
    grid-template-columns: 1fr auto;
    gap: 80px;
  }
}

.team-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-copy .btn {
  align-self: flex-start;
  margin-top: 12px;
}

.member-badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 176px));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 12px;
  border: 2px solid var(--member);
  border-radius: 14px;
  background: var(--ink-800);
  text-align: center;
}

.member-badge img {
  width: 112px;
  aspect-ratio: 1;
  object-fit: contain;
}

.member-badge .name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--member);
}

.member-badge .role {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.member--blue {
  --member: var(--blue);
}

.member--red {
  --member: var(--red);
}

.member--green {
  --member: var(--green);
}

@media (max-width: 767px) {
  .section {
    padding-block: 56px 32px;
  }

  .member-badges {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .member-badge {
    padding: 14px 4px;
    border-radius: var(--radius-md);
  }

  .member-badge img {
    width: 64px;
  }

  .member-badge .name {
    font-size: 0.875rem;
  }

  .member-badge .role {
    display: none;
  }

  .team-copy .btn {
    align-self: stretch;
  }
}

/* ---------- Community CTA ---------- */

.cta {
  padding-block: 56px 120px;
}

.cta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: 48px 56px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(90deg, rgb(46 139 255 / 0.22), rgb(54 210 127 / 0.1) 50%, rgb(255 74 92 / 0.22)),
    var(--ink-800);
}

.cta-copy {
  display: flex;
  flex: 1 1 420px;
  flex-direction: column;
  gap: 12px;
}

.cta-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
}

.cta-copy p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

@media (max-width: 767px) {
  .cta {
    padding-block: 32px 64px;
  }

  .cta-panel {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }

  .cta-panel .btn {
    width: 100%;
  }
}

/* ---------- Inner page header ---------- */

.page-header {
  position: relative;
  border-bottom: 1.5px solid var(--line);
  background: var(--ink-950);
}

.page-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-brand img {
  width: 74px;
}

.header-brand .wordmark {
  font-size: 1.375rem;
}

@media (max-width: 767px) {
  .header-brand img {
    width: 56px;
  }

  .header-brand .wordmark {
    font-size: 1.125rem;
  }

  .page-header .hero-actions {
    margin-left: auto;
  }
}

/* ---------- Page intro ---------- */

.page-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-block: 96px 48px;
  background:
    radial-gradient(40% 90% at 20% 0%, rgb(54 210 127 / 0.14), transparent 70%),
    var(--ink-900);
}

@media (max-width: 767px) {
  .page-intro {
    padding-block: 56px 32px;
  }
}

/* ---------- Download cards ---------- */

.downloads {
  display: grid;
  gap: 28px;
  padding-bottom: 48px;
}

.download-card {
  --accent: var(--green);
  display: grid;
  gap: 24px 40px;
  align-items: center;
  padding: 16px;
  border: 2px solid var(--line-strong);
  border-radius: 18px;
  background: var(--ink-800);
  scroll-margin-top: 24px;
}

@media (min-width: 900px) {
  .download-card {
    grid-template-columns: 400px 1fr;
    padding-right: 40px;
  }
}

.download-card--sp0 {
  --accent: var(--sp0);
}

.download-card--s7 {
  --accent: var(--s7);
}

.download-card .cover {
  width: 100%;
  aspect-ratio: 400 / 310;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.download-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.download-body .num {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.download-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 2.8vw, 2.125rem);
  font-weight: 700;
  line-height: 1.1;
}

.download-body p {
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding-block: 8px;
}

.specs div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 16px;
  border-left: 1.5px solid var(--line);
}

.specs dt {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.specs dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 500;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}

@media (max-width: 899px) {
  .specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 16px;
  }

  .download-body {
    padding: 0 8px 8px;
  }
}

@media (max-width: 767px) {
  .download-actions .btn {
    flex: 1;
  }
}

/* ---------- Where to play ---------- */

.play {
  padding-block: 72px 56px;
}

.play-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.platforms {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .platforms {
    grid-template-columns: repeat(3, 1fr);
  }
}

.platform {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 32px 32px 36px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-800);
}

.platform .tag {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: var(--tag);
  color: var(--text-on-accent);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.platform h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
}

.platform p {
  color: var(--text-muted);
  font-size: 1.0625rem;
}

/* Emulator names link to their download pages, highlighted in the card's colour */
.platform {
  --emu: var(--green);
}

.platform:has(.tag--blue) {
  --emu: var(--blue);
}

.platform:has(.tag--red) {
  --emu: var(--red);
}

.emu-link {
  display: inline-block;
  padding: 0 6px;
  margin: 0 -2px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--emu);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
  transition:
    background-color 200ms ease,
    color 200ms ease;
}

.emu-link::after {
  content: " ↗";
  font-size: 0.6em;
  color: var(--emu);
  vertical-align: 0.4em;
}

@media (hover: hover) and (pointer: fine) {
  .emu-link:hover {
    background: var(--emu);
    color: var(--text-on-accent);
    text-decoration-color: transparent;
  }

  .emu-link:hover::after {
    color: var(--text-on-accent);
  }
}

.emu-sep {
  color: var(--text-muted);
}

.tag--blue {
  --tag: var(--blue);
}

.tag--red {
  --tag: var(--red);
}

.tag--green {
  --tag: var(--green);
}

.tag--sp0 {
  --tag: var(--sp0);
}

/* Patching instructions, below the emulators */
.patching {
  padding-bottom: 120px;
}

.patch-card {
  --emu: var(--sp0);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  max-width: 820px;
  padding: 32px 32px 36px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-800);
}

.patch-card .tag {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: var(--tag);
  color: var(--text-on-accent);
  font-family: var(--font-display);
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.patch-card p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.patch-card strong {
  color: var(--text);
  font-weight: 600;
}

.patch-card .emu-link {
  margin: 0;
  padding: 0 4px;
  font-weight: 600;
}

@media (max-width: 767px) {
  .play {
    padding-block: 48px 32px;
  }

  .patching {
    padding-bottom: 64px;
  }

  .patch-card {
    padding: 24px;
  }

  .platform {
    padding: 24px;
  }
}

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

.about-intro {
  padding-block: 96px;
  background:
    radial-gradient(45% 80% at 85% 50%, rgb(46 139 255 / 0.18), transparent 70%),
    var(--ink-950);
}

.about-intro .container {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1000px) {
  .about-intro .container {
    grid-template-columns: 1fr 460px;
    gap: 80px;
  }
}

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.logo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 40px 32px 36px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: var(--ink-800);
  text-align: center;
}

.logo-card img {
  width: min(300px, 100%);
}

.colour-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
}

.colour-key li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--member);
}

.colour-key li::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--member);
}

.logo-card figcaption {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.members-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.member-cards {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .member-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.member-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 28px 32px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-800);
}

.member-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.member-card img {
  width: 104px;
  aspect-ratio: 1;
  object-fit: contain;
}

.member-card .role {
  padding: 5px 12px;
  border: 1.5px solid var(--member);
  border-radius: 999px;
  color: var(--member);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.member-card h3 {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--member);
}

.member-card p {
  color: var(--text-muted);
}

.made {
  padding-block: 56px;
}

.made h2 {
  margin-bottom: 28px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
}

.made-list {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .made-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.made-link {
  --accent: var(--green);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px 12px 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--ink-800);
  text-decoration: none;
  transition:
    border-color 200ms ease,
    transform var(--press) var(--ease-out);
}

.made-link:active {
  transform: scale(0.99);
}

@media (hover: hover) and (pointer: fine) {
  .made-link:hover {
    border-color: var(--accent);
  }

  .made-link:hover .arrow {
    transform: translateX(4px);
  }
}

.made-link--sp0 {
  --accent: var(--sp0);
}

.made-link--s7 {
  --accent: var(--s7);
}

.made-link img {
  flex: none;
  width: 140px;
  aspect-ratio: 140 / 108;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.made-link .text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
}

.made-link .num {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.made-link .title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.15;
}

.made-link .arrow {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  transition: transform 200ms var(--ease-out);
}

@media (max-width: 767px) {
  .made-link img {
    width: 96px;
  }

  .made-link .title {
    font-size: 1.125rem;
  }
}

.thanks {
  padding-block: 56px 120px;
}

.thanks-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 64px;
  padding: 40px 48px;
  border: 2px dashed var(--line-strong);
  border-radius: 18px;
}

.thanks-copy {
  display: flex;
  flex: 1 1 420px;
  flex-direction: column;
  gap: 12px;
}

.thanks-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
}

.thanks-copy p:not(.eyebrow) {
  color: var(--text-muted);
  font-size: 1.0625rem;
}

@media (max-width: 767px) {
  .about-intro {
    padding-block: 56px;
  }

  .thanks {
    padding-block: 32px 64px;
  }

  .thanks-panel {
    padding: 28px 20px;
  }

  .thanks-panel .btn {
    width: 100%;
  }
}

/* ---------- Reviews ---------- */

.reviews {
  padding-bottom: 120px;
}

/* Cards run left to right in importance order: 3 columns on desktop, 2 on tablets, 1 on phones.
   main.js packs them masonry-style by giving each card a row span; without JS the rows simply align. */
.review-list {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  column-gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-list[data-masonry] {
  grid-auto-rows: 4px;
}

@media (min-width: 768px) {
  .review-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .review-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding: 24px 24px 26px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-800);
  transition: border-color 250ms ease;
}

.review-card::before {
  content: "\201C";
  height: 0.5em;
  font-family: var(--font-display);
  font-size: 2.75rem;
  line-height: 1;
  color: var(--s7);
}

@media (hover: hover) and (pointer: fine) {
  .review-card:hover {
    border-color: var(--line-strong);
  }
}


.review-quote {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* Redacted text: a black bar the length of what it hides, one line tall */
.redacted {
  display: inline-block;
  max-width: 100%;
  height: 1.05em;
  vertical-align: -0.15em;
  border-radius: 2px;
  background: #000;
}


@media (max-width: 767px) {
  .reviews {
    padding-bottom: 64px;
  }

  .review-list {
    column-gap: 14px;
  }

  .review-card {
    margin-bottom: 14px;
    padding: 20px;
  }
}
/* ---------- Gallery ---------- */

.gallery-section {
  padding-bottom: 72px;
}

.gallery-section--last {
  padding-bottom: 120px;
}

.gallery-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

.gallery-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
}

.gallery-head p {
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 479px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-subhead {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 40px 0 20px;
}

.gallery-head + .gallery-subhead,
.gallery-section .container > .gallery-subhead:first-child {
  margin-top: 0;
}

.gallery-subhead h2,
.gallery-subhead h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--sp0);
}

.gallery-subhead p {
  color: var(--text-muted);
}

.gallery-item,
.gallery-placeholder {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
}

/* Square tiles show each artwork whole (portrait tarot cards and wide scenes alike);
   thumbnails are pre-flattened onto --ink-800 so the letterbox blends in */
.gallery-item {
  aspect-ratio: 1;
  padding: 14px;
  border: 1.5px solid var(--line);
  background: var(--ink-800);
  cursor: zoom-in;
  transition:
    transform 320ms var(--ease-out),
    border-color 250ms ease,
    box-shadow 320ms var(--ease-out);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 500ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover {
    transform: translateY(-4px);
    border-color: var(--sp0);
    box-shadow:
      0 24px 48px rgb(3 5 20 / 0.55),
      0 0 32px color-mix(in srgb, var(--sp0) 18%, transparent);
  }

  .gallery-item:hover img {
    transform: scale(1.04);
  }
}

.gallery-item:active {
  transform: scale(0.98);
}

@media (max-width: 767px) {
  .gallery-item {
    padding: 8px;
  }
}

.gallery-placeholder {
  display: grid;
  place-items: center;
  border: 2px dashed var(--line);
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgb(42 47 94 / 0.25) 14px 15px),
    var(--ink-800);
}

.gallery-placeholder span {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 56px 16px 32px;
  border: 0;
  background: transparent;
  color: var(--text);
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgb(4 5 16 / 0.88);
  backdrop-filter: blur(6px);
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0;
  max-width: min(1200px, 100%);
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  border-radius: var(--radius-md);
  box-shadow: 0 32px 80px rgb(0 0 0 / 0.6);
}

.lightbox-caption {
  color: var(--text-muted);
  font-size: 0.9375rem;
  text-align: center;
}

.lightbox-btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--ink-800);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition:
    transform var(--press) var(--ease-out),
    border-color 200ms ease;
}

.lightbox-btn:active {
  transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
  .lightbox-btn:hover {
    border-color: var(--text-muted);
  }
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  margin-top: -24px;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox[data-single="true"] .lightbox-prev,
.lightbox[data-single="true"] .lightbox-next {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] .lightbox-figure {
    animation: lightbox-in 260ms var(--ease-out);
  }

  .lightbox[open]::backdrop {
    animation: backdrop-in 260ms ease;
  }

  @keyframes lightbox-in {
    from {
      opacity: 0;
      transform: scale(0.96);
    }
  }

  @keyframes backdrop-in {
    from {
      opacity: 0;
    }
  }
}

@media (max-width: 767px) {
  .gallery-section--last {
    padding-bottom: 64px;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 16px;
    margin-top: 0;
  }
}

/* Tablets: the menu drops down as a compact panel on the right */
@media (min-width: 768px) and (max-width: 1023px) {
  .site-nav {
    left: auto;
    width: 300px;
  }
}

/* Six menu items: tighten spacing on smaller desktops */
@media (min-width: 1024px) and (max-width: 1199px) {
  .nav-list {
    gap: 20px;
  }

  .nav-list a {
    font-size: 0.875rem;
  }
}

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

.site-footer {
  padding-block: 48px;
  border-top: 1.5px solid var(--line);
  background: var(--ink-950);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.footer-brand img {
  width: 66px;
}

.footer-brand .wordmark {
  font-size: 1.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover {
    color: var(--text);
  }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
  padding-top: 32px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.footer-bottom p:first-child {
  max-width: 760px;
}

/* ---------- Entrance motion ---------- */

/* Elements fade up as they scroll into view. Only hidden when JS is running
   (main.js adds .is-visible), so the content is never lost without it. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    transition:
      opacity 700ms var(--ease-out),
      transform 700ms var(--ease-out),
      filter 700ms var(--ease-out);
  }

  .js .reveal:not(.is-visible) {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(4px);
  }

  /* Failsafe: if main.js never runs, show the content anyway after 2s */
  .js:not([data-reveal-ready]) .reveal:not(.is-visible) {
    animation: reveal-failsafe 400ms ease 2s forwards;
  }

  @keyframes reveal-failsafe {
    to {
      opacity: 1;
      transform: none;
      filter: none;
    }
  }

  .js .reveal.is-visible {
    transition-delay: calc(var(--i, 0) * 80ms);
  }

  /* Covers settle in slightly after their card */
  .js .reveal .cover {
    transition: transform 900ms var(--ease-out);
  }

  .js .reveal:not(.is-visible) .cover {
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
