/*
Theme Name: Wargamer MX Command
Theme URI: https://wargamermx.com
Author: Origen Media
Description: Spanish-first tabletop gaming news theme for Wargamer MX, inspired by modern hobby community hubs.
Version: 0.1.3
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.1
Text Domain: wargamermx
*/

:root {
  --wmx-black: #050706;
  --wmx-iron: #10130f;
  --wmx-panel: #171b15;
  --wmx-panel-2: #20261d;
  --wmx-text: #e8e2d2;
  --wmx-muted: #a9a493;
  --wmx-line: rgba(214, 204, 178, 0.14);
  --wmx-red: #8f3a2e;
  --wmx-gold: #b9944a;
  --wmx-blue: #4f6770;
  --wmx-green: #637047;
  --wmx-brass: #a88745;
  --wmx-olive: #3f4a31;
  --wmx-hazard: #c59a34;
  --wmx-max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--wmx-black);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 16% 0%, rgba(99, 112, 71, 0.26), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(79, 103, 112, 0.16), transparent 34%),
    linear-gradient(180deg, #050706 0%, #10130f 52%, #050706 100%);
  color: var(--wmx-text);
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

img,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-alert {
  background:
    repeating-linear-gradient(135deg, rgba(5, 7, 6, 0.24) 0 10px, transparent 10px 20px),
    linear-gradient(90deg, #323a25, #687246 48%, #323a25);
  color: #f4e8c3;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  padding: 8px 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(185, 148, 74, 0.34);
  background: rgba(5, 7, 6, 0.92);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  width: min(calc(100% - 32px), var(--wmx-max));
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  margin: 0 auto;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
}

.site-brand__name {
  color: #f4ead3;
  font-size: 26px;
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-brand__tag {
  color: var(--wmx-gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.site-menu-toggle {
  display: none;
}

.site-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--wmx-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--wmx-text);
}

.site-menu-button span,
.site-menu-button::before,
.site-menu-button::after {
  content: "";
  width: 19px;
  height: 2px;
  display: block;
  margin: 5px auto;
  background: currentColor;
}

.site-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: rgba(243, 239, 228, 0.78);
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav .current-menu-item > a {
  color: var(--wmx-gold);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-search input {
  width: 170px;
  min-height: 40px;
  border: 1px solid var(--wmx-line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--wmx-text);
  padding: 0 10px;
}

.site-search button,
.button-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(185, 148, 74, 0.5);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 6px, transparent 6px 12px),
    rgba(99, 112, 71, 0.2);
  color: #f4e8c3;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.site-main {
  min-height: calc(100vh - 76px);
}

.section {
  width: min(calc(100% - 32px), var(--wmx-max));
  margin: 0 auto;
  padding: 56px 0;
}

.section--tight {
  padding-top: 24px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  border-bottom: 2px solid rgba(185, 148, 74, 0.34);
  padding-bottom: 12px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--wmx-gold);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.page-title,
.hero-title,
.entry-title {
  margin: 0;
  color: #f4ead3;
  font-size: clamp(40px, 8vw, 88px);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 0.95;
  text-transform: uppercase;
}

.page-copy,
.hero-copy {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(243, 239, 228, 0.78);
  font-size: 19px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 22px;
}

.feature-card,
.side-card,
.news-card,
.system-card,
.promo-band,
.entry-content,
.page-content {
  border: 1px solid var(--wmx-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018)),
    rgba(23, 27, 21, 0.72);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.feature-card {
  position: relative;
  min-height: 520px;
  display: grid;
  align-items: end;
  overflow: hidden;
  text-decoration: none;
}

.feature-card::after,
.side-card::after,
.news-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.82));
  pointer-events: none;
}

.feature-card__image,
.side-card__image,
.news-card__image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(99, 112, 71, 0.42), rgba(79, 103, 112, 0.24));
}

.feature-card__image img,
.side-card__image img,
.news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-card__body {
  position: relative;
  z-index: 2;
  padding: clamp(24px, 5vw, 44px);
}

.feature-card__title {
  max-width: 760px;
  margin: 0;
  font-size: clamp(32px, 4.1vw, 52px);
  line-height: 0.98;
  text-transform: uppercase;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(185, 148, 74, 0.48);
  background: rgba(0, 0, 0, 0.35);
  color: #dec48a;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.hero-side {
  display: grid;
  gap: 22px;
}

.side-card {
  position: relative;
  min-height: 249px;
  display: grid;
  align-items: end;
  overflow: hidden;
  text-decoration: none;
}

.side-card__body {
  position: relative;
  z-index: 2;
  padding: 20px;
}

.side-card__title {
  margin: 0;
  font-size: 25px;
  line-height: 1;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.news-card {
  position: relative;
  min-height: 340px;
  overflow: hidden;
}

.news-card a {
  position: relative;
  display: grid;
  align-items: end;
  height: 100%;
  min-height: 340px;
  text-decoration: none;
}

.news-card__image {
  aspect-ratio: auto;
}

.news-card__body {
  position: relative;
  z-index: 2;
  padding: 18px;
  background: linear-gradient(180deg, transparent, rgba(5, 7, 6, 0.82));
}

.news-card__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.05;
}

.news-card__excerpt {
  margin: 12px 0 0;
  color: rgba(243, 239, 228, 0.72);
  font-size: 15px;
}

.fallback-emblem {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--wmx-gold);
  font-size: 36px;
  font-weight: 950;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.system-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  text-decoration: none;
}

.system-card strong {
  display: block;
  color: #f4ead3;
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
}

.system-card span {
  color: var(--wmx-muted);
  font-size: 14px;
}

.promo-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  background:
    repeating-linear-gradient(135deg, rgba(5, 7, 6, 0.16) 0 12px, transparent 12px 24px),
    linear-gradient(90deg, rgba(99, 112, 71, 0.34), rgba(79, 103, 112, 0.17)),
    rgba(23, 27, 21, 0.78);
}

.promo-band h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 56px);
  line-height: 0.95;
  text-transform: uppercase;
}

.promo-band p {
  margin: 12px 0 0;
  color: rgba(243, 239, 228, 0.78);
}

.entry-header {
  width: min(calc(100% - 32px), 940px);
  margin: 0 auto;
  padding: 66px 0 26px;
}

.entry-meta {
  margin: 18px 0 0;
  color: var(--wmx-muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.entry-content,
.page-content {
  width: min(calc(100% - 32px), 900px);
  margin: 0 auto 76px;
  padding: clamp(24px, 4vw, 42px);
  color: rgba(243, 239, 228, 0.88);
  font-size: 19px;
}

.entry-content > :first-child,
.page-content > :first-child {
  margin-top: 0;
}

.entry-content > :last-child,
.page-content > :last-child {
  margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.page-content h2,
.page-content h3 {
  color: #f4ead3;
  line-height: 1.08;
}

.entry-content a,
.page-content a {
  color: #dbc487;
}

.entry-content .wp-block-image,
.entry-content .wp-block-gallery,
.entry-content .wp-block-embed {
  margin: 32px 0;
}

.entry-content .wp-block-embed__wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
}

.entry-content .wp-block-embed__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.page-numbers {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wmx-line);
  color: rgba(243, 239, 228, 0.78);
  padding: 0 12px;
  text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover,
.page-numbers:focus-visible {
  border-color: rgba(185, 148, 74, 0.6);
  color: #f4e8c3;
}

.site-footer {
  border-top: 1px solid var(--wmx-line);
  background: #050706;
}

.site-footer__inner {
  width: min(calc(100% - 32px), var(--wmx-max));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 34px 0;
  color: var(--wmx-muted);
  font-size: 14px;
}

.footer-menu {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 980px) {
  .site-header__inner {
    grid-template-columns: auto auto;
  }

  .site-menu-button {
    display: block;
    justify-self: end;
  }

  .site-nav,
  .site-search {
    display: none;
  }

  .site-menu-toggle:checked ~ .site-nav {
    position: fixed;
    inset: 112px 0 auto;
    display: block;
    border-bottom: 1px solid var(--wmx-line);
    background: rgba(6, 7, 8, 0.98);
    padding: 24px 16px;
  }

  .site-menu-toggle:checked ~ .site-nav ul {
    width: min(100%, 520px);
    display: grid;
    justify-content: stretch;
    gap: 16px;
    margin: 0 auto;
  }

  .hero-grid,
  .promo-band {
    grid-template-columns: 1fr;
  }

  .news-grid,
  .system-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .section {
    padding: 42px 0;
  }

  .site-alert {
    font-size: 11px;
  }

  .feature-card {
    min-height: 430px;
  }

  .news-grid,
  .system-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .site-footer__inner {
    display: block;
  }
}
