/* ============================================
   Badlucksbane Theme v3 - Mobile-First Responsive
   ============================================
   
   Architecture:
   - Base styles = Mobile (no media query)
   - min-width: 480px = Large phones
   - min-width: 640px = Phablets/small tablets
   - min-width: 768px = Tablets
   - min-width: 1024px = Small desktop/laptop
   - min-width: 1280px = Large desktop
   
   Design System:
   - Touch targets: minimum 48px
   - Fluid typography using clamp()
   - CSS Grid + Flexbox
   - Dark theme with CSS variables
   
   Design System v3.1 Integration:
   - Imports Badlucksbane Design System v3.1 for tokens and components
   - Cyberpunk Professional Theme
   ============================================ */

/* ============================================
   DESIGN SYSTEM v3.1 IMPORT
   Master stylesheet with tokens, components, and utilities
   ============================================ */
@import url('/v3.1/design-system-v3.1.css');

/* ============================================
   CSS Variables - Design Tokens
   Cyberpunk Professional Palette - Badlucksbane Lab
   ============================================ */
:root {
  /* Colors - Cyberpunk Professional Palette */
  --bg-color: #0a0a0a;
  --text-color: #f8f9fa;
  --text-secondary: #a8a8a8;
  --text-muted: #6b7280;
  --link-color: #00ff88;      /* Electric Green - Primary */
  --link-hover: #00cc6a;
  --accent-color: #ff6b6b;    /* Coral - Secondary */
  --accent-hover: #ef4444;
  --accent-secondary: #00d4ff; /* Cyber Blue - Accent */
  --border-color: #252525;
  --code-bg: #1e1e1e;
  --code-border: #374151;
  --card-bg: #0f0f23;          /* Deep space black */
  --card-border: rgba(0, 255, 136, 0.15);
  
  /* Semantic Colors */
  --success-bg: rgba(16, 185, 129, 0.15);
  --success-border: #10b981;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --warning-border: #f59e0b;
  --info-bg: rgba(59, 130, 246, 0.15);
  --info-border: #3b82f6;
  --error-bg: rgba(239, 68, 68, 0.15);
  --error-border: #ef4444;
  
  /* RGB values for colored shadows and effects */
  --primary-rgb: 0, 255, 136;
  --secondary-rgb: 255, 107, 107;
  --accent-rgb: 0, 212, 255;
  
  /* Gradients */
  --hero-gradient: linear-gradient(135deg, #0a0a0a 0%, #0f0f23 50%, #0a0a0a 100%);
  --card-gradient: linear-gradient(180deg, #0f0f23 0%, rgba(0, 255, 136, 0.05) 100%);
  --btn-gradient: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
  --glow-gradient: radial-gradient(circle at center, rgba(0, 255, 136, 0.1) 0%, transparent 70%);
  --border-gradient: linear-gradient(90deg, #00ff88, #ff6b6b, #00d4ff);
  
  /* Colored Shadows */
  --shadow-primary: 0 0 20px rgba(0, 255, 136, 0.3);
  --shadow-primary-lg: 0 0 40px rgba(0, 255, 136, 0.2);
  --shadow-secondary: 0 0 20px rgba(255, 107, 107, 0.3);
  --glow-primary: 0 0 25px rgba(0, 255, 136, 0.4);
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.5);
  
  /* Spacing - Mobile-first */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.35s ease;
  
  /* Typography - Fluid scale */
  --text-base: clamp(1rem, 2vw, 1.125rem);
  --text-sm: clamp(0.875rem, 1.5vw, 1rem);
  --text-xs: clamp(0.75rem, 1.25vw, 0.875rem);
  
  /* Z-index layers */
  --z-nav: 100;
  --z-modal: 200;
  --z-tooltip: 300;
}

/* ============================================
   Reset & Base Styles (MOBILE FIRST)
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-body);
  line-height: var(--line-height-normal);
  color: var(--text-color);
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-display: swap;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-color);
  color: white;
  padding: var(--space-sm) var(--space-md);
  z-index: var(--z-nav);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   Typography
   ============================================ */

p {
  margin-bottom: var(--space-md);
  font-size: var(--text-base);
}

p:last-child {
  margin-bottom: 0;
}

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

a:hover,
a:focus {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Fluid heading scale - mobile first
   Uses Playfair Display for h1-h3, Inter for h4-h6 for enhanced hierarchy */
h1 {
  font-family: var(--font-family-heading);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-lg);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
}

h2 {
  font-family: var(--font-family-heading);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-md);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-tight);
}

h3 {
  font-family: var(--font-family-heading);
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-tight);
}

h4 {
  font-family: var(--font-family-body);
  font-size: clamp(1rem, 3vw, 1.15rem);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-normal);
}

/* Special heading styles */
article h1,
article h2,
article h3 {
  margin-top: 0;
}

.time,
.published {
  color: var(--text-muted);
  font-size: var(--text-sm);
  display: block;
  margin-bottom: var(--space-md);
}

/* ============================================
   Navigation - MOBILE FIRST with Hamburger
   ============================================ */

header {
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) var(--space-lg);
  background: var(--card-bg);
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  box-shadow: var(--shadow-sm);
}

/* Navigation container - flex for mobile, will change at 768px */
.nav-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Hamburger menu button - visible on mobile only */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.25rem;
}

.nav-toggle:focus {
  outline: none;
}

.nav-toggle-icon {
  width: 32px;
  height: 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text-color);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Navigation list - base styles */
nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  gap: var(--space-sm);
  display: flex;
  flex-direction: column;
}

/* Hide mobile nav by default on small screens (controlled by JS) */
@media (max-width: 767px) {
  nav ul:not(.nav-open) {
    display: none;
  }
  
  nav ul.nav-open {
    display: flex;
  }
}

nav li {
  margin: 0;
}

nav a {
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  display: block;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  transition: all var(--transition-normal);
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--link-color);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

nav a:hover,
nav a:focus {
  color: var(--link-color);
  background: rgba(0, 255, 136, 0.05);
}

nav a:hover::after,
nav a:focus::after {
  width: 80%;
}

/* Site title on mobile nav */
.nav-title {
  font-weight: 700;
  font-size: 1.1rem;
}

/* ============================================
   Main Content
   ============================================ */

main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  width: 100%;
}

article {
  margin-bottom: var(--space-xl);
}

/* Page-specific max widths for readability */
.notebook-page,
.physics-page,
.aurora-page,
.philosophy-page,
.code-page {
  max-width: 800px;
}

.leg-page {
  max-width: 100%;
}

.leg-page .tagline {
  font-size: var(--text-base);
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: var(--space-lg);
}

.leg-description {
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

/* ============================================
   Media Leg - Tier Blocks
   ============================================ */

.tier-blocks {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.tier {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  background: var(--card-bg);
  transition: all var(--transition-normal);
}

.tier:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-color);
}

.tier h3 {
  margin-bottom: var(--space-md);
  color: var(--accent-color);
}

.turnaround {
  font-weight: bold;
  margin: var(--space-sm) 0;
  display: block;
}

.sample-embed {
  margin: var(--space-md) 0;
}

.sample-embed audio,
.sample-embed video,
.sample-embed img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.sample-embed audio,
.sample-embed video {
  max-width: 400px;
}

.usage-rights {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  margin: var(--space-lg) 0;
  font-size: var(--text-base);
  color: var(--text-color);
}

/* ============================================
   Systems Leg
   ============================================ */

.case-study.lead {
  background: var(--info-bg);
  border-left: 4px solid var(--info-border);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.retainer-offer {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}

/* ============================================
   CTA Buttons
   ============================================ */

.cta-button {
  display: inline-block;
  background: var(--btn-gradient);
  color: white;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-base);
  margin-top: var(--space-md);
  transition: all var(--transition-normal);
  min-height: 48px;
  line-height: 1.5;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:hover,
.cta-button:focus {
  background: var(--btn-gradient);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
  text-decoration: none;
}

.cta-button:active {
  transform: translateY(0);
}

/* ============================================
   Code Blocks
   ============================================ */

pre {
  background: var(--code-bg);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  border: 1px solid var(--code-border);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin: var(--space-md) 0;
  -webkit-overflow-scrolling: touch;
}

code {
  background: var(--code-bg);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, 'Courier New', monospace;
  font-size: var(--text-sm);
}

pre code {
  background: none;
  padding: 0;
}

/* ============================================
   Home Page Specific Styles
   ============================================ */

.prelaunch-banner {
  background: var(--warning-bg);
  border-bottom: 2px solid var(--warning-border);
  padding: var(--space-md) var(--space-lg);
  text-align: center;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: var(--space-md);
  font-size: var(--text-base);
}

.hero {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glow-gradient);
  pointer-events: none;
  opacity: 0.3;
}

.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: pulse 20s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-family-heading);
  font-size: clamp(2rem, 8vw, 3rem);
  margin-bottom: var(--space-md);
  border: none;
  padding: 0;
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-tight);
}

.subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  max-width: 800px;
  margin: 0 auto var(--space-lg);
  line-height: var(--line-height-relaxed);
  font-weight: var(--font-weight-light);
}

.lab-status {
  background: var(--info-bg);
  border-left: 4px solid var(--info-border);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-lg) 0;
  border-radius: var(--radius-sm);
}

.about {
  max-width: 800px;
  margin: 0 auto var(--space-xl);
}

.about h2 {
  margin-top: var(--space-xl);
}

.about h3 {
  margin-top: var(--space-lg);
  font-size: clamp(1.1rem, 3vw, 1.25rem);
}

.sections-overview {
  margin: var(--space-xl) 0;
}

.sections-overview h2 {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.section-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  background: var(--card-bg);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.section-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-gradient);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.section-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 255, 136, 0.15);
  border-color: var(--link-color);
}

.section-card:hover::before {
  transform: scaleX(1);
}

.section-card h3 {
  margin-bottom: var(--space-sm);
}

.section-card h3 a {
  color: var(--accent-color);
}

.section-card p {
  color: var(--text-secondary);
  margin: 0;
}

.legs-overview {
  margin: var(--space-xl) 0;
  background: var(--card-bg);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

.legs-overview h2 {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.legs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin: var(--space-lg) 0;
}

.leg-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.leg-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border-gradient);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.leg-card:hover {
  border-color: var(--link-color);
  box-shadow: 0 12px 30px rgba(0, 255, 136, 0.2);
  transform: translateY(-2px);
}

.leg-card:hover::before {
  transform: scaleX(1);
}

.leg-card.media {
  border-top: 4px solid var(--info-border);
}

.leg-card.systems {
  border-top: 4px solid var(--success-border);
}

.leg-card h3 {
  margin-bottom: var(--space-sm);
}

.leg-card h3 a {
  color: var(--accent-color);
  font-size: clamp(1.25rem, 4vw, 1.4rem);
}

.leg-tagline {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: var(--space-sm);
}

.leg-card.media {
  border-top: 4px solid var(--info-border);
}

.leg-card.systems {
  border-top: 4px solid var(--success-border);
}

.leg-card p {
  color: var(--text-secondary);
  margin: var(--space-sm) 0 0 0;
}

/* ============================================
   Footer
   ============================================ */

footer {
  border-top: 1px solid var(--border-color);
  padding: var(--space-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

footer p {
  margin-bottom: 0;
}

footer a {
  color: var(--text-secondary);
}

footer a:hover {
  color: var(--accent-color);
}

/* ============================================
   Breadcrumb Navigation
   ============================================ */

.breadcrumb {
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: 0;
  margin: 0;
  list-style: none;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb .separator {
  color: var(--text-muted);
  padding: 0 var(--space-xs);
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--link-color);
}

/* ============================================
   Related Content
   ============================================ */

.related-content {
  margin: var(--space-xl) 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
}

.related-content h3 {
  margin-bottom: var(--space-md);
  color: var(--text-color);
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.related-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all var(--transition-normal);
}

.related-item:hover {
  border-color: var(--link-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.related-item h4 {
  margin: 0 0 var(--space-sm) 0;
  font-size: var(--text-base);
  color: var(--link-color);
}

.related-item p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.related-tagline {
  font-style: italic;
}

.related-description {
  font-style: normal;
}

@media (min-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* ============================================
   Utility Classes
   ============================================ */

.text-center {
  text-align: center;
}

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

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

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ============================================
   Responsive Breakpoints - MOBILE FIRST
   min-width media queries (progressively enhance)
   ============================================ */

/* ----- Large Phones / Small Tablets (480px) ----- */
@media (min-width: 480px) {
  html {
    font-size: 16.5px;
  }
  
  .tier-blocks {
    gap: var(--space-lg);
  }
  
  .sample-embed audio,
  .sample-embed video {
    max-width: 450px;
  }
  
  .section-grid {
    gap: var(--space-lg);
  }
}

/* ----- Tablet Portrait (640px) ----- */
@media (min-width: 640px) {
  html {
    font-size: 17px;
  }
  
  main {
    padding: var(--space-lg) var(--space-xl);
  }
  
  .section-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .legs-grid {
    grid-template-columns: 1fr;
  }
  
  /* Navigation - still stacked but more breathing room */
  nav ul[aria-expanded="true"] {
    gap: var(--space-md);
  }
}

/* ----- Tablet Landscape (768px) ----- */
@media (min-width: 768px) {
  /* Navigation - switch to horizontal desktop */
  .nav-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .nav-toggle {
    display: none;
  }
  
  nav ul {
    flex-direction: row;
    gap: var(--space-md);
    align-items: center;
  }
  
  nav a {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-base);
  }
  
  .nav-title {
    display: none;
  }
  
  /* Mobile nav is hidden via JS, but if no JS, show it stacked */
  .no-js nav ul {
    display: flex !important;
  }
  
  .tier-blocks {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .section-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
  }
  
  .legs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }
  
  .hero h1 {
    font-size: clamp(2.25rem, 6vw, 3rem);
  }
  
  h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
  }
}

/* ----- Small Desktop / Large Tablet (1024px) ----- */
@media (min-width: 1024px) {
  html {
    font-size: 17.5px;
  }
  
  main {
    padding: var(--space-xl) var(--space-2xl);
  }
  
  header {
    padding: var(--space-md) var(--space-2xl);
  }
  
  .tier-blocks {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
  }
  
  .section-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .legs-grid {
    gap: var(--space-2xl);
  }
  
  /* Two-column layout for some content */
  .leg-description {
    max-width: 900px;
  }
}

/* ----- Large Desktop (1280px) ----- */
@media (min-width: 1280px) {
  html {
    font-size: 18px;
  }
  
  main {
    padding: var(--space-xl);
  }
  
  header {
    padding: var(--space-md) var(--space-xl);
  }
  
  nav ul {
    gap: var(--space-lg);
  }
  
  .tier-blocks {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
  
  .section-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  .legs-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  /* More refined typography at large screens */
  p {
    font-size: 1.125rem;
    line-height: 1.7;
  }
  
  .lab-status {
    padding: var(--space-lg) var(--space-2xl);
  }
}

/* ----- Extra Large Screens (1536px) ----- */
@media (min-width: 1536px) {
  main {
    max-width: 1400px;
  }
  
  .section-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
  
  .tier-blocks {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  body {
    background: white;
    color: black;
  }
  
  header,
  footer,
  nav,
  .nav-toggle,
  .cta-button,
  .prelaunch-banner {
    display: none;
  }
  
  main {
    padding: 0;
    max-width: none;
  }
  
  a {
    color: #0066cc;
    text-decoration: underline;
  }
  
  pre {
    background: #f5f5f5;
    border: 1px solid #ccc;
  }
  
  code {
    background: #f5f5f5;
    border: 1px solid #ccc;
  }
}

/* ============================================
   Animations - Visual Polish
   ============================================ */

/* Fade in animation for sections */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply fade-in to home page sections with staggered delays */
article.home-page > section {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}
article.home-page > section:nth-child(1) { animation-delay: 0.1s; }
article.home-page > section:nth-child(2) { animation-delay: 0.2s; }
article.home-page > section:nth-child(3) { animation-delay: 0.3s; }
article.home-page > section:nth-child(4) { animation-delay: 0.4s; }
article.home-page > section:nth-child(5) { animation-delay: 0.5s; }
article.home-page > section:nth-child(6) { animation-delay: 0.6s; }

/* Glow pulse for buttons */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.5);
  }
}

/* Enhanced CTA Button with glow */
.cta-button {
  box-shadow: var(--shadow-primary);
  transition: all 0.3s ease;
}

.cta-button:hover {
  box-shadow: var(--shadow-primary-lg);
  transform: translateY(-1px);
}

/* Glow pulse animation for interactive elements */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3); }
  50% { box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.5); }
}

/* Apply subtle glow to cards on hover */
.section-card:hover,
.tier:hover,
.leg-card:hover {
  box-shadow: var(--shadow-primary-lg);
  border-color: var(--link-color);
}

/* Float animation for decorative elements */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Gentle pulse animation for hero background */
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.05); }
}

/* Shimmer effect for special elements */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Shimmer effect for loading states */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Hero section gradient background */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(var(--primary-rgb), 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(var(--secondary-rgb), 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Card gradient backgrounds */
.section-card,
.leg-card,
.tier {
  background: var(--card-gradient);
}

/* ============================================
   Reduced Motion
   ============================================ */
@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;
  }
}
