/* ============================================================
   PUT THE PLAYER FIRST — style.css
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS Custom Properties
   ------------------------------------------------------------ */
:root {
  --bg:          #E0DED7;
  --text:        #000000;
  --text-muted:  #595959;
  --text-light:  #FFFFFF;
  --text-subtle: #EEEEEE;

  --green:       #D0FF00;
  --purple:      #463366;
  --orange:      #D64933;
  --teal:        #0097A7;
  --amber:       #FFAB40;
  --moss:        #4E6348;
  --lime:        #EEFF41;

  --font: 'Barlow', sans-serif;
  --max-width: 800px;
  --nav-height: 64px;
}

/* ------------------------------------------------------------
   2. Reset & Base
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  padding-left: 1.4em;
}

/* ------------------------------------------------------------
   3. Typography
   ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; margin-top: 2rem; }
h3 { font-size: 1.2rem; margin-top: 1.5rem; }
h4 { font-size: 1rem; margin-top: 1.2rem; }

p {
  margin-bottom: 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
}

blockquote {
  border-left: 4px solid var(--purple);
  padding-left: 1.2em;
  margin: 1.5em 0;
  color: var(--text-muted);
  font-style: italic;
}

/* ------------------------------------------------------------
   4. Layout
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
  padding: 3rem 0;
}

/* ------------------------------------------------------------
   5. Header & Navigation
   ------------------------------------------------------------ */
header {
  background-color: var(--purple);
  color: var(--text-light);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--green);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 1rem;
}

.site-logo {
  height: 36px;
  width: auto;
  flex-shrink: 0;
}

/* Fallback text logo if image fails */
.site-logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--green);
  text-decoration: none;
  flex-shrink: 0;
}

header nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

header nav a {
  color: var(--text-subtle);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}

header nav a:hover,
header nav a.active {
  color: var(--green);
  text-decoration: none;
}

/* ------------------------------------------------------------
   6. Footer
   ------------------------------------------------------------ */
footer {
  background-color: var(--purple);
  color: var(--text-subtle);
  padding: 2.5rem 0;
  font-size: 0.9rem;
}

footer .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

footer p {
  margin: 0;
  color: var(--text-subtle);
}

footer nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

footer nav a {
  color: var(--text-subtle);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}

footer nav a:hover {
  color: var(--green);
  text-decoration: none;
}

.footer-sitemap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-sitemap strong {
  display: block;
  color: var(--green);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.footer-sitemap nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* ------------------------------------------------------------
   7. Hero Section
   ------------------------------------------------------------ */
.hero {
  background-color: var(--purple);
  color: var(--text-light);
  padding: 4rem 0;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.6rem;
  color: var(--green);
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-subtle);
  max-width: 560px;
  margin-bottom: 1.5rem;
}

/* ------------------------------------------------------------
   8. Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 0.65em 1.4em;
  border-radius: 4px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  border: none;
}

.btn:hover {
  opacity: 0.88;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--green);
  color: var(--text);
}

.btn-secondary {
  background-color: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}

.btn-dark {
  background-color: var(--purple);
  color: var(--text-light);
}

/* ------------------------------------------------------------
   9. Cards (homepage feature cards, game cards)
   ------------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background-color: var(--text-light);
  border-radius: 6px;
  padding: 1.75rem 1.5rem;
  border-top: 4px solid var(--teal);
}

.card h3 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--purple);
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.game-card {
  background-color: var(--text-light);
  border-radius: 6px;
  padding: 1.75rem 1.5rem;
  border-left: 5px solid var(--purple);
}

.game-card h3 {
  margin-top: 0;
  color: var(--purple);
}

.game-card .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   10. Tags / Labels
   ------------------------------------------------------------ */
.tag {
  display: inline-block;
  padding: 0.2em 0.7em;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background-color: var(--purple);
  color: var(--green);
  text-decoration: none;
}

.tag:hover {
  opacity: 0.85;
  text-decoration: none;
}

/* ------------------------------------------------------------
   11. Blog — Post List
   ------------------------------------------------------------ */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 1.5rem 0;
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list .post-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.post-list a {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
}

.post-list a:hover {
  color: var(--teal);
  text-decoration: none;
}

.post-list .post-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ------------------------------------------------------------
   12. Blog — Single Post
   ------------------------------------------------------------ */
.post-header {
  margin-bottom: 2.5rem;
}

.post-header .post-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.post-header h1 {
  margin-bottom: 0.75rem;
}

.post-header .post-category {
  margin-top: 0.75rem;
}

.post-body {
  max-width: var(--max-width);
}

.post-body h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--green);
}

.post-body h3 {
  color: var(--purple);
}

.post-body ul,
.post-body ol {
  margin-bottom: 1.1em;
}

.post-body li {
  margin-bottom: 0.35em;
}

.post-body a {
  color: var(--teal);
  text-decoration: underline;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   13. Game Page Specifics
   ------------------------------------------------------------ */
.game-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background-color: var(--purple);
  color: var(--text-light);
  border-radius: 6px;
}

.game-stats .stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.game-stats .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--green);
  font-weight: 600;
}

.game-stats .stat-value {
  font-size: 1rem;
  font-weight: 500;
}

/* ------------------------------------------------------------
   14. Page-level utility classes
   ------------------------------------------------------------ */
.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
}

.divider {
  border: none;
  border-top: 2px solid var(--green);
  margin: 2.5rem 0;
  width: 48px;
}

.highlight {
  background-color: var(--green);
  color: var(--text);
  padding: 0.1em 0.3em;
}

/* ------------------------------------------------------------
   15. Images
   ------------------------------------------------------------ */

/* About page: side-by-side headshot + text */
.about-intro {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 0;
}

.about-text {
  flex: 1;
  min-width: 0;
}

.about-photo-wrap {
  flex-shrink: 0;
}

.about-photo {
  width: 220px;
  height: 280px;
  object-fit: cover;
  object-position: top center;
  border-radius: 4px;
  border: 3px solid var(--green);
}

/* Homepage photo strip */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 2rem 0;
}

.photo-strip img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

/* Generic inline content image */
.content-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 4px;
  margin: 1.5rem 0;
}

@media (max-width: 640px) {
  html { font-size: 16px; }

  .footer-sitemap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.35rem; }

  .hero h1 { font-size: 2rem; }

  header .container {
    height: auto;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    flex-wrap: wrap;
  }

  header nav {
    gap: 1rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .game-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .post-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-intro {
    flex-direction: column-reverse;
    gap: 1.5rem;
  }

  .about-photo {
    width: 140px;
    height: 175px;
  }

  .photo-strip {
    grid-template-columns: 1fr;
  }

  .photo-strip img {
    height: 220px;
  }
}
