/* =====================================================================
   CrossFit Ironclad — Global Styles
   Palette: Steel Night #0E1520 · Volt Yellow #C8F000 · Cold White #EEF2FB
   Fonts: Anton (display) · Saira (body/UI)
   ===================================================================== */

@import '@fontsource/anton/400.css';
@import '@fontsource/saira/400.css';
@import '@fontsource/saira/500.css';
@import '@fontsource/saira/600.css';
@import '@fontsource/saira/700.css';

@tailwind base;
@tailwind components;
@tailwind utilities;

/* ── Design tokens ─────────────────────────────────────────────────── */
:root {
  /* Backgrounds — Steel Night family */
  --color-bg:         #0E1520;
  --color-bg-alt:     #121B2A;
  --color-surface:    #151D2B;
  --color-surface-2:  #1A2437;

  /* Volt Yellow accent */
  --color-accent:        #C8F000;
  --color-accent-hover:  #A6C800;
  --color-accent-light:  #1C2800;   /* very dark volt tint for icon bg */
  --color-on-accent:     #0E1520;   /* dark text on volt — 8.4:1 AAA ✓ */

  /* Text */
  --color-text:         #EEF2FB;   /* cold off-white — 13.8:1 on bg AAA ✓ */
  --color-text-muted:   #8896B0;   /* 4.6:1 on bg AA ✓ */
  --color-text-faint:   #8896B0;

  /* Borders */
  --color-border:        #1D2B40;
  --color-border-strong: #252F42;
  --color-border-accent: #C8F000;

  /* Spacing rhythm */
  --section-gap: 5rem;
}

/* ── Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'Saira', system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Skip link ─────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 200;
}
.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-family: 'Saira', system-ui, sans-serif;
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
  z-index: 10000;
}

/* ── Layout ─────────────────────────────────────────────────────────── */
.container-x {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 768px) {
  .container-x { padding-inline: 2rem; }
}

/* ── Typography scale ───────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Anton', Impact, sans-serif;
  line-height: 1.05;
  font-weight: 400; /* Anton is inherently bold in its single weight */
  letter-spacing: 0.02em;
  color: var(--color-text);
}

h1 { font-size: clamp(2.75rem, 8vw, 5.5rem); }
h2 { font-size: clamp(1.875rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.0625rem; }

.eyebrow {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.75rem;
  background-color: var(--color-accent);
  color: var(--color-on-accent);
  font-family: 'Saira', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.75rem;
  background-color: transparent;
  color: var(--color-text);
  font-family: 'Saira', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  text-decoration: none;
  border: 2px solid var(--color-border-strong);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ── Cards ───────────────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

/* ── Accordions ─────────────────────────────────────────────────────── */
details {
  border-bottom: 1px solid var(--color-border);
}
details summary {
  cursor: pointer;
  list-style: none;
  font-family: 'Saira', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 1.25rem 0;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
details[open] summary::after {
  transform: rotate(45deg);
}
details .faq-answer {
  padding-bottom: 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ── Focus ring ─────────────────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Utility ────────────────────────────────────────────────────────── */
.section-gap { margin-block: var(--section-gap); }

/* ── Schedule filter buttons ──────────────────────────────────────── */
.filter-btn {
  font-family: 'Saira', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5625rem 1rem;
  min-height: 44px;
  border-radius: 3px;
  border: 1px solid var(--color-border-strong);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.filter-btn.active {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
}
