/* VATEC GAMES — games.vatec-it.com
 *
 * One stylesheet for both sites. The palette, the type pairing and the wolf
 * are lifted straight out of the game rather than invented for the web, so
 * the site, the store pages, the trailer and the game itself read as one
 * piece of design instead of four.
 *
 * Fonts are self-hosted. That is not a preference: German courts have found
 * that embedding Google Fonts hands a visitor's IP address to a third party
 * without consent, and the parent company's own site makes a point of DSGVO
 * compliance. A sibling site cannot undercut that for the sake of one link
 * tag.
 */

/* ------------------------------------------------------------ the fonts */

@font-face {
  font-family: "Jersey 25";
  src: url("../fonts/Jersey25-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("../fonts/AlegreyaSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("../fonts/AlegreyaSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* ------------------------------------------------------------ the tokens */

:root {
  --ground:   #0e141e;   /* the page itself */
  --raised:   #131a26;   /* the game's own background */
  --panel:    #1a2332;
  --edge:     #26314a;

  --ink:      #eee8da;   /* cream, from the wordmark */
  --ink-dim:  #a9b3c4;
  --ink-far:  #78849a;

  --gold:     #e8ba5c;   /* CARAVAN, and every price in the game */
  --teal:     #35c8b5;   /* the game's interface accent */
  --rust:     #e0664c;

  --shadow:   #0e0c12;

  --display: "Jersey 25", "Courier New", monospace;
  --body: "Alegreya Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;

  --prose: 66ch;
  --wide: 1180px;

  --gap: clamp(1rem, 2.5vw, 2rem);
  --section: clamp(3.5rem, 9vw, 7rem);
}

/* ------------------------------------------------------------- the reset */

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 clamp(1.02rem, .45vw + .92rem, 1.16rem)/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Pixel art must never be smoothed. This is the single most important line
 * in the file for how the site feels. */
.px { image-rendering: pixelated; image-rendering: crisp-edges; }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }

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

.skip {
  position: absolute; left: -9999px;
  background: var(--gold); color: var(--shadow);
  padding: .6rem 1rem; font-weight: 700; z-index: 99;
}
.skip:focus { left: 1rem; top: 1rem; }

/* -------------------------------------------------------------- the type */

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02;
             text-wrap: balance; margin: 0; letter-spacing: .01em; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin-bottom: .8rem; }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.6rem); margin-bottom: .35rem; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.lead { font-size: 1.2em; color: var(--ink-dim); }
.dim  { color: var(--ink-dim); }
.far  { color: var(--ink-far); font-size: .92em; }

.eyebrow {
  font-family: var(--body); font-weight: 700;
  font-size: .78rem; letter-spacing: .17em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 .7rem;
}

strong { color: var(--ink); font-weight: 700; }

/* ------------------------------------------------------------ the layout */

.wrap { width: min(100% - 2.4rem, var(--wide)); margin-inline: auto; }
.prose { max-width: var(--prose); }
.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--edge); }

.grid { display: grid; gap: var(--gap); }
.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }

/* --------------------------------------------------------------- the bar */

.bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--edge);
}
.bar .wrap {
  display: flex; align-items: center; gap: 1.4rem;
  min-height: 4.1rem; flex-wrap: wrap;
}
.bar nav { margin-left: auto; display: flex; gap: 1.35rem; flex-wrap: wrap; }
.bar nav a {
  color: var(--ink-dim); text-decoration: none;
  font-size: .95rem; padding: .25rem 0;
  border-bottom: 2px solid transparent;
}
.bar nav a:hover, .bar nav a[aria-current="page"] {
  color: var(--ink); border-bottom-color: var(--gold);
}

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { width: 34px; }
.brand span {
  font-family: var(--display); font-size: 1.34rem; color: var(--ink);
  letter-spacing: .02em;
}

/* On a phone the navigation wrapped onto a second line, and because the bar
 * is sticky that second line then ate a quarter of the screen for the whole
 * visit. One row that scrolls sideways instead: every link stays reachable
 * and the bar stays the height of a bar. */
@media (max-width: 46rem) {
  .bar .wrap { min-height: 0; padding-block: .7rem; gap: .6rem; }
  .bar nav {
    margin-left: 0; width: 100%;
    flex-wrap: nowrap; overflow-x: auto; gap: 1.15rem;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
            mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .bar nav::-webkit-scrollbar { display: none; }
  .bar nav a { white-space: nowrap; }
}

/* -------------------------------------------------------------- the hero */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--edge); }
.hero-art {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated;
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--shadow) 55%, transparent) 0%,
      color-mix(in srgb, var(--shadow) 72%, transparent) 45%,
      var(--ground) 100%);
}
.hero-in {
  position: relative;
  padding-block: clamp(4rem, 13vw, 9rem);
  text-align: center;
}
.hero-mark { width: min(74%, 620px); margin: 0 auto 1.6rem; }
.hero h1 { margin-bottom: .3rem; }
.hero .sub {
  font-family: var(--display); color: var(--gold);
  font-size: clamp(1.4rem, 3.4vw, 2.4rem); letter-spacing: .18em;
  margin: 0 0 1.4rem;
}
.hero .tag { max-width: 46ch; margin: 0 auto 2rem; color: var(--ink-dim); }

/* ----------------------------------------------------------- the buttons */

.buttons { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .78rem 1.5rem;
  border: 1px solid var(--edge); border-radius: 3px;
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: .98rem;
  transition: border-color .18s, background .18s, transform .18s;
}
.btn:hover { border-color: var(--gold); background: var(--panel);
             color: var(--ink); transform: translateY(-1px); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #17130a; }
.btn.primary:hover { background: #f0c977; border-color: #f0c977; color: #17130a; }
.btn[aria-disabled="true"] {
  opacity: .45; pointer-events: none;
}

/* ------------------------------------------------------------- the cards */

.card {
  background: var(--raised);
  border: 1px solid var(--edge); border-radius: 4px;
  padding: 1.5rem 1.6rem;
}
.card h3 { color: var(--ink); }
.card p:last-child { margin-bottom: 0; }

/* A whole game, as one clickable panel. */
.game {
  display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: 0; background: var(--raised);
  border: 1px solid var(--edge); border-radius: 5px; overflow: hidden;
}
@media (max-width: 46rem) { .game { grid-template-columns: 1fr; } }
.game-art { width: 100%; height: 100%; object-fit: cover; min-height: 15rem; }
.game-body { padding: clamp(1.5rem, 3vw, 2.4rem); }
.game-body h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .1rem; }
.game-body .sub {
  font-family: var(--display); color: var(--gold);
  letter-spacing: .16em; font-size: 1.1rem; margin-bottom: .9rem;
}

/* -------------------------------------------------------------- the data */

.facts { display: grid; gap: .1rem; margin: 0; }
.facts div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .62rem 0; border-bottom: 1px solid var(--edge);
}
.facts dt { color: var(--ink-dim); }
.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.numbers { display: flex; flex-wrap: wrap; gap: 1.6rem 2.6rem; margin: 0; padding: 0; }
.numbers div { list-style: none; }
.numbers b {
  display: block; font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem); color: var(--gold); line-height: 1;
}
.numbers span { color: var(--ink-dim); font-size: .93rem; }

/* -------------------------------------------------------------- the shots */

.shots { display: grid; gap: .7rem;
         grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
.shots a { display: block; border: 1px solid var(--edge); border-radius: 3px;
           overflow: hidden; line-height: 0; transition: border-color .18s; }
.shots a:hover { border-color: var(--gold); }

figure { margin: 0; }
figcaption { color: var(--ink-far); font-size: .9rem; margin-top: .5rem; }

/* -------------------------------------------------------------- the video */

.film {
  border: 1px solid var(--edge); border-radius: 4px; overflow: hidden;
  background: #000; line-height: 0;
}
.film video { width: 100%; }

/* ------------------------------------------------------------- the tables */

table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { text-align: left; padding: .62rem .7rem; border-bottom: 1px solid var(--edge); }
th { color: var(--gold); font-weight: 700; font-size: .82rem;
     letter-spacing: .1em; text-transform: uppercase; }
.scroll { overflow-x: auto; }

/* -------------------------------------------------------------- the lists */

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.ticks { list-style: none; padding: 0; margin: 0; }
ul.ticks li { padding-left: 1.6rem; position: relative; margin-bottom: .55rem; }
ul.ticks li::before {
  content: "·"; position: absolute; left: .45rem; top: -.08em;
  color: var(--gold); font-size: 1.5em; line-height: 1;
}

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

footer {
  border-top: 1px solid var(--edge);
  padding-block: 3rem 3.5rem;
  color: var(--ink-far); font-size: .94rem;
}
footer a { color: var(--ink-dim); }
footer a:hover { color: var(--ink); }
.foot-grid { display: grid; gap: 2rem;
             grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.foot-grid h4 {
  font-family: var(--body); font-size: .78rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 .7rem; font-weight: 700;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: .42rem; }
.parent { display: inline-block; margin-top: .6rem; }
.parent img { width: 116px; opacity: .55; transition: opacity .18s; }
.parent:hover img { opacity: 1; }

.rule { border: 0; border-top: 1px solid var(--edge); margin: 2.4rem 0 1.6rem; }

/* -------------------------------------------------------- the legal pages */

.legal { padding-block: 3rem var(--section); }
.legal h2 { font-family: var(--body); font-weight: 700;
            font-size: 1.15rem; letter-spacing: .04em;
            text-transform: uppercase; color: var(--gold);
            margin-top: 2.6rem; }
.legal h2:first-of-type { margin-top: 1.6rem; }
.legal .prose { max-width: 68ch; }

/* A note the reader must not skim past. */
.note {
  border-left: 3px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 7%, transparent);
  padding: 1rem 1.2rem; margin: 1.6rem 0; border-radius: 0 3px 3px 0;
}
.note.warn { border-left-color: var(--rust);
             background: color-mix(in srgb, var(--rust) 8%, transparent); }
.note p:last-child { margin-bottom: 0; }
