/* ============================================================
   MAIN STYLES
   CSS Custom Properties, Reset, Base, Layout, Buttons,
   Section Headers, Scroll Reveal Stagger
   ============================================================ */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Brand Colors */
  --cooper-red: #BF0D3E;
  --cooper-red-light: #e8416a;
  --cooper-red-dark: #8a0a2d;
  --navy: #2a3b6b;
  --navy-light: #3d5299;
  --dark-bg: #1a1a2e;
  --dark-bg-lighter: #222240;

  /* Neutral Palette */
  --white: #ffffff;
  --gray-50: #f8f9fb;
  --gray-100: #f1f3f6;
  --gray-200: #e2e6ec;
  --gray-300: #cdd3dc;
  --gray-400: #9ba3b2;
  --gray-500: #4b5563;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-bg-light: rgba(255, 255, 255, 0.65);
  --glass-border-light: rgba(255, 255, 255, 0.85);

  /* Spacing */
  --gap: 20px;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;

  /* Typography */
  --font-primary: 'Inter', sans-serif;
  --font-body: 'Lato', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.14), 0 8px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 20px 50px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px 80px;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  margin-bottom: 48px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cooper-red);
  margin-bottom: 12px;
}

.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cooper-red);
  border-radius: 2px;
}

.section-title {
  font-family: var(--font-primary);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400;
  color: var(--gray-900);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--gray-500);
  margin-top: 12px;
  max-width: 600px;
  line-height: 1.6;
  font-weight: 300;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-primary);
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--cooper-red);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(191,13,62,0.3);
}

.btn-primary:hover {
  background: var(--cooper-red-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(191,13,62,0.4);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ============================================================
   SCROLL REVEAL STAGGER
   ============================================================ */
.bento-tile:nth-child(1) { transition-delay: 0.05s; }
.bento-tile:nth-child(2) { transition-delay: 0.1s; }
.bento-tile:nth-child(3) { transition-delay: 0.15s; }
.bento-tile:nth-child(4) { transition-delay: 0.2s; }
.bento-tile:nth-child(5) { transition-delay: 0.25s; }
.bento-tile:nth-child(6) { transition-delay: 0.3s; }
.bento-tile:nth-child(7) { transition-delay: 0.35s; }

/* Transition for scroll reveal */
.bento-tile {
  transition-property: opacity, transform, box-shadow, border-color, background;
  transition-duration: 0.6s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   RESPONSIVE — Shared
   ============================================================ */
@media (max-width: 900px) {
  .main-content {
    padding: 40px 20px 60px;
  }
}

@media (max-width: 680px) {
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   ACCESSIBILITY
   Screen reader text, focus styles, reduced motion
   ============================================================ */

/**
 * Screen Reader Text (WordPress standard)
 *
 * Visually hidden but available to assistive technology.
 * The :focus/:active rules let skip links appear when tabbed to.
 */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
  white-space: nowrap;
}

.screen-reader-text:focus,
.screen-reader-text:active {
  background: var(--dark-bg);
  clip: auto !important;
  clip-path: none;
  color: var(--white);
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 12px 24px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-lg);
}

/**
 * Visible Focus Styles
 *
 * :focus-visible fires only on keyboard navigation, not mouse clicks.
 * Cooper Red outline provides a clear, on-brand focus indicator
 * that meets WCAG 2.1 AA contrast requirements against both
 * dark and light backgrounds.
 */
:focus-visible {
  outline: 2px solid var(--cooper-red);
  outline-offset: 2px;
}

/* Remove the default outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Buttons and interactive elements get a slightly softer glow */
.btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cooper-red);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(191, 13, 62, 0.15);
}

/**
 * Reduced Motion
 *
 * Respects the user's OS-level preference for reduced motion.
 * Disables all animations and transitions so content appears
 * instantly without any movement. This is non-negotiable for
 * users with vestibular disorders.
 */
@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;
  }
}
