/*
Theme Name: Fantasy Gaming World
Theme URI: https://fantasygamingworld.com
Author: Fantasy Gaming World
Description: A clean, editorial WordPress theme for Fantasy Gaming World and the Primal Forces d20 RPG.
Version: 1.0.1
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: fgw
*/

:root {
  --ink: #20241f;
  --muted: #667064;
  --forest: #405b38;
  --forest-dark: #2d4428;
  --moss: #6c805e;
  --gold: #b49a62;
  --ivory: #f8f5ed;
  --paper: #fffdf7;
  --line: #ded9ca;
  --shadow: 0 18px 50px rgba(32, 36, 31, .10);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--ivory); font-family: var(--sans); line-height: 1.65; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em; }
img { display: block; max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-shell { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }

.site-header { position: relative; z-index: 20; background: rgba(255,253,247,.96); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 92px; display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 13px; margin-right: auto; text-decoration: none; }
.brand img { width: 76px; height: 76px; object-fit: contain; }
.brand-copy { display: none; }
.main-nav { display: flex; align-items: center; gap: 28px; font-family: var(--serif); font-size: 16px; }
.main-nav a { text-decoration: none; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--forest); }
.shop-link { display: inline-flex; align-items: center; gap: 8px; padding: 12px 17px; border-radius: 4px; color: white; background: var(--forest); font: 700 13px/1 var(--sans); letter-spacing: .045em; text-decoration: none; text-transform: uppercase; }
.shop-link:hover { background: var(--forest-dark); }

.hero { background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(390px, .82fr) 1.3fr; min-height: 520px; }
.hero-copy { padding: 72px 56px 64px 0; align-self: center; }
.eyebrow { color: var(--forest); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.08; }
.hero h1 { max-width: 660px; margin: 14px 0 20px; font-size: clamp(46px, 5vw, 72px); font-weight: 500; letter-spacing: -.035em; }
.hero-copy > p { max-width: 620px; margin: 0 0 30px; color: #3f463e; font-size: 19px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 49px; padding: 0 22px; border: 1px solid var(--forest); border-radius: 4px; color: white; background: var(--forest); font-size: 13px; font-weight: 800; letter-spacing: .055em; text-decoration: none; text-transform: uppercase; }
.button.secondary { color: var(--forest-dark); background: transparent; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(45,68,40,.16); }
.hero-art { min-height: 520px; background: #cbd4c0 url('assets/fgw-hero.png') center/cover no-repeat; }

.section { padding: 74px 0; }
.section.paper { background: var(--paper); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: clamp(34px, 4vw, 48px); font-weight: 500; letter-spacing: -.025em; }
.section-head p { max-width: 540px; margin: 0; color: var(--muted); }
.text-link { color: var(--forest); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }

.posts-grid { display: grid; grid-template-columns: 1.7fr repeat(2, 1fr); gap: 22px; }
.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card a { text-decoration: none; }
.post-thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #c8cdbb, #738065); object-fit: cover; width: 100%; }
.post-card.post-12 .post-thumb { object-position: center top; }
.post-body { padding: 21px; }
.post-meta { color: var(--forest); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.post-card h3 { margin: 8px 0 10px; font-size: 25px; font-weight: 500; }
.post-card.featured h3 { font-size: 31px; }
.post-card p { margin: 0; color: var(--muted); font-size: 14px; }
.empty-posts { grid-column: 1 / -1; padding: 44px; border: 1px dashed var(--line); text-align: center; background: rgba(255,255,255,.4); }

.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.topic-card { min-height: 240px; padding: 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); text-decoration: none; }
.topic-card:hover { border-color: var(--moss); box-shadow: var(--shadow); }
.topic-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--forest); font: 500 22px var(--serif); }
.topic-card h3 { margin: 28px 0 10px; font-size: 25px; font-weight: 500; }
.topic-card p { margin: 0; color: var(--muted); font-size: 14px; }

.primal-banner { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr .95fr; border-radius: 8px; color: white; background: var(--forest-dark); box-shadow: var(--shadow); }
.primal-copy { padding: 54px; }
.primal-copy h2 { margin: 10px 0 18px; font-size: clamp(38px, 4vw, 56px); font-weight: 500; }
.primal-copy p { max-width: 610px; color: #e7eadf; }
.forces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 30px; }
.force { padding: 11px 4px; border: 1px solid rgba(255,255,255,.2); border-radius: 4px; font-size: 11px; text-align: center; text-transform: uppercase; letter-spacing: .07em; }
.primal-visual { min-height: 430px; background: linear-gradient(135deg, rgba(180,154,98,.12), rgba(20,35,20,.5)), url('assets/fgw-hero.png') 72% center/cover no-repeat; }

.newsletter { padding: 54px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; border-top: 1px solid var(--line); }
.newsletter h2 { margin: 0 0 6px; font-size: 34px; font-weight: 500; }
.newsletter p { margin: 0; color: var(--muted); }
.newsletter-note { color: var(--forest); font-size: 13px; font-weight: 700; }

.site-footer { padding: 50px 0; color: #e5e8de; background: #20281e; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 45px; }
.footer-brand { font: 500 25px var(--serif); }
.site-footer p { color: #bec6b9; }
.footer-title { color: white; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: #dce1d7; text-decoration: none; }
.copyright { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); color: #aeb8a9; font-size: 13px; }

.content-wrap { width: min(820px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0; }
.content-wrap.wide { width: min(1180px, calc(100% - 40px)); }
.page-title { margin: 0 0 32px; font-size: clamp(42px, 6vw, 72px); font-weight: 500; letter-spacing: -.035em; }
.entry-content { font-family: var(--serif); font-size: 19px; }
.entry-content > * { max-width: 760px; margin-inline: auto; }
.entry-content > .alignwide { max-width: 1080px; }
.entry-content h2 { margin-top: 2em; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-header { margin-bottom: 36px; }
.post-header .post-meta { margin-bottom: 12px; }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 56px 0; }
  .hero-art { min-height: 430px; }
  .posts-grid, .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card.featured { grid-column: 1 / -1; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .primal-banner { grid-template-columns: 1fr; }
  .primal-visual { min-height: 320px; }
}

@media (max-width: 640px) {
  .site-shell { width: min(100% - 28px, 1240px); }
  .header-inner { min-height: 74px; }
  .brand img { width: 58px; height: 58px; }
  .shop-link { padding: 11px 12px; font-size: 11px; }
  .hero h1 { font-size: 43px; }
  .hero-art { min-height: 320px; }
  .section { padding: 54px 0; }
  .section-head { display: block; }
  .section-head .text-link { display: inline-block; margin-top: 14px; }
  .posts-grid, .archive-grid, .topic-grid { grid-template-columns: 1fr; }
  .primal-copy { padding: 34px 24px; }
  .forces { grid-template-columns: repeat(2, 1fr); }
  .newsletter { padding: 38px 24px; grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
