/* VirtualBoard Design System - Global Styles */

/* ============================================
   CSS Custom Properties (Color System)
   ============================================ */

:root {
  /* Base Colors (oklch color space) */
  --background: oklch(0.13 0.01 240);        /* Deep technical background */
  --foreground: oklch(0.95 0.005 240);       /* Slightly warm white text */
  --primary: oklch(0.65 0.12 220);           /* Subdued blue primary */
  --primary-foreground: oklch(0.13 0.01 240); /* Text on primary bg */
  --secondary: oklch(0.7 0.15 190);          /* Cyan secondary */
  --muted: oklch(0.25 0.01 240);             /* Muted elements */
  --muted-foreground: oklch(0.6 0.01 240);   /* Muted text */
  --border: oklch(0.20 0.01 240);            /* Subtle borders */
  --card: oklch(0.16 0.01 240);              /* Card backgrounds */
  --accent: oklch(0.75 0.18 160);            /* Vibrant accent green */
}

/* ============================================
   Base Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, pre {
  font-family: 'JetBrains Mono', 'Geist Mono', 'SF Mono', ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Courier New', monospace;
}

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 3.75rem; /* 60px */
  letter-spacing: -0.025em;
  line-height: 1.1;
}

h2 {
  font-size: 3rem; /* 48px */
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.875rem; /* 30px */
  line-height: 1.3;
}

p {
  line-height: 1.75;
}

/* ============================================
   Component Base Styles
   ============================================ */

/* Navigation */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background-color: color-mix(in oklch, var(--background) 80%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--border) 50%, transparent);
}

/* Cards */
.card {
  background-color: color-mix(in oklch, var(--card) 30%, transparent);
  border: 1px solid color-mix(in oklch, var(--border) 50%, transparent);
  border-radius: 0.75rem; /* 12px */
  padding: 1.5rem; /* 24px */
  transition: all 300ms;
}

.card:hover {
  background-color: color-mix(in oklch, var(--card) 50%, transparent);
  border-color: var(--border);
  box-shadow: 0 10px 15px -3px color-mix(in oklch, var(--primary) 5%, transparent);
  transform: scale(1.02);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1.5rem; /* 12px 24px */
  border-radius: 0.5rem; /* 8px */
  font-weight: 500;
  text-decoration: none;
  transition: all 300ms;
  box-shadow: 0 10px 15px -3px color-mix(in oklch, var(--primary) 25%, transparent);
}

.btn-primary:hover {
  background-color: color-mix(in oklch, var(--primary) 90%, black);
  box-shadow: 0 20px 25px -5px color-mix(in oklch, var(--primary) 30%, transparent);
  transform: scale(1.05);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: color-mix(in oklch, var(--muted) 50%, transparent);
  color: var(--foreground);
  border: 1px solid color-mix(in oklch, var(--border) 50%, transparent);
  padding: 0.75rem 1.5rem; /* 12px 24px */
  border-radius: 0.5rem; /* 8px */
  font-weight: 500;
  text-decoration: none;
  transition: all 300ms;
}

.btn-secondary:hover {
  background-color: var(--muted);
  border-color: var(--border);
}

/* Code Blocks */
.code-block {
  background-color: color-mix(in oklch, var(--muted) 50%, transparent);
  border: 1px solid color-mix(in oklch, var(--border) 30%, transparent);
  border-radius: 0.5rem; /* 8px */
  padding: 1rem; /* 16px */
  overflow-x: auto;
}

.code-block code {
  font-size: 0.875rem; /* 14px */
  color: var(--muted-foreground);
}

code.inline-code {
  background-color: color-mix(in oklch, var(--muted) 50%, transparent);
  border: 1px solid color-mix(in oklch, var(--border) 30%, transparent);
  border-radius: 0.25rem; /* 4px */
  padding: 0.125rem 0.5rem; /* 2px 8px */
  font-size: 0.875rem; /* 14px */
}

/* Badges */
.badge-recommended {
  display: inline-flex;
  align-items: center;
  background-color: color-mix(in oklch, var(--primary) 10%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in oklch, var(--primary) 20%, transparent);
  padding: 0.375rem 1rem; /* 6px 16px */
  border-radius: 9999px;
  font-size: 0.875rem; /* 14px */
  font-weight: 500;
}

.badge-info {
  display: inline-flex;
  align-items: center;
  background-color: color-mix(in oklch, var(--accent) 10%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in oklch, var(--accent) 20%, transparent);
  padding: 0.25rem 0.75rem; /* 4px 12px */
  border-radius: 9999px;
  font-size: 0.75rem; /* 12px */
  font-weight: 500;
}

/* ============================================
   Layout Utilities
   ============================================ */

.container {
  width: 100%;
  max-width: 80rem; /* 1280px */
  margin: 0 auto;
  padding: 0 1.5rem; /* 24px */
}

.container-narrow {
  width: 100%;
  max-width: 64rem; /* 1024px */
  margin: 0 auto;
}

.container-text {
  width: 100%;
  max-width: 42rem; /* 672px */
  margin: 0 auto;
}

/* Section Spacing */
.section-hero {
  padding: 6rem 0; /* 96px */
}

.section-standard {
  padding: 5rem 0; /* 80px */
}

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

/* Text Colors */
.text-foreground {
  color: var(--foreground);
}

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

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

/* Background Colors */
.bg-background {
  background-color: var(--background);
}

.bg-card {
  background-color: var(--card);
}

.bg-muted {
  background-color: var(--muted);
}

/* Gradients */
.gradient-hero {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    color-mix(in oklch, var(--primary) 5%, transparent),
    transparent,
    transparent
  );
  pointer-events: none;
}

.gradient-section {
  background: linear-gradient(to bottom,
    transparent,
    color-mix(in oklch, var(--muted) 20%, transparent),
    transparent
  );
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem; /* 24px */
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem; /* 24px */
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem; /* 16px */
}

/* Responsive Grid Breakpoints */
@media (min-width: 768px) {
  h1 {
    font-size: 4.5rem; /* 72px */
  }

  .section-hero {
    padding: 8rem 0; /* 128px */
  }

  .section-standard {
    padding: 7rem 0; /* 112px */
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   Interactive States
   ============================================ */

/* Focus States */
a:focus,
button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Group Hover Effects */
.group:hover .group-hover-scale {
  transform: scale(1.1);
}

.group-hover-scale {
  transition: transform 300ms;
}

/* ============================================
   Animation & Transitions
   ============================================ */

.transition-all {
  transition: all 300ms ease-in-out;
}

.transition-transform {
  transition: transform 300ms ease-in-out;
}

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

@media (max-width: 767px) {
  h1 {
    font-size: 2.5rem; /* 40px on very small screens */
  }

  h2 {
    font-size: 2rem; /* 32px */
  }

  h3 {
    font-size: 1.5rem; /* 24px */
  }
}

/* ============================================
   Special Elements
   ============================================ */

/* Step Numbers */
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem; /* 48px */
  height: 3rem; /* 48px */
  background-color: color-mix(in oklch, var(--primary) 10%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in oklch, var(--primary) 20%, transparent);
  border-radius: 0.75rem; /* 12px */
  font-weight: 700;
  font-size: 1.25rem; /* 20px */
  flex-shrink: 0;
}

/* List Bullets */
.list-styled {
  list-style: none;
  padding: 0;
}

.list-styled li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.75rem; /* 12px */
  color: var(--muted-foreground);
}

.list-styled li::before {
  content: "•";
  color: var(--primary);
  font-weight: 700;
  margin-right: 0.5rem; /* 8px */
}

/* ============================================
   Border Utilities
   ============================================ */

.border-top {
  border-top: 1px solid color-mix(in oklch, var(--border) 50%, transparent);
}

.border-bottom {
  border-bottom: 1px solid color-mix(in oklch, var(--border) 50%, transparent);
}

.border-y {
  border-top: 1px solid color-mix(in oklch, var(--border) 50%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--border) 50%, transparent);
}

/* ============================================
   Accessibility
   ============================================ */

.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;
}

/* Reduced motion support */
@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;
  }
}
