/* ============================================
   base.css — Design System, Reset, Typography
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-bg: #FFFFFF;
  --color-bg-alt: #F7F9FB;
  --color-bg-card: #FFFFFF;
  --color-text-primary: #1A1F2B;
  --color-text-secondary: #4A5568;
  --color-text-muted: #718096;
  --color-accent: #2BAE9E;
  --color-accent-hover: #22958A;
  --color-accent-light: #E6F7F5;
  --color-blue: #3B82F6;
  --color-blue-light: #EFF6FF;
  --color-border: #E2E8F0;
  --color-shadow: rgba(26, 31, 43, 0.06);
  --color-shadow-md: rgba(26, 31, 43, 0.1);
  --color-danger: #E53E3E;

  /* Typography */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
  --font-size-4xl: 3rem;
  --line-height-tight: 1.25;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-section: 5rem;

  /* Layout */
  --max-width: 1100px;
  --max-width-narrow: 800px;
  --border-radius: 10px;
  --border-radius-lg: 16px;
  --border-radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px var(--color-shadow);
  --shadow-md: 0 4px 12px var(--color-shadow);
  --shadow-lg: 0 8px 30px var(--color-shadow-md);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Header height for scroll offset */
  --header-height: 72px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--font-size-3xl);
}

h2 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: var(--font-size-xl);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

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

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

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

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

.section-title {
  text-align: center;
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-2xl);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
  max-width: 600px;
  margin: 0 auto var(--space-3xl);
}

.accent-line {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  margin: var(--space-md) auto var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-ui);
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.btn--primary:hover {
  background-color: var(--color-accent-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn--outline:hover {
  background-color: var(--color-accent-light);
  color: var(--color-accent-hover);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: var(--font-size-sm);
}

/* --- Cards --- */
.card {
  background: var(--color-bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* --- Badge --- */
.badge-18 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-danger);
  color: #FFFFFF;
  font-weight: 700;
  font-size: var(--font-size-xs);
  border-radius: var(--border-radius-full);
  flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --space-section: 3.5rem;
    --header-height: 64px;
  }

  h1 {
    font-size: var(--font-size-2xl);
  }

  h2 {
    font-size: var(--font-size-xl);
  }

  .container {
    padding: 0 var(--space-md);
  }
}

@media (max-width: 480px) {
  :root {
    --space-section: 2.5rem;
  }

  h1 {
    font-size: var(--font-size-xl);
  }
}
