/* =============================
   Variables
   ============================= */
:root {
  /* === Colors === */
  --color-background: #fffdfa;
  --color-text: #2d2a26;
  --color-primary: #f6ab48;
  --color-success: #72c77a;
  --color-warning: #ffe066;
  --color-danger: #f26767;
  --color-gray-50: #f8fafc;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  /* === Typography === */
  --font-sans: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-mono: 'Menlo', 'Monaco', 'Consolas', monospace;
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 2rem;     /* 32px */
  --line-height-base: 1.6;
  --line-height-tight: 1.2;
  --line-length: 68ch;

  /* === Spacing (0–96px: 0, 4, 8, 12, ..., 96) === */
  --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;

  /* === Borders and Shadows === */
  --radius-xs: 2px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 2px rgba(30, 41, 59, 0.02);
  --shadow-sm: 0 1.5px 6px rgba(246, 171, 72, 0.10);
  --shadow-md: 0 4px 20px rgba(30, 41, 59, 0.07);
  --shadow-lg: 0 10px 40px -8px rgba(246, 171, 72, 0.18);

  /* === Transition === */
  --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 420ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================
   Reset / Normalize
   ============================= */
* {
  box-sizing: border-box;
}
*::before,*::after {
  box-sizing: inherit;
}
html, body {
  padding: 0;
  margin: 0;
}
body {
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
ul,ol {
  margin: 0;
  padding-left: var(--space-6);
}
h1, h2, h3, h4, h5, h6, p, figure {
  margin-block: 0;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}
img, svg, picture, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  background: none;
  border: none;
  color: inherit;
  outline: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* =============================
   Base Styles
   ============================= */
body {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  letter-spacing: 0.01em;
  max-width: 100vw;
}

h1 { font-size: var(--font-size-3xl); margin-block: var(--space-8) var(--space-4); }
h2 { font-size: var(--font-size-2xl); margin-block: var(--space-6) var(--space-3); }
h3 { font-size: var(--font-size-xl); margin-block: var(--space-4) var(--space-2); }
h4 { font-size: var(--font-size-lg); margin-block: var(--space-3) var(--space-1); }
h5 { font-size: var(--font-size-base); margin-block: var(--space-2) var(--space-0); }
h6 { font-size: var(--font-size-sm); margin-block: var(--space-2) var(--space-0); }

p {
  margin-block: var(--space-3);
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: color var(--transition-fast);
}
a:hover, a:focus-visible {
  color: var(--color-success);
  text-decoration-thickness: 2px;
}
a:active {
  color: var(--color-danger);
}
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

pre, code {
  font-family: var(--font-mono);
  background: var(--color-gray-100);
  border-radius: var(--radius-xs);
  padding: var(--space-1) var(--space-2);
}

::selection {
  background: var(--color-primary);
  color: #fff;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important; /* disables infinite animation loops */
  }
}

/* =============================
   Utilities
   ============================= */

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

.flex {
  display: flex;
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-column {
  display: flex;
  flex-direction: column;
}
.grid {
  display: grid;
  gap: var(--space-6);
}
.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);
}
.space-y-4 > * + * {
  margin-top: var(--space-4) !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;
}

/* =============================
   Components
   ============================= */

/* --- Button --- */
.button {
  display: inline-block;
  font-family: inherit;
  font-weight: 600;
  font-size: var(--font-size-base);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.button:hover,
.button:focus-visible {
  background: var(--color-success);
  box-shadow: var(--shadow-md);
  outline: 2px solid var(--color-success);
  outline-offset: 2px;
  transform: translateY(-2px) scale(1.02);
}
.button:active {
  background: var(--color-warning);
}
.button:disabled,
.button[aria-disabled="true"] {
  background: var(--color-gray-300);
  color: var(--color-gray-500);
  cursor: not-allowed;
  box-shadow: none;
}

/* --- Input --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-gray-300);
  background: var(--color-gray-50);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  margin-bottom: var(--space-3);
  appearance: none;
  box-shadow: var(--shadow-xs);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(246, 171, 72, 0.18);
}
input:disabled,
select:disabled,
textarea:disabled {
  background: var(--color-gray-100);
  color: var(--color-gray-500);
  border-color: var(--color-gray-200);
  cursor: not-allowed;
}

/* --- Card --- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  transition: box-shadow var(--transition-fast), transform var(--transition-base);
  border: 1px solid var(--color-gray-200);
}
.card:hover,
.card:focus-within {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px) scale(1.01);
  border-color: var(--color-primary);
}

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

[tabindex="-1"]:focus {
  outline: none;
}

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

.site-header {
  background: #fffdfa;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: var(--font-size-xl);
  letter-spacing: 0.01em;
  color: var(--color-primary);
  text-decoration: none;
}
.logo-icon {
  font-size: 2rem;
  line-height: 1;
}
.site-name {
  color: var(--color-text);
  font-size: 1.25rem;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  background: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  text-decoration: none;
  font-weight: 500;
  color: var(--color-text);
  font-size: var(--font-size-base);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.nav-menu a:hover, .nav-menu a:focus-visible, .nav-cta {
  background: var(--color-primary);
  color: #fff !important;
}
.nav-cta {
  font-weight: 700;
  margin-left: var(--space-2);
}
.nav-toggle {
  background: none;
  border: none;
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-3);
  margin-left: var(--space-4);
}
.nav-toggle-bar {
  width: 28px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  display: block;
  transition: transform var(--transition-fast);
}

@media (max-width: 900px) {
  .nav-menu {
    position: absolute;
    top: 64px;
    right: 0;
    background: #fffdfa;
    flex-direction: column;
    align-items: flex-end;
    width: 260px;
    max-width: 90vw;
    gap: var(--space-4);
    padding: var(--space-6);
    box-shadow: var(--shadow-lg);
    border-top-left-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-lg);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base), transform var(--transition-base);
    z-index: 200;
  }
  .nav-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }
  .nav-toggle {
    display: flex;
  }
}

/* Footer styles */
.site-footer {
  background: #faeee5;
  padding: var(--space-10) 0 var(--space-16) 0;
  box-shadow: 0 -2px 16px rgba(246, 171, 72, 0.05);
  position: relative;
}
.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-8);
}
.footer-branding {
  min-width: 200px;
}
.footer-logo {
  font-size: var(--font-size-xl);
  font-weight: bold;
  color: var(--color-primary);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.footer-copy {
  color: var(--color-gray-600);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-3);
}
.footer-nav {
  display: flex;
  gap: var(--space-10);
}
.footer-menu, .footer-legal {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-menu a, .footer-legal a {
  color: var(--color-gray-800);
  text-decoration: underline;
  font-size: var(--font-size-sm);
  font-weight: 500;
}
.footer-menu a:hover, .footer-legal a:hover {
  color: var(--color-primary);
}

@media (max-width: 800px) {
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }
  .footer-nav {
    gap: var(--space-6);
  }
}

/* =============================
   Cookie Consent Banner
   ============================= */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2500;
  background: linear-gradient(90deg, #fffdfa 70%, #fef6e3 100%);
  color: var(--color-gray-900);
  box-shadow: 0 -2px 12px 0 rgba(246,171,72,0.09);
  border-top: 1px solid var(--color-warning);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  font-size: var(--font-size-base);
  transition: opacity var(--transition-fast);
}
.cookie-consent[hidden] {
  display: none;
}
.cookie-buttons {
  display: flex;
  gap: var(--space-4);
}
.button-outline {
  background: #fffdfa;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  box-shadow: none;
}
.button-outline:hover, .button-outline:focus-visible {
  background: var(--color-warning);
  color: var(--color-gray-900);
}
@media (max-width: 800px) {
  .cookie-consent {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    font-size: var(--font-size-sm);
    padding: var(--space-4) var(--space-3);
  }
  .cookie-buttons {
    width: 100%;
    justify-content: flex-end;
  }
}

/* =============================
   End of Base CSS
   ============================= */
