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

html {
  font-size: 16px;
}

body {
  font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Board colour from the app's design system:
   DesignSystem+Colors.swift — dsColors.Game.boardBrown
   Color.brown.opacity(0.8) — sampled via Digital Color Meter (sRGB): R166 G122 B90 = #A67A5A */

a {
  color: #8D6A2F;
  text-decoration: underline;
}

a:hover {
  color: #6b5024;
}

/* =====================
   Header & Nav
   ===================== */
header {
  background: #A67A5A;
  color: #3b2a10;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #3b2a10;
  white-space: nowrap;
}

header nav {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}

header nav a {
  color: rgba(59,42,16,0.8);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

header nav a:hover,
header nav a.active {
  background: rgba(0,0,0,0.1);
  color: #3b2a10;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #3b2a10;
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: auto;
  padding: 0.25rem 0.5rem;
}

/* Mobile nav (hidden by default) */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: #8f6a4d;
  padding: 0.5rem 1.5rem 1rem;
}

.mobile-nav a {
  color: rgba(59,42,16,0.9);
  text-decoration: none;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(59,42,16,0.15);
  font-size: 1rem;
  font-weight: 700;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a.active,
.mobile-nav a:hover {
  color: #3b2a10;
}

.mobile-nav.open {
  display: flex;
}

/* =====================
   Main content
   ===================== */
main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* Hero (home page) */
.hero {
  margin-bottom: 2.5rem;
}

.hero-icon {
  display: block;
  margin: 0 0 1.25rem;
  border-radius: 22%;
  width: 128px;
  height: 128px;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.hero .tagline {
  font-size: 1.3rem;
  color: #555;
  font-weight: 400;
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #333;
  max-width: 640px;
  margin: 1rem 0 1.5rem;
}

.btn-cta {
  display: inline-block;
  background: #A67A5A;
  color: #3b2a10 !important;
  text-decoration: none !important;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.05rem;
  transition: background 0.15s;
}

.btn-cta:hover {
  background: #8c6347 !important;
  color: #3b2a10 !important;
}

/* Accessibility callout */
.accessibility-callout {
  background: #f3ece3;
  border-left: 4px solid #A67A5A;
  border-radius: 0 10px 10px 0;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}

.accessibility-callout h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #3b2a10;
  margin-bottom: 0.5rem;
}

.accessibility-callout p {
  font-size: 0.975rem;
  line-height: 1.7;
  color: #444;
  margin: 0;
  max-width: 640px;
}

/* Content creators */
.content-creators {
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}

.content-creators p {
  font-size: 0.975rem;
  line-height: 1.7;
  color: #444;
  max-width: 640px;
}

/* Interior page header */
.page-header {
  margin-bottom: 2rem;
  border-bottom: 2px solid #A67A5A;
  padding-bottom: 1rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
}

.page-header .updated {
  margin-top: 0.4rem;
  color: #777;
  font-size: 0.9rem;
}

/* Body content */
.content p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #333;
  margin-bottom: 1.25rem;
  max-width: 700px;
}

.content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

/* =====================
   Section headings
   ===================== */
.section-heading {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.4rem;
}

.section-subheading {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 2.25rem;
  max-width: 640px;
}

/* =====================
   Features grid
   ===================== */
.features-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

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

.feature-card {
  background: #faf7f4;
  border: 1px solid #e8ddd4;
  border-radius: 10px;
  padding: 1.5rem 1.5rem 1.25rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #3b2a10;
  margin-bottom: 0.6rem;
}

.feature-card p {
  font-size: 0.975rem;
  line-height: 1.7;
  color: #444;
  margin: 0;
}

.feature-card .feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
  display: block;
}

/* =====================
   Texture showcase
   ===================== */
.textures-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.texture-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.texture-swatch {
  border: 1px solid #e8ddd4;
  border-radius: 8px;
  padding: 1rem;
  background: #faf7f4;
  text-align: center;
}

.texture-swatch .swatch-label {
  font-size: 0.925rem;
  font-weight: 700;
  color: #3b2a10;
  display: block;
  margin-bottom: 0.3rem;
}

.texture-swatch .swatch-note {
  font-size: 0.85rem;
  color: #777;
}

.texture-swatch .swatch-demo {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* Texture group headings (moved from inline styles) */
.texture-group-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #3b2a10;
  margin-bottom: 0.75rem;
  margin-top: 1.75rem;
}

.texture-group-heading:first-of-type {
  margin-top: 1.5rem;
}

/* Press page icon */
.press-icon-wrap {
  margin: 1rem 0 1.5rem;
}

.press-icon {
  border-radius: 22%;
  border: 1px solid #e8ddd4;
}

/* IAP callout */
.iap-note {
  background: #f3ece3;
  border-left: 3px solid #A67A5A;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.975rem;
  color: #444;
  line-height: 1.7;
}

.iap-note strong {
  color: #3b2a10;
}

/* =====================
   Donate section
   ===================== */
.donate-section {
  margin-top: 3.5rem;
  margin-bottom: 2rem;
  padding-top: 2.5rem;
  border-top: 2px solid #A67A5A;
}

.donate-card {
  background: #faf7f4;
  border: 1px solid #e8ddd4;
  border-radius: 10px;
  padding: 1.75rem 2rem;
  max-width: 620px;
}

.donate-card p {
  font-size: 1rem;
  line-height: 1.75;
  color: #333;
  margin-bottom: 1.25rem;
}

.donate-card p:last-child {
  margin-bottom: 0;
}

.btn-donate {
  display: inline-block;
  background: #A67A5A;
  color: #3b2a10 !important;
  text-decoration: none !important;
  padding: 0.65rem 1.5rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.975rem;
  transition: background 0.15s;
  margin-top: 0.25rem;
}

.btn-donate:hover {
  background: #8c6347 !important;
  color: #3b2a10 !important;
}

/* =====================
   Screenshots
   ===================== */
.screenshots-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.screenshots-device-label {
  font-size: 1rem;
  font-weight: 700;
  color: #3b2a10;
  margin-bottom: 0.75rem;
  margin-top: 1.75rem;
}

.screenshots-device-label:first-of-type {
  margin-top: 1.25rem;
}

.screenshots-row {
  display: grid;
  gap: 1rem;
}

.screenshots-row--ipad {
  grid-template-columns: repeat(3, 1fr);
}

.screenshots-row--iphone {
  grid-template-columns: repeat(3, minmax(0, 180px));
}

.screenshots-row--mac {
  grid-template-columns: repeat(3, 1fr);
}

.screenshots-row--high-contrast {
  grid-template-columns: repeat(2, 1fr);
}

.high-contrast-intro {
  font-size: 0.975rem;
  line-height: 1.7;
  color: #444;
  max-width: 640px;
  margin-bottom: 1rem;
}

.screenshot {
  margin: 0;
}

.screenshot img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e8ddd4;
  display: block;
}

.screenshot figcaption {
  font-size: 0.825rem;
  color: #777;
  text-align: center;
  margin-top: 0.4rem;
}

@media (max-width: 680px) {
  .screenshots-row--ipad,
  .screenshots-row--mac,
  .screenshots-row--high-contrast {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .screenshots-row--iphone {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =====================
   Blog
   ===================== */
.blog-list {
  margin-top: 1rem;
}

.blog-card {
  background: #faf7f4;
  border: 1px solid #e8ddd4;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.blog-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.blog-card h2 a {
  color: #1a1a1a;
  text-decoration: none;
}

.blog-card h2 a:hover {
  color: #8D6A2F;
}

.blog-card p {
  font-size: 0.975rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 0.75rem;
}

.blog-date {
  display: block;
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.4rem;
}

.blog-read-more {
  font-size: 0.925rem;
  font-weight: 700;
}

.blog-post {
  max-width: 700px;
}

.blog-post-header {
  margin-bottom: 2rem;
  border-bottom: 2px solid #A67A5A;
  padding-bottom: 1rem;
}

.blog-post-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.blog-post-back {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* =====================
   Footer
   ===================== */
footer {
  background: #f4f4f4;
  border-top: 1px solid #ddd;
  text-align: center;
  padding: 1.25rem 1.5rem;
  font-size: 0.875rem;
  color: #777;
}

.footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.footer-social a {
  color: #8D6A2F;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.footer-social a:hover {
  color: #6b5024;
}

.footer-social img {
  border-radius: 4px;
  flex-shrink: 0;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 680px) {
  header nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

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

  .hero .tagline {
    font-size: 1.1rem;
  }

  .hero-icon {
    width: 96px;
    height: 96px;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }
}
