/* ============================================
   Pipforge — Solo Journaling RPG Engine
   Design tokens: classic playing card palette
   ============================================ */

:root {
  /* Brand: classic card colors, inverted to light background */
  --bg: #faf8f4;
  --surface: #f0ece2;
  --ink: #1c1814;
  --red: #b91f26;
  --red-deep: #8c1c20;
  --border: #ddd5c5;
  --text-dim: #4a4339;

  /* Per-game accents, used only within each game's own card */
  --godkissed: #97315c;
  --long-static: #1f7d70;
  --red-roads: #95661f;

  --font-display: 'Bitter', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --max-width: 1140px;
  --gutter: 1.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.45rem); }

p { color: var(--text-dim); }

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

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ============================================
   Header
   ============================================ */

.site-header {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.brand .brand-mark {
  height: 38px;
  width: auto;
  border-radius: 5px;
}

.header-tagline {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

@media (max-width: 600px) {
  .header-tagline { display: none; }
}

/* ============================================
   Hero
   ============================================ */

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.5rem;
}

.hero .eyebrow::before,
.hero .eyebrow::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--red);
}

.hero h1 {
  max-width: 760px;
  margin: 0 auto 1.5rem;
}

.hero p.lede {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: rgba(28, 24, 20, 0.06);
  transform: translateY(-1px);
}

.btn-solid {
  background: var(--red);
  border-color: var(--red);
  color: var(--bg);
}

.btn-solid:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: var(--bg);
}

/* ============================================
   Section scaffolding
   ============================================ */

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-head .eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}

.section-head h2 { margin-bottom: 1rem; }

/* ============================================
   How it works (three pips)
   ============================================ */

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 760px) {
  .how-grid { grid-template-columns: 1fr; }
}

.how-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.how-card .pip-number {
  width: 48px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border: 2px solid var(--red);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--red);
}

.how-card h3 { margin-bottom: 0.6rem; }
.how-card p { font-size: 0.92rem; }

/* ============================================
   Game cards
   ============================================ */

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 900px) {
  .game-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -16px rgba(0,0,0,0.5);
}

.game-card-top {
  height: 6px;
}

.game-card-body {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-genre {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.game-card h3 {
  margin-bottom: 0.9rem;
}

.game-card p {
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 1.5rem;
}

.game-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.game-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.game-card.godkissed .game-card-top { background: var(--godkissed); }
.game-card.godkissed .game-genre,
.game-card.godkissed .dot { color: var(--godkissed); background: var(--godkissed); }

.game-card.long-static .game-card-top { background: var(--long-static); }
.game-card.long-static .game-genre,
.game-card.long-static .dot { color: var(--long-static); background: var(--long-static); }

.game-card.red-roads .game-card-top { background: var(--red-roads); }
.game-card.red-roads .game-genre,
.game-card.red-roads .dot { color: var(--red-roads); background: var(--red-roads); }

/* ============================================
   Newsletter
   ============================================ */

.newsletter-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.newsletter-bar .container {
  text-align: center;
  max-width: 560px;
}

.newsletter-bar h3 { margin-bottom: 0.6rem; }
.newsletter-bar p { font-size: 0.92rem; margin-bottom: 1.5rem; }

.newsletter-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  max-width: 320px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--text-dim);
}

.newsletter-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  padding: 2.5rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer p {
  font-size: 0.82rem;
}

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