/*
 * Colors come in three layers:
 *   1. Palette: the six studio colors. Nothing else in this file names a hex value.
 *   2. Roles: what each color is used for. Rules read roles, never palette colors.
 *   3. Classes: a theme class on <body> reassigns roles for the whole page; an accent
 *      class on a panel picks its shadow color.
 */
:root {
  --cream: #FFF8E7;
  --steel: #3A3D47;
  --aura: #F2B630;
  --teal: #58A4B0;
  --ultramarine: #3B37A6;
  --violet: #7678ED;

  --display: 'Dela Gothic One', 'Arial Black', Impact, sans-serif;
  --label: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --body: 'Rubik', 'Segoe UI', Arial, sans-serif;
}

/* Roles, with the default theme's values. */
:root, .theme-ultramarine {
  --ground: var(--steel);
  --ground-text: var(--cream);
  --ground-muted: color-mix(in srgb, var(--cream) 72%, transparent);
  --ground-dots: color-mix(in srgb, var(--cream) 7%, transparent);
  --rule: var(--aura);
  --link: var(--aura);

  --hero-bg: var(--ultramarine);
  --hero-lines: color-mix(in srgb, var(--violet) 45%, transparent);
  --hero-text: var(--cream);
  --hero-edge: var(--steel);
  --wordmark: var(--aura);
  --wordmark-shadow: var(--steel);

  --panel-bg: var(--cream);
  --panel-text: var(--steel);
  --panel-border: var(--steel);
  --tag-bg: var(--aura);
  --tag-text: var(--steel);
  --status-bg: var(--teal);
  --status-text: var(--steel);
  --art-stripes: color-mix(in srgb, var(--teal) 22%, transparent);

  --button-bg: var(--ultramarine);
  --button-text: var(--cream);
  --button-shadow: var(--steel);

  --accent: var(--aura);
}

/* The original periwinkle hero. Cream on periwinkle is 3.5:1, so this is for comparison. */
.theme-periwinkle {
  --hero-bg: var(--violet);
  --hero-lines: color-mix(in srgb, var(--cream) 16%, transparent);
}

/* A dark hero on the steel ground, with yellow focus lines. */
.theme-steel {
  --hero-bg: var(--steel);
  --hero-lines: color-mix(in srgb, var(--aura) 14%, transparent);
  --hero-edge: var(--aura);
  --wordmark-shadow: var(--ultramarine);
}

/* Panel shadow color, per panel. */
.accent-aura { --accent: var(--aura); }
.accent-teal { --accent: var(--teal); }
.accent-violet { --accent: var(--violet); }
.accent-ultramarine { --accent: var(--ultramarine); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ground-text);
  font: 400 1.05rem/1.6 var(--body);
  background-color: var(--ground);
  /* Halftone dot screen over the ground. */
  background-image: radial-gradient(var(--ground-dots) 1.2px, transparent 1.6px);
  background-size: 14px 14px;
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--ground-text); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.6rem clamp(1rem, 4vw, 3rem);
  background: var(--ground);
  border-bottom: 4px solid var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ground-text);
  text-decoration: none;
  font: 1.05rem var(--display);
}

nav { display: flex; gap: 1.5rem; }
nav a {
  color: var(--ground-muted);
  text-decoration: none;
  font: 700 0.95rem var(--label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
nav a:hover { color: var(--link); }

/* Hero: manga focus lines radiating from Cranky. */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1rem, 6vw, 5rem);
  overflow: hidden;
  background:
    repeating-conic-gradient(from 0deg at 25% 50%, var(--hero-lines) 0deg 2.5deg, transparent 2.5deg 9deg),
    var(--hero-bg);
  border-bottom: 6px solid var(--hero-edge);
}

/* Hard offset shadow traced from the mark's silhouette, matching the wordmark's. */
.hero-mascot img { width: 100%; height: auto; display: block; filter: drop-shadow(8px 8px 0 var(--wordmark-shadow)); }

.kana {
  margin: 0.9rem 0 0 clamp(2rem, 6vw, 5rem);
  color: var(--hero-text);
  text-shadow: 2px 2px 0 var(--wordmark-shadow);
  font: 700 clamp(0.85rem, 1.6vw, 1.1rem) var(--body);
  letter-spacing: 0.2em;
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02; margin: 0.15em 0; }

h1 {
  font-size: clamp(2.8rem, 7.5vw, 5.6rem);
  color: var(--wordmark);
  text-shadow: 5px 5px 0 var(--wordmark-shadow);
}
h1 span { display: block; color: var(--hero-text); }

.tagline {
  margin: 1.4rem 0 0 clamp(1rem, 3vw, 2.5rem);
  color: var(--hero-text);
  text-shadow: 3px 3px 0 var(--wordmark-shadow);
  font: 700 clamp(1.1rem, 2.4vw, 1.6rem) var(--label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

main { overflow: hidden; }

.band { max-width: 1080px; margin: 0 auto; padding: 3.5rem clamp(1rem, 4vw, 3rem) 1rem; }

h2 {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.4rem;
}
.num {
  font: 700 1rem var(--label);
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 0.15rem 0.5rem;
  transform: skewX(-12deg);
}

/* Comic panel: hard offset shadow in the panel's accent color. */
.panel {
  background: var(--panel-bg);
  color: var(--panel-text);
  border: 4px solid var(--panel-border);
  box-shadow: 8px 8px 0 var(--accent);
}

.game-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
}
.game-art {
  display: grid;
  place-items: center;
  background: repeating-conic-gradient(from 0deg, var(--panel-bg) 0deg 6deg, var(--art-stripes) 6deg 12deg);
  border: 3px solid var(--panel-border);
}
.game-card h3 { font-size: 2.6rem; }
.game-card p { margin: 0.4rem 0 1rem; }

.status {
  display: inline-block;
  margin: 0;
  padding: 0.1rem 0.5rem;
  background: var(--status-bg);
  color: var(--status-text);
  font: 700 0.85rem var(--label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.button {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  background: var(--button-bg);
  color: var(--button-text);
  border: 3px solid var(--button-shadow);
  box-shadow: 4px 4px 0 var(--button-shadow);
  text-decoration: none;
  font: 700 0.95rem var(--label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.1s, box-shadow 0.1s;
}
.button:hover { color: var(--button-text); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--button-shadow); }

.lede { font-size: 1.25rem; max-width: 46rem; margin-top: 0; }

/* Five tenets: three across, then two across. */
.tenets {
  list-style: none;
  padding: 0;
  margin: 1.8rem 0 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.6rem;
}
.tenets li { grid-column: span 2; padding: 1.1rem 1.2rem; }
.tenets li:nth-child(n+4) { grid-column: span 3; }
.tenets li:nth-child(2) { transform: rotate(1deg); }
.tenets li:nth-child(3) { transform: rotate(-1deg); }
.tenets li:nth-child(4) { transform: rotate(-0.6deg); }
.tenets li:nth-child(5) { transform: rotate(0.8deg); }
.tenets strong { display: block; font: 1.3rem var(--display); margin-bottom: 0.3rem; }

.contact { font-size: 1.15rem; }

footer {
  margin-top: 3rem;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ground-muted);
  font-size: 0.85rem;
  border-top: 4px solid var(--rule);
}

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  h1 { font-size: 8.6vw; }
  .tagline, .kana { margin-left: 0; }
  .tenets { grid-template-columns: 1fr; }
  .tenets li, .tenets li:nth-child(n+4) { grid-column: auto; }
  .hero-mascot { max-width: 280px; margin: 0 auto; }
  .game-card { grid-template-columns: 1fr; }
  .game-art { height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
