@charset "utf-8";
/* UniGames site: the UniGames brand (warm white, ink, logo orange, Nunito).
   The Ripples page keeps the game's own look (paper, ink outlines, Bitter Pro, word-tile colours) through the tokens set on its <main>. */
@font-face {
  font-family: "Bitter Pro";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/bitterpro-bold.woff") format("woff");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("fonts/nunito-latin-900.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/nunito-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/nunito-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/nunito-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/nunito-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* UniGames brand */
  --paper: #fffdf9;
  --paper-light: #ffffff;
  --paper-deep: #fff0e7;
  --ink: #202124;
  --ink-soft: #4d5056;
  --rule: #ead9ce;
  --line: #e2cfc2;
  --accent: #f27d42;
  --accent-hover: #f69462;
  --accent-soft: #ffe0d1;
  --rust: #a83f13;
  --rust-dark: #84300d;
  --check: #276a4b;
  --wrong: #9a3b2c;
  --focus: #202124;
  --desk: #1e2429;
  --desk-edge: #12171b;
  --display: "Nunito", system-ui, sans-serif;
  --display-weight: 900;
  --heading-tracking: -0.025em;
  --radius: 12px;
  --frame-border: 1px solid var(--line);
  --lift: 0 16px 40px rgba(54, 38, 24, 0.12);
  --lift-hover: 0 22px 50px rgba(54, 38, 24, 0.18);
  --lift-dark: 0 20px 50px rgba(0, 0, 0, 0.35);
  --button-fg: var(--ink);
  --button-bg: var(--accent);
  --button-border: var(--accent);
  --button-hover-bg: var(--accent-hover);
  --button-shadow: none;
  --button-press-shadow: none;
  --secondary-shadow: none;
  --secondary-press-shadow: none;
  /* Word-tile colours from Ripples, used by the puzzle */
  --person: #7ea6a1;
  --time: #c08b6a;
  --noun: #c6a45b;
  --verb: #b77f8f;
  --adjective: #a593b8;
  --symbol: #8f9bb3;
  --direction: #9aa66f;
  --shell: 72rem;
  --header-height: 4.5rem;
  --body: "Nunito", system-ui, sans-serif;
}

/* The Ripples page wears the game's look: paper, ink outlines, hard shadows, Bitter Pro and the detective's desk. */
body[data-route="ripples"] main {
  --paper: #f4eedf;
  --paper-light: #fbf8f0;
  --paper-deep: #e6dbc3;
  --ink: #2b2724;
  --ink-soft: #4d4741;
  --rule: #cdbf9f;
  --line: #2b2724;
  --rust: #a8472a;
  --rust-dark: #87361f;
  --check: #3f5e48;
  --focus: #2b2724;
  --desk: #3b2a20;
  --desk-edge: #24180f;
  --display: "Bitter Pro", Georgia, serif;
  --display-weight: 700;
  --heading-tracking: 0;
  --radius: 4px;
  --frame-border: 2px solid #2b2724;
  --lift: 6px 6px 0 #2b2724;
  --lift-hover: 4px 4px 0 #2b2724;
  --lift-dark: 6px 6px 0 #24180f;
  --button-fg: #fbf8f0;
  --button-bg: #2b2724;
  --button-border: #2b2724;
  --button-hover-bg: #3d3833;
  --button-shadow: 0 3px 0 #a8472a;
  --button-press-shadow: 0 1px 0 #a8472a;
  --secondary-shadow: 0 3px 0 #2b2724;
  --secondary-press-shadow: 0 1px 0 #2b2724;
  color: var(--ink);
  background: var(--paper);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  min-width: 18rem;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

body.menu-is-open {
  overflow: hidden;
}

img,
picture {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--rust);
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

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

::selection {
  background: var(--paper-deep);
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-weight: var(--display-weight);
  letter-spacing: var(--heading-tracking);
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  max-width: 20ch;
  margin-bottom: 1.25rem;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 1.1rem;
  font-size: clamp(1.8rem, 3.6vw, 2.75rem);
  line-height: 1.1;
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1rem;
}

.shell {
  width: min(calc(100% - 2.5rem), var(--shell));
  margin-inline: auto;
}

.nowrap {
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  z-index: 200;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.6rem 1rem;
  color: var(--paper-light);
  background: var(--ink);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Buttons and links */
.button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  color: var(--button-fg);
  background: var(--button-bg);
  border: 2px solid var(--button-border);
  border-radius: var(--radius);
  box-shadow: var(--button-shadow);
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.button:hover {
  color: var(--button-fg);
  background: var(--button-hover-bg);
  border-color: var(--button-hover-bg);
}

.button:active {
  box-shadow: var(--button-press-shadow);
  transform: translateY(2px);
}

.button-secondary {
  color: var(--ink);
  background: var(--paper-light);
  border-color: var(--ink);
  box-shadow: var(--secondary-shadow);
}

.button-secondary:hover {
  color: var(--ink);
  background: var(--paper-deep);
  border-color: var(--ink);
}

.button-secondary:active {
  box-shadow: var(--secondary-press-shadow);
}

.button-small {
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.95rem;
}

.text-link {
  font-weight: 700;
  text-decoration-color: var(--accent);
}

.text-button {
  padding: 0.5rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand img {
  width: 2.6rem;
  height: auto;
}

.brand-word {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
}

.brand-uni {
  color: var(--rust);
}

.desktop-nav {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.7rem;
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.language-switch {
  display: inline-flex;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}

.language-switch a {
  display: inline-grid;
  min-width: 2.4rem;
  min-height: 2.1rem;
  place-items: center;
  padding: 0.2rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.language-switch a[aria-current="true"] {
  color: var(--paper-light);
  background: var(--ink);
}

.menu-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
}

.menu-toggle span {
  width: 1.2rem;
  height: 2px;
  background: var(--ink);
  transition: transform 150ms ease, opacity 150ms ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(0.4rem) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-0.4rem) rotate(-45deg);
}

.mobile-nav .nav-link {
  padding-inline: 0;
}

.mobile-nav {
  border-top: 1px solid var(--line);
}

.mobile-nav-inner {
  display: grid;
  gap: 0.25rem;
  padding-block: 1rem 1.5rem;
}

.mobile-project-link {
  margin-top: 0.75rem;
}

/* Sections */
.page-intro {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) 1rem;
}

.page-intro:has(.page-intro-grid) {
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.page-intro-text {
  max-width: 40rem;
  font-size: 1.2rem;
}

.page-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.page-intro-art {
  aspect-ratio: 16 / 9;
  box-shadow: var(--lift);
}

.page-intro-art .project-picture,
.page-intro-art .project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



.page-intro-meta {
  color: var(--ink-soft);
  font-weight: 700;
}

.section {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.section + .section {
  border-top: 2px solid var(--rule);
}

/* The one dark surface, used where a game is shown: slate in the brand, the detective's desk on the Ripples page. */
.section-desk {
  color: var(--paper-light);
  background: var(--desk);
  border-block: 2px solid var(--desk-edge);
}

.section + .section-desk,
.section-desk + .section {
  border-top-color: var(--desk-edge);
}

.section-desk a:not(.button) {
  color: var(--paper-light);
}

.section-desk a:not(.button):hover {
  color: var(--paper-deep);
}

.section-desk .text-link {
  text-decoration-color: var(--accent);
}

.section-desk .framed {
  border-color: var(--desk-edge);
  box-shadow: var(--lift-dark);
}

.section-desk .note,
.section-desk .section-intro {
  color: var(--paper-deep);
}

.section-desk :focus-visible {
  outline-color: var(--paper-light);
}

.section-intro {
  max-width: 42rem;
  margin-bottom: 1.75rem;
}

.note {
  max-width: 42rem;
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 2rem;
}

.split-head > :last-child {
  margin-bottom: 0;
}

.split-aside {
  color: var(--ink-soft);
}

.split > h2,
.split > .split-head {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  align-self: start;
}

.split > div > :last-child,
.split > p:last-child {
  margin-bottom: 0;
}

.framed {
  display: block;
  overflow: hidden;
  background: var(--paper-deep);
  border: var(--frame-border);
  border-radius: var(--radius);
}

.project-picture {
  width: 100%;
  height: 100%;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Home */
.home-hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

/* The headline runs across the page; copy and the game art share the row below it. */
.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  grid-template-areas:
    "title title"
    "copy figure";
  align-items: start;
  gap: 1.5rem clamp(2rem, 5vw, 4rem);
}

.home-hero-grid h1 {
  grid-area: title;
  max-width: 24ch;
  margin-bottom: 0.5rem;
  font-size: clamp(2.4rem, 5vw, 4.25rem);
}

.home-hero-copy {
  grid-area: copy;
  padding-top: 0.25rem;
}

.home-hero-copy .page-intro-text {
  margin-bottom: 0;
}



.home-hero-copy .actions {
  margin-top: 1.25rem;
}

.home-hero-figure {
  grid-area: figure;
  margin: 0;
}

/* The Ripples screenshot keeps its original framing. */
.hero-lead {
  display: block;
  color: var(--ink);
}

.hero-lead .framed {
  aspect-ratio: 16 / 9;
  box-shadow: var(--lift);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.hero-lead:hover .framed {
  box-shadow: var(--lift-hover);
  transform: translate(-2px, -2px);
}

/* Who the games were made for: a quiet strip of partner names under the hero. */
.partners {
  padding-block: 1.5rem;
  border-block: 1px solid var(--rule);
}

.partners-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 2.5rem;
}

.partners-label {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.partners-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.partners + .section {
  border-top: 0;
}

.feature-label {
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.feature h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}


.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 3.5rem);
}

.feature-copy > :last-child {
  margin-bottom: 0;
}

.feature-figure {
  margin: 0;
}

.feature-figure .framed {
  aspect-ratio: 16 / 9;
  box-shadow: var(--lift);
}

.feature-figure figcaption,
.home-hero-figure figcaption {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* The desk band leads with the game screen, larger than the text beside it. */
.section-desk .feature {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
}

.section-desk .feature-media .framed {
  box-shadow: var(--lift-dark);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.section-head h2 {
  margin-bottom: 0;
}

.section-light {
  background: var(--paper-light);
}

.mini-work {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.mini-work-link {
  display: grid;
  gap: 0.3rem;
  text-decoration: none;
}

.mini-work-link .framed {
  transition: transform 120ms ease, box-shadow 120ms ease;
  margin-bottom: 0.6rem;
  aspect-ratio: 16 / 10;
}

.mini-work-link strong {
  font-family: var(--display);
  font-size: 1.35rem;
}

.mini-work-link:hover .framed {
  box-shadow: var(--lift-hover);
  transform: translate(-2px, -2px);
}

.mini-work-link:hover strong {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.mini-work-client,
.work-client {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
}

.home-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
}

.home-how > :last-child {
  margin-bottom: 0;
}

/* A case file: paper card with an ink outline and a hard shadow, like the deduction board. */
.case-card {
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--paper-light);
  border: var(--frame-border);
  border-left: 8px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--lift);
}

.case-card h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
}

.case-card .button {
  margin-top: 0.5rem;
}

.case-card-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem 3rem;
}

.case-card-wide p {
  max-width: 42rem;
  margin-bottom: 0;
}

.case-card-wide .button {
  margin-top: 0;
}

.closing-inner > * {
  max-width: 44rem;
}

/* Carousel */
.carousel {
  position: relative;
  width: 100%;
}

.carousel-track {
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
}

.js .carousel-track {
  scrollbar-width: none;
}

.js .carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

/* Slim controls sit on the image, bottom right, so every project card keeps the same shape. */
.carousel-controls {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: flex;
  align-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.carousel-controls button {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

.carousel-controls button:hover:not(:disabled) {
  background: var(--paper-deep);
}

.carousel-controls button:disabled {
  color: var(--rule);
  opacity: 1;
  cursor: default;
}

.carousel-status {
  min-width: 3rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* Work */
.work-list {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
}

.work-item {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.work-item .framed:not(.carousel-track) {
  aspect-ratio: 16 / 9;
}

.work-copy > :last-child {
  margin-bottom: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0 0 1.25rem;
  list-style: none;
}

.tag-list li {
  padding: 0.1rem 0.65rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.9rem;
}

/* Ripples */
.loop {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.loop-item {
  padding-top: 1rem;
  border-top: 4px solid var(--ink);
}

.loop-item:nth-child(1) {
  border-color: var(--noun);
}

.loop-item:nth-child(2) {
  border-color: var(--person);
}

.loop-item:nth-child(3) {
  border-color: var(--time);
}

.facts {
  margin: 0;
}

.facts > div {
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  margin: 0;
}

/* Puzzle */
.puzzle-board {
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(15rem, 0.8fr) minmax(0, 1.6fr);
  overflow: hidden;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--lift);
}

.puzzle-bank {
  padding: 1.25rem;
  background: #e9dcbc;
  border-right: 2px solid var(--ink);
}

.puzzle-case {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.puzzle-bank h3,
.puzzle-case h3 {
  font-size: 1.05rem;
}

/* Only small screens turn the bank into a collapsible tray. */
.puzzle-bank-toggle {
  display: none;
}

.puzzle-clues {
  padding: 0.9rem 1.1rem 0.4rem;
  margin-bottom: 1.5rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-left-width: 6px;
  border-radius: var(--radius);
}

.puzzle-clues summary {
  cursor: pointer;
  list-style: none;
}

.puzzle-clues summary::-webkit-details-marker {
  display: none;
}

.puzzle-clues summary h3 {
  display: inline;
}

.puzzle-clues summary::after {
  margin-left: 0.5rem;
  content: "▾";
}

.puzzle-clues:not([open]) summary::after {
  content: "▸";
}

.puzzle-clues:not([open]) {
  padding-bottom: 0.9rem;
}

.puzzle-clues ul {
  padding-left: 1.1rem;
  margin: 0;
}

.puzzle-clues li {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.puzzle-group + .puzzle-group {
  margin-top: 0.9rem;
}

.puzzle-group-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 0.9rem;
}

.puzzle-group-label::before {
  width: 0.7rem;
  height: 0.7rem;
  background: var(--cat);
  content: "";
}

.puzzle-chips {
  display: flex;
  min-height: 2.4rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

[data-category="person"] { --cat: var(--person); }
[data-category="time"] { --cat: var(--time); }
[data-category="noun"] { --cat: var(--noun); }
[data-category="verb"] { --cat: var(--verb); }
[data-category="adjective"] { --cat: var(--adjective); }
[data-category="symbol"] { --cat: var(--symbol); }
[data-category="direction"] { --cat: var(--direction); }

.puzzle-chip {
  min-width: 3rem;
  min-height: 2.3rem;
  padding: 0.15rem 0.7rem;
  background: var(--paper-light);
  border: 3px double var(--cat);
  border-radius: var(--radius);
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.2;
}

.puzzle-chip:hover {
  background: #fffdf7;
}

.puzzle-chip[aria-pressed="true"] {
  background: var(--cat);
  box-shadow: 0 1px 0 var(--ink);
  transform: translateY(2px);
}

.puzzle-line {
  margin-bottom: 0.9rem;
  font-size: 1.1rem;
  line-height: 2.6;
}

.puzzle-line.is-formula {
  font-family: var(--display);
  font-size: 1.3rem;
}

.puzzle-slot {
  display: inline-flex;
  min-width: 6.5rem;
  height: 2.3rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.3rem;
  margin: 0 0.15rem;
  vertical-align: middle;
  background: color-mix(in srgb, var(--cat) 22%, transparent);
  border: 2px dashed var(--ink-soft);
  border-radius: var(--radius);
  cursor: pointer;
}

.puzzle-slot.is-filled {
  min-width: 0;
  padding: 0;
  background: transparent;
  border-color: transparent;
}

.puzzle-slot .puzzle-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.nowrap .puzzle-slot {
  margin-right: 0;
}

.puzzle-slot.is-target {
  border-color: var(--ink);
  border-style: solid;
}

.puzzle-slot.is-correct .puzzle-chip {
  background: var(--cat);
  box-shadow: 0 0 0 2px var(--check);
}

.puzzle-slot.is-correct {
  cursor: default;
}

.puzzle-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.puzzle-actions .button {
  background: var(--check);
  border-color: var(--check);
  box-shadow: 0 3px 0 var(--ink);
}

.puzzle-status {
  min-height: 1.6rem;
  margin: 1rem 0 0;
  font-weight: 700;
}

.puzzle-status.is-solved {
  color: var(--check);
}

.puzzle-chip.is-bouncing {
  animation: bounce 420ms ease;
}

.puzzle-slot.is-stamped .puzzle-chip {
  animation: stamp 320ms ease;
}

@keyframes bounce {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-3deg); }
  40% { transform: translateX(6px) rotate(3deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@keyframes stamp {
  0% { transform: scale(1.25); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* How we work */
.make-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 1.75rem 0 0;
}

.make-list > div {
  padding-top: 1rem;
  border-top: 3px solid var(--ink);
}


.make-list dt {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 900;
}

.make-list dd {
  margin: 0.25rem 0 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 0;
  margin: 1.75rem 0 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  counter-increment: step;
}

/* The steps are joined by a dashed line, like the gaps on the deduction board. */
.steps li:not(:last-child)::after {
  position: absolute;
  top: 1.6rem;
  right: -1.5rem;
  left: 3.2rem;
  border-top: 2px dashed var(--line);
  content: "";
}

.steps li::before {
  position: relative;
  z-index: 1;
  display: grid;
  background: var(--paper-light);
  width: 3.2rem;
  height: 3.2rem;
  place-items: center;
  margin-bottom: 1rem;
  color: var(--rust-dark);
  background: var(--accent-soft);
  border: 0;
  border-radius: 50%;
  content: counter(step);
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
}


/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2.5rem 1.5rem;
}

.team-card {
  display: flex;
  flex-direction: column;
}

.team-links {
  margin-top: auto;
}

.team-photo {
  margin-bottom: 0.9rem;
  aspect-ratio: 1;
}

.team-picture,
.team-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The portraits were shot wide; zoom in on the person. */
.team-picture img {
  filter: sepia(0.12) saturate(0.95) brightness(1.12) contrast(1.03);
  transform: scale(1.5);
  transform-origin: 50% 62%;
}

.team-initials {
  display: grid;
  width: 100%;
  height: 100%;
  place-content: center;
  justify-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 800;
}

.team-initials img {
  width: 6rem;
  height: auto;
  opacity: 0.85;
}

.team-card h3 {
  margin-bottom: 0.1rem;
  font-size: 1.25rem;
}

.team-role {
  margin-bottom: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 700;
}

.team-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.92rem;
}

/* Contact and planner */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(15rem, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 3.5rem);
}

.contact-side h2 {
  font-size: 1.25rem;
}

.contact-side h2:not(:first-child) {
  margin-top: 2rem;
}

.contact-direct {
  margin: 0;
}

.contact-direct > div + div {
  margin-top: 1rem;
}

.contact-direct dt {
  font-weight: 700;
}

.contact-direct dd {
  margin: 0;
}

.planner-panel,
.planner-noscript {
  padding: clamp(1.25rem, 4vw, 2.25rem);
  background: var(--paper-light);
  border: var(--frame-border);
  border-radius: var(--radius);
  box-shadow: var(--lift);
}

html:not(.js) .planner-panel {
  display: none;
}

.planner-progress-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.planner-progress-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.planner-progress {
  height: 0.5rem;
  background: var(--paper-deep);
  border: 1px solid var(--ink);
}

.planner-progress span {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--accent);
  transition: width 200ms ease;
}

.planner-step {
  padding: 0;
  margin: 0;
  border: 0;
}

.planner-step legend {
  padding: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1.25;
}

.field-hint {
  margin: 0.4rem 0 1.25rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.planner-heading h2 {
  font-size: 1.35rem;
}

.planner-step {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.option-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
}

.option-card > span {
  height: 100%;
}

.option-card {
  position: relative;
  cursor: pointer;
}

.option-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.option-card > span {
  display: grid;
  min-height: 4.2rem;
  grid-template-columns: 1.2rem 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border: 2px solid #8a7e6c;
  border-radius: var(--radius);
  line-height: 1.35;
}

.option-card:hover > span {
  border-color: var(--ink);
}

.option-card i {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--ink-soft);
  border-radius: 50%;
}

.option-card input:checked + span {
  background: var(--paper);
  border-color: var(--ink);
}

.option-card input:checked + span i {
  background: var(--rust);
  border-color: var(--rust);
  box-shadow: inset 0 0 0 2px var(--paper-light);
}

.option-card input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.planner-step textarea {
  width: 100%;
  padding: 0.8rem;
  resize: vertical;
  background: var(--paper);
  border: 2px solid var(--rule);
  border-radius: var(--radius);
}

.planner-error {
  padding: 0.6rem 0.8rem;
  margin: 1rem 0 0;
  color: var(--wrong);
  border: 2px solid var(--wrong);
  border-radius: var(--radius);
  font-weight: 700;
}

.planner-controls,
.planner-review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.planner-controls [data-planner-next],
.planner-controls [data-planner-finish] {
  margin-left: auto;
}

.planner-step .planner-error {
  margin: 0 0 1rem;
}

.planner-review-actions .text-button {
  min-height: 2.75rem;
  padding-inline: 0;
  margin-left: auto;
}

.planner-review dl {
  margin: 1.25rem 0 0;
}

.planner-review dl > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--rule);
}

.planner-review dt {
  font-weight: 700;
}

.planner-review dd {
  margin: 0;
}

.copy-status {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  color: var(--check);
  font-weight: 700;
}

/* Footer */
.site-footer {
  padding-block: 2.5rem 1.5rem;
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.footer-intro p {
  max-width: 26rem;
  margin-top: 0.9rem;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}

.footer-column a {
  text-decoration: none;
}

.footer-column a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.footer-column h2 {
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.footer-bottom {
  margin-top: 2rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer-bottom p {
  margin: 0;
}

/* Error and redirect pages */
.error-main {
  width: min(calc(100% - 2.5rem), 40rem);
  margin: 0 auto;
  padding-block: clamp(3rem, 12vh, 7rem);
}

.error-main .brand {
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 62rem) {
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-desk .feature {
    grid-template-columns: minmax(0, 1fr);
  }

  .desktop-nav,
  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .split > h2,
  .split > .split-head {
    position: static;
  }

  .make-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hero-grid {
    grid-template-areas: "title" "copy" "figure";
  }

  .puzzle-chip {
    min-height: 2.75rem;
  }

  .puzzle-case {
    padding-bottom: 4.5rem;
  }

  .home-hero-grid,
  .page-intro-grid,
  .home-next,
  .feature,
  .work-item,
  .work-item:not(.is-lead),
  .contact-layout,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps li:nth-child(2n)::after {
    display: none;
  }

  /* The evidence becomes a tray pinned to the bottom of the screen, like the inventory bar in the game. */
  .puzzle-board {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .puzzle-case {
    order: 1;
  }

  .puzzle-bank {
    position: sticky;
    z-index: 5;
    bottom: 0;
    order: 2;
    padding: 0;
    border-top: 2px solid var(--ink);
    border-right: 0;
    box-shadow: 0 -4px 0 rgba(43, 39, 36, 0.18);
  }

  .puzzle-bank-body {
    max-height: 30vh;
    padding: 0 1rem 1rem;
    overflow-y: auto;
  }

  .puzzle-bank-title {
    padding: 1rem 1rem 0;
  }

  .js .puzzle-bank-title {
    display: none;
  }

  .js .puzzle-bank-toggle {
    display: flex;
    width: 100%;
    min-height: 3.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
  }

  .puzzle-bank-toggle-label {
    font-family: var(--display);
    font-weight: 700;
  }

  .puzzle-bank-toggle-label::after {
    display: inline-block;
    margin-left: 0.5rem;
    content: "▴";
    transition: transform 150ms ease;
  }

  .puzzle-bank-toggle[aria-expanded="true"] .puzzle-bank-toggle-label::after {
    transform: rotate(180deg);
  }

  .puzzle-bank-toggle-hint {
    color: var(--ink-soft);
    font-size: 0.92rem;
  }

  .puzzle-bank-toggle-hint .puzzle-chip {
    background: var(--cat);
    box-shadow: 0 1px 0 var(--ink);
    pointer-events: none;
  }

  .js .puzzle-bank:not(.is-open) .puzzle-bank-body {
    display: none;
  }

  .puzzle-group {
    display: grid;
    grid-template-columns: 8rem 1fr;
    align-items: start;
    gap: 0.5rem;
  }

  .puzzle-group-label {
    margin-top: 0.45rem;
  }
}

@media (max-width: 40rem) {
  /* One column: the dashed line runs down instead of across. */
  .steps li:not(:last-child)::after,
  .steps li:nth-child(2n):not(:last-child)::after {
    display: block;
    top: 3.2rem;
    right: auto;
    bottom: -1.5rem;
    left: 1.6rem;
    border-top: 0;
    border-left: 2px dashed var(--line);
  }

  .steps li {
    min-height: 3.2rem;
    padding-left: 4.25rem;
  }

  .steps li::before {
    position: absolute;
    top: 0;
    left: 0;
  }

  .home-hero-figure .framed {
    box-shadow: var(--lift);
  }

  /* On phones the carousel buttons sit under the image instead of covering it. */
  .carousel-controls {
    position: static;
    width: fit-content;
    margin: 0.6rem 0 0 auto;
    background: var(--paper-light);
    border: 1px solid var(--line);
    box-shadow: none;
  }

  .language-switch a {
    min-width: 2.75rem;
    min-height: 2.5rem;
  }

  .mini-work,
  .loop,
  .steps,
  .option-grid,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .puzzle-group {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }

  .puzzle-board {
    box-shadow: var(--lift);
  }

  .puzzle-line {
    font-size: 1rem;
  }

  .puzzle-slot {
    min-width: 5rem;
    height: 2.75rem;
  }

  .puzzle-case {
    padding-inline: 1rem;
  }

  .puzzle-line {
    margin-bottom: 0.5rem;
    line-height: 3;
  }

  .puzzle-slot {
    min-width: 4rem;
    margin: 0.1rem;
  }

  .actions .button {
    flex: 1 1 100%;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 1rem;
  }

  .footer-intro {
    grid-column: 1 / -1;
  }

  .footer-column a {
    padding-block: 0.45rem;
  }

  .mobile-nav .nav-link {
    padding-block: 0.6rem;
    font-family: var(--display);
    font-size: 1.25rem;
  }

  .team-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }

  .team-card {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    align-items: start;
    column-gap: 1rem;
  }

  .team-card > :not(.team-photo) {
    grid-column: 2;
  }

  .team-photo {
    grid-row: 1 / span 4;
    margin-bottom: 0;
  }

  .team-initials {
    gap: 0.25rem;
    font-size: 1.1rem;
  }

  .team-initials img {
    width: 3rem;
  }

  .case-card-wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-card-wide .button {
    width: 100%;
  }

  .planner-review dl > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .planner-controls [data-planner-next],
  .planner-controls [data-planner-finish] {
    margin-left: 0;
  }
}

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