/* Sunny Parasite Games — site stylesheet */

:root {
  --brand-red: #ea4128;
  --brand-red-dark: #c23018;
  --ink: #1b1b1b;
  --ink-soft: #242421;
  --cream: #f7deb9;
  --paper: #fdf6ea;
  --text: #2a2622;
  --text-muted: #6b6259;
  --text-on-dark: #e8e2d8;
  --max-width: 1040px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background: var(--ink) url("../images/background5.jpg") no-repeat center top;
  background-size: cover;
  background-attachment: fixed;
  line-height: 1.65;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, .nav, .button, .badge, .stat strong {
  font-family: "Arial Narrow", Impact, Haettenschweiler, sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

h1 { font-size: 2.4rem; line-height: 1.15; }
h2 { font-size: 1.6rem; margin-bottom: 0.6rem; color: var(--ink); }
h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }

/* darker red for text-level uses: 5.2:1 on the paper background (WCAG AA) */
a { color: var(--brand-red-dark); }
a:hover { color: var(--brand-red); }

:focus-visible { outline: 3px solid var(--brand-red-dark); outline-offset: 2px; }
/* high-contrast focus ring on dark and red surfaces */
.nav a:focus-visible, .button:focus-visible, .site-footer a:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 2px;
}

/* Header */
.site-header {
  background: var(--ink-soft);
  border-bottom: 4px solid var(--brand-red);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.site-header .brand img { height: 64px; width: auto; display: block; }

.site-header .brand span {
  font-family: "Arial Narrow", Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 1.25rem;
  color: #fff;
}

.nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }

.nav a {
  color: var(--text-on-dark);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  font-size: 1rem;
}

.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: var(--brand-red); }

/* Hero */
.hero { position: relative; }
.hero img { width: 100%; display: block; }

/* Typographic brand hero (home page) */
.hero-brand {
  background: var(--ink-soft);
  border-bottom: 4px solid var(--brand-red);
  text-align: center;
  padding: 3.5rem 1.5rem 3rem;
}

.hero-brand img {
  width: 190px;
  max-width: 60%;
  height: auto;
  margin-bottom: 1.5rem;
}

.hero-brand h1 {
  color: #fff;
  font-size: 3rem;
  letter-spacing: 0.14em;
}

.hero-sub {
  color: var(--cream);
  font-size: 1.35rem;
  font-style: italic;
  margin-top: 0.5rem;
}

.hero-tagline {
  color: var(--text-on-dark);
  margin-top: 1rem;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-caption {
  background: var(--ink-soft);
  color: var(--text-on-dark);
  text-align: center;
  padding: 1.1rem 1.5rem;
}

.hero-caption h1 { color: #fff; font-size: 1.8rem; }
.hero-caption p { margin-top: 0.3rem; font-style: italic; }

/* Layout blocks */
.content { padding: 2.5rem 2rem; flex: 1; }
.content > * + * { margin-top: 1.1rem; }
.content section + section { margin-top: 2.5rem; }

.rule {
  border: 0;
  border-bottom: 8px double #d8cbb4;
  margin: 2rem 0;
}

.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }

.card {
  background: #fff;
  border: 1px solid #e3d8c4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.card .card-body { padding: 1.3rem; flex: 1; display: flex; flex-direction: column; gap: 0.7rem; }
.card .card-body p { flex: 1; }

/* Buttons and badges */
.button {
  display: inline-block;
  background: var(--brand-red);
  color: #fff;
  text-decoration: none;
  padding: 0.55rem 1.2rem;
  font-size: 1rem;
  border: none;
}

.button:hover { background: var(--ink-soft); color: #fff; }
.button.secondary { background: var(--ink-soft); }
.button.secondary:hover { background: var(--brand-red); }

.badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.2rem 0.7rem;
  border: 2px solid var(--brand-red-dark);
  color: var(--brand-red-dark);
  background: transparent;
}

.badge.dev { border-color: #2e7d32; color: #2e7d32; }

/* Game page details */
.byline { font-style: italic; color: var(--text-muted); }

.stats { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1rem 0; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.3rem; color: var(--brand-red); }
.stat span { font-size: 0.9rem; color: var(--text-muted); }

.figure { margin: 1.5rem 0; text-align: center; }
.figure img { max-width: 100%; height: auto; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2); }
.figure figcaption { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.5rem; font-style: italic; }

.fine { font-size: 0.85rem; color: var(--text-muted); }

.steps { counter-reset: step; list-style: none; }
.steps li { margin: 0.9rem 0; padding-left: 3rem; position: relative; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2rem;
  height: 2rem;
  background: var(--brand-red);
  color: #fff;
  font-family: "Arial Narrow", Impact, sans-serif;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.principles { padding-left: 1.2rem; }
.principles li { margin: 0.45rem 0; }

.notice {
  background: var(--cream);
  border-left: 5px solid var(--brand-red);
  padding: 1rem 1.3rem;
}

/* Footer */
.site-footer {
  background: var(--ink-soft);
  color: var(--text-on-dark);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 4px solid var(--brand-red);
}

.site-footer a { color: var(--cream); }
.site-footer .fine { color: #9d968b; margin-top: 0.4rem; }

@media (max-width: 768px) {
  /* fixed backgrounds cause scroll jank and repaints on mobile */
  body { background-attachment: scroll; }
}

@media (max-width: 640px) {
  h1 { font-size: 1.8rem; }
  .hero-brand h1 { font-size: 2rem; }
  .hero-sub { font-size: 1.1rem; }
  .content { padding: 1.5rem 1.1rem; }
  .site-header { justify-content: center; }
}
