/* =========================
   VARIABLES
   ========================= */
:root {
  /* Color Palette */
  --color-bg: #fcfcfc;
  --color-text: #1a1a1a;
  --color-primary: #2254f6;
  --color-success: #28a745;
  --color-warning: #ffc107;
  --color-danger: #e02f2f;
  --color-gray-100: #f5f5f7;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;

  /* Typography */
  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-mono: 'SFMono-Regular', 'Menlo', monospace;

  --font-size-1: 0.813rem; /* 13px */
  --font-size-2: 0.938rem; /* 15px */
  --font-size-3: 1rem;     /* 16px, body */
  --font-size-4: 1.25rem;  /* 20px, h4 */
  --font-size-5: 1.5rem;   /* 24px, h3 */
  --font-size-6: 2rem;     /* 32px, h2 */
  --font-size-7: 2.5rem;   /* 40px, h1 */
  --font-size-8: clamp(2.5rem, 8vw, 4rem);
  --line-height-1: 1.1;
  --line-height-2: 1.2;
  --line-height-3: 1.5;
  --line-height-4: 1.7;

  /* Spacing (4px scale, 0-24) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Other */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px 0 rgba(20,22,22, .06);
  --shadow-md: 0 4px 16px 0 rgba(20,22,22,.11);
  --shadow-lg: 0 8px 32px 0 rgba(20,22,22,.14);

  --transition: 0.2s cubic-bezier(.4,0,.2,1);
  --transition-fast: 0.10s cubic-bezier(.5,0,.2,1);
}

/* =========================
   RESET / NORMALIZE
   ========================= */
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after {
  box-sizing: inherit;
}
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}
ul[class], ol[class] {
  padding: 0;
  list-style: none;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* =========================
   BASE STYLES
   ========================= */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-3);
  line-height: var(--line-height-4);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
::selection {
  background: var(--color-primary);
  color: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: var(--line-height-2);
  color: var(--color-text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-2);
}
h1 { font-size: var(--font-size-7); }
h2 { font-size: var(--font-size-6); }
h3 { font-size: var(--font-size-5); }
h4 { font-size: var(--font-size-4); }
h5 { font-size: var(--font-size-3); }
h6 { font-size: var(--font-size-2); }
h1, h2, h3 {
  letter-spacing: -.02em;
}
p, ul, ol, dl {
  margin-bottom: var(--space-4);
  max-width: 60ch;
}
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
  outline: none;
}
a:hover,
a:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
}

/* =========================
   UTILITIES
   ========================= */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.flex {
  display: flex !important;
}
.justify-center { justify-content: center !important; }
.justify-between { flex-wrap: wrap; justify-content: space-between !important; }
.items-center { align-items: center !important; }
.gap-4 { gap: var(--space-4) !important; }
.grid {
  display: grid !important;
}
.grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.gap-8 { gap: var(--space-8) !important; }

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

/* =========================
   COMPONENTS
   ========================= */
.button, button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-3);
  font-weight: 500;
  line-height: 1.3;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  border: none;
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  min-width: 44px;
  min-height: 44px;
}
.button:hover, .button:focus-visible,
button:hover, button:focus-visible,
.btn:hover, .btn:focus-visible {
  background: color-mix(in srgb, var(--color-primary) 85%, black 15%);
  box-shadow: var(--shadow-md);
}
.button:disabled,
button:disabled,
.btn:disabled {
  background: var(--color-gray-300);
  color: var(--color-gray-500);
  cursor: not-allowed;
  box-shadow: none;
}

input, textarea, select {
  width: 100%;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-gray-300);
  background: #fff;
  color: var(--color-text);
  transition: border-color var(--transition);
  font-size: var(--font-size-3);
  box-shadow: var(--shadow-sm);
  outline: none;
  margin-bottom: var(--space-4);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 40%, transparent 60%);
}
input:disabled, textarea:disabled, select:disabled {
  background: var(--color-gray-100);
  color: var(--color-gray-400);
  cursor: not-allowed;
}

.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
  transition: box-shadow var(--transition);
  text-align: center;
}
.card:hover, .card:focus-within {
  box-shadow: var(--shadow-lg);
}

/* =========================
   ACCESSIBILITY / FOCUS
   ========================= */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* =========================
   HEADER & FOOTER STYLES (shared from home.css)
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 30;
  box-shadow: var(--shadow-sm);
  padding-block: var(--space-4);
  margin-bottom: var(--space-4);
}
.site-logo .logo-text {
  font-size: var(--font-size-5);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--color-primary);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
}
.nav-toggle-bar {
  width: 28px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
}
.nav-menu {
  max-width: 73ch;
  display: flex;
  gap: var(--space-4);
  align-items: center;
  list-style: none;
}
@media (max-width: 900px) {
  .nav-menu {
    gap: var(--space-2);
  }
}
@media (max-width: 768px) {
  .main-nav {
    position: relative;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    position: absolute;
    top: 48px;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-2);
    min-width: 180px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4);
    transition: visibility var(--transition), opacity var(--transition);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
  }
  .nav-menu.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
}

.site-footer {
  background: var(--color-gray-200);
  padding-block: var(--space-10) var(--space-6);
  margin-top: var(--space-24);
  position: relative;
  font-size: var(--font-size-2);
}
.footer-brand {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.1em;
}
.footer-nav li:not(:last-child)::after {
  content: '\2022';
  padding-inline: var(--space-2);
  color: var(--color-gray-400);
}
.footer-legal li:not(:last-child)::after {
  content: '\2014';
  padding-inline: var(--space-2);
  color: var(--color-gray-400);
}
.footer-bottom {
  margin-top: var(--space-5);
  text-align: center;
  color: var(--color-gray-600);
}

/* =========================
   COOKIE CONSENT BANNER (shared from home.css)
   ========================= */
.cookie-consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--color-gray-700);
  color: #fff;
  z-index: 1000;
  padding-block: var(--space-3);
  box-shadow: 0 -2px 18px 0 rgba(20,22,22,.12);
  font-size: var(--font-size-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.cookie-consent-banner.visible {
  opacity: 1;
  pointer-events: auto;
}
.cookie-consent-banner a {
  color: var(--color-warning);
  text-decoration: underline;
}
@media (max-width: 600px) {
  .cookie-consent-banner .container { flex-direction: column; gap: var(--space-2); align-items: flex-start; }
}

/* =========================
   RESPONSIVE HELPERS
   ========================= */
@media (max-width: 768px) {
  .container {
    padding-inline: var(--space-2);
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  .card {
    padding: var(--space-4);
  }
  .grid-cols-2, .grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.95rem;
  }
}
