/* OTHERLAND Games — site styles. Colours of each game come from games.json (palette). */
/* Fonts are hosted on this site (no Google Fonts requests). Both are SIL Open Font License 1.1. */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/bricolage-grotesque-latin-opsz-normal.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/instrument-sans-latin-wght-normal.woff2) format("woff2-variations");
}
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --ink: #221b3a;
  --muted: #5c5672;
  --line: #dddbe8;
  --focus: #3b5bff;
  --btn: #221b3a;
  --btn-ink: #ffffff;
  --radius-l: 22px;
  --radius-s: 10px;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #19152c;
  --surface: #231e3b;
  --ink: #f2effc;
  --muted: #b3adc9;
  --line: #3a3458;
  --focus: #8ea2ff;
  --btn: #f2effc;
  --btn-ink: #19152c;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #19152c; --surface: #231e3b; --ink: #f2effc; --muted: #b3adc9;
    --line: #3a3458; --focus: #8ea2ff; --btn: #f2effc; --btn-ink: #19152c;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 750; }
h3 { font-size: 1.4rem; font-weight: 700; }
p { margin: 0; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34em; }

/* Header */
.site-head { padding-block: 1.1rem; }
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.logo { font: 800 1.45rem/1 var(--display); letter-spacing: -0.03em; text-decoration: none; display: inline-flex; align-items: baseline; gap: .35em; }
.logo small { font: 500 .95rem var(--body); color: var(--muted); letter-spacing: 0; }
.nav { display: flex; gap: .25rem; margin-left: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; padding: .45rem .8rem; border-radius: 999px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface); }
.theme-toggle {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  width: 2.5rem; height: 2.5rem; border-radius: 999px; cursor: pointer; display: grid; place-items: center;
}
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; gap: .55rem; text-decoration: none;
  font: 600 1rem/1 var(--body); padding: .9rem 1.3rem; border-radius: 999px;
  background: var(--btn); color: var(--btn-ink); border: 2px solid var(--btn);
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* Hero: the sliced block */
.hero { padding-block: clamp(2rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.hero .wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { margin-bottom: 1.25rem; max-width: 11ch; }
.hero .lede { margin-bottom: 2rem; }
.block-fig { margin: 0; }
.block { position: relative; aspect-ratio: 1 / 1.02; max-width: 440px; margin-inline: auto; margin-right: max(1rem, 4%); }
.slab {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  border-radius: 28px 34px 26px 30px; overflow: hidden;
}
.slab span { display: block; }
.slab.left { clip-path: polygon(0 0, 58% 0, 44% 100%, 0 100%); }
.slab.right { clip-path: polygon(58% 0, 100% 0, 100% 100%, 44% 100%); animation: fall 1.4s cubic-bezier(.5,0,.2,1) .5s both; transform-origin: 50% 100%; }
.slab.right::after { /* cut face shading */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(255,255,255,.28) 44%, transparent 60%);
  mix-blend-mode: soft-light;
}
@keyframes fall { from { transform: none; } to { transform: translate(4%, 1%) rotate(3deg); } }
.slab.right { transform: translate(4%, 1%) rotate(3deg); }
@media (prefers-reduced-motion: reduce) { .slab.right { animation: none; } html { scroll-behavior: auto; } }
.legend { list-style: none; padding: 0; margin: 1.5rem auto 0; max-width: 470px; display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .95rem; color: var(--muted); }
.legend a { text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.legend a:hover { color: var(--ink); text-decoration: underline; }
.legend i { width: .8rem; height: .8rem; border-radius: 3px; display: inline-block; }

/* Section rhythm */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section-head p { color: var(--muted); max-width: 32em; }
.text-link { font-weight: 600; text-underline-offset: .25em; }

/* Game art with Steam image over a palette fallback */
.art {
  position: relative; aspect-ratio: 460 / 215; overflow: hidden; border-radius: var(--radius-s);
  background: var(--stripes); display: grid; place-items: center;
}
.art b { font: 800 clamp(1.2rem, 3vw, 2rem)/1 var(--display); color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.35); padding: 1rem; text-align: center; letter-spacing: -0.02em; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Badges */
.badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.badge { font: 600 .82rem/1 var(--body); padding: .45rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.badge.out { background: #d9f5e3; border-color: #a9e2bd; color: #134b2a; }
.badge.ea { background: #fff0c9; border-color: #f1d98a; color: #5c4300; }
.badge.soon { background: #ffe0d6; border-color: #f6b9a6; color: #6a2210; }
.badge.demo { background: #dfe7ff; border-color: #b6c6ff; color: #1b2f7a; }

/* Featured */
.featured { background: var(--surface); border-radius: var(--radius-l); padding: clamp(1.25rem, 3vw, 2.25rem); display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center; border-top: 8px solid var(--accent); }
@media (min-width: 900px) { .featured { grid-template-columns: 1.25fr 1fr; } }
.featured .art { border-radius: 14px; }
.featured .when { font: 700 1rem var(--body); color: var(--muted); margin-bottom: .5rem; }
.featured h2 { margin-bottom: 1rem; }
.featured p.desc { margin-bottom: 1.25rem; }
.featured ul { margin: 0 0 1.75rem; padding-left: 1.1rem; color: var(--muted); }
.featured li { margin-bottom: .3rem; }
.featured li::marker { color: var(--accent); }

/* Grid */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: flex; flex-direction: column; gap: .9rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.card p { color: var(--muted); flex: 1; }
.card .btn { align-self: flex-start; padding: .75rem 1.1rem; font-size: .95rem; }
.card .art { border-bottom: 6px solid var(--accent); }

/* Upcoming strip (always dark, uses the game's own colours) */
.upcoming { background: var(--u-bg); color: #f4f1ff; border-radius: var(--radius-l); overflow: hidden; display: grid; }
@media (min-width: 900px) { .upcoming { grid-template-columns: 1fr 1fr; } }
.upcoming .copy { padding: clamp(1.5rem, 4vw, 3rem); display: flex; flex-direction: column; gap: 1rem; }
.upcoming .when { color: var(--u-accent); font-weight: 700; }
.upcoming p { color: #cfc9e6; }
.upcoming .btn { background: var(--u-accent); border-color: var(--u-accent); color: #160d05; }
.upcoming .btn.ghost { background: transparent; color: #f4f1ff; border-color: rgba(255,255,255,.35); }
.upcoming .btn.ghost:hover { border-color: #fff; }
.upcoming .art { border-radius: 0; aspect-ratio: auto; min-height: 260px; height: 100%; }
.upcoming .more { font-size: .95rem; color: #a59fc0; }

/* Follow */
.follow { display: grid; gap: 0 2.5rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); border-top: 1px solid var(--line); }
.follow a { text-decoration: none; padding: 1.1rem .25rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.follow a strong { font: 700 1.3rem var(--display); }
.follow a span { color: var(--muted); font-size: .95rem; }
.follow a:hover strong { text-decoration: underline; text-underline-offset: .2em; }

/* Footer */
.site-foot { padding-block: 3rem; margin-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.site-foot .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 800px) { .site-foot .wrap { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-foot h4 { margin: 0 0 .5rem; color: var(--ink); font: 700 1rem var(--body); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.site-foot a { text-underline-offset: .2em; }
.site-foot .fine { grid-column: 1 / -1; font-size: .85rem; }

/* Contact line in the follow section */
.contact { margin-top: 2rem; display: grid; gap: .4rem; max-width: 40em; }
.contact a { font-weight: 600; }
.contact p { color: var(--muted); }

/* Legal pages */
.legal { padding-block: clamp(2rem, 5vw, 4rem) 3rem; }
.legal .wrap { max-width: 46rem; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: .75rem; }
.legal .updated { color: var(--muted); margin-bottom: 2rem; }
.legal h2 { font-size: 1.5rem; margin: 2.5rem 0 .75rem; }
.legal h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.legal p, .legal li { margin-bottom: .75rem; }
.legal ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.legal .summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 1.25rem 1.4rem; }
.legal .summary ul { margin: 0; }
.template-note { background: #fff0c9; color: #4a3600; border: 2px dashed #d9b440; border-radius: var(--radius-s); padding: 1rem 1.25rem; margin-bottom: 2rem; }
mark.fill { background: #ffe066; color: #2b2100; padding: 0 .25em; border-radius: 4px; }

/* 404 */
.notfound { padding-block: clamp(3rem, 10vw, 7rem); }
.notfound p { margin: 1rem 0 2rem; color: var(--muted); }
