/* Dark Origins: the studio's front page. Same ink, bone and amber as Malin. */

@font-face {
  font-family: 'Barlow';
  src: url('fonts/barlow-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('fonts/barlow-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('fonts/barlow-condensed-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('fonts/barlow-condensed-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #100e0c;
  --panel: #1b1813;
  --line: #352f26;
  --line-2: #4a4235;
  --bone: #e9e2d0;
  --muted: #a39a86;
  --amber: #e8a33d;
  --amber-hi: #f2b456;
  --display: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  --text: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

/* Header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--width);
  margin: 0 auto;
  padding: 20px 16px;
}

.wordmark {
  font: 700 1.25rem/1 var(--display);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.top nav {
  display: flex;
  gap: 20px;
}

.top nav a {
  font: 600 0.95rem/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 0;
}

.top nav a:hover {
  color: var(--bone);
}

/* Page */

main {
  display: grid;
  gap: 24px;
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 16px 56px;
}

.intro {
  padding: 24px 0 8px;
  border-top: 1px solid var(--line);
}

.intro h1 {
  margin: 0 0 4px;
  font: 700 clamp(1.75rem, 5vw, 2.5rem) / 1.05 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.intro p {
  margin: 0;
  color: var(--muted);
}

/* Game cards */

.game {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  scroll-margin-top: 16px;
}

.game .body {
  position: relative;
  padding: 20px;
}

.game .body > p {
  margin: 0 0 12px;
  max-width: 60ch;
}

.eyebrow {
  font: 600 0.9rem/1.2 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}

.game h2 {
  display: flex;
  align-items: center;
  gap: 0.25em;
  margin: 0 0 12px;
  font: 700 clamp(2.75rem, 9vw, 4.75rem) / 0.95 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game h2 img {
  width: 0.8em;
  height: 0.8em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 20px;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  font: 700 1.1rem/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.button.primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #1a1208;
}

.button.primary:hover {
  background: var(--amber-hi);
  border-color: var(--amber-hi);
}

.button.waiting {
  border-style: dashed;
  color: var(--muted);
}

/* Malin: the key art on top on phones, behind the text on wider screens. */

.malin .art img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 820px) {
  .malin {
    display: flex;
    align-items: flex-end;
    min-height: 600px;
  }

  .malin .art {
    position: absolute;
    inset: 0;
  }

  .malin .art img {
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
  }

  .malin .art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(16, 14, 12, 0.96) 0%, rgba(16, 14, 12, 0.82) 30%, rgba(16, 14, 12, 0) 62%);
  }

  .malin .body {
    max-width: 640px;
    padding: 40px;
  }
}

/* Footer */

.bottom {
  max-width: var(--width);
  margin: 0 auto;
  padding: 20px 16px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.bottom p {
  margin: 0;
}
