/* ==========================================================================
   Free State Weightlifting — design tokens
   Palette: iron black, chalk white, steel greys, banner yellow
   Type: Anton (display, poster/gym-sign feel) + Barlow (body) + JetBrains Mono (data/labels)
   ========================================================================== */

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

:root {
  --ink: #111113;
  --ink-soft: #1d1d20;
  --steel: #6b6b6f;
  --steel-light: #9d9da1;
  --chalk: #f7f5f0;
  --chalk-dim: #e8e5dd;
  --yellow: #f0c230;
  --yellow-deep: #d9a812;
  --line: rgba(247, 245, 240, 0.14);
  --line-dark: rgba(17, 17, 19, 0.12);

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', monospace;

  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--yellow-deep);
  display: inline-block;
}

/* ---------------- Header / Nav ---------------- */
.site-header {
  background: var(--ink);
  border-bottom: 3px solid var(--yellow);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--chalk);
}
.brand img { height: 46px; width: 46px; }
.brand-text {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  line-height: 1.05;
}
.brand-text span { display: block; color: var(--yellow); font-size: 0.62rem; letter-spacing: 0.18em; font-family: var(--font-mono); text-transform: uppercase; margin-top: 2px; }

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--chalk-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 3px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--ink); background: var(--yellow); }
.nav-links a.active { color: var(--ink); background: var(--yellow); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--chalk);
  padding: 8px 10px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    gap: 0;
    padding: 8px 28px 18px;
    border-bottom: 3px solid var(--yellow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 4px; width: 100%; }
}

:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ---------------- Barbell divider (signature element) ---------------- */
.barbell-rule {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  opacity: 0.95;
}
.barbell-rule svg { width: 100%; height: auto; display: block; }

/* ---------------- Hero ---------------- */
.hero {
  background: var(--ink);
  color: var(--chalk);
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero-mark {
  width: 168px;
  height: 168px;
  margin: 0 auto 30px;
  filter: drop-shadow(0 0 0 transparent);
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  color: var(--chalk);
}
.hero h1 .accent { color: var(--yellow); }
.hero-sub {
  font-family: var(--font-mono);
  color: var(--steel-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-top: 18px;
}
.hero-lede {
  max-width: 620px;
  margin: 26px auto 0;
  font-size: 1.12rem;
  color: var(--chalk-dim);
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 3px;
  display: inline-block;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: var(--chalk); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--chalk); }
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }

/* ---------------- Sections ---------------- */
section { padding: 84px 0; }
.section-dark { background: var(--ink); color: var(--chalk); }
.section-mid { background: var(--ink-soft); color: var(--chalk); }

/* Watermark: faint crest on light-background sections */
section:not(.hero):not(.section-dark):not(.section-mid) {
  position: relative;
  overflow: hidden;
}
section:not(.hero):not(.section-dark):not(.section-mid)::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -70px;
  width: 420px;
  height: 420px;
  background-image: url('assets/logo-mark.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}
section > .wrap { position: relative; z-index: 1; }

@media (max-width: 640px) {
  section:not(.hero):not(.section-dark):not(.section-mid)::after {
    width: 260px;
    height: 260px;
    right: -40px;
    bottom: -40px;
  }
}

/* Watermark on light cards too */
.card {
  position: relative;
  overflow: hidden;
}
.card::after {
  content: '';
  position: absolute;
  right: -36px;
  bottom: -36px;
  width: 200px;
  height: 200px;
  background-image: url('assets/logo-mark.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}
.card > * { position: relative; z-index: 1; }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-top: 14px; }
.section-head p { margin-top: 14px; font-size: 1.05rem; color: var(--steel); }
.section-dark .section-head p, .section-mid .section-head p { color: var(--chalk-dim); }

/* Pillars grid (mission) */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}
.pillar {
  background: var(--chalk);
  padding: 32px 30px;
}
.pillar .glyph {
  width: 34px; height: 34px;
  margin-bottom: 16px;
}
.pillar h3 { font-size: 1.15rem; margin-bottom: 10px; }
.pillar p { color: var(--steel); margin: 0; font-size: 0.98rem; }

@media (max-width: 860px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .pillars { grid-template-columns: 1fr; }
}

/* Banner ribbon (matches logo EST./YEAR banners) */
.ribbon-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}
.ribbon {
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 22px;
  clip-path: polygon(6% 0, 100% 0, 94% 100%, 0% 100%);
}

/* Cards (events / info) */
.card {
  background: var(--chalk);
  border: 1px solid var(--line-dark);
  padding: 30px;
}

/* Empty state (events TBC) */
.empty-state {
  text-align: center;
  padding: 70px 30px;
  border: 2px dashed var(--line);
  border-radius: 4px;
}
.empty-state h3 { font-size: 1.5rem; color: var(--chalk); margin-bottom: 12px; }
.empty-state p { color: var(--chalk-dim); max-width: 460px; margin: 0 auto; }
.chalk-dust {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 18px;
  display: block;
}

/* Gallery placeholder tiles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
.gallery-tile {
  aspect-ratio: 4 / 3;
  border: 2px dashed var(--line);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--steel-light);
}
.gallery-tile svg { width: 34px; height: 34px; opacity: 0.7; }
.gallery-tile span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chalk-dim);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
}
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-item {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-dark);
}
.contact-item:last-child { border-bottom: none; }
.contact-item .icon {
  width: 22px; height: 22px; flex-shrink: 0; margin-top: 3px;
  color: var(--yellow-deep);
}
.contact-item .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 4px;
}
.contact-item .value { font-size: 1.08rem; font-weight: 600; }
.contact-item .value a { text-decoration: none; }
.contact-item .value a:hover { color: var(--yellow-deep); }

.map-frame {
  border: 1px solid var(--line-dark);
  height: 100%;
  min-height: 320px;
}
.map-frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--steel-light);
  padding: 46px 0 30px;
  border-top: 3px solid var(--yellow);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 40px; width: 40px; }
.footer-brand .brand-text { color: var(--chalk); }
.footer-meta { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; text-align: right; }
.footer-meta p { margin: 4px 0; }
@media (max-width: 600px) {
  .footer-grid { flex-direction: column; }
  .footer-meta { text-align: left; }
}

/* Page intro banner (non-home pages) */
.page-banner {
  background: var(--ink);
  color: var(--chalk);
  padding: 60px 0 46px;
  border-bottom: 3px solid var(--yellow);
  text-align: left;
}
.page-banner h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
.page-banner .eyebrow { margin-bottom: 16px; }

.prose p { color: var(--steel); font-size: 1.06rem; margin: 0 0 20px; max-width: 700px; }
.prose p:last-child { margin-bottom: 0; }
.section-dark .prose p, .section-mid .prose p { color: var(--chalk-dim); }
