/* ============================================
   Base Styles - Variables, Reset, Typography
   ============================================ */

:root {
  /* Brand Colors */
  --bg: #ffffff;
  --text: #1b1b1f;
  --muted: #6b7280;
  --violet: #7c3aed;
  --purple: #a855f7;
  --lavender: #e9d5ff;
  --border: rgba(124, 58, 237, 0.18);
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);

  /* Breakpoints */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1440px;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  /* Typography */
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --line-height-base: 1.6;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--spacing-sm);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--spacing-sm);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

h5,
h6 {
  font-size: 1.125rem;
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text);
}

a {
  color: var(--violet);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--purple);
}

a:focus {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  margin-left: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

li {
  margin-bottom: var(--spacing-xs);
}

/* Utility Classes */
.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;
}

/* WebP Support Detection */
.no-webp .webp-image {
  display: none;
}

.webp .webp-image {
  display: block;
}