/* ============================================================
   SPARTON CAPITAL — design system
   Dark theme only. Gold palette extracted from logo.
   Display: League Spartan · Body: Inter
   ============================================================ */

:root {
  /* ---- Brand palette ---- */
  --gold-hi:   #EEDEAE;   /* highlight */
  --gold:      #C9A94A;   /* primary — THE Sparton gold */
  --gold-deep: #8D6D37;   /* deep shadow */

  --color-bg:        #0A0A0B;   /* near-black base */
  --color-surface:   #141416;   /* elevated */
  --color-surface-2: #1B1B1E;   /* one step up */
  --color-border:    rgba(201, 169, 74, 0.15);
  --color-border-soft: rgba(217, 214, 204, 0.08);

  --color-text:  #D9D6CC;   /* warm off-white */
  --color-heading: #F1EEE6;
  --color-muted: #8A857A;

  /* ---- Type scale (fluid) ---- */
  --text-xs:   clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm:   clamp(0.875rem, 0.84rem + 0.2vw, 0.9375rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --text-lg:   clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
  --text-xl:   clamp(1.35rem, 1.1rem + 1.1vw, 2rem);
  --text-2xl:  clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --text-3xl:  clamp(2.6rem, 1.3rem + 5vw, 5rem);
  --text-hero: clamp(3rem, 1rem + 7vw, 6.5rem);

  /* ---- Spacing (4px) ---- */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  --transition: 260ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 660px;
  --content-default: 1080px;
  --content-wide: 1280px;

  --font-display: 'League Spartan', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --header-h: 76px;
}

/* ============================================================
   Typography
   ============================================================ */
body { letter-spacing: 0.005em; font-weight: 400; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-heading);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--color-heading);
}

/* small caps label */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  display: inline-block;
}
.eyebrow.no-rule::before { display: none; }

.lede {
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.6;
  max-width: 60ch;
}

p { max-width: 68ch; font-weight: 300; }
strong { font-weight: 600; color: var(--color-heading); }

.gold-text { color: var(--gold); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
}
.text-link .arrow { transition: transform var(--transition); }
.text-link:hover { color: var(--gold-hi); }
.text-link:hover .arrow { transform: translateX(3px); }

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container-wide {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container-narrow {
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

section { position: relative; }
.section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
}
.section-tight { padding-block: clamp(var(--space-12), 6vw, var(--space-20)); }

.section-head { margin-bottom: var(--space-12); max-width: 62ch; }
.section-head h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-4);
  text-transform: uppercase;
}
.section-head p { margin-top: var(--space-5); color: var(--color-muted); font-size: var(--text-base); }

.divider-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  border: 0;
}

/* film grain + subtle gold vignette applied on body::after via each page */
.grain::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("assets/svg/grain.svg");
  background-repeat: repeat;
  mix-blend-mode: overlay;
}

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--color-border);
}
.header-inner {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}
.brand { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.brand img { height: 30px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-2) 0;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold-hi); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: var(--space-4); flex-shrink: 0; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  min-height: 46px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: #0A0A0B;
  font-weight: 600;
}
.btn-primary:hover { background: var(--gold-hi); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn-sm { padding: var(--space-2) var(--space-5); min-height: 40px; font-size: var(--text-xs); }
.btn .arrow { transition: transform var(--transition); }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.card:hover { border-color: var(--color-border); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  padding-block: var(--space-20) var(--space-10);
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-16);
}
.footer-brand img { height: 34px; margin-bottom: var(--space-5); }
.footer-brand p { color: var(--color-muted); font-size: var(--text-sm); max-width: 34ch; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-5);
  font-weight: 600;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a {
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 300;
}
.footer-col a:hover { color: var(--gold-hi); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border-soft);
  color: var(--color-muted);
  font-size: var(--text-xs);
}
.footer-bottom a { color: var(--color-muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* ============================================================
   Page hero (interior pages)
   ============================================================ */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(var(--space-16), 10vw, var(--space-32)));
  padding-bottom: clamp(var(--space-12), 6vw, var(--space-20));
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border-soft);
}
.page-hero::before {
  /* subtle greek key/pillar texture at edge */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 100% 0%, rgba(201,169,74,0.07), transparent 55%);
  pointer-events: none;
}
.page-hero h1 {
  font-size: var(--text-3xl);
  text-transform: uppercase;
  line-height: 0.95;
}
.page-hero .lede { margin-top: var(--space-6); }

/* ============================================================
   Forms
   ============================================================ */
.form-field { margin-bottom: var(--space-5); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.form-field label {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-2);
  font-weight: 500;
}
.form-field label .req { color: var(--gold); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text);
  font-size: var(--text-base);
  font-weight: 300;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--color-surface);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: #55524b; }
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23C9A94A' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}
.file-input-wrap {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.file-input-wrap input { padding: var(--space-2) 0; border: none; background: none; }
.form-status {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  display: none;
}
.form-status.show { display: block; }
.form-status.success { background: rgba(201,169,74,0.1); border: 1px solid var(--color-border); color: var(--gold-hi); }
.form-status.error { background: rgba(200,80,80,0.08); border: 1px solid rgba(200,80,80,0.3); color: #e0a0a0; }

/* ============================================================
   Utility motion
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.16,1,0.3,1), transform 700ms cubic-bezier(0.16,1,0.3,1);
}
[data-reveal].in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav.open { display: flex; }
  .form-row { grid-template-columns: 1fr; }
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 99;
  background: rgba(10,10,11,0.98);
  backdrop-filter: blur(20px);
  flex-direction: column;
  padding: var(--space-8) var(--space-6);
  gap: var(--space-2);
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  text-transform: uppercase;
  color: var(--color-heading);
  text-decoration: none;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-soft);
  letter-spacing: 0.02em;
}
.mobile-nav a:hover { color: var(--gold); }
.mobile-nav .btn { margin-top: var(--space-6); }


/* ---- Empty states for CMS-driven sections ---- */
.content-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-12) var(--space-8);
  text-align: center;
}
.content-empty h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  text-transform: uppercase;
  color: var(--gold-hi);
  margin-bottom: var(--space-3);
}
.content-empty p { color: var(--color-muted); font-size: var(--text-sm); max-width: 46ch; margin-inline: auto; }
