/* ========================================
   ALL DUCKS, NO DRAKES - DESIGN SYSTEM
   Quack Pop Color Palette
   ======================================== */

:root {
  /* Swamp/Duck Color Palette */
  --color-primary: #6B8E5A;       /* camouflage duck green */
  --color-primary-700: #4A6B3A;   /* darker swamp green */
  --color-secondary: #C8860D;     /* muted duck bill orange */
  --color-accent: #8FA67A;        /* lighter swamp green */
  --color-bg: #E8F0E1;            /* light swamp background */
  --color-surface: #D4E0C5;       /* swamp surface green */
  --color-text: #2D3D2D;          /* dark swamp text */
  --color-text-muted: #5A6B4F;    /* muted swamp text */
  --color-success: #7A8E6A;       /* swamp success green */
  --color-danger: #B8552B;        /* muted danger orange */
  --color-warning: #C8860D;       /* duck bill warning */
  --color-info: #7A8E6A;          /* swamp info green */

  /* Design Tokens */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  --shadow-xl: 0 12px 32px rgba(0,0,0,.15);

  /* Typography */
  --font-heading: 'Inter', ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', monospace;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --container-max-width: 1200px;
  --header-height: 100px;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-700);
}

/* ========================================
   LAYOUT UTILITIES
   ======================================== */

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   BUTTONS
   ======================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px; /* Accessibility: minimum touch target */
  position: relative;
  overflow: hidden;
}

.button:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.button-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.button-primary:hover {
  background: var(--color-primary-700);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.button-primary:active {
  transform: translateY(0);
}

.button-secondary {
  background: var(--color-secondary);
  color: var(--color-text);
  box-shadow: var(--shadow-md);
}

.button-secondary:hover {
  background: #F59E0B;
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.button-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.button-outline:hover {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* ========================================
   BADGES
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-info {
  background: rgba(107, 142, 90, 0.1);
  color: var(--color-primary);
}

.badge-success {
  background: rgba(143, 166, 122, 0.1);
  color: var(--color-success);
}

.badge-warning {
  background: rgba(200, 134, 13, 0.1);
  color: var(--color-warning);
}

.badge-accent {
  background: rgba(143, 166, 122, 0.1);
  color: var(--color-accent);
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
}

.nav-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.logo svg {
  transition: transform 0.2s ease;
}

.logo:hover img {
  transform: scale(1.1);
}

.logo img {
  height: 4rem;
  width: auto;
  max-width: 150px;
  transition: transform 0.2s ease;
  cursor: pointer;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0.25rem;
}

.duck-sprite {
  margin: 0 var(--space-md);
}

.header-duck {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  transition: transform 0.2s ease;
}

.header-duck:hover {
  transform: scale(1.1) rotate(5deg);
}

.nav-menu {
  display: flex;
  gap: var(--space-xl);
}

.nav-link {
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
  padding: var(--space-xs) 0;
}

.nav-link:hover {
  color: var(--color-primary);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.2s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile menu styles */
@media (max-width: 768px) {
  .nav-menu.mobile-open {
    display: flex;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
    gap: var(--space-md);
    z-index: 999;
  }

  .nav-menu.mobile-open .nav-link {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease;
  }

  .nav-menu.mobile-open .nav-link:hover {
    background: var(--color-bg);
  }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  background:
    linear-gradient(rgba(107, 142, 90, 0.3), rgba(74, 107, 58, 0.4)),
    url('images/adnd_image_03.png'),
    url('images/allducks_nodrakes_001.png');
  background-size: cover, contain, cover;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-attachment: fixed;
  color: white;
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-3xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  margin-bottom: var(--space-lg);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin-bottom: var(--space-2xl);
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-visual {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}



.chaos-animation {
  position: relative;
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
}

.chaos-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.chaos-elements span {
  position: absolute;
  animation: chaosFloat 4s ease-in-out infinite;
}

.ripple { top: -20px; left: -10px; animation-delay: 0s; }
.crumb { top: -10px; right: -20px; animation-delay: 1s; }
.sparkle { bottom: -15px; left: -15px; animation-delay: 2s; }
.splash { bottom: -20px; right: -10px; animation-delay: 3s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes chaosFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.7; }
  25% { transform: translateY(-15px) rotate(90deg); opacity: 1; }
  50% { transform: translateY(-5px) rotate(180deg); opacity: 0.8; }
  75% { transform: translateY(-20px) rotate(270deg); opacity: 0.9; }
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about {
  background: var(--color-surface);
}

.about-content {
  display: grid;
  gap: var(--space-3xl);
  align-items: center;
}

.about-text p {
  font-size: 1.125rem;
  line-height: 1.7;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.stat-card {
  text-align: center;
  padding: var(--space-lg);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.stat-label {
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ========================================
   CHAOS BLOG SECTION
   ======================================== */

.chaos-blog {
  background: var(--color-bg);
}

.chaos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.chaos-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.chaos-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.chaos-image {
  height: 200px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.chaos-duck-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.chaos-overlay {
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.3);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hide duck icon when there's a real duck image */
.chaos-image:has(.chaos-duck-img) .chaos-overlay .duck-icon.large {
  display: none;
}

.chaos-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
}

.duck-icon.large {
  font-size: 4rem;
  animation: bounce 2s ease-in-out infinite;
}

.chaos-content {
  padding: var(--space-lg);
}

.chaos-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.chaos-time {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.chaos-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

.chaos-excerpt {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ========================================
   MERCH SECTION
   ======================================== */

.merch {
  background: var(--color-bg);
}

.merch-content {
  max-width: 1000px;
  margin: 0 auto;
}

.merch-intro {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.merch-intro p {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.merch-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.merch-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.merch-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.merch-image {
  height: 200px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.merch-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
}

.merch-icon {
  font-size: 4rem;
  animation: bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.merch-content {
  padding: var(--space-lg);
}

.merch-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.merch-description {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.merch-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
}

.merch-btn {
  width: 100%;
  justify-content: center;
}

.merch-cta {
  text-align: center;
  padding: var(--space-2xl);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.merch-cta h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.merch-cta p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

/* ========================================
   NEWSLETTER SECTION
   ======================================== */

.newsletter {
  background: var(--color-surface);
}

.newsletter-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-title {
  margin-bottom: var(--space-md);
}

.newsletter-subtitle {
  margin-bottom: var(--space-2xl);
}

.newsletter-form {
  margin-bottom: var(--space-lg);
}

.form-group {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-input {
  flex: 1;
  padding: var(--space-md);
  border: 2px solid var(--color-bg);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: border-color 0.2s ease;
  min-height: 48px;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.newsletter-disclaimer {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: var(--color-text);
  color: white;
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer-brand .brand-name {
  color: white;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .form-group {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
  }

  .chaos-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero {
    background-attachment: scroll; /* Better performance on mobile */
  }

  .hero-visual {
    display: none;
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .button {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
*:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-text: #000000;
    --color-text-muted: #333333;
    --color-bg: #F5F5F5;
    --color-surface: #FFFFFF;
  }
}
