/* Tradajay: a light table with each game's sheet laid on it in that game's own colours.
   The studio frame stays graphite and non-photo blue, like a rough under a clean line. */

@font-face {
  font-family: "Anybody";
  src: url("fonts/anybody.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Spline Sans Mono";
  src: url("fonts/spline-sans-mono.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --table: #e6e9ec;
  --ink: #16181d;
  --graphite: #535a66;
  --blue: #7db0dd;
  --pencil: #c8402a;
  --rule: rgba(22, 24, 29, 0.14);
  --mark-cut: #e6e9ec;

  --display: "Anybody", "Arial Black", sans-serif;
  --body: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --table: #111317;
    --ink: #eceef1;
    --graphite: #9aa1ac;
    --blue: #3f6d97;
    --pencil: #f0694c;
    --rule: rgba(236, 238, 241, 0.16);
    --mark-cut: #111317;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --table: #111317;
  --ink: #eceef1;
  --graphite: #9aa1ac;
  --blue: #3f6d97;
  --pencil: #f0694c;
  --rule: rgba(236, 238, 241, 0.16);
  --mark-cut: #111317;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--table);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }

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

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--table);
  border-radius: 6px;
  z-index: 10;
  text-decoration: none;
}
.skip:focus { top: 8px; }

/* ---------- top bar ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
}
.mark { display: inline-flex; color: var(--ink); }
.top nav { display: flex; gap: clamp(14px, 3vw, 28px); }
.top nav a {
  font: 500 0.8125rem/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--graphite);
  padding: 6px 0;
}
.top nav a:hover { color: var(--ink); }

/* ---------- hero: the boiling wordmark ---------- */

.hero { padding-top: clamp(28px, 7vw, 88px); }

.wordmark {
  position: relative;
  margin: 0 0 0 -0.04em;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 150%;
  font-size: min(11.6vw, 9.3rem); /* the word is ~7.7em wide at this stretch */
  line-height: 0.9;
  letter-spacing: -0.015em;
  padding-bottom: 0.12em; /* room for the j and y */
}
.wordmark .ink {
  position: relative;
  display: block;
  color: var(--ink);
  filter: url(#boil-ink);
}
.wordmark .rough {
  position: absolute;
  inset: 0;
  color: transparent;
  -webkit-text-stroke: 2px var(--blue);
  transform: translate(-0.035em, 0.05em) rotate(-0.8deg);
  filter: url(#boil-rough);
  pointer-events: none;
  user-select: none;
}

.hero-foot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: clamp(18px, 3vw, 36px);
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
@media (min-width: 900px) {
  .hero-foot { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; }
}

.lede {
  font-size: clamp(1.25rem, 2.3vw, 1.6rem);
  line-height: 1.32;
  font-weight: 500;
  max-width: 24ch;
  text-wrap: balance;
}

.index { list-style: none; margin: 0; padding: 0; }
.index li + li { border-top: 1px dashed var(--rule); }
.index a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  text-decoration: none;
}
.index img { border-radius: 10px; }
.index-name {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 115%;
  font-size: 1.2rem;
  line-height: 1.1;
}
.index-status {
  font: 500 0.75rem/1.2 var(--mono);
  color: var(--graphite);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: right;
}
.index a:hover .index-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
@media (max-width: 480px) {
  .index a { grid-template-columns: 40px 1fr; row-gap: 2px; }
  .index img { grid-row: span 2; width: 40px; height: 40px; }
  .index-status { text-align: left; }
}

/* ---------- shelves and game sheets ---------- */

.games { padding-top: clamp(48px, 8vw, 96px); }

.shelf {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font: 500 0.8125rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
}
.shelf::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--blue);
}
.game + .shelf { margin-top: clamp(48px, 7vw, 80px); }

.game {
  --g-bg: #fff;
  --g-ink: #111;
  --g-muted: #555;
  --g-accent: #111;
  --g-accent-ink: #fff;
  --g-rule: rgba(0, 0, 0, 0.14);
  background: var(--g-bg);
  color: var(--g-ink);
  border-radius: var(--radius);
  padding: clamp(18px, 3.4vw, 44px);
  box-shadow: 0 0 0 1px var(--g-edge, transparent), 0 1px 0 rgba(0, 0, 0, 0.05), 0 22px 44px -30px rgba(10, 14, 20, 0.55);
}
/* Night-coloured sheets need an edge to sit on a dark table. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .game { --g-edge: rgba(255, 255, 255, 0.09); }
}
:root[data-theme="dark"] .game { --g-edge: rgba(255, 255, 255, 0.09); }
.game + .game { margin-top: clamp(20px, 3vw, 32px); }

/* Flippr: the cream of its drawing panel and the orange of its toolbar. */
.game--flippr {
  --g-bg: #fff0d4;
  --g-ink: #2a1606;
  --g-muted: #6d4a2c;
  --g-accent: #ff6a00;
  --g-accent-ink: #1d0c00;
  --g-title: #d84f00;
  --g-rule: rgba(42, 22, 6, 0.16);
}
/* Hometown Casino: Main Street after dark, marquee gold. */
.game--hometown {
  --g-bg: #150e13;
  --g-ink: #f0e4cf;
  --g-muted: #bba88a;
  --g-accent: #e6b45c;
  --g-accent-ink: #1b1007;
  --g-title: #e9bd6a;
  --g-rule: rgba(240, 228, 207, 0.16);
  background-image: linear-gradient(180deg, #1d1118 0%, #150e13 55%);
}
/* Bombsite Manager: the team house walls, the teal trim, the sticker red. */
.game--bombsite {
  --g-bg: #161b24;
  --g-ink: #e6edf3;
  --g-muted: #98a6b7;
  --g-accent: #2db6dc;
  --g-accent-ink: #061820;
  --g-title: #ff4b4f;
  --g-rule: rgba(230, 237, 243, 0.14);
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
}
@media (min-width: 960px) {
  .game-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .game--hometown .game-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
/* On narrow screens the art leads every sheet. */
@media (max-width: 959px) {
  .game--hometown .cover { order: -1; }
}

.cover { margin: 0; }
.cover img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--g-rule);
}
.game--hometown .cover img { image-rendering: pixelated; }

.game-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.game-icon { border-radius: 14px; flex: none; }
.game-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 850;
  font-stretch: 120%;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--g-title);
}
.game-meta {
  margin-top: 8px;
  font: 500 0.75rem/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--g-muted);
}

.pitch { font-size: 1.0625rem; max-width: 52ch; }

.features {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.96875rem;
  line-height: 1.45;
}
.features li {
  position: relative;
  padding: 7px 0 7px 22px;
  border-top: 1px solid var(--g-rule);
}
.features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.95em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--g-accent);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}
.stats div {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 106, 0, 0.12);
}
.stats dt {
  font: 500 0.6875rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g-muted);
}
.stats dd {
  margin: 6px 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 110%;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stats-note {
  margin-top: 8px;
  font: 400 0.75rem/1.3 var(--mono);
  color: var(--g-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 22px;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--g-accent);
  color: var(--g-accent-ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}
.button:hover { filter: brightness(1.06); }
.button:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18); }
.quiet-link {
  color: var(--g-muted);
  text-underline-offset: 4px;
}
.quiet-link:hover { color: var(--g-ink); }

/* Screenshot strip under the in-development sheets. */
.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 18px);
  margin: clamp(20px, 3vw, 36px) 0 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 640px) {
  .shots {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * clamp(18px, 3.4vw, 44px));
    padding-inline: clamp(18px, 3.4vw, 44px);
    padding-bottom: 6px;
    scrollbar-width: thin;
  }
  .shots li { scroll-snap-align: start; }
}
.shots a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--g-rule);
  cursor: zoom-in;
}
.shots img { width: 100%; transition: transform 0.35s ease; }
.shots a:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .shots img { transition: none; } .shots a:hover img { transform: none; } }

/* ---------- studio + contact ---------- */

.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-top: clamp(56px, 9vw, 112px);
}
@media (min-width: 900px) {
  .about { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; }
}
.about-block p { max-width: 58ch; }
.about-block p + p { margin-top: 10px; }

.email {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}
.email a {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 100%;
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  line-height: 1.15;
  white-space: nowrap;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}
.email a:hover { text-decoration-color: var(--pencil); }
.copy {
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
}
.copy:hover { color: var(--ink); border-color: var(--graphite); }

/* ---------- footer ---------- */

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: 18px;
  padding-bottom: 32px;
  border-top: 1px solid var(--rule);
  font: 400 0.8125rem/1.4 var(--mono);
  color: var(--graphite);
}
.foot a { text-underline-offset: 3px; }

/* ---------- screenshot viewer ---------- */

.viewer {
  width: min(1280px, 100vw - 32px);
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #0d0f12;
  color: #e9ecef;
  overflow: hidden;
}
.viewer::backdrop { background: rgba(8, 10, 12, 0.82); }
.viewer figure { margin: 0; }
.viewer img {
  width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  background: #000;
}
.viewer figcaption { padding: 14px 18px 0; font-size: 0.9375rem; }
.viewer-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px 14px;
}
.viewer-bar button {
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e9ecef;
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
}
.viewer-bar button:hover { background: rgba(255, 255, 255, 0.16); }
.viewer-close { margin-left: 8px; }
