/* Giant Digital Games. Source stylesheet: tools/build.py copies it to /assets/css/site.<hash>.css */

@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/chakra-petch-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/chakra-petch-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Monoton";
  src: url("/assets/fonts/monoton.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: block;
}

:root {
  --ink: #07040c;         /* brand near-black */
  --ink-2: #110b18;       /* raised panel */
  --ink-3: #1c1426;       /* lines, wells */
  --text: #f3eef7;
  --muted: #cfc6d8;       /* brand secondary text */
  --dim: #9a8fa8;
  --red: #d94044;         /* brand accent */
  --red-hi: #ff5a5f;      /* red on dark when it carries small text */
  --ttk-pink: #ff2e88;
  --ttk-yellow: #ffe600;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --display: "Chakra Petch", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --chamfer: 18px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: .01em; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--ttk-yellow); outline-offset: 3px; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ttk-yellow); color: var(--ink); padding: .5rem 1rem; font-weight: 600;
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ------------------------------------------------------------- brand lockup */
/* Matches the owner-approved card: white logo with a soft red glow, "GAMES" in a plain
   semibold sans, brand red, letter-spaced .62em, centred under the logo. */
.lockup {
  display: inline-flex; flex-direction: column; align-items: center;
  text-decoration: none; width: 190px; gap: .5em;
}
.lockup__logo {
  width: 100%;
  filter: drop-shadow(0 0 6px rgba(217, 64, 68, .55)) drop-shadow(0 0 14px rgba(217, 64, 68, .25));
}
.lockup__games {
  font: 600 11.5px/1 var(--sans);
  color: var(--red);
  letter-spacing: .62em;
  margin-right: -.62em; /* trailing tracking would push the word off-centre */
}
.lockup--small { width: 160px; }
.lockup--small .lockup__games { font-size: 9.5px; }

/* ------------------------------------------------------------- header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px 24px;
  padding: 18px var(--gutter);
  max-width: 1600px; margin: 0 auto;
}
.site-nav { display: flex; gap: 4px 22px; flex-wrap: wrap; }
.site-nav a {
  font: 500 1rem/1 var(--display); text-decoration: none; color: var(--muted);
  padding: 10px 2px; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--text); border-bottom-color: var(--red); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--red); }
@media (max-width: 560px) {
  .site-header { justify-content: center; padding-top: 14px; padding-bottom: 6px; }
  .site-nav { justify-content: center; gap: 4px 20px; }
  .lockup { width: 170px; }
}

/* ------------------------------------------------------------- Time to Kill logo */
.ttk-logo {
  margin: 0; font-family: "Monoton", var(--display); font-weight: 400;
  display: flex; flex-direction: column; align-items: center;
  line-height: .98; letter-spacing: .02em; text-align: center;
}
.ttk-logo__top {
  color: var(--ttk-yellow);
  text-shadow: .045em .045em 0 #ff7a1a, 0 0 .22em rgba(255, 230, 0, .55);
}
.ttk-logo__bottom {
  color: var(--ttk-pink);
  text-shadow: .045em .045em 0 #7b2cff, 0 0 .22em rgba(255, 46, 136, .6);
}
.ttk-logo img { width: 100%; height: auto; }

/* ------------------------------------------------------------- flagship (home hero) */
.flagship { max-width: 1600px; margin: 0 auto; }
.flagship__art { position: relative; overflow: hidden; background: #000; }
.flagship__frame { position: relative; container-type: inline-size; }
.flagship__img { width: 100%; }
/* Phones: show the middle two thirds of the cover, so the title panel is big enough to read. */
@media (max-width: 599px) {
  .flagship__frame { width: 150%; margin-left: -25%; }
}
/* The cover art leaves a black panel in its centre for the title. Sized in container units,
   so the logo sits in that panel at every width. */
.flagship__logo {
  position: absolute; left: 49.6%; top: 49.5%; transform: translate(-50%, -50%);
  font-size: 5.6cqw; width: 30cqw;
}
.flagship__logo .ttk-logo { font-size: 1em; }
@media (prefers-reduced-motion: no-preference) {
  .flagship__logo .ttk-logo__top { animation: neon-on 1.1s steps(1, end) .25s both; }
  .flagship__logo .ttk-logo__bottom { animation: neon-on 1.1s steps(1, end) .55s both; }
}
@keyframes neon-on {
  0% { opacity: 0; } 12% { opacity: 1; } 18% { opacity: .15; } 26% { opacity: 1; }
  34% { opacity: .35; } 40%, 100% { opacity: 1; }
}

.flagship__panel {
  display: grid; gap: 6px 48px; align-items: center;
  padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(40px, 6vw, 72px);
  background:
    linear-gradient(180deg, rgba(255, 46, 136, .16), transparent 70%),
    var(--ink);
  border-top: 4px solid var(--ttk-pink);
}
.flagship__tagline {
  font: 700 clamp(1.9rem, 6.4vw, 4rem)/1 var(--display);
  color: var(--ttk-yellow); margin: 6px 0 10px; text-wrap: balance;
  text-shadow: .05em .05em 0 #ff7a1a;
}
.flagship__pitch { color: var(--muted); font-size: 1.125rem; max-width: 46ch; }
.flagship__actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin: 8px 0 12px; }
.flagship__note { color: var(--dim); font-size: .95rem; margin: 0; }
@media (min-width: 960px) {
  .flagship__panel { grid-template-columns: 1.15fr 1fr; grid-template-rows: auto auto auto; }
  .flagship__panel .status { grid-column: 1; }
  .flagship__tagline { grid-column: 1; grid-row: 2 / span 2; align-self: start; }
  .flagship__pitch { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0; }
  .flagship__actions { grid-column: 2; grid-row: 3; }
  .flagship__note { grid-column: 2; grid-row: 4; }
}

/* the big button: the game's own START button, skewed and loud */
.btn-play {
  display: inline-block; text-decoration: none;
  font: 700 clamp(1.35rem, 3.4vw, 1.75rem)/1 var(--display);
  color: #fff; background: var(--ttk-pink);
  padding: .8em 1.5em; transform: skewX(-10deg);
  box-shadow: 6px 6px 0 #000, 6px 6px 0 2px var(--ttk-yellow);
  letter-spacing: .02em;
}
.btn-play:hover { background: #ff4a9a; box-shadow: 8px 8px 0 #000, 8px 8px 0 2px var(--ttk-yellow); }
.btn-play:active { transform: skewX(-10deg) translate(3px, 3px); box-shadow: 3px 3px 0 #000; }
.btn-play:focus-visible { outline-offset: 6px; }

.btn-quiet {
  display: inline-block; font: 500 1.05rem/1 var(--display); color: var(--text);
  text-decoration: none; padding: .85em .2em; border-bottom: 2px solid var(--red);
}
.btn-quiet:hover { color: #fff; border-bottom-color: var(--text); }

.status {
  display: inline-block; justify-self: start; width: max-content;
  font: 500 .95rem/1 var(--display); color: var(--muted);
  padding: .45em .8em; border: 1px solid var(--ink-3); background: var(--ink-2);
}
.status--out { color: var(--ink); background: var(--ttk-yellow); border-color: var(--ttk-yellow); }

/* ------------------------------------------------------------- games grid */
.games, .studio { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--gutter) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(2rem, 6vw, 3.4rem); }
.section-head p { color: var(--muted); margin: 0; max-width: 44ch; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 24px; grid-template-columns: 1fr; }
.grid + .grid { margin-top: 28px; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grid:not(.grid--featured) { grid-template-columns: repeat(3, 1fr); } }

.card { position: relative; }
.card__link { display: block; text-decoration: none; height: 100%; }
.card__media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-2);
  clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)),
                     calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer));
}
.card__media::after { /* each game's own colour, as a bar along the top edge */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--accent);
}
.card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card__img.is-pixel { image-rendering: pixelated; }
.card__link:hover .card__img { transform: scale(1.03); }
.card__body { padding: 14px 2px 0; }
.card__title { font-size: 1.45rem; margin-bottom: 6px; }
.card__link:hover .card__title { color: var(--accent); }
.card__pitch { color: var(--muted); margin: 0 0 8px; font-size: 1rem; }
.card__meta { color: var(--dim); font-size: .9rem; margin: 0; }
.card--featured .card__title { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.card--featured .card__pitch { font-size: 1.1rem; }

.card__type, .game-hero__type {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 8%;
  background:
    repeating-linear-gradient(-58deg, transparent 0 22px, rgba(255, 255, 255, .025) 22px 23px),
    radial-gradient(120% 90% at 20% 110%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 60%),
    #0d0810;
}
.card__type { container-type: inline-size; }
.card__type span, .game-hero__type span {
  font: 700 min(3rem, 12cqw)/.92 var(--display); text-transform: uppercase;
  color: var(--accent); text-align: center; letter-spacing: .02em;
  text-shadow: 3px 3px 0 #000;
}

/* ------------------------------------------------------------- studio */
.studio { display: grid; gap: 24px 48px; align-items: start; }
@media (min-width: 760px) { .studio { grid-template-columns: 140px 1fr; } }
.studio__mark { width: 96px; height: 96px; filter: drop-shadow(0 0 18px rgba(217, 64, 68, .35)); }
@media (min-width: 760px) { .studio__mark { width: 140px; height: 140px; } }
.studio h2 { font-size: clamp(2rem, 6vw, 3.4rem); margin-bottom: 18px; }
.studio__text p { color: var(--muted); max-width: 62ch; font-size: 1.125rem; }

/* ------------------------------------------------------------- footer */
.site-footer {
  max-width: var(--max); margin: clamp(56px, 9vw, 112px) auto 0;
  padding: 40px var(--gutter) 48px; border-top: 1px solid var(--ink-3);
  display: grid; gap: 24px 48px; align-items: start;
}
@media (min-width: 760px) { .site-footer { grid-template-columns: auto 1fr; } }
.footer__h { font-size: 1.25rem; margin-bottom: 8px; }
.footer__contact p { color: var(--muted); margin: 0; }
.footer__contact a { color: var(--text); text-decoration-color: var(--red); text-underline-offset: 3px; overflow-wrap: anywhere; }
.footer__legal { grid-column: 1 / -1; color: var(--dim); font-size: .875rem; margin: 0; }

/* ------------------------------------------------------------- game page */
.game-hero { max-width: 1600px; margin: 0 auto; }
.game-hero__media { position: relative; background: #000; }
.game-hero__img { width: 100%; max-height: 74vh; object-fit: cover; }
.game-hero--ttk .game-hero__text > .game-tagline:first-child { margin-top: 0; font-size: clamp(1.6rem, 4.6vw, 2.8rem); text-shadow: .05em .05em 0 #ff7a1a; }
.game-hero__img.is-pixel, .shot__img.is-pixel { image-rendering: pixelated; }
.game-hero__type { aspect-ratio: 16 / 7; }
@media (min-width: 760px) { .game-hero__type { aspect-ratio: 16 / 5; } }
.game-hero__type span { font-size: clamp(2.4rem, 9vw, 7rem); }
.game-hero__cap {
  position: absolute; right: 12px; bottom: 10px; margin: 0; font-size: .8rem; color: #fff;
  background: rgba(7, 4, 12, .72); padding: 3px 8px;
}
.game-hero__text {
  max-width: var(--max); margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--gutter) 0;
}
.game-title { font-size: clamp(2.5rem, 8.5vw, 5.6rem); text-transform: uppercase; }
.game-title::after {
  content: ""; display: block; width: 96px; height: 6px; background: var(--accent); margin-top: 18px;
}
.game-tagline { font: 700 clamp(1.2rem, 3vw, 1.6rem)/1.2 var(--display); color: var(--accent); margin: 18px 0 0; }
.game-pitch { font-size: clamp(1.15rem, 2.4vw, 1.4rem); color: var(--muted); max-width: 52ch; margin: 18px 0 0; }
.game-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 28px; }

.ttk-logo--page { font-size: clamp(2.6rem, 11vw, 6.5rem); align-items: flex-start; text-align: left; }
.game-hero--ttk .game-tagline { color: var(--ttk-yellow); }

.game-body {
  max-width: var(--max); margin: 0 auto; padding: clamp(32px, 5vw, 56px) var(--gutter) 0;
  display: grid; gap: 32px 64px;
}
@media (min-width: 900px) { .game-body { grid-template-columns: 300px 1fr; } }
.facts { margin: 0; display: grid; gap: 18px; border-left: 4px solid var(--accent); padding-left: 18px; }
.facts dt { color: var(--dim); font-size: .9rem; margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 600; }
.game-copy { max-width: 66ch; font-size: 1.125rem; }
.game-copy p:first-child { font-size: 1.25rem; color: #fff; }
.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.features li { position: relative; padding-left: 28px; color: var(--muted); }
.features li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 11px; height: 11px; background: var(--accent);
  clip-path: polygon(30% 0, 100% 0, 100% 70%, 70% 100%, 0 100%, 0 30%);
}

.gallery { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 7vw, 80px) var(--gutter) 0; }
.gallery h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 22px; }
.gallery__grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .gallery__grid { grid-template-columns: 1fr 1fr; } }
.shot { margin: 0; }
.shot a { display: block; background: var(--ink-2); }
.shot__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.shot__img.is-contain { object-fit: contain; } /* character sheets and square art: show it whole */
.shot figcaption { color: var(--dim); font-size: .92rem; margin-top: 8px; }

.pager {
  max-width: var(--max); margin: clamp(56px, 8vw, 96px) auto 0; padding: 0 var(--gutter);
  display: grid; gap: 12px; grid-template-columns: 1fr;
}
@media (min-width: 760px) { .pager { grid-template-columns: 1fr auto 1fr; align-items: center; } }
.pager a { text-decoration: none; font: 700 1.15rem/1.2 var(--display); padding: 14px 0; border-top: 1px solid var(--ink-3); }
.pager a:hover { color: var(--accent); }
.pager__dir { display: block; font: 400 .85rem/1.4 var(--sans); color: var(--dim); }
.pager__next { text-align: right; }
.pager__all { text-align: center; color: var(--muted); }
@media (max-width: 759px) { .pager__next, .pager__all { text-align: left; } }

/* ------------------------------------------------------------- 404 */
.nf { max-width: 760px; margin: 0 auto; padding: clamp(48px, 10vw, 120px) var(--gutter) 0; }
.nf__mark { width: 120px; height: 120px; margin-bottom: 28px; }
.nf h1 { font-size: clamp(2.2rem, 7vw, 3.8rem); margin-bottom: 16px; }
.nf p { color: var(--muted); font-size: 1.15rem; }
.nf__links { display: flex; gap: 12px 28px; flex-wrap: wrap; }

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

/* ------------------------------------------------------------- trailers */
.game-hero__video { display: block; aspect-ratio: 16 / 9; height: auto; background: #000; }
.trailer { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 7vw, 80px) var(--gutter) 0; }
.trailer__video { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; background: #000; }
@media (prefers-reduced-motion: reduce) { .game-hero__video { display: none; } }
.btn-play--soon { cursor: default; opacity: .85; }
.btn-play--soon:hover { transform: none; }
