/* ==========================================================================
   Maniac Games — 2026
   Hand-written, no framework, no JS. Light theme only (the brand mark is
   black-on-white by design).
   ========================================================================== */

:root {
  --ink:        #111111;
  --ink-soft:   #4a4a4a;
  --ink-faint:  #8a8a8a;
  --rule:       #111111;
  --hairline:   #e2e2e2;
  --paper:      #ffffff;
  --paper-alt:  #f6f6f6;
  --red:        #ff0000;
  --red-ink:    #cc0000;

  --measure:    62ch;
  --wrap:       980px;
  --gutter:     clamp(1rem, 4vw, 2.5rem);

  --step-0:     1rem;
  --step-1:     1.125rem;
  --step-2:     clamp(1.35rem, 1.1rem + 1.1vw, 1.75rem);
  --step-3:     clamp(1.75rem, 1.3rem + 2.2vw, 2.6rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-1);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--hairline);
  transition: text-decoration-color .15s ease, color .15s ease;
}
a:hover, a:focus-visible {
  color: var(--red-ink);
  text-decoration-color: var(--red);
}
a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link ---------------------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 10;
  text-decoration: none;
}
.skip:focus {
  left: var(--gutter);
  top: .5rem;
  color: #fff;
}

/* Shell -------------------------------------------------------------------- */

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

/* Header ------------------------------------------------------------------- */

.site-header {
  padding-block: clamp(1.5rem, 4vw, 2.75rem) 1.1rem;
}

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

.brand {
  display: block;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand:focus-visible { outline-offset: 6px; }

.brand img {
  width: clamp(160px, 26vw, 215px);
}

/* Nav ---------------------------------------------------------------------- */

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.1rem, 3vw, 2.1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-block;
  padding-block: .25rem;
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--hairline);
}
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--red);
}

/* The black rule under the header — carried over from the 2015 site --------- */

.rule {
  height: 2px;
  background: var(--rule);
}

/* Main --------------------------------------------------------------------- */

main {
  padding-block: clamp(2rem, 6vw, 3.5rem) clamp(3rem, 8vw, 5rem);
}

h1 {
  font-size: var(--step-3);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
}

h2 {
  font-size: var(--step-2);
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 2.5rem 0 .75rem;
}

h3 {
  font-size: var(--step-1);
  margin: 1.75rem 0 .5rem;
}

p, ul, ol { max-width: var(--measure); }
p { margin: 0 0 1.15rem; }

.lede {
  font-size: var(--step-2);
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 1.75rem;
}

.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }

/* The squares motif from the logo, used as a section marker ---------------- */

.squares {
  display: flex;
  gap: 6px;
  margin: 0 0 1.75rem;
}
.squares span {
  width: 12px;
  height: 12px;
  background: var(--ink);
}
.squares span:first-child { background: var(--red); }

/* Games -------------------------------------------------------------------- */

.games {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
}

.game {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--hairline);
}
.games > .game:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.game__icon {
  width: 100px;
  height: 100px;
  border-radius: 18px;
  border: 1px solid var(--hairline);
  background: var(--paper-alt);
}

.game__body > :first-child { margin-top: 0; }

.game__title {
  font-size: var(--step-2);
  margin: 0 0 .4rem;
}

.game__meta {
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 .85rem;
}

.game__body p { margin-bottom: .9rem; }

/* Store badges ------------------------------------------------------------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  max-width: none;
}
.stores a {
  display: block;
  text-decoration: none;
  border-radius: 6px;
}
.stores img {
  height: 44px;
  width: auto;
}
.stores a:hover img,
.stores a:focus-visible img {
  opacity: .78;
}

/* Contact ------------------------------------------------------------------ */

.contact {
  max-width: var(--measure);
  margin: 0 0 2.75rem;
}
.contact > :last-child { margin-bottom: 0; }

.contact__address {
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: .55rem;
  word-break: break-word;
}
.contact__address a {
  text-decoration-thickness: 2px;
  text-decoration-color: var(--red);
  text-underline-offset: 5px;
}
.contact__address a:hover,
.contact__address a:focus-visible {
  color: var(--red-ink);
  text-decoration-color: var(--red-ink);
}

/* Long-form legal text ----------------------------------------------------- */

.prose h2 { margin-top: 2.75rem; }
.prose li { margin-bottom: .4rem; }
.prose ul { padding-left: 1.25rem; }

.updated {
  font-size: .9rem;
  color: var(--ink-faint);
  margin-bottom: 2.5rem;
}

/* Footer ------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 2rem 3rem;
  font-size: .9rem;
  color: var(--ink-soft);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.75rem;
  align-items: baseline;
  justify-content: space-between;
}
.site-footer p { margin: 0; max-width: none; }
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
}

/* Narrow screens ----------------------------------------------------------- */

@media (max-width: 640px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .nav {
    gap: 1.25rem;
    width: 100%;
  }
  .game {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .game__icon {
    width: 84px;
    height: 84px;
    border-radius: 15px;
  }
  .stores img { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
