/* =========================================================
   IRONVALE WARGAMING CLUB — shared stylesheet
   Design tokens: campaign-dossier theme
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@400;500;600;700&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color */
  --ink: #14171b;
  --panel: #1c2126;
  --panel-raised: #232a30;
  --panel-line: #333c44;
  --parchment: #e8e1cf;
  --parchment-dim: #cfc7ae;
  --brass: #b08d3e;
  --brass-bright: #d4af61;
  --verdigris: #4c7a6e;
  --oxide: #9c3b2e;
  --oxide-bright: #c24a3a;

  /* Type */
  --font-display: 'Bebas Neue', 'Oswald', sans-serif;
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a { color: var(--brass-bright); text-decoration: none; }
a:hover { color: var(--oxide-bright); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Hex-grid texture ---------- */
.hex-field {
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(20,23,27,0.2) 0%, rgba(20,23,27,0.85) 75%, var(--ink) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='96' viewBox='0 0 84 96'%3E%3Cg fill='none' stroke='%23B08D3E' stroke-opacity='0.16' stroke-width='1'%3E%3Cpath d='M42 0 L84 24 L84 72 L42 96 L0 72 L0 24 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 84px 96px;
}

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--oxide-bright);
  display: inline-block;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(20, 23, 27, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--panel-line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--parchment);
}
.brand:hover { color: var(--parchment); }
.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--brass);
  text-transform: uppercase;
  margin-top: 2px;
}

nav.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}
nav.primary-nav a {
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
nav.primary-nav a:hover,
nav.primary-nav a[aria-current="page"] {
  color: var(--brass-bright);
  border-bottom-color: var(--oxide-bright);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--panel-line);
  color: var(--parchment);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 780px) {
  nav.primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--panel-line);
    display: none;
  }
  nav.primary-nav.open { display: block; }
  nav.primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 28px 20px;
  }
  nav.primary-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--panel-line);
  }
  .nav-toggle { display: inline-block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 24px;
  border: 1px solid var(--oxide-bright);
  color: var(--parchment);
  background: var(--oxide);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover {
  background: var(--oxide-bright);
  color: var(--ink);
  transform: translateY(-1px);
}
.btn.ghost {
  background: transparent;
  border-color: var(--brass);
  color: var(--brass-bright);
}
.btn.ghost:hover {
  background: var(--brass);
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  padding: 110px 0 90px;
  position: relative;
}
.hero .eyebrow { margin-bottom: 22px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.98;
  letter-spacing: 0.01em;
  margin: 0 0 24px;
  color: var(--parchment);
  max-width: 14ch;
}
.hero h1 span { color: var(--oxide-bright); }
.hero p.lede {
  font-size: 19px;
  color: var(--parchment-dim);
  max-width: 54ch;
  margin: 0 0 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
section.tight { padding: 56px 0; }
.section-head { margin-bottom: 44px; max-width: 62ch; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: 0.01em;
  margin: 14px 0 0;
  color: var(--parchment);
}
.section-head p { color: var(--parchment-dim); margin-top: 12px; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--panel-line) 20%, var(--panel-line) 80%, transparent);
  border: 0;
  margin: 0;
}

/* ---------- Pillars (Home) ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pillar {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  padding: 30px 26px;
  border-top: 3px solid var(--brass);
}
.pillar h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  letter-spacing: 0.03em;
  color: var(--brass-bright);
  margin: 0 0 10px;
  text-transform: uppercase;
}
.pillar p { color: var(--parchment-dim); margin: 0; font-size: 15.5px; }

@media (max-width: 820px) {
  .pillars { grid-template-columns: 1fr; }
}

/* ---------- Order card (next engagement) ---------- */
.order-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  display: grid;
  grid-template-columns: 150px 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 28px 32px;
  position: relative;
}
.order-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--oxide);
}
.order-date {
  font-family: var(--font-mono);
  text-align: center;
  border-right: 1px solid var(--panel-line);
  padding-right: 24px;
}
.order-date .day { font-size: 40px; color: var(--parchment); line-height: 1; display: block; }
.order-date .mon { font-size: 12px; letter-spacing: 0.14em; color: var(--brass-bright); text-transform: uppercase; }
.order-body h3 { font-family: var(--font-heading); font-size: 21px; margin: 0 0 6px; color: var(--parchment); }
.order-body p { margin: 0; color: var(--parchment-dim); font-size: 15px; }
.order-meta { font-family: var(--font-mono); font-size: 12px; color: var(--verdigris); margin-top: 8px; }

@media (max-width: 700px) {
  .order-card { grid-template-columns: 1fr; text-align: left; }
  .order-date { border-right: 0; border-bottom: 1px solid var(--panel-line); padding-right: 0; padding-bottom: 16px; display: flex; align-items: baseline; gap: 10px; }
}

/* ---------- Campaign log (Events page) ---------- */
.log-entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 30px;
  padding: 34px 0;
  border-bottom: 1px solid var(--panel-line);
}
.log-entry:first-of-type { border-top: 1px solid var(--panel-line); }
.log-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass);
  letter-spacing: 0.1em;
}
.log-index .date-big { display: block; font-family: var(--font-mono); font-size: 28px; color: var(--parchment); margin-top: 6px; }
.log-body h3 { font-family: var(--font-heading); font-size: 22px; color: var(--parchment); margin: 0 0 8px; }
.log-body p { color: var(--parchment-dim); margin: 0 0 14px; }
.log-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--verdigris);
  border: 1px solid var(--verdigris);
  padding: 4px 9px;
}

@media (max-width: 640px) {
  .log-entry { grid-template-columns: 1fr; }
}

/* ---------- Home carousel ("Field Dispatches") ---------- */
.carousel {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
.carousel-viewport {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  background: var(--panel);
}
.carousel-track {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  aspect-ratio: 16 / 8;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease;
}
.carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
.carousel-slide .plate-img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
}
.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 32px;
  background: linear-gradient(0deg, rgba(20,23,27,0.92) 0%, rgba(20,23,27,0.55) 60%, transparent 100%);
}
.carousel-caption .eyebrow { display: inline-flex; margin-bottom: 6px; }
.carousel-caption p {
  margin: 0;
  color: var(--parchment);
  font-size: 17px;
  max-width: 56ch;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(20,23,27,0.75);
  border: 1px solid var(--brass);
  color: var(--parchment);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.carousel-btn:hover { background: var(--oxide); border-color: var(--oxide-bright); }
.carousel-btn.prev { left: 40px; }
.carousel-btn.next { right: 40px; }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--brass);
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.carousel-dots button.is-active { background: var(--brass-bright); }

@media (max-width: 700px) {
  .carousel-btn { width: 38px; height: 38px; font-size: 18px; }
  .carousel-btn.prev { left: 14px; }
  .carousel-btn.next { right: 14px; }
  .carousel-caption { padding: 18px 20px; }
  .carousel-caption p { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide { transition: none; }
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.plate {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  overflow: hidden;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease;
}
.plate:hover { border-color: var(--brass); }
.plate:hover .plate-img::before {
  content: "View →";
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-bright);
  z-index: 1;
}
.plate-img {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--panel-raised), var(--ink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--panel-line);
  letter-spacing: 0.1em;
  position: relative;
}
.plate-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='96' viewBox='0 0 84 96'%3E%3Cpath fill='none' stroke='%23333C44' stroke-width='1' d='M42 0 L84 24 L84 72 L42 96 L0 72 L0 24 Z'/%3E%3C/svg%3E");
}
.plate-caption {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.plate-caption span:first-child { font-family: var(--font-heading); font-size: 14px; color: var(--parchment); }
.plate-caption span:last-child { font-family: var(--font-mono); font-size: 11px; color: var(--brass); }

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.lightbox.is-open { display: block; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 23, 27, 0.92);
}
.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 6vh auto 0;
  padding: 0 70px;
}
.lightbox-img {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--brass);
}
.lightbox-close {
  position: absolute;
  top: -46px;
  right: 70px;
  background: transparent;
  border: 1px solid var(--panel-line);
  color: var(--parchment);
  width: 38px;
  height: 38px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { border-color: var(--oxide-bright); color: var(--oxide-bright); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  background: rgba(20,23,27,0.75);
  border: 1px solid var(--brass);
  color: var(--parchment);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav:hover { background: var(--oxide); border-color: var(--oxide-bright); }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }
.lightbox-caption {
  padding: 16px 4px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.lightbox-caption #lightbox-title { font-family: var(--font-heading); font-size: 18px; color: var(--parchment); }
.lightbox-caption #lightbox-plate { font-family: var(--font-mono); font-size: 12px; color: var(--brass); letter-spacing: 0.08em; }

@media (max-width: 700px) {
  .lightbox-content { padding: 0 20px; margin-top: 12vh; }
  .lightbox-close { top: -42px; right: 20px; }
  .lightbox-nav.prev { left: -4px; }
  .lightbox-nav.next { right: -4px; }
  .lightbox-nav { width: 38px; height: 38px; font-size: 19px; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: start;
}
.about-grid p { color: var(--parchment-dim); }
.roster {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  padding: 26px 28px;
}
.roster h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass-bright);
  margin: 0 0 16px;
}
.roster dl { margin: 0; }
.roster dt { font-family: var(--font-mono); font-size: 11px; color: var(--verdigris); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 14px; }
.roster dd { margin: 4px 0 0; color: var(--parchment); font-size: 15px; }

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus,
.field textarea:focus { border-color: var(--brass); }
.form-note { font-family: var(--font-mono); font-size: 12px; color: var(--parchment-dim); margin-top: 10px; }

.contact-info h3 { font-family: var(--font-heading); font-size: 15px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brass-bright); margin: 28px 0 10px; }
.contact-info h3:first-child { margin-top: 0; }
.contact-info p { color: var(--parchment-dim); margin: 0; }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- News / Bulletin posts ---------- */
.post-list { display: flex; flex-direction: column; }
.post {
  padding: 40px 0;
  border-bottom: 1px solid var(--panel-line);
}
.post:first-of-type { border-top: 1px solid var(--panel-line); }
.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--parchment-dim);
  letter-spacing: 0.04em;
}
.post h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 28px);
  color: var(--parchment);
  margin: 0 0 14px;
}
.post p {
  color: var(--parchment-dim);
  margin: 0 0 14px;
  max-width: 70ch;
}
.post-byline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass);
  letter-spacing: 0.04em;
}

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--panel-line);
  padding: 46px 0;
  margin-top: 40px;
}
footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
footer.site-footer .foot-brand {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--parchment-dim);
}
footer.site-footer .foot-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--panel-line);
  letter-spacing: 0.05em;
}
footer.site-footer a { color: var(--parchment-dim); }
footer.site-footer a:hover { color: var(--brass-bright); }
