/* Import Brand Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Luxurious+Script&display=swap');
@import 'animations-impact.css';

/* ==========================================================================
   Design Tokens - Toastmasters International Brand Architecture
   Standards: DS-08, DS-09, DS-10, COLOR-01, COLOR-11, TYPO-01, UXUI-09, UXUI-19
   ========================================================================== */
:root {
  /* Primitive Brand Colors */
  --color-loyal-blue: #004165;
  --color-loyal-blue-dark: #002d46;
  --color-loyal-blue-light: #005a8c;
  --color-true-maroon: #772432;
  --color-true-maroon-dark: #581a24;
  --color-true-maroon-light: #942d3e;
  --color-cool-gray: #a9b2b1;
  --color-cool-gray-light: #f3f5f5;
  --color-cool-gray-dark: #7e8786;
  --color-happy-yellow: #f2df74;
  --color-happy-yellow-hover: #e6ce4f;
  --color-happy-yellow-dark: #b89c1a;

  /* Semantic Color Tokens */
  --color-surface-base: var(--color-cool-gray-light);
  --color-surface-card: #ffffff;
  --color-surface-subtle: #f8fafc;
  --color-surface-elevated: #ffffff;
  
  --color-text-primary: #0f172a;     /* Slate-900 (High contrast WCAG AAA) */
  --color-text-secondary: #475569;   /* Slate-600 */
  --color-text-muted: #64748b;       /* Slate-500 */
  --color-text-on-dark: #ffffff;
  --color-text-on-accent: #0f172a;   /* High contrast on happyYellow (WCAG AA > 7:1) */

  --color-action-primary: var(--color-loyal-blue);
  --color-action-accent: var(--color-happy-yellow);
  --color-action-danger: var(--color-true-maroon);
  --color-focus-ring: var(--color-happy-yellow);
  --color-focus-outline: var(--color-loyal-blue);

  /* Typography Tokens */
  --font-headings: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-script: 'Luxurious Script', cursive;

  /* Ergonomics & Touch Target Tokens (UXUI-09, WCAG 2.5.5) */
  --touch-target-min: 44px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 250ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Styles */
body {
  font-family: var(--font-body);
  background-color: var(--color-surface-base);
  color: var(--color-text-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: inherit;
}

.font-script {
  font-family: var(--font-script);
}

/* Theme Utilities */
.bg-loyal-blue { background-color: var(--color-loyal-blue); }
.text-loyal-blue { color: var(--color-loyal-blue); }
.border-loyal-blue { border-color: var(--color-loyal-blue); }

.bg-true-maroon { background-color: var(--color-true-maroon); }
.text-true-maroon { color: var(--color-true-maroon); }
.border-true-maroon { border-color: var(--color-true-maroon); }

.bg-cool-gray { background-color: var(--color-cool-gray); }
.text-cool-gray { color: var(--color-cool-gray); }
.border-cool-gray { border-color: var(--color-cool-gray); }

.bg-happy-yellow { background-color: var(--color-happy-yellow); }
.text-happy-yellow { color: var(--color-happy-yellow); }
.border-happy-yellow { border-color: var(--color-happy-yellow); }

/* Minimum Touch Target (UXUI-09 & Fitts' Law) */
.touch-target {
  min-height: var(--touch-target-min);
  min-width: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Interactive States & Button Variants (UXUI-21, WEB-12)
   Covers default, hover, focus-visible, active, disabled, loading
   ========================================================================== */
.btn-tm-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch-target-min);
  padding: 0.625rem 1.5rem;
  background-color: var(--color-loyal-blue);
  color: #ffffff;
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}
.btn-tm-primary:hover {
  background-color: var(--color-loyal-blue-dark);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}
.btn-tm-primary:active {
  transform: translateY(0);
  background-color: #001f30;
}
.btn-tm-primary:focus-visible {
  outline: 2px solid var(--color-happy-yellow);
  outline-offset: 2px;
}
.btn-tm-primary:disabled,
.btn-tm-primary[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.btn-tm-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch-target-min);
  padding: 0.625rem 1.5rem;
  background-color: var(--color-happy-yellow);
  color: var(--color-text-on-accent);
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}
.btn-tm-accent:hover {
  background-color: var(--color-happy-yellow-hover);
  box-shadow: 0 4px 12px rgba(242, 223, 116, 0.4);
  transform: translateY(-1px);
}
.btn-tm-accent:active {
  transform: translateY(0);
  background-color: #d8c242;
}
.btn-tm-accent:focus-visible {
  outline: 2px solid var(--color-loyal-blue);
  outline-offset: 2px;
}
.btn-tm-accent:disabled,
.btn-tm-accent[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.btn-tm-maroon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch-target-min);
  padding: 0.625rem 1.5rem;
  background-color: var(--color-true-maroon);
  color: #ffffff;
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}
.btn-tm-maroon:hover {
  background-color: var(--color-true-maroon-dark);
  transform: translateY(-1px);
}
.btn-tm-maroon:active {
  transform: translateY(0);
}
.btn-tm-maroon:focus-visible {
  outline: 2px solid var(--color-happy-yellow);
  outline-offset: 2px;
}

.btn-tm-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch-target-min);
  padding: 0.625rem 1.25rem;
  background-color: #ffffff;
  color: var(--color-loyal-blue);
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 65, 101, 0.25);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}
.btn-tm-secondary:hover {
  background-color: var(--color-cool-gray-light);
  border-color: var(--color-loyal-blue);
  color: var(--color-loyal-blue-dark);
  transform: translateY(-1px);
}
.btn-tm-secondary:active {
  transform: translateY(0);
  background-color: #e2e8f0;
}
.btn-tm-secondary:focus-visible {
  outline: 2px solid var(--color-loyal-blue);
  outline-offset: 2px;
}

/* ==========================================================================
   Accessibility Focus States - WCAG AA & AAA Compliance (UXUI-19, UXUI-21)
   ========================================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-focus-ring) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 3px var(--color-focus-outline) !important;
}

/* Avoid outline disruption inside dark headers/footers */
header a:focus-visible,
header button:focus-visible,
footer a:focus-visible,
footer button:focus-visible {
  outline: 2px solid var(--color-happy-yellow) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px rgba(0, 45, 70, 0.8) !important;
}

/* Form input standard focus behavior */
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-loyal-blue);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-true-maroon);
  color: white;
  padding: 12px 24px;
  z-index: 100;
  transition: top 0.2s ease;
  font-family: var(--font-headings);
  font-weight: bold;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-happy-yellow);
}

/* Reduced Motion Preference (UXUI-19) */
@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;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-cool-gray-light);
}
::-webkit-scrollbar-thumb {
  background: var(--color-loyal-blue);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-true-maroon);
}

/* Custom Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.5s ease-out forwards;
}

.animate-slide-down {
  animation: slideDown 0.3s ease-out forwards;
}

/* Card glassmorphism and subtle elevation shadows */
.card-premium {
  background: #ffffff;
  border: 1px solid rgba(169, 178, 177, 0.3);
  box-shadow: 0 4px 20px -2px rgba(0, 65, 101, 0.05);
  border-radius: 12px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.card-premium:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -4px rgba(0, 65, 101, 0.1);
  border-color: rgba(0, 65, 101, 0.2);
}

/* Timeline specific styles */
.timeline-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: var(--color-true-maroon);
  border-radius: 50%;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--color-cool-gray);
  transform: translateX(-50%);
}

/* Pulse animation for active highlights */
.pulse-highlight {
  position: relative;
}

.pulse-highlight::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid var(--color-happy-yellow);
  border-radius: inherit;
  animation: pulse-ring 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.98); opacity: 0.8; }
  70% { transform: scale(1.05); opacity: 0; }
  100% { transform: scale(1.05); opacity: 0; }
}

/* Hide scrollbar for touch carousels */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================================
   Hero Animated Background - Pure Scenic Auditorium (Zero Committee Portraits)
   ========================================================================== */
@keyframes heroKenBurnsCinematic {
  0% {
    transform: scale(1.0) translate(0, 0);
  }
  25% {
    transform: scale(1.08) translate(-1.5%, -1%);
  }
  50% {
    transform: scale(1.14) translate(1%, -0.5%);
  }
  75% {
    transform: scale(1.07) translate(-0.5%, 1%);
  }
  100% {
    transform: scale(1.0) translate(0, 0);
  }
}

.hero-kenburns-animated {
  will-change: transform;
  animation: heroKenBurnsCinematic 24s ease-in-out infinite alternate;
}

@keyframes heroGlowPulse {
  0% {
    opacity: 0.25;
    transform: scale(0.96);
  }
  100% {
    opacity: 0.65;
    transform: scale(1.04);
  }
}

.hero-ambient-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(242, 223, 116, 0.15) 0%, transparent 65%);
  animation: heroGlowPulse 9s ease-in-out infinite alternate;
  pointer-events: none;
  mix-blend-mode: screen;
}

@media (prefers-reduced-motion: reduce) {
  .hero-kenburns-animated {
    animation: none !important;
    transform: none !important;
  }
  .hero-ambient-glow {
    animation: none !important;
  }
}

/* Print CSS */
@media print {
  body {
    background: white;
    color: black;
  }
  .no-print {
    display: none !important;
  }
}


.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--color-cool-gray);
  transform: translateX(-50%);
}

/* Pulse animation for active highlights */
.pulse-highlight {
  position: relative;
}

.pulse-highlight::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid var(--color-happy-yellow);
  border-radius: inherit;
  animation: pulse-ring 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.98); opacity: 0.8; }
  70% { transform: scale(1.05); opacity: 0; }
  100% { transform: scale(1.05); opacity: 0; }
}

/* Hide scrollbar for touch carousels */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================================
   Hero Animated Background - Pure Scenic Auditorium (Zero Committee Portraits)
   ========================================================================== */
@keyframes heroKenBurnsCinematic {
  0% {
    transform: scale(1.0) translate(0, 0);
  }
  25% {
    transform: scale(1.08) translate(-1.5%, -1%);
  }
  50% {
    transform: scale(1.14) translate(1%, -0.5%);
  }
  75% {
    transform: scale(1.07) translate(-0.5%, 1%);
  }
  100% {
    transform: scale(1.0) translate(0, 0);
  }
}

.hero-kenburns-animated {
  will-change: transform;
  animation: heroKenBurnsCinematic 24s ease-in-out infinite alternate;
}

@keyframes heroGlowPulse {
  0% {
    opacity: 0.25;
    transform: scale(0.96);
  }
  100% {
    opacity: 0.65;
    transform: scale(1.04);
  }
}

.hero-ambient-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(242, 223, 116, 0.15) 0%, transparent 65%);
  animation: heroGlowPulse 9s ease-in-out infinite alternate;
  pointer-events: none;
  mix-blend-mode: screen;
}

@media (prefers-reduced-motion: reduce) {
  .hero-kenburns-animated {
    animation: none !important;
    transform: none !important;
  }
  .hero-ambient-glow {
    animation: none !important;
  }
}

/* Print CSS */
@media print {
  body {
    background: white;
    color: black;
  }
  .no-print {
    display: none !important;
  }
}
