/* Tinkerwise Games: the one stylesheet. Colours come from brand/logo/tinkerwise-mark.svg. */

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --paper: #f3efe6;
  --sheet: #fbf9f4;
  --ink: #1c1c1c;
  --muted: #5f5a51;
  --line: #e2dccf;
  --red: #d93a2b;
  --red-text: #b52a1d;
  --amber: #f2b705;
  --display: "Fredoka", ui-rounded, system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17161a;
    --sheet: #211f24;
    --ink: #f3efe6;
    --muted: #b3ada2;
    --line: #34313a;
    --red-text: #f0695b;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  font: 1.0625rem/1.6 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration-color: var(--red); text-underline-offset: 0.18em; }
a:hover { color: var(--red-text); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(2rem, 6vw, 2.75rem); margin: 0 0 0.5rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }

.wrap { width: 100%; max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: 0.9rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--display); font-size: 1.35rem; font-weight: 600; }
.brand img { width: 2.25rem; height: 2.25rem; transition: transform 0.3s ease; }
.brand-name span { color: var(--red-text); font-weight: 400; }
/* The whole name underlines and the nut takes a quarter-turn clockwise. */
a.brand:hover .brand-name { text-decoration: underline 2px var(--red); text-underline-offset: 0.2em; }
a.brand:hover img { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .brand img { transition: none; } }
.site-nav { display: flex; gap: 1.1rem; margin-left: auto; font-family: var(--display); font-size: 1.05rem; }

/* Header and footer links all behave like the brand: plain until hovered, then underlined in
   red, keeping their colour. The current page is in bold: still a link in the header, plain
   text in the footer. */
.site-header a, .site-footer a { color: inherit; text-decoration: none; }
.site-header a:hover, .site-footer a:hover { color: inherit; text-decoration: underline 2px var(--red); text-underline-offset: 0.2em; }
.site-nav [aria-current="page"], .site-footer [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Main */
main { flex: 1; padding-block: 2.5rem 3.5rem; }
.lead { font-size: 1.2rem; color: var(--muted); margin-top: 0; }

.hero { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero img { width: 6.5rem; height: 6.5rem; }
.hero h1 span { color: var(--red-text); font-weight: 400; }

.card {
  display: flex; gap: 1.25rem; align-items: center;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 1rem;
  padding: 1.25rem; text-decoration: none;
}
.card:hover { border-color: var(--red); color: inherit; }
/* The game's icon brings its own rounded tile: no border-radius, or it clips the tile's corners. */
.card img { width: 5.5rem; height: 5.5rem; flex: none; }
.card h3 { margin: 0 0 0.25rem; }
.card p { margin: 0; color: var(--muted); }

.badge {
  display: inline-block; margin-top: 0.6rem; padding: 0.2rem 0.7rem;
  border-radius: 999px; background: var(--amber); color: #1c1c1c;
  font-family: var(--display); font-size: 0.9rem; font-weight: 500;
}

.game-title { margin: 0 0 1.75rem; }
.game-title img { display: block; width: min(100%, 22rem); height: auto; margin: 0 auto; }

ul.features { padding-left: 1.2rem; }
ul.features li { margin: 0.35rem 0; }
ul.features li::marker { color: var(--red); }

.mail {
  background: var(--sheet); border: 1px solid var(--line); border-radius: 1rem;
  padding: 1rem 1.25rem; margin: 1rem 0;
}
.mail h2 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.mail p { margin: 0.25rem 0; }
.mail a { font-family: var(--display); font-size: clamp(0.95rem, 4.6vw, 1.2rem); font-weight: 500; overflow-wrap: anywhere; }

.policy .updated { color: var(--muted); margin-top: 0; }
.policy .summary {
  background: var(--sheet); border-left: 4px solid var(--red); border-radius: 0 0.75rem 0.75rem 0;
  padding: 0.75rem 1.1rem; margin: 1.5rem 0;
}
.policy li { margin: 0.3rem 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--muted); }
.site-footer .wrap { display: flex; gap: 0.75rem 1.5rem; flex-wrap: wrap; justify-content: space-between; padding-block: 1.25rem; }
.site-footer nav { display: flex; gap: 0.4rem 1rem; flex-wrap: wrap; }
