/* =========================================================
   VARIABLES
   ========================================================= */
:root {
  /* COLOR PALETTE */
  --color-bg: #f8fafd;
  --color-bg-alt: #fff;
  --color-text: #262933;
  --color-primary: #fc5d5b;
  --color-primary-accent: #fdab46;
  --color-success: #38c976;
  --color-warning: #ffce45;
  --color-danger: #f05454;
  --color-neutral-100: #ffffff;
  --color-neutral-200: #f2f4f7;
  --color-neutral-300: #e3e6ed;
  --color-neutral-400: #bac3d1;
  --color-neutral-500: #7f8799;
  --color-neutral-700: #52596b;
  --color-neutral-900: #23243a;

  /* TYPOGRAPHY */
  --font-family-sans: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif;
  --font-family-head: 'Poppins', 'Segoe UI', Arial, Helvetica, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
  --line-height-tight: 1.1;
  --line-height-normal: 1.5;
  --line-height-loose: 1.75;

  /* SPACING SCALE (0-96px) */
  --space-0: 0px;
  --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;

  /* RADIUS */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;

  /* SHADOWS */
  --shadow-xs: 0 1px 2px 0 rgba(38, 41, 51, 0.05);
  --shadow-sm: 0 2px 8px 0 rgba(38, 41, 51, 0.08);
  --shadow-md: 0 6px 16px rgba(252, 93, 91, 0.14);
  --shadow-lg: 0 12px 32px rgba(38, 41, 51, 0.18);

  /* TRANSITION DURATIONS */
  --transition-fast: 0.15s;
  --transition-base: 0.3s;
  --transition-slow: 0.5s;
}


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

html, body {
  height: 100%;
  padding: 0;
  margin: 0;
  scroll-behavior: smooth;
  background: var(--color-bg);
}

body {
  color: var(--color-text);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-head);
  font-weight: 700;
  color: var(--color-text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  line-height: var(--line-height-tight);
}
h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
  margin: 0 0 var(--space-4) 0;
  line-height: var(--line-height-loose);
}
ul,ol {
  margin: 0 0 var(--space-4) var(--space-6);
  padding: 0;
}

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

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

a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: color var(--transition-fast) cubic-bezier(.4,0,.2,1);
}
a:hover,
a:focus-visible {

  text-decoration-thickness: 2px;
}
a:active {
  color: var(--color-danger);
}

/* REMOVES BLUE BG IN iOS LINKS */
a, button, input, textarea, select {
  -webkit-tap-highlight-color: transparent;
}

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

/* =========================================================
   BASE STYLES
   ========================================================= */
::selection {
  background: var(--color-primary-accent);
  color: var(--color-neutral-100);
}

code, pre {
  font-family: 'Fira Mono', monospace;
  background: var(--color-neutral-200);
  border-radius: var(--radius-sm);
}

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


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

.flex {
  display: flex;
}
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-4 { gap: var(--space-4); }

.grid {
  display: grid;
}
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.gap-6 { gap: var(--space-6); }

/* Screen-reader only */
.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;
  border: 0 !important;
}

/* Margin Utility Example */
.mt-8 { margin-top: var(--space-8) !important; }

/* =========================================================
   COMPONENTS
   ========================================================= */
.button, button, [type="button"], [type="submit"] {
  appearance: none;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-base);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: 
    background var(--transition-base) cubic-bezier(.4,0,.2,1),
    box-shadow var(--transition-fast) cubic-bezier(.4,0,.2,1),
    color var(--transition-fast) cubic-bezier(.4,0,.2,1);
  outline: none;
}
.button:hover,
button:hover,
.button:focus-visible,
button:focus-visible {
  background: var(--color-primary-accent);
  box-shadow: var(--shadow-sm);
}
.button:active,
button:active {
  background: var(--color-danger);
}
.button:disabled,
button:disabled {
  background: var(--color-neutral-300);
  color: var(--color-neutral-500);
  cursor: not-allowed;
  opacity: 0.75;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-neutral-300);
  box-shadow: none;
  transition: border-color var(--transition-fast) cubic-bezier(.4,0,.2,1),
              box-shadow var(--transition-fast) cubic-bezier(.4,0,.2,1);
  margin-bottom: var(--space-4);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(252,93,91,0.15);
  outline: none;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: var(--color-neutral-200);
  color: var(--color-neutral-400);
  cursor: not-allowed;
  opacity: 0.7;
}

.card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  transition: transform var(--transition-fast) cubic-bezier(.4,0,.2,1),
              box-shadow var(--transition-fast) cubic-bezier(.4,0,.2,1);
}
.card:hover {
  transform: translateY(-2px) scale(1.012);
  box-shadow: var(--shadow-lg);
}

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

/* Mobile responsiveness for base layout */
@media (max-width: 600px) {
  .container {
    padding-left: var(--space-2);
    padding-right: var(--space-2);
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.15rem; }
}


/* =========================================================
   HEADER & FOOTER STYLES
   (Shared by all pages)
   ========================================================= */

/* Header styles */
.main-header {
  background: var(--color-neutral-100);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1010;
}
.brand {
  display: flex;
  align-items: center;
  font-family: var(--font-family-head);
  font-size: var(--font-size-xl);
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
  gap: var(--space-2);
}
.brand-logo {
  font-size: 2rem;
  display: inline-block;
  margin-right: var(--space-1);
}
.menu-toggle {
  background: none;
  border: none;
  padding: var(--space-2);
  display: none;
  position: relative;
}
.menu-icon {
  width: 26px;
  height: 4px;
  background: var(--color-primary);
  border-radius: var(--radius-xs);
  display: block;
  position: relative;
  transition: background var(--transition-base);
}
.menu-icon:before,
.menu-icon:after {
  content: "";
  display: block;
  width: 26px;
  height: 4px;
  background: var(--color-primary);
  border-radius: var(--radius-xs);
  position: absolute;
  left: 0;
  transition: transform var(--transition-fast);
}
.menu-icon:before { top: -9px; }
.menu-icon:after { top: 9px; }

.nav-list {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 900px) {
  .nav-list {
    gap: var(--space-3);
  }
}
@media (max-width: 700px) {
  .menu-toggle {
    display: block;
  }
  .nav-list {
    display: none;
    position: absolute;
    right: var(--space-2);
    top: 60px;
    background: var(--color-bg-alt);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    gap: var(--space-4);
    min-width: 180px;
    border-radius: var(--radius-md);
    padding: var(--space-6) var(--space-4);
    z-index: 1100;
  }
  .nav-list.open {
    display: flex;
  }
}

/* Footer styles */
.main-footer {
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-xs);
  margin-top: var(--space-12);
  padding: var(--space-10) 0 var(--space-2) 0;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-family-head);
  font-weight: bold;
  font-size: var(--font-size-lg);
}
.footer-nav li, .footer-legal li {
  display: inline;
}
.footer-bottom {
  border-top: 1px solid var(--color-neutral-300);
  margin-top: var(--space-3);
  text-align: center;
  padding-top: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-neutral-500);
}

/* Cookie Consent Banner (shared) */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: var(--color-neutral-200);
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-sm);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.cookie-banner[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
  transform: translateY(32px);
}
.cookie-banner-actions {
  display: flex;
  gap: var(--space-2);
}
.button-outline {
  background: none;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.button-outline:hover,
.button-outline:focus-visible {
  background: var(--color-primary-accent);
  color: #fff;
}
