/* ============================================
   THE GOOD FIGHT - Modern Design System
   Aesthetic: Documentary Brutalism
   ============================================ */

:root {
  /* Color Palette */
  --color-black: #0a0a0a;
  --color-white: #fafafa;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e5e5e5;
  --color-gray-300: #d4d4d4;
  --color-gray-400: #a3a3a3;
  --color-gray-500: #737373;
  --color-gray-600: #525252;
  --color-gray-700: #404040;
  --color-gray-800: #262626;
  --color-gray-900: #171717;

  /* Accent - Warm amber representing hope/rebuilding */
  --color-accent: #d97706;
  --color-accent-light: #f59e0b;
  --color-accent-dark: #b45309;

  /* Typography Scale */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Fluid Typography */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3rem);
  --text-5xl: clamp(3rem, 2rem + 5vw, 4.5rem);
  --text-6xl: clamp(3.75rem, 2.5rem + 6.25vw, 6rem);
  --text-hero: clamp(4rem, 2rem + 10vw, 12rem);

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-40: 10rem;
  --space-48: 12rem;

  /* Animation Easings */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Transitions */
  --transition-fast: 150ms var(--ease-out-quart);
  --transition-base: 300ms var(--ease-out-quart);
  --transition-slow: 500ms var(--ease-out-expo);
  --transition-slower: 800ms var(--ease-out-expo);
  --transition-slowest: 1200ms var(--ease-out-expo);

  /* Layout */
  --container-max: 1400px;
  --container-narrow: 900px;
  --gutter: clamp(1rem, 3vw, 3rem);

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-dramatic: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-gray-900);
  background: var(--color-white);
  overflow-x: hidden;
}

/* Hide default WordPress header/footer structure */
#masthead.site-header,
#colophon.site-footer {
  display: none !important;
}

.site-branding,
.main-navigation {
  display: none !important;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.02em;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:visited {
  color: inherit;
}

a:hover {
  color: inherit;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* Text utilities */
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-gray-500); }
.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.1em; }

/* ============================================
   SCROLL-TRIGGERED ANIMATIONS
   ============================================ */

/* Default: show content (fallback if JS doesn't load) */
[data-animate] {
  opacity: 1;
  transform: none;
}

/* When JS is ready, hide for animation */
.js-ready [data-animate] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1),
              transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.js-ready [data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js-ready [data-animate="fade-up"] {
  transform: translateY(60px);
}

.js-ready [data-animate="fade-left"] {
  transform: translateX(60px);
}

.js-ready [data-animate="fade-right"] {
  transform: translateX(-60px);
}

.js-ready [data-animate="fade-scale"] {
  transform: scale(0.95);
}

.js-ready [data-animate="fade-up"].is-visible,
.js-ready [data-animate="fade-left"].is-visible,
.js-ready [data-animate="fade-right"].is-visible,
.js-ready [data-animate="fade-scale"].is-visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Stagger delays */
.js-ready [data-delay="1"] { transition-delay: 100ms; }
.js-ready [data-delay="2"] { transition-delay: 200ms; }
.js-ready [data-delay="3"] { transition-delay: 300ms; }
.js-ready [data-delay="4"] { transition-delay: 400ms; }
.js-ready [data-delay="5"] { transition-delay: 500ms; }
.js-ready [data-delay="6"] { transition-delay: 600ms; }

/* ============================================
   MODERN BUTTON STYLES
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before {
  opacity: 0.1;
}

.btn--primary {
  background: var(--color-black);
  color: var(--color-white) !important;
}

.btn--primary:hover {
  background: var(--color-gray-800);
  color: var(--color-white) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--outline {
  background: transparent;
  color: var(--color-black) !important;
  border: 2px solid var(--color-black);
}

.btn--outline:hover {
  background: var(--color-black);
  color: var(--color-white) !important;
}

.btn--accent {
  background: var(--color-accent);
  color: var(--color-white) !important;
}

.btn--accent:hover {
  background: var(--color-accent-dark);
  color: var(--color-white) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--ghost {
  background: transparent;
  color: var(--color-white) !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white) !important;
  border-color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   MAGNETIC HOVER EFFECT (for links)
   ============================================ */

.magnetic-link {
  position: relative;
  display: inline-block;
}

.magnetic-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-base);
}

.magnetic-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ============================================
   GRAIN OVERLAY (for texture)
   ============================================ */

.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ============================================
   SMOOTH SCROLL PROGRESS BAR
   ============================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  z-index: 9998;
  transition: width 50ms linear;
}

/* ============================================
   CURSOR FOLLOWER (optional enhancement)
   ============================================ */

.cursor-follower {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 1px solid var(--color-black);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  mix-blend-mode: difference;
  transition: transform 100ms ease-out, width 200ms ease, height 200ms ease;
}

.cursor-follower.is-hovering {
  width: 50px;
  height: 50px;
  border-width: 2px;
}

/* ============================================
   REVEAL ANIMATIONS (for text)
   ============================================ */

.text-reveal {
  overflow: hidden;
  display: inline-block;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform var(--transition-slower);
}

.text-reveal.is-visible span {
  transform: translateY(0);
}

/* Split text animation */
.split-text .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px) rotate(10deg);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.split-text.is-visible .char {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

/* ============================================
   PARALLAX SECTIONS
   ============================================ */

.parallax-section {
  position: relative;
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

/* ============================================
   IMAGE TREATMENTS
   ============================================ */

.img-reveal {
  position: relative;
  overflow: hidden;
}

.img-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-black);
  transform-origin: left;
  transition: transform var(--transition-slowest);
}

.img-reveal.is-visible::after {
  transform: scaleX(0);
  transform-origin: right;
}

.img-reveal img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.2);
  transition: transform var(--transition-slowest);
  transition-delay: 200ms;
}

.img-reveal.is-visible img {
  transform: scale(1);
}

/* ============================================
   SECTION DIVIDERS
   ============================================ */

.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gray-300), transparent);
  margin: var(--space-24) 0;
}

.section-divider--accent {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

/* ============================================
   NUMBER COUNTER STYLES
   ============================================ */

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--color-black) 0%, var(--color-gray-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-gray-500);
}

/* ============================================
   CARD STYLES
   ============================================ */

.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-dramatic);
}

.card--dark {
  background: var(--color-gray-900);
  color: var(--color-white);
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

@media (max-width: 768px) {
  .cursor-follower {
    display: none;
  }

  [data-animate] {
    transform: translateY(30px);
  }

  [data-animate="fade-left"],
  [data-animate="fade-right"] {
    transform: translateY(30px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
