/* Bonny Interactive - notebook-paper look shared with Doodle Guard. */

@font-face {
  font-family: "Bricolage";
  src: url("bricolage-regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage";
  src: url("bricolage-semibold.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage";
  src: url("bricolage-extrabold.woff") format("woff");
  font-weight: 800;
  font-display: swap;
}

:root {
  --paper: #f6f1e4;
  --card: #fbf8ef;
  --ink: #1f2645;
  --ink-soft: #4b5272;
  --mustard: #e3b033;
  --tomato: #db4d3d;
  --rule: rgba(31, 38, 69, 0.07);
  --margin: rgba(219, 77, 61, 0.28);
  --radius: 18px;
  --gutter: 16px;
  --width: 980px;
  --font: "Bricolage", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
}

/* The red margin line of a notebook page, only where there is room for it. */
@media (min-width: 1100px) {
  body::before {
    content: "";
    position: fixed;
    inset: 0 auto 0 calc(50% - var(--width) / 2 - 48px);
    width: 2px;
    background: var(--margin);
    pointer-events: none;
  }
}

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

a {
  color: var(--ink);
  text-decoration-color: var(--mustard);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--tomato);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--tomato);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------------------------------------------------------------- header */

.site-header {
  padding: 22px 0;
}

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

.brand {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand span {
  color: var(--tomato);
}

.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-weight: 600;
  font-size: 16px;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--mustard);
}

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

.hero {
  padding: 48px 0 32px;
}

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(38px, 7vw, 64px);
  max-width: 14ch;
}

h1 mark {
  background: linear-gradient(transparent 62%, var(--mustard) 62% 88%, transparent 88%);
  color: inherit;
}

h2 {
  font-size: clamp(28px, 4.5vw, 40px);
}

h3 {
  font-size: 22px;
}

.lead {
  font-size: clamp(19px, 2.4vw, 22px);
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0;
}

section {
  padding: 32px 0;
}

/* ---------------------------------------------------------------- game card */

.game {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--ink);
}

.game-art {
  border-bottom: 3px solid var(--ink);
  aspect-ratio: 1024 / 500;
  background: var(--paper);
}

.game-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-body {
  padding: 24px;
  display: grid;
  gap: 24px;
}

@media (min-width: 760px) {
  .game-body {
    grid-template-columns: 1.3fr 1fr;
    padding: 32px;
  }
}

.game-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.game-title img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 2px solid var(--ink);
}

.game-title h3 {
  margin: 0;
  font-size: 28px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.tags li {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}

.facts {
  margin: 0;
  padding-left: 1.1em;
  color: var(--ink-soft);
}

.facts li + li {
  margin-top: 4px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 800;
  font-size: 17px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  color: var(--paper);
  background: #2b3460;
}

.button.ghost {
  background: transparent;
  color: var(--ink);
}

.button.ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

.button[aria-disabled="true"] {
  background: var(--paper);
  color: var(--ink-soft);
  border-style: dashed;
  cursor: default;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-self: start;
}

.shots img {
  border-radius: 10px;
  border: 2px solid var(--ink);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: var(--paper);
}

/* ---------------------------------------------------------------- contact */

.note {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 640px;
  transform: rotate(-0.6deg);
  box-shadow: 4px 4px 0 var(--mustard);
}

.note p {
  margin: 0 0 8px;
}

.email {
  font-weight: 800;
  font-size: clamp(19px, 3.6vw, 24px);
  word-break: break-word;
}

/* ---------------------------------------------------------------- long text (policies) */

.doc {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 24px;
  margin: 8px 0 48px;
}

@media (min-width: 760px) {
  .doc {
    padding: 40px 48px;
  }
}

.doc h1 {
  max-width: none;
  font-size: clamp(30px, 5vw, 44px);
}

.doc h2 {
  font-size: 24px;
  margin-top: 36px;
}

.doc h3 {
  font-size: 19px;
  margin-top: 24px;
  margin-bottom: 8px;
}

.doc p,
.doc li {
  max-width: 70ch;
}

.doc .meta {
  color: var(--ink-soft);
  font-size: 16px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin: 12px 0;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 2px solid var(--rule);
}

.doc th {
  font-weight: 800;
  border-bottom-color: var(--ink);
}

.table-scroll {
  overflow-x: auto;
}

.lang-switch {
  display: inline-flex;
  border: 3px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.lang-switch button {
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  padding: 6px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* Without JavaScript both languages show; with it, only the chosen one. */
.js [data-lang][hidden] {
  display: none;
}

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

.site-footer {
  padding: 32px 0 48px;
  font-size: 15px;
  color: var(--ink-soft);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  border-top: 3px solid var(--ink);
  padding-top: 20px;
}

.site-footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* Narrow screens: each table row becomes a small card with labelled cells. */
@media (max-width: 640px) {
  .doc table.stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .doc table.stack,
  .doc table.stack tbody,
  .doc table.stack tr,
  .doc table.stack td {
    display: block;
    width: 100%;
  }

  .doc table.stack tr {
    border: 2px solid var(--ink);
    border-radius: 12px;
    padding: 4px 0;
    margin: 0 0 12px;
    background: var(--paper);
  }

  .doc table.stack td {
    border-bottom: 0;
    padding: 6px 14px;
  }

  .doc table.stack td::before {
    content: attr(data-label);
    display: block;
    font-weight: 800;
    font-size: 14px;
  }
}
