/* =========================================
   AEROPAW DTC DESIGN SYSTEM v1.0
   Architecture: Obsidian Dark + Electric Cyan
   Base Scale: 8px
   ========================================= */

/* 1. DESIGN TOKENS */
:root {
  /* Surface & Background Colors */
  --bg-base: #0a0e14;               /* Deepest obsidian background */
  --bg-elevated: #12161f;           /* Secondary elevated containers & cards */
  --bg-card: #161b26;               /* Interactive card surfaces */
  
  /* Borders & Highlights */
  --border-subtle: rgba(255, 255, 255, 0.08); /* Default hairline separators */
  --border-active: #22d3ee;                    /* High-contrast cyan active state */
  
  /* Brand Accents */
  --accent-primary: #22d3ee;        /* Electric Cyan (Primary CTA & Highlights) */
  --accent-primary-hover: #0ea5c7;  /* Deepened Cyan for hover states */
  --accent-success: #34d399;        /* Emerald Green for savings & checkout */
  --gold: #fbbf24;                  /* 5-star customer review gold */

  /* Text Colors */
  --text-primary: #f5f7fa;          /* High-contrast headings and primary labels */
  --text-secondary: #94a3b8;        /* Body copy, descriptions, specifications */
  --text-muted: #64748b;            /* Sub-labels, dates, micro-metadata */

  /* 8px Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  /* Border Radiuses */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* Shadow & Glow Effects */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 0 1px var(--accent-primary), 0 0 24px rgba(34, 211, 238, 0.35);

  /* Typography Stack */
  --font-display: 'General Sans', 'Clash Display', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Z-Index Scale */
  --z-content: 1;
  --z-badge: 2;
  --z-sticky: 10;
  --z-floating: 50;
  --z-modal: 100;
  --z-toast: 200;

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-smooth: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. GLOBAL RESET & BASE STYLES */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px; /* Base for rem calculations */
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 3. TYPOGRAPHY SYSTEM */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: var(--space-6); }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--space-4); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--space-3); }

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  font-size: 1.05rem;
}

.text-mono {
  font-family: var(--font-mono);
  color: var(--accent-primary);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.text-gold { color: var(--gold); }
.text-success { color: var(--accent-success); }

/* 4. LAYOUT UTILITIES */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-16) 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-8); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }

.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* 5. COMPONENT: BUTTONS (CTA) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--bg-base);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background-color: rgba(34, 211, 238, 0.05);
}

.btn-buy {
  width: 100%;
  padding: var(--space-6);
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #06b6d4 100%);
  color: var(--bg-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-buy:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-glow);
}

/* 6. COMPONENT: CARDS (Product, Review, Feature) */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all 0.3s ease;
  position: relative;
}

.card:hover {
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.card-glow:hover {
  box-shadow: var(--shadow-glow);
}

/* 7. COMPONENT: PRODUCT DOCK (Color Selector) */
.color-dock {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  background-color: var(--bg-elevated);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.color-swatch.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-primary);
  transform: scale(1.1);
}

.color-swatch::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.color-swatch:hover::after {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Specific Product Colors */
.swatch-obsidian { background-color: #1a1a1a; }
.swatch-cyan { background-color: #22d3ee; }
.swatch-coral { background-color: #fb7185; }
.swatch-white { background-color: #f8fafc; }

/* 8. COMPONENT: BADGES & TAGS */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.badge-cyan {
  color: var(--accent-primary);
  border-color: rgba(34, 211, 238, 0.3);
  background-color: rgba(34, 211, 238, 0.05);
}

.badge-success {
  color: var(--accent-success);
  border-color: rgba(52, 211, 153, 0.3);
  background-color: rgba(52, 211, 153, 0.05);
}

/* 9. COMPONENT: SPECIFICATIONS TABLE (Blueprint Style) */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.spec-table th, .spec-table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.spec-table th {
  color: var(--text-muted);
  font-weight: 400;
  width: 40%;
}

.spec-table td {
  color: var(--text-primary);
  font-weight: 700;
}

/* 10. MICRO-INTERACTIONS & ANIMATIONS */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(34, 211, 238, 0.2); }
  50% { box-shadow: 0 0 40px rgba(34, 211, 238, 0.5); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* Hover Reveal Utility */
.reveal-on-hover {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.group:hover .reveal-on-hover {
  opacity: 1;
  transform: translateY(0);
}

/* 11. MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
  :root {
    --space-16: 48px;
    --space-12: 32px;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  
  .container { padding: 0 var(--space-4); }
  
  .btn { width: 100%; }
  
  /* Sticky Buy Bar on Mobile */
  .sticky-buy-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 14, 20, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-4);
    z-index: 1000;
    display: flex;
    gap: var(--space-4);
    align-items: center;
  }
}

/* 12. ACCESSIBILITY & FOCUS STATES */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
