/* Oisif Games — self-contained. No external fonts, no CDN, no analytics.
   The shell is deliberately neutral: it belongs to the studio, not to any one
   game, so a new title is a new card and nothing else has to change. Colour
   comes from each game's own art, through the --brand custom property. */

/* ── Font, self-hosted ──────────────────────────────────────────── */

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/figtree-latin.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+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/figtree-latin-ext.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;
}

/* ── Tokens ─────────────────────────────────────────────────────── */

:root {
  --bg:     #ffffff;
  --bg-2:   #f7f8f9;
  --ink:    #14171c;
  --ink-2:  #596270;
  --ink-3:  #8d949e;
  --line:   #e5e8eb;

  --font: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;

  --radius: 12px;
  --max: 56rem;
  --measure: 38rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Long-form reading measure, used by the legal pages. */
.wrap.doc { max-width: calc(var(--measure) + 3rem); }

/* ── Header ─────────────────────────────────────────────────────── */

header.site {
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 0;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}

.brand span { font-weight: 500; color: var(--ink-2); }

nav a {
  color: var(--ink-2);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.94rem;
  font-weight: 500;
}

nav a:hover, nav a:focus { color: var(--ink); }

/* ── Type ───────────────────────────────────────────────────────── */

h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  margin: 2.5rem 0 0.6rem;
}

/* The landing page wants section labels rather than headings. */
h2.eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1.5rem;
}

h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 1.6rem 0 0.35rem;
  color: var(--ink);
}

p, li { color: var(--ink-2); }

.lede {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-2);
  margin: 0;
  max-width: 34rem;
}

.updated { color: var(--ink-3); font-size: 0.87rem; margin: 0 0 2.5rem; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #c3cad1;
  text-underline-offset: 0.16em;
}

a:hover { text-decoration-color: currentColor; }

ul { padding-left: 1.15rem; }
li { margin: 0.35rem 0; }

/* ── Sections ───────────────────────────────────────────────────── */

section { padding: 3.5rem 0; border-top: 1px solid var(--line); }

.hero { padding: 4.5rem 0 3.5rem; border-top: 0; }

/* ── Games ──────────────────────────────────────────────────────── */

/* One card per title. A second game is one more <article>; nothing in the
   shell knows which games exist. */

.games { display: grid; gap: 1.25rem; }

.game {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.game-art {
  background: var(--brand, var(--bg-2));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem;
  aspect-ratio: 1 / 1;
}

.game-art img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.game-body { padding: 1.9rem 2rem; align-self: center; }

.game-body h3 { margin: 0 0 0.4rem; font-size: 1.35rem; }

.game-body p { margin: 0 0 1rem; }

.meta {
  font-size: 0.85rem;
  color: var(--ink-3);
  margin: 0 0 1.25rem;
}

/* An unreleased title has no store link and often no logo yet, so the art panel
   carries its name in type and the button is replaced by a status line. */

.game.wip .game-art { color: #fff; }

.game-art .wordmark {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-align: center;
  color: inherit;
}

/* A screenshot fills its panel edge to edge; a logo gets padding. */
/* A screenshot is shown whole: the panel stretches to the card's height, so
   `cover` would crop it by however much the text column happens to be taller,
   and in this one the subject runs edge to edge. `contain` costs two bands,
   which are filled with a blurred copy of the shot itself. The URL arrives as
   --shot on the element, so the stylesheet stays ignorant of which game it is. */

.game-art.shot {
  padding: 0;
  position: relative;
  overflow: hidden;
  background: var(--brand, var(--bg-2));
}

.game-art.shot::before {
  content: '';
  position: absolute;
  inset: -8%;
  background: var(--shot) center / cover no-repeat;
  filter: blur(22px) saturate(1.1);
  transform: scale(1.05);
}

.game-art.shot img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

/* A code name is not the title; say so next to it rather than in a sentence. */
.codename {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  vertical-align: 0.22em;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}

.status::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--brand, var(--ink-3));
  flex: none;
}

/* ── Buttons ────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.62rem 1.2rem;
  border-radius: 999px;
}

.btn:hover, .btn:focus { background: #2c323b; color: var(--bg); text-decoration: none; }

.btn svg { width: 1.05em; height: 1.05em; fill: currentColor; }

/* ── Contact ────────────────────────────────────────────────────── */

.mail {
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--line);
}

.mail:hover { border-bottom-color: var(--ink); text-decoration: none; }

/* ── Callout and tables, used by the legal pages ────────────────── */

.note {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  font-size: 0.96rem;
}

.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0 1.75rem;
}

.table-scroll table { margin: 0; min-width: 30rem; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.75rem;
  font-size: 0.92rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}

tr:last-child td { border-bottom: 0; }

th {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-2);
}

/* ── Footer ─────────────────────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  color: var(--ink-3);
  font-size: 0.89rem;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}

footer.site p { margin: 0; color: var(--ink-3); }
footer.site a { color: var(--ink-2); text-decoration: none; }
footer.site a:hover { color: var(--ink); text-decoration: underline; }
footer.site nav a { margin: 0 0 0 1.5rem; font-size: 0.89rem; }
footer.site nav a:first-child { margin-left: 0; }

/* ── Small screens ──────────────────────────────────────────────── */

@media (max-width: 48rem) {
  .game { grid-template-columns: 1fr; }
  .game-art { padding: 1.5rem; }
  .game-art.shot { padding: 0; }
  .game-body { padding: 1.5rem; }
}

@media (max-width: 34rem) {
  body { font-size: 16px; }
  .wrap { padding: 0 1.15rem; }
  header.site .wrap { display: block; }
  header.site nav { margin-top: 0.6rem; }
  nav a { margin: 0 1.35rem 0 0; }
  footer.site nav a { margin: 0 1.35rem 0 0; }
  .hero { padding: 2.75rem 0 2.25rem; }
  section { padding: 2.5rem 0; }
}

/* The header already draws a rule under itself. */
main > section:first-child { border-top: 0; }
