/* Google Fonts: Plus Jakarta Sans (Headings/Brand) + Inter (Body/UI) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@700;800;900&display=swap');

/* ==========================================================================
   SAN DIEGO FENCING CENTER (SDFC) - DESIGN SYSTEM
   Modern Athletic Editorial Design Architecture
   Derived from official SDFC brand identity and vector assets
   ========================================================================== */

:root {
  /* Brand Color Palette - Derived from SDFC Vector Logos */
  --sdfc-navy: #000F2E;             /* Deep Midnight Navy (Primary Brand Authority) */
  --sdfc-navy-light: #071D49;       /* Lighter Navy for elevated surfaces */
  --sdfc-navy-dark: #000819;        /* Darker Navy for footers and rich contrasts */
  --sdfc-crimson: #B80617;          /* Heritage SDFC Crimson (Primary Accent & Action) */
  --sdfc-crimson-bright: #C0121C;   /* Vibrant Crest Red */
  --sdfc-crimson-hover: #980412;    /* Darkened Crimson for accessible hover */
  --sdfc-crimson-subtle: rgba(184, 6, 23, 0.08); /* Low-opacity Crimson tint */
  --sdfc-carbon: #171818;           /* Carbon Black / Mask Mesh Tint */
  --sdfc-gold: #C59B27;             /* Laurel Gold (Restrained accent) */

  /* Neutral Surface & Typography Scale */
  --sdfc-white: #FFFFFF;
  --sdfc-gray-50: #F8FAFC;          /* Piste Platinum (Section alt backgrounds) */
  --sdfc-gray-100: #F1F5F9;         /* Card backgrounds */
  --sdfc-gray-200: #E2E8F0;         /* Fine structural borders / piste lines */
  --sdfc-gray-300: #CBD5E1;         /* Dividers */
  --sdfc-gray-400: #94A3B8;         /* Subdued icons & disabled states */
  --sdfc-gray-500: #64748B;         /* Secondary metadata text */
  --sdfc-gray-600: #475569;         /* Supporting copy */
  --sdfc-gray-700: #334155;         /* Editorial body text */
  --sdfc-gray-800: #1E293B;         /* Headings */
  --sdfc-gray-900: #0F172A;         /* Primary high-contrast text */

  /* Semantic Typography Hierarchy */
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --text-xs: 0.75rem;               /* 12px */
  --text-sm: 0.875rem;              /* 14px */
  --text-base: 1rem;                /* 16px */
  --text-lg: 1.125rem;              /* 18px */
  --text-xl: 1.25rem;               /* 20px */
  --text-2xl: clamp(1.35rem, 2vw, 1.625rem);
  --text-3xl: clamp(1.75rem, 2.6vw, 2.25rem);
  --text-4xl: clamp(2.15rem, 3.8vw, 3rem);
  --text-5xl: clamp(2.75rem, 5vw, 3.85rem);
  --text-display: clamp(3rem, 6.5vw, 4.75rem);

  /* Spacing Scale (4px base) */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */

  /* Layout Containers */
  --container-max: 1240px;
  --container-narrow: 940px;
  --container-prose: 740px;
  --header-height: 76px;

  /* Architectural Fencing Accents */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;     /* Restrained modern corners, no oversized bubbles */
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 15, 46, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 15, 46, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 15, 46, 0.12);
  --shadow-editorial: 0 20px 48px -10px rgba(0, 15, 46, 0.16);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--sdfc-gray-700);
  background-color: var(--sdfc-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  max-width: 100vw;
}

/* Accessibility Focus Ring (WCAG 2.2 AA) */
:focus-visible {
  outline: 2px solid var(--sdfc-crimson);
  outline-offset: 3px;
}

/* Accessible Skip Navigation Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--sdfc-crimson);
  color: var(--sdfc-white);
  padding: var(--space-3) var(--space-6);
  z-index: 9999;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
  text-decoration: none;
}
.skip-link:focus {
  top: var(--space-4);
}

/* Typography Elements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--sdfc-navy);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-4);
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--sdfc-crimson);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--sdfc-crimson-hover);
}

img, svg, video, iframe, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

table {
  max-width: 100%;
}

/* Reusable Container Classes */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
  box-sizing: border-box;
}

.container-narrow {
  max-width: var(--container-narrow);
}

.container-prose {
  max-width: var(--container-prose);
}

/* Section Spacing */
.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  position: relative;
}

.section-sm {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section-lg {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.bg-light {
  background-color: var(--sdfc-gray-50);
}

.bg-navy {
  background-color: var(--sdfc-navy);
  color: var(--sdfc-white);
}

.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy h4 {
  color: var(--sdfc-white);
}

.bg-navy p {
  color: var(--sdfc-gray-300);
}

/* Editorial Eyebrow Labels */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sdfc-crimson);
  margin-bottom: var(--space-3);
}

.eyebrow-navy {
  color: var(--sdfc-navy);
}

.eyebrow-light {
  color: #FFA5A5;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  background-color: currentColor;
}

/* Fencing Piste / Strip Linear Decoration */
.piste-line {
  position: relative;
}
.piste-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--sdfc-gray-200) 20%, var(--sdfc-gray-200) 80%, transparent 100%);
}

/* Athletic Grid & Flex Helpers */
.grid {
  display: grid;
  gap: var(--space-8);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Unified Responsive Breakpoints */
@media (max-width: 1024px) {
  .grid { gap: var(--space-6); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding-top: var(--space-16); padding-bottom: var(--space-16); }
  .section-lg { padding-top: var(--space-20); padding-bottom: var(--space-20); }
}

@media (max-width: 768px) {
  .grid { gap: var(--space-5); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding-top: var(--space-12); padding-bottom: var(--space-12); }
  .section-sm { padding-top: var(--space-8); padding-bottom: var(--space-8); }
  .section-lg { padding-top: var(--space-16); padding-bottom: var(--space-16); }
  .container { padding-left: var(--space-4); padding-right: var(--space-4); }
  .card { padding: var(--space-5); }
}

@media (max-width: 480px) {
  .grid { gap: var(--space-4); }
  .section { padding-top: var(--space-10); padding-bottom: var(--space-10); }
  .container { padding-left: var(--space-3); padding-right: var(--space-3); }
  .card { padding: var(--space-4); }
}

/* Reduced Motion Optimization (WCAG 2.2 AA) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
