/* ============================================
   WATERLOO ABC — Variables, Reset & Base Styles
   ============================================ */

/* --- Custom Properties --- */
:root {
  /* Brand Colors — Blue & White */
  --color-primary: #2B5EA7;
  --color-primary-dark: #1E4578;
  --color-primary-light: #3A75C4;
  --color-highlight: #4A8FE7;

  /* Backgrounds */
  --color-bg-dark: #0D1B2E;
  --color-bg-light: #F7F9FC;
  --color-surface-dark: #142640;
  --color-surface: #FFFFFF;

  /* Text */
  --color-text: #0D1B2E;
  --color-text-muted: #6B7FA3;
  --color-text-on-dark: #FFFFFF;
  --color-text-on-primary: #FFFFFF;

  /* Utility */
  --color-border: #D0D8E4;
  --color-border-dark: #1E3455;
  --color-overlay: rgba(13, 27, 46, 0.7);
  --color-overlay-light: rgba(13, 27, 46, 0.4);

  /* Shadows — blue-tinted, layered */
  --shadow-sm: 0 1px 3px rgba(43, 94, 167, 0.08), 0 1px 2px rgba(13, 27, 46, 0.06);
  --shadow-md: 0 4px 12px rgba(43, 94, 167, 0.1), 0 2px 4px rgba(13, 27, 46, 0.06);
  --shadow-lg: 0 12px 40px rgba(43, 94, 167, 0.15), 0 4px 12px rgba(13, 27, 46, 0.08);
  --shadow-xl: 0 20px 60px rgba(43, 94, 167, 0.2), 0 8px 20px rgba(13, 27, 46, 0.1);

  /* Typography */
  --font-heading: 'Bebas Neue', cursive;
  --font-body: 'Barlow', sans-serif;

  /* Type Scale (1.25 ratio) */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.563rem;
  --text-2xl: 1.953rem;
  --text-3xl: 2.441rem;
  --text-4xl: 3.052rem;
  --text-hero: clamp(3rem, 8vw, 5.5rem);

  /* Spacing tokens */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-section: clamp(4rem, 8vw, 7rem);

  /* Layout */
  --container-max: 1200px;
  --container-wide: 1400px;
  --nav-height: 80px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-base: 350ms;
  --duration-slow: 600ms;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* --- Skip to Content --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  padding: var(--space-sm) var(--space-lg);
  font-weight: 600;
  z-index: 9999;
  border-radius: var(--radius-sm);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-md);
}

/* --- Base Typography --- */
.heading-hero {
  font-size: var(--text-hero);
  letter-spacing: 0.02em;
}

.heading-section {
  font-size: clamp(2rem, 5vw, var(--text-4xl));
  letter-spacing: 0.02em;
}

.heading-sub {
  font-size: var(--text-2xl);
}

.text-body {
  font-size: var(--text-base);
  line-height: 1.7;
}

.text-body--lg {
  font-size: var(--text-lg);
  line-height: 1.65;
}

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

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

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

/* --- Section base --- */
.section {
  padding-block: var(--space-section);
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

.section--light {
  background-color: var(--color-bg-light);
  color: var(--color-text);
}

.section--primary {
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
}

/* --- Scroll Animation Base --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal--left {
  transform: translateX(-40px);
}

.reveal--right {
  transform: translateX(40px);
}

.reveal--scale {
  transform: scale(0.92);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Stagger delays for children */
.stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger > .reveal:nth-child(2) { transition-delay: 100ms; }
.stagger > .reveal:nth-child(3) { transition-delay: 200ms; }
.stagger > .reveal:nth-child(4) { transition-delay: 300ms; }
.stagger > .reveal:nth-child(5) { transition-delay: 400ms; }
.stagger > .reveal:nth-child(6) { transition-delay: 500ms; }

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
