/* Swiss Backgammon — style.css
   Version: 1.0.0
   Warm wooden game room aesthetic — burgundy, terracotta, cream
   ============================================================= */

/* ─── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  --burgundy: #6B2D3E;
  --burgundy-dark: #501E2C;
  --brown: #8B6914;
  --cream: #FDF8EF;
  --terracotta: #C4713B;
  --terracotta-light: #D4895B;
  --dark: #2C1810;
  --text: #2C1810;
  --text-light: #6B5B50;
  --border: #E5D8C8;
  --card-bg: #FFFFFF;
  --section-alt: #F5EDE0;
}

/* ─── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Work Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--terracotta); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--burgundy); }
ul { list-style: none; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Serif Display', serif;
  color: var(--dark);
  line-height: 1.25;
  font-weight: 400;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.55rem); margin-bottom: 0.6rem; }
h4 { font-size: 1.15rem; margin-bottom: 0.5rem; }
h5 { font-size: 1rem; margin-bottom: 0.4rem; }

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

strong { font-weight: 600; color: var(--dark); }
em { font-style: italic; }

/* ─── HEADER ─────────────────────────────────────────────────── */
.site-header {
  background: var(--burgundy-dark);
  border-bottom: 3px solid var(--terracotta);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 62px;
}

.site-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  color: var(--cream) !important;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo span { font-size: 1.5rem; }
.site-logo:hover { color: var(--terracotta-light) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: auto;
  padding: 4px 8px;
}

.site-nav { margin-left: auto; }

.site-nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
}

.site-nav ul li a {
  color: #D9C8BB;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.site-nav ul li a:hover,
.site-nav ul li a.active {
  background: var(--terracotta);
  color: #fff;
}

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--dark) 60%, #3D1A0E 100%);
  padding: 72px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C4713B' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
}

.hero-inner { position: relative; max-width: 700px; margin: 0 auto; }

.hero h1 {
  color: var(--cream);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero .lead {
  color: #D9C8BB;
  font-size: 1.12rem;
  margin-bottom: 1.8rem;
  line-height: 1.75;
}

.hero-badge {
  display: inline-block;
  background: var(--terracotta);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 1.2rem;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-primary {
  background: var(--terracotta);
  color: #fff;
  border: 2px solid var(--terracotta);
}

.btn-primary:hover {
  background: var(--terracotta-light);
  border-color: var(--terracotta-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196,113,59,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 2px solid rgba(253,248,239,0.4);
  margin-left: 12px;
}

.btn-outline:hover {
  background: rgba(253,248,239,0.1);
  border-color: var(--cream);
  color: var(--cream);
}

/* ─── MAIN LAYOUT ────────────────────────────────────────────── */
.main-content {
  max-width: 840px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.main-content.wide {
  max-width: 1060px;
}

/* ─── PAGE HEADER (article pages) ────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--burgundy-dark) 0%, #3D1A10 100%);
  padding: 52px 24px 44px;
  text-align: center;
}

.page-hero h1 { color: var(--cream); margin-bottom: 0.8rem; }
.page-hero .subtitle { color: #C4A899; font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

.page-hero .breadcrumb {
  color: #9C7E74;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.page-hero .breadcrumb a { color: var(--terracotta-light); }

/* ─── ARTICLE CONTENT ────────────────────────────────────────── */
.article-body h2 {
  color: var(--burgundy);
  margin-top: 2.4rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
}

.article-body h3 {
  color: var(--dark);
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
}

.article-body h4 {
  color: var(--text-light);
  margin-top: 1.4rem;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.article-body p { color: var(--text); line-height: 1.8; margin-bottom: 1.1rem; }

.article-body ul, .article-body ol {
  margin: 0.8rem 0 1.1rem 1.4rem;
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.45rem; color: var(--text); }

/* ─── INFO BOX ───────────────────────────────────────────────── */
.info-box {
  background: #FEF4EB;
  border-left: 4px solid var(--terracotta);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin: 1.8rem 0;
}

.info-box.burgundy {
  background: #F9EEF1;
  border-left-color: var(--burgundy);
}

.info-box.brown {
  background: #F8F2E0;
  border-left-color: var(--brown);
}

.info-box p { margin: 0; font-size: 0.95rem; }
.info-box strong { display: block; margin-bottom: 0.3rem; font-size: 1rem; }

/* ─── TABLE ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 1.6rem 0; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,0.08); }

table { width: 100%; border-collapse: collapse; background: var(--card-bg); font-size: 0.93rem; }

thead { background: var(--burgundy); }
thead th { color: #fff; padding: 12px 16px; text-align: left; font-weight: 600; font-size: 0.88rem; letter-spacing: 0.04em; }

tbody tr:nth-child(even) { background: #F8F0E8; }
tbody td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }

/* ─── GRID CARDS ─────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin: 2rem 0;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: box-shadow 0.25s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 6px 24px rgba(44,24,16,0.12);
  transform: translateY(-2px);
}

.card-icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--burgundy); }
.card-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--terracotta); }
.card p { font-size: 0.9rem; color: var(--text-light); margin: 0; }

/* ─── TOC (Table of Contents) ────────────────────────────────── */
.toc {
  background: var(--section-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 26px;
  margin: 0 0 2.4rem;
}

.toc h2 {
  font-size: 1rem;
  font-family: 'Work Sans', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 0.8rem;
  border: none;
  padding: 0;
}

.toc ol { margin: 0 0 0 1.2rem; }
.toc li { margin-bottom: 0.3rem; }
.toc a { color: var(--burgundy); font-size: 0.93rem; }
.toc a:hover { color: var(--terracotta); text-decoration: underline; }

/* ─── HIGHLIGHT BLOCK ────────────────────────────────────────── */
.highlight-block {
  background: linear-gradient(135deg, var(--burgundy-dark), #3D1A0E);
  color: var(--cream);
  border-radius: 12px;
  padding: 36px 32px;
  margin: 2.4rem 0;
  text-align: center;
}

.highlight-block h2, .highlight-block h3 { color: var(--cream); border: none; padding: 0; margin-top: 0; }
.highlight-block p { color: #C4A899; }
.highlight-block a.btn { margin-top: 0.8rem; }

/* ─── DICE VISUAL ────────────────────────────────────────────── */
.dice-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin: 1.6rem 0;
  flex-wrap: wrap;
}

.dice {
  width: 52px;
  height: 52px;
  background: var(--cream);
  border: 2px solid var(--terracotta);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 2px 3px 8px rgba(44,24,16,0.2);
}

/* ─── BOARD POINT DIAGRAM ────────────────────────────────────── */
.board-diagram {
  background: #4A1C0C;
  border-radius: 10px;
  padding: 20px;
  margin: 1.6rem 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 0.7rem;
  color: var(--cream);
  overflow-x: auto;
}

/* ─── FAQ / ACCORDION ────────────────────────────────────────── */
.faq-list { margin: 1.6rem 0; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item details summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  color: var(--dark);
  transition: background 0.2s;
}

.faq-item details summary:hover { background: var(--section-alt); }
.faq-item details summary::after { content: '+'; font-size: 1.3rem; color: var(--terracotta); font-weight: 400; }
.faq-item details[open] summary::after { content: '−'; }

.faq-item details .faq-answer {
  padding: 16px 20px;
  background: #FFFBF7;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ─── COMPARISON TABLE ───────────────────────────────────────── */
.compare-table thead th:first-child { background: var(--dark); }
.compare-table .check { color: #4CAF50; font-weight: 700; }
.compare-table .cross { color: #E53935; }

/* ─── PRODUCT CARD ───────────────────────────────────────────── */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.2s;
}

.product-card:hover {
  box-shadow: 0 8px 28px rgba(44,24,16,0.14);
  transform: translateY(-3px);
}

.product-card-body { padding: 22px; }
.product-card h3 { font-size: 1.1rem; color: var(--burgundy); margin-bottom: 0.4rem; }
.product-card .price { font-size: 1.4rem; font-weight: 700; color: var(--terracotta); margin: 0.5rem 0; font-family: 'DM Serif Display', serif; }
.product-card p { font-size: 0.88rem; color: var(--text-light); margin-bottom: 0.8rem; }

/* ─── STAT ROW ───────────────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin: 2rem 0;
}

.stat-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.stat-box .stat-number {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--burgundy);
  display: block;
}

.stat-box .stat-label { font-size: 0.82rem; color: var(--text-light); }

/* ─── SECTION SEPARATOR ──────────────────────────────────────── */
.section-sep {
  text-align: center;
  margin: 3rem 0 2.5rem;
  color: var(--terracotta);
  font-size: 1.6rem;
  letter-spacing: 0.4rem;
}

/* ─── HOMEPAGE SECTIONS ──────────────────────────────────────── */
.section { padding: 64px 24px; }
.section.alt { background: var(--section-alt); }
.section.dark { background: var(--dark); }

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 { color: var(--burgundy); }
.section.dark .section-title h2 { color: var(--cream); }
.section-title p { color: var(--text-light); font-size: 1.05rem; max-width: 520px; margin: 0.5rem auto 0; }
.section.dark .section-title p { color: #C4A899; }

.section-inner {
  max-width: 1060px;
  margin: 0 auto;
}

/* ─── ARTICLE CARDS (blog-style) ─────────────────────────────── */
.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  gap: 20px;
  transition: box-shadow 0.25s;
  margin-bottom: 20px;
}

.article-card:hover { box-shadow: 0 4px 20px rgba(44,24,16,0.1); }
.article-card-icon { font-size: 2.4rem; flex-shrink: 0; width: 52px; text-align: center; }
.article-card h3 { font-size: 1.1rem; margin-bottom: 0.3rem; color: var(--burgundy); }
.article-card p { font-size: 0.9rem; color: var(--text-light); margin: 0; }

/* ─── FEATURED BANNER ────────────────────────────────────────── */
.featured-banner {
  background: linear-gradient(135deg, #FEF4EB 0%, #FDF8EF 100%);
  border: 1px solid var(--terracotta);
  border-radius: 12px;
  padding: 32px;
  margin: 2.5rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.featured-banner h3 { color: var(--burgundy); margin-bottom: 0.5rem; }
.featured-banner p { color: var(--text-light); font-size: 0.95rem; margin: 0; }

/* ─── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: #B0A098;
  padding: 56px 24px 0;
  margin-top: 64px;
}

.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.8fr 2fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-about h4 {
  color: var(--cream);
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.footer-about p { font-size: 0.9rem; line-height: 1.7; color: #9A8A82; }
.footer-about a { color: var(--terracotta); }
.footer-about a:hover { color: var(--terracotta-light); }

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-links h5 {
  color: var(--cream);
  font-family: 'Work Sans', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-links ul li { margin-bottom: 0.5rem; }
.footer-links ul li a { color: #9A8A82; font-size: 0.88rem; transition: color 0.2s; }
.footer-links ul li a:hover { color: var(--terracotta-light); }

.footer-bottom {
  max-width: 1060px;
  margin: 0 auto;
  padding: 20px 0;
  font-size: 0.82rem;
  color: #6B5B53;
  text-align: center;
}

/* ─── MISC ───────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  background: var(--section-alt);
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.78rem;
  padding: 2px 10px;
  border-radius: 20px;
  margin: 2px;
}

.tag.terracotta { background: #FEF0E6; border-color: var(--terracotta); color: var(--terracotta); }
.tag.burgundy { background: #F9EEF1; border-color: var(--burgundy); color: var(--burgundy); }

.reading-time { color: var(--text-light); font-size: 0.83rem; margin-bottom: 1.5rem; }

.cta-inline {
  background: var(--section-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--terracotta);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin: 2rem 0;
}

.cta-inline p { margin: 0; font-size: 0.95rem; }
.cta-inline strong { color: var(--burgundy); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { height: 56px; padding: 0 16px; }
  .nav-toggle { display: flex; }
  .site-nav { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--burgundy-dark); border-top: 2px solid var(--terracotta); padding: 12px 0; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul li a { display: block; padding: 10px 20px; border-radius: 0; }

  .hero { padding: 52px 16px 44px; }
  .btn-outline { margin-left: 0; margin-top: 10px; display: block; text-align: center; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }

  .main-content { padding: 32px 16px 48px; }
  .article-card { flex-direction: column; gap: 12px; }
  .featured-banner { grid-template-columns: 1fr; }

  .card-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
}
