/* =============================================================
   VARIABLES
   ============================================================= */
:root {
  /* Colors */
  --color-background: #ffffff;
  --color-text: #1a202c;
  --color-primary: #2b6cb0;
  --color-primary-hover: #22406d;
  --color-success: #38a169;
  --color-warning: #d69e2e;
  --color-danger: #e53e3e;
  --color-gray-100: #f7fafc;
  --color-gray-200: #edf2f7;
  --color-gray-300: #e2e8f0;
  --color-gray-400: #cbd5e1;
  --color-gray-500: #a0aec0;
  --color-gray-600: #718096;
  --color-gray-700: #4a5568;
  --color-gray-800: #2d3748;
  --color-gray-900: #1a202c;

  /* Typography */
  --font-family-sans: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-family-serif: 'Merriweather', serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --line-height-xs: 1.2;
  --line-height-sm: 1.4;
  --line-height-base: 1.6;
  --line-height-lg: 1.8;

  /* Spacing (0 - 96px, 0–24 in 4px steps) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Radius, Shadows, Transitions */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px 0 rgba(30, 41, 59, 0.08);
  --shadow: 0 2px 8px 0 rgba(30, 41, 59, 0.12);
  --shadow-lg: 0 4px 24px 0 rgba(30, 41, 59, 0.16);
  --transition-fast: 120ms cubic-bezier(.4,0,.2,1);
  --transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* =============================================================
   RESET / NORMALIZE
   ============================================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding-left: var(--space-4);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
  margin: 0;
  border: none;
  background: none;
  box-shadow: none;
  outline: none;
}

button, [type="button"], [type="reset"], [type="submit"] {
  cursor: pointer;
  background: none;
}

/* Remove tap highlight on mobile */
*:focus {
  outline: none;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@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-family-sans);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: var(--color-background);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-sans);
  font-weight: 700;
  color: var(--color-text);
  line-height: var(--line-height-xs);
  margin-bottom: var(--space-2);
}

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

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

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

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

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
  font-weight: 600;
}

p {
  font-size: var(--font-size-base);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  line-height: var(--line-height-lg);
  max-width: 65ch;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
  outline: none;
}

a:hover,
a:focus-visible {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

a:active {
  color: var(--color-primary);
}

hr {
  border: none;
  border-top: 1px solid var(--color-gray-300);
  margin: var(--space-6) 0;
}

/* =============================================================
   UTILITIES
   ============================================================= */
.container {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.flex {
  display: flex !important;
}
.flex-center {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.grid {
  display: grid !important;
}
.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;
}

/* Quick spacing utility example */
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.pt-4 { padding-top: var(--space-4); }
.pb-4 { padding-bottom: var(--space-4); }

/* =============================================================
   COMPONENTS
   ============================================================= */
.button, button, [type="button"], [type="submit"] {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  font-size: var(--font-size-base);
  border: none;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition);
  cursor: pointer;
  outline: none;
  text-align: center;
}
.button:hover, button:hover, [type="button"]:hover, [type="submit"]:hover,
.button:focus-visible, button:focus-visible, [type="button"]:focus-visible, [type="submit"]:focus-visible {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow);
  color: #fff;
}
.button:disabled, button:disabled, [type="button"]:disabled, [type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--color-gray-400);
  color: var(--color-gray-700);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-sm);
  background: var(--color-gray-100);
  color: var(--color-text);
  font-size: var(--font-size-base);
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: none;
  resize: vertical;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.12);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--color-gray-200);
  color: var(--color-gray-500);
  cursor: not-allowed;
}

.card {
  background: var(--color-background);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  transition: box-shadow var(--transition);
}
.card:hover, .card:focus-within {
  box-shadow: 0 8px 32px 0 rgba(30,41,59,0.18);
}

/* =============================================================
   Header & Footer styles
   ============================================================= */

/* --------- HEADER --------- */
.site-header {
  background: var(--color-gray-100);
  border-bottom: 1px solid var(--color-gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-container {
  min-height: 72px;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.site-name {
  font-family: var(--font-family-serif);
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -1px;
}

.header-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.main-nav {
  position: relative;
}
.menu-toggle {
  display: none;
  background: none;
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  border: none;
  padding: var(--space-2);
  margin-right: var(--space-2);
}
.nav-list {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
}
.nav-list a {
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--color-primary);
  transition: color var(--transition);
  padding: var(--space-2) var(--space-2);
  border-radius: var(--radius-sm);
}
.nav-list a:hover, .nav-list a:focus-visible {
  color: var(--color-primary-hover);
  background: var(--color-gray-200);
  text-decoration: none;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-block;
  }
  .nav-list {
    right: 0;
    top: 48px;
    flex-direction: column;
    background: var(--color-background);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    gap: 0;
    min-width: 180px;
    display: none;
    z-index: 1100;
  }
  .nav-list.open {
    display: flex;
  }
  .nav-list li {
    width: 100%;
  }
  .nav-list a {
    display: block;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-gray-200);
    background: var(--color-background);
  }
  .nav-list li:last-child a {
    border-bottom: none;
  }
}


/* --------- FOOTER --------- */
.site-footer {
  background: var(--color-gray-700);
  color: #fff;
  position: relative;
  padding-bottom: 84px; /* reserve for cookie banner */
}
.footer-container {
  padding-top: var(--space-8);
}
.footer-top {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-8);
  align-items: flex-start;
}
.footer-site-name {
  font-family: var(--font-family-serif);
  font-size: var(--font-size-lg);
  color: #fff;
  font-weight: 700;
  letter-spacing: -1px;
}
.footer-nav, .footer-legal {
  margin: 0;
}
.footer-nav-list, .footer-legal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: var(--space-4);
}
.footer-nav-list a, .footer-legal-list a {
  color: #fff;
  text-decoration: none;
  font-size: var(--font-size-base);
  font-weight: 600;
}
.footer-nav-list a:hover, .footer-legal-list a:hover,
.footer-nav-list a:focus-visible, .footer-legal-list a:focus-visible {
  text-decoration: underline;
  color: var(--color-primary);
}
.footer-bottom {
  text-align: center;
  margin-top: var(--space-6);
  color: var(--color-gray-300);
}
@media (max-width: 700px) {
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
  .footer-nav-list, .footer-legal-list {
    flex-direction: column;
    gap: var(--space-2);
  }
}

/* --------- COOKIE BANNER --------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 2000;
  width: 100%;
  background: var(--color-background);
  color: var(--color-text);
  box-shadow: 0 -3px 16px 0 rgba(30,41,59,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-base);
  transition: transform var(--transition), opacity var(--transition);
}
.cookie-text a { color: var(--color-primary); text-decoration: underline; }
.cookie-actions {
  gap: var(--space-2);
  display: flex;
  flex-shrink: 0;
}
.cookie-banner.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(80px);
}


@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    gap: var(--space-3);
    align-items: flex-start;
    padding: var(--space-4);
  }
  .cookie-actions { width: 100%; }
  .cookie-actions .button {
    width: 100%;
  }
}

/* ============================================================= */
