/* ========================================
   Fonts
   ======================================== */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/Archivo/Archivo-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/Archivo/Archivo-Italic-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ========================================
   Reset and Base Styles
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 16px;
}

html {
  
  line-height: 1.6;
}

body {
  font-family: "Archivo", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings: "wdth" 100;
  font-size: 1rem;
  color: #333;
  background-color: #fff;
  ont-weight: 100;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: "Archivo", sans-serif;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

p {
  margin-bottom: 1em;
}

a {
  color: #333;
  text-decoration: underline;
}

a:hover {
  text-decoration: underline;
}

/* ========================================
   Layout
   ======================================== */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.site-header {
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  text-align: center;
}

.site-logo {
  display: inline-block;
  margin-bottom: 1rem;
}

.site-logo img {
  height: 120px;
  width: auto;
}

.site-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.site-nav a {
  color: #666;
  font-size: 1rem;
}

.site-nav a:hover {
  color: #0066cc;
}

/* ========================================
   Main Content
   ======================================== */

.site-main {
  min-height: calc(100vh - 250px);
  padding-bottom: 2rem;
}

/* ========================================
   Posts List
   ======================================== */

.posts-list {
  max-width: 900px;
  margin: 0 auto;
}

.post-list {
  list-style: none;
}

.post-item {
  margin-bottom: 3rem;
}

.post-item h2 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
}

.post-item time {
  color: #666;
  font-size: 1rem;
}

.post-thumbnail {
  display: block;
  margin-bottom: 1rem;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

/* Blog/News: smaller floated thumbnails */
.posts-list--blog .post-thumbnail {
  float: left;
  width: 40%;
  margin-right: 1.5rem;
  margin-bottom: 0.5rem;
}

.posts-list--blog .post-item article {
  overflow: hidden; /* contain the float */
}

.posts-list--blog .post-item article::after {
  content: "";
  display: block;
  clear: both;
}

.post-excerpt {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  color: #555;
}

.read-more {
  color: #0066cc;
  font-weight: 500;
}

/* ========================================
   Post/Page Content
   ======================================== */

.post, .page {
  max-width: 900px;
  margin: 0 auto;
}

.post-header, .page-header {
  margin-bottom: 1rem;
}

.post-title, .page-title {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.post-meta {
  color: #666;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.post-content, .page-content {
  line-height: 1.7;
}

.post-feature-image {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1.5rem;
}

.post-content img, .page-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
}

/* Standalone images (only child of a paragraph) - reduce double margins */
.post-content p:has(> img:only-child),
.page-content p:has(> img:only-child) {
  margin: 0;
}

.post-content p > img:only-child,
.page-content p > img:only-child {
  margin: 0.75rem 0;
}

.post-content pre, .page-content pre {
  background-color: #f5f5f5;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
  margin: 1rem 0;
}

.post-content code, .page-content code {
  background-color: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: "Courier New", Courier, monospace;
  font-size: 1em;
}

.post-content pre code, .page-content pre code {
  background-color: transparent;
  padding: 0;
}

.post-content blockquote, .page-content blockquote {
  border-left: 4px solid #e0e0e0;
  padding-left: 1rem;
  margin-left: 0;
  color: #666;
  font-style: italic;
}

/* Responsive video embeds */
.post-content iframe[src*="youtube"],
.post-content iframe[src*="vimeo"],
.page-content iframe[src*="youtube"],
.page-content iframe[src*="vimeo"] {
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  margin: 1.5rem 0;
}

/* ========================================
   Tags
   ======================================== */

.post-tags {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background-color: #f0f0f0;
  color: #555;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-size: 0.85rem;
  text-decoration: none;
}

.tag:hover {
  background-color: #e0e0e0;
  text-decoration: none;
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.all-tags {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.all-tags h3 {
  margin-top: 0;
}

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

.newsletter-signup {
  margin: 3rem 0;
  padding: 2rem;
  background-color: #f5f5f5;
  border-radius: 4px;
  text-align: center;
}

.newsletter-content h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.newsletter-content p {
  margin-bottom: 1.5rem;
  color: #555;
}

.newsletter-form-row {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.newsletter-input:focus {
  outline: none;
  border-color: #333;
}

.newsletter-button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background-color: #333;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.newsletter-button:hover {
  background-color: #000;
}

.newsletter-message {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.newsletter-message.success {
  color: #085229;
}

.newsletter-message.error {
  color: #661d1d;
}

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

.site-footer {
  border-top: 1px solid #e0e0e0;
  padding: 2rem 0;
  margin-top: 3rem;
  color: #666;
  font-size: 1rem;
}

/* ========================================
   Featured Games Row (Home Page)
   ======================================== */

.featured-games {
  margin: 2rem 0;
}

.featured-row {
  display: flex;
  gap: 1.5rem;
}

.featured-card {
  flex: 1;
  text-decoration: none;
  color: #333;
}

.featured-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-card h3 {
  margin-top: 0.5rem;
  margin-bottom: 0;
  font-size: 1rem;
}

/* ========================================
   Games Grid
   ======================================== */

.games-grid {
  columns: 3;
  column-gap: 1.5rem;
}

.game-card {
  display: inline-block;
  width: 100%;
  margin-bottom: 1.5rem;
  break-inside: avoid;
  text-decoration: none;
  color: #333;
}

.game-card img {
  width: 100%;
  height: auto;
  display: block;
}

.game-card h3 {
  margin-top: 0.5rem;
  font-size: 1rem;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .site-logo img {
    height: 80px;
  }

  .site-nav ul {
    gap: 1rem;
  }

  h1 { font-size: 1.25rem; }
  h2 { font-size: 1.1rem; }
  h3 { font-size: 1rem; }

  .featured-row {
    flex-direction: column;
  }

  .posts-list--blog .post-thumbnail {
    float: none;
    width: 100%;
    margin-right: 0;
  }

  .newsletter-form-row {
    flex-direction: column;
  }

  .games-grid {
    columns: 1;
  }
}
