/* ================================================================
   VARIABLES
   ================================================================ */
:root {
  /* Colors */
  --color-background: #f9fafb;
  --color-surface: #fff;
  --color-text: #22292f;
  --color-primary: #2257bf;
  --color-primary-hover: #174599;
  --color-success: #22b573;
  --color-warning: #ffa629;
  --color-danger: #de3618;
  --gray-100: #f4f5f7;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #24292f;

  /* Typography */
  --font-sans: 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-serif: 'Georgia', serif;
  --font-mono: 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
  --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: 2rem;
  --font-size-4xl: 2.5rem;
  --line-height-tight: 1.2;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing (0 to 96px, by 4s) */
  --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-20: 80px;
  --space-24: 96px;
  /* Radius, Shadows, Transitions */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(60,72,88,0.06);
  --shadow-md: 0 2px 8px rgba(60,72,88,0.09);
  --shadow-lg: 0 4px 24px rgba(60,72,88,0.12);
  --transition-fast: 0.15s cubic-bezier(.4,0,.2,1);
  --transition-base: 0.25s cubic-bezier(.4,0,.2,1);
  --transition-slow: 0.4s cubic-bezier(.4,0,.2,1);
}

/* ================================================================
   RESET & NORMALIZE
   ================================================================ */
*,*::before,*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

ul[role='list'], ol[role='list'], ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  margin: 0;
}

/* Remove built-in form typography styles */
input, button, textarea, select {
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  appearance: none;
}

/* Remove default button and link styles */
a {
  text-decoration: none;
  color: inherit;
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/* ================================================================
   BASE TYPOGRAPHY & LAYOUT
   ================================================================ */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

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

p {
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: color var(--transition-base);
}
a:hover, a:focus-visible {
  color: var(--color-primary-hover);
  outline: none;
}
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Accessibility: visible focus for other controls */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Disabled state */
[disabled], .disabled {
  opacity: 0.55 !important;
  pointer-events: none !important;
  cursor: not-allowed;
}

/* ================================================================
   UTILITIES
   ================================================================ */

.container {
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.flex { display: flex; }
.flex-center { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; align-items: center; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.gap-4 { gap: var(--space-4); }
.gap-8 { gap: var(--space-8); }

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

/* Spacing utility examples */
.mb-4 { margin-bottom: var(--space-4) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.p-4 { padding: var(--space-4) !important; }
.pt-8 { padding-top: var(--space-8) !important; }
.pb-8 { padding-bottom: var(--space-8) !important; }

/* ================================================================
   COMPONENTS
   ================================================================ */

/* Button */
.button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: 500;
  color: #fff;
  background-color: var(--color-primary);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast),
    box-shadow var(--transition-fast),
    color var(--transition-fast);
  min-width: 48px;
  min-height: 40px;
  text-align: center;
  text-decoration: none;
  outline: none;
}
.button:hover, .btn:hover,
.button:focus-visible, .btn:focus-visible {
  background-color: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}
.button:active, .btn:active {
  background-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.button[disabled], .btn[disabled] {
  background-color: var(--gray-300);
  color: var(--gray-500);
  cursor: not-allowed;
}

/* Secondary button variant */
.button--secondary, .btn--secondary {
  background-color: var(--gray-100);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.button--secondary:hover, .btn--secondary:hover,
.button--secondary:focus-visible, .btn--secondary:focus-visible {
  background-color: var(--gray-200);
}

/* Input + textarea */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: inherit;
  font-size: var(--font-size-base);
  background-color: var(--color-surface);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-sm);
  resize: vertical;
}
input:focus, textarea:focus, select:focus, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(34,87,191,0.14);
}

input[disabled], textarea[disabled], select[disabled] {
  background-color: var(--gray-100);
  color: var(--gray-500);
  border-color: var(--gray-200);
  cursor: not-allowed;
}

/* Card */
.card {
  background: var(--color-surface);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

/* ================================================================
   HEADER & FOOTER STYLES
   ================================================================ */
.site-header {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  letter-spacing: 0em;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  transition: color var(--transition-base);
      text-decoration: none;
}
.site-logo:focus-visible {
  outline: 2px solid var(--color-primary);
}
.site-nav {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}
.site-nav li {
  list-style: none;
}
.site-nav .cta-nav {
  margin-left: var(--space-3);
}
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--color-primary);
  margin-left: var(--space-4);
}
@media (max-width: 900px) {
  .site-nav {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--color-surface);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100vw;
    max-width: none;
    box-shadow: var(--shadow-md);
    display: none;
    padding: var(--space-4);
    border-bottom-right-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1002;
  }
  .site-nav.open {
    display: flex;
  }
  .site-header nav {
    position: relative;
  }
  .mobile-nav-toggle {
    display: inline-flex;
  }
}
.footer-inner {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--gray-200);
  margin-top: var(--space-16);
}
.site-footer {
  background: var(--color-surface);
  font-size: var(--font-size-sm);
}
.footer-nav ul,
.footer-legal ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-nav ul li,
.footer-legal ul li {
  list-style: none;
}
/* Accessibility for focus styles in menu/content */
.site-nav a:focus-visible, .footer-nav a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
/* Responsive Tweaks */
@media (max-width: 900px) {
  .footer-inner { padding: var(--space-8) 0; }
}

/* ================================================================
   COOKIE CONSENT & AGE RESTRICTION
   ================================================================ */
/* Cookie Consent */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  box-shadow: 0 -2px 24px rgba(60,72,88,0.12);
  background: rgba(255,255,255,0.99);
  padding: var(--space-4) 0;
  z-index: 1050;
  display: none;
}
.cookie-consent[hidden] { display: none !important; }
.cookie-consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.cookie-consent-inner p {
  margin: 0;
  font-size: var(--font-size-sm);
}
.cookie-consent-actions {
  display: flex;
  gap: var(--space-3);
}
@media (max-width: 600px) {
  .cookie-consent-inner {
    flex-direction: column;
    gap: var(--space-4);
    align-items: flex-start;
  }
}

/* ================================================================
   ACCESSIBILITY/MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ================================================================
   RESPONSIVENESS
   ================================================================ */
@media (max-width: 900px) {
  .container {
    max-width: 100%;
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }
  .card {
    padding: var(--space-4);
  }
  .grid-cols-3 { grid-template-columns: 1fr; }
  .grid-cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }
  .card {
    padding: var(--space-3);
  }
}
