/* trmdev.com — cozy craft-desk look: paper, cardboard, tape, post-its. */

@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("../fonts/Fredoka-SemiBold.woff") format("woff"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url("../fonts/Fredoka-Bold.woff") format("woff"); }
@font-face { font-family: "Marker"; font-weight: 400; font-display: swap; src: url("../fonts/PermanentMarker-Regular.woff") format("woff"); }

:root {
  --desk: #e9dcc4;
  --paper: #fffaf0;
  --kraft: #c9a274;
  --kraft-dark: #a57d50;
  --ink: #3b2f2a;
  --ink-soft: #6b5a4e;
  --accent: #e8743b;
  --accent-dark: #c95a24;
  --blue: #3a6ea5;
  --postit: #ffe27a;
  --postit-pink: #ffb7c5;
  --postit-green: #bfe8a6;
  --tape: rgba(255, 244, 214, .75);
  --shadow: 0 2px 0 rgba(59, 47, 42, .08), 0 10px 24px -8px rgba(59, 47, 42, .28);
  --radius: 14px;
  --max: 1080px;
  --font-head: "Fredoka", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-hand: "Marker", "Comic Sans MS", cursive;
}

@media (prefers-color-scheme: dark) {
  :root {
    --desk: #2b241f;
    --paper: #3a312a;
    --kraft: #8a6a45;
    --kraft-dark: #6d5235;
    --ink: #f4ead9;
    --ink-soft: #cbbba6;
    --accent: #f08a52;
    --accent-dark: #f4a273;
    --blue: #8db7e6;
    --postit: #d9bd52;
    --postit-pink: #d993a2;
    --postit-green: #9cc585;
    --tape: rgba(255, 244, 214, .35);
    --shadow: 0 2px 0 rgba(0, 0, 0, .2), 0 12px 28px -8px rgba(0, 0, 0, .6);
  }
}

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

body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.6 var(--font-body);
  background-color: var(--desk);
  /* faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.23 0 0 0 0 0.18 0 0 0 0 0.16 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
h3 { font-size: 1.35rem; font-weight: 600; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* ---------- header ---------- */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Logo: C1 tape (assets/img/logo.svg). The SVG has ~14% padding for the shadow, pulled back with negative margins. */
.logo { display: inline-block; line-height: 0; margin: -14px -16px; transition: transform .2s; }
.logo:hover { transform: rotate(-1.5deg) scale(1.03); }
.logo img { height: 74px; width: auto; }
@media (max-width: 480px) { .logo img { height: 62px; } }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  font-family: var(--font-head); font-weight: 600;
  color: var(--ink); text-decoration: none;
  padding: 6px 14px; border-radius: 999px;
}
.nav a:hover { background: var(--paper); color: var(--accent-dark); }

/* ---------- hero ---------- */
.hero { padding: 40px 0 70px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.kicker {
  display: inline-block; font-family: var(--font-hand); color: var(--accent-dark);
  font-size: 1.2rem; transform: rotate(-1.5deg); margin-bottom: 8px;
}
.hero h1 .scribble { position: relative; white-space: nowrap; }
.hero h1 .scribble::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: .02em; height: .32em; z-index: -1;
  background: var(--postit); border-radius: 4px; transform: rotate(-1deg);
}
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 34ch; }
.hero h1 { position: relative; z-index: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  padding: 12px 22px; border-radius: 999px; text-decoration: none;
  background: var(--accent); color: #fffaf0;
  box-shadow: 0 4px 0 var(--accent-dark);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { color: #fffaf0; transform: translateY(-2px); box-shadow: 0 6px 0 var(--accent-dark); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ghost:hover { color: var(--accent-dark); box-shadow: inset 0 0 0 2px var(--accent-dark); transform: none; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

/* hero collage: cardboard sheet with a taped polaroid and post-its */
.collage { position: relative; aspect-ratio: 1 / 1; max-width: 420px; justify-self: center; width: 100%; }
.cardboard {
  position: absolute; inset: 6% 4% 4% 6%;
  background: repeating-linear-gradient(90deg, var(--kraft) 0 6px, var(--kraft-dark) 6px 7px);
  border-radius: 10px; transform: rotate(3deg); box-shadow: var(--shadow); opacity: .9;
}
.polaroid {
  position: absolute; left: 14%; top: 10%; width: 64%; margin: 0;
  background: var(--paper); padding: 10px 10px 42px; box-shadow: var(--shadow);
  transform: rotate(-4deg);
}
.polaroid img { border-radius: 4px; aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; }
.polaroid figcaption {
  position: absolute; left: 0; right: 0; bottom: 8px; text-align: center;
  font-family: var(--font-hand); font-size: 1.05rem; color: var(--ink-soft);
}
.tape {
  position: absolute; width: 90px; height: 26px; background: var(--tape);
  box-shadow: 0 1px 2px rgba(59, 47, 42, .12);
}
.polaroid .tape { top: -12px; left: 50%; margin-left: -45px; transform: rotate(3deg); }
.postit {
  position: absolute; padding: 14px 14px 18px; width: 44%;
  font-family: var(--font-hand); font-size: 1.05rem; line-height: 1.3; color: #3b2f2a;
  background: var(--postit); box-shadow: var(--shadow);
}
.collage .postit.a { right: 0; bottom: 8%; transform: rotate(6deg); }
.collage .postit.b { left: 0; bottom: 0; width: 34%; background: var(--postit-pink); transform: rotate(-7deg); }

/* ---------- sections ---------- */
section { padding: 60px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head p { margin: 0; color: var(--ink-soft); }

/* Games grid: add a new game by copying one <article class="game"> block. */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 28px; }
.games + .group { margin-top: 56px; }
.group { font-family: var(--font-hand); font-weight: 400; font-size: 1.4rem; color: var(--accent-dark); margin-bottom: 22px; transform: rotate(-1deg); }
.game {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; transition: transform .2s;
}
.game:nth-child(odd) { transform: rotate(-.6deg); }
.game:nth-child(even) { transform: rotate(.6deg); }
.game:hover { transform: rotate(0) translateY(-4px); }
.game .tape { top: -12px; left: 24px; transform: rotate(-4deg); }
.game-art { border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--kraft); margin-bottom: 16px; }
.game-art img { width: 100%; height: 100%; object-fit: cover; }
/* square app icon shown as a tile on cardboard instead of a wide screenshot */
.game-art.icon {
  display: grid; place-items: center;
  background: repeating-linear-gradient(90deg, var(--kraft) 0 6px, var(--kraft-dark) 6px 7px);
}
.game-art.icon img { width: 46%; height: auto; aspect-ratio: 1; border-radius: 22%; box-shadow: var(--shadow); }
.game h3 small { font-size: .7em; font-weight: 600; color: var(--ink-soft); }
.game-art { position: relative; }
.game-body { display: flex; flex-direction: column; flex: 1; }
/* a lone game gets a wide featured card instead of one narrow tile */
.games:has(> .game:only-child) { grid-template-columns: minmax(0, 900px); }
@media (min-width: 720px) {
  .game:only-child { flex-direction: row; gap: 32px; align-items: stretch; padding: 22px; }
  .game:only-child .game-art { flex: 0 0 42%; margin-bottom: 0; aspect-ratio: 1 / 1; }
  .game:only-child .game-body { justify-content: center; }
  .game:only-child h3 { font-size: 1.8rem; }
  .game:only-child .meta { margin-top: 8px; }
}
.game h3 { margin-bottom: .3em; }
.game-title { display: flex; align-items: center; gap: 12px; margin-bottom: .4em; }
.game-title img { width: 48px; height: 48px; border-radius: 22%; box-shadow: 0 2px 6px rgba(59, 47, 42, .25); }
.game-title h3 { margin: 0; }
.game .stores { margin-top: 14px; align-items: center; }
.small-link { font-size: .9rem; color: var(--ink-soft); margin-left: 4px; }
.game p { margin: 0 0 14px; color: var(--ink-soft); }
.game .meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.chip {
  font-family: var(--font-head); font-weight: 600; font-size: .85rem;
  padding: 3px 12px; border-radius: 999px;
  background: var(--desk); color: var(--ink);
}
.status {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  font-family: var(--font-hand); font-size: .95rem; color: #3b2f2a;
  background: var(--postit-green); padding: 4px 12px; transform: rotate(4deg);
  box-shadow: 0 2px 6px rgba(59, 47, 42, .25);
}
.status.soon { background: var(--postit); }

/* store badges row (filled in when a game launches) */
.stores { display: flex; gap: 10px; flex-wrap: wrap; }
.store {
  font-family: var(--font-head); font-weight: 600; font-size: .9rem; text-decoration: none;
  padding: 6px 14px; border-radius: 10px; background: var(--ink); color: var(--paper);
}
.store:hover { color: var(--postit); }

/* about */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.note-board { position: relative; min-height: 260px; }
.note-board .postit { position: relative; display: block; width: auto; max-width: 260px; margin-bottom: -10px; }
.note-board .postit:nth-child(1) { transform: rotate(-4deg); }
.note-board .postit:nth-child(2) { background: var(--postit-green); transform: rotate(3deg); margin-left: 70px; }
.note-board .postit:nth-child(3) { background: var(--postit-pink); transform: rotate(-2deg); margin-left: 20px; }
.about p { color: var(--ink-soft); }

/* contact */
.contact-card {
  position: relative; text-align: center;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 48px 24px; max-width: 680px; margin-inline: auto;
}
.contact-card .tape { top: -12px; left: 50%; margin-left: -45px; transform: rotate(-2deg); }
.contact-card p { color: var(--ink-soft); margin: 0 auto 24px; max-width: 46ch; }
.email { font-family: var(--font-hand); font-size: clamp(1.4rem, 4vw, 2rem); color: var(--accent-dark); text-decoration: none; }
.email:hover { text-decoration: underline; }
.socials { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.socials:empty { display: none; }

/* footer */
.site-footer { padding: 36px 0 48px; color: var(--ink-soft); font-size: .92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 2px dashed var(--kraft); padding-top: 24px; }
.site-footer a { color: var(--ink-soft); }

/* ---------- legal pages ---------- */
.doc {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 56px); margin: 10px auto 40px; max-width: 780px;
}
.doc h1 { font-size: clamp(2rem, 5vw, 2.6rem); }
.doc h2 { font-size: 1.4rem; margin-top: 1.8em; }
.doc .updated { color: var(--ink-soft); font-family: var(--font-hand); }
.doc li { margin-bottom: .4em; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .hero .wrap, .about { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding-top: 16px; }
  .collage { max-width: 340px; }
  .note-board { order: 2; }
}
@media (max-width: 480px) {
  .site-header .wrap { justify-content: center; }
  section { padding: 44px 0; }
}

/* ---------- brand page ---------- */
.brand-intro { max-width: 680px; padding: 10px 0 30px; }
.brand-intro p { color: var(--ink-soft); }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; margin-bottom: 40px; }
.brand-card { margin: 0; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.brand-preview { height: 200px; display: grid; place-items: center; padding: 18px; }
.brand-preview.light { background: #f7f3ec; }
.brand-preview.dark { background: #1f1b18; }
.brand-preview img { max-width: 100%; max-height: 164px; }
.brand-preview img.icon { max-height: 130px; }
.brand-preview.swatches { grid-template-columns: repeat(3, 1fr); place-items: stretch; padding: 0; }
.brand-preview.swatches span { display: grid; place-items: end center; padding-bottom: 12px; height: 100%; font: 600 .85rem var(--font-head); color: #fffaf0; }
.brand-card figcaption { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 18px; }
.brand-card h3 { margin: 0 auto 0 0; font-size: 1.1rem; }

/* ---------- game cards: whole card links to the game page ---------- */
.game-link { color: inherit; text-decoration: none; }
.game-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.game-link:hover { color: var(--accent-dark); }
.game .stores, .game .more { position: relative; z-index: 2; }
.game .more { display: inline-block; margin-top: 12px; font-family: var(--font-head); font-weight: 600; text-decoration: none; }
.game .stores + .more { margin-left: 0; }

/* ---------- game pages (generated by private/site/build.py) ---------- */
.game-hero { padding: 20px 0 50px; }
.game-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.back { display: inline-block; margin-bottom: 18px; font-family: var(--font-head); font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.back:hover { color: var(--accent-dark); }
.game-head { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.game-head img { width: 96px; height: 96px; border-radius: 22%; box-shadow: var(--shadow); }
.game-head h1 { margin: 6px 0 0; font-size: clamp(2rem, 5vw, 3rem); }
.game-head .status { position: static; display: inline-block; }
.game-hero .lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 40ch; }
.game-hero .stores { margin: 18px 0 14px; }
.game-hero .store { font-size: 1rem; padding: 10px 18px; }
.hero-shot { position: relative; margin: 0; background: var(--paper); padding: 10px; box-shadow: var(--shadow); transform: rotate(1.5deg); border-radius: 6px; }
.hero-shot img { border-radius: 4px; width: 100%; height: auto; }
.hero-shot .tape { top: -12px; left: 50%; margin-left: -45px; transform: rotate(-3deg); z-index: 1; }
.trailer { position: relative; display: block; }
.trailer .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-head); font-weight: 600; color: #fffaf0; background: rgba(31, 27, 24, .8);
  padding: 12px 22px; border-radius: 999px;
}
.trailer:hover .play { background: var(--accent); }

.shots { padding: 10px 0 40px; }
.shot-strip {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px 4px 18px; scrollbar-width: thin;
}
.shot {
  flex: 0 0 auto; padding: 0; border: 0; background: none; cursor: zoom-in; scroll-snap-align: start;
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s;
}
.shot:hover { transform: translateY(-3px); }
.shot img { height: min(420px, 62vh); width: auto; display: block; }

.game-content { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.game-text { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(22px, 4vw, 44px); }
.game-text p, .game-text li { color: var(--ink-soft); }
.game-text h2 { font-size: 1.5rem; margin-top: 1.4em; }
.game-text h2:first-child { margin-top: 0; }
.game-text li { margin-bottom: .45em; }
.game-text strong { color: var(--ink); }
.facts { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; position: sticky; top: 20px; }
.facts h3 { margin-bottom: 12px; }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: .95rem; }
.facts dt { font-family: var(--font-head); font-weight: 600; }
.facts dd { margin: 0; color: var(--ink-soft); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; overflow: visible; }
.lightbox::backdrop { background: rgba(20, 16, 14, .88); }
.lightbox img { max-height: 90vh; max-width: 92vw; border-radius: 14px; display: block; }
.lightbox button {
  position: fixed; border: 0; cursor: pointer; color: #fffaf0; background: rgba(255, 255, 255, .12);
  font: 600 2rem/1 var(--font-head); width: 52px; height: 52px; border-radius: 50%;
}
.lightbox button:hover { background: var(--accent); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (max-width: 820px) {
  .game-hero-grid, .game-content { grid-template-columns: 1fr; gap: 28px; }
  .facts { position: static; }
  .shot img { height: min(360px, 60vh); }
}
.trailer-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; background: #000; }
