/* ===============================================================
   VARIABLES
   =============================================================== */
:root {
  /* Colors */
  --color-background: #181921;
  --color-surface: #21222c;
  --color-text: #ebebf0;
  --color-primary: #bfa76a;
  --color-primary-hover: #a08a50;
  --color-success: #4ec27e;
  --color-warning: #ffb547;
  --color-danger: #e05260;
  --color-neutral-100: #f6f6fa;
  --color-neutral-200: #e0e0eb;
  --color-neutral-300: #bdbdcb;
  --color-neutral-400: #888a99;
  --color-neutral-500: #444555;
  --color-neutral-600: #353649;

  /* Typography */
  --font-sans: "Inter", "Segoe UI", Arial, sans-serif;
  --font-serif: "Merriweather", serif;
  --font-mono: "Fira Mono", "Consolas", monospace;

  --font-size-xs: 0.75rem;     /* 12px */
  --font-size-sm: 0.875rem;    /* 14px */
  --font-size-base: 1rem;      /* 16px */
  --font-size-lg: 1.25rem;     /* 20px */
  --font-size-xl: 1.5rem;      /* 24px */
  --font-size-2xl: 2rem;       /* 32px */
  --font-size-3xl: 2.5rem;     /* 40px */

  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.5rem;    /* 24px */
  --space-6: 2rem;      /* 32px */
  --space-8: 3rem;      /* 48px */
  --space-10: 4rem;     /* 64px */
  --space-12: 6rem;     /* 96px */

  /* Radius and Shadows */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.09);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);

  /* Transition durations */
  --transition-fast: 120ms;
  --transition-base: 200ms;
  --transition-slow: 320ms;
}


/* ===============================================================
   RESET & NORMALIZE
   =============================================================== */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption,
tbody, tfoot, thead, tr, th, td, article,
aside, canvas, details, embed, figure,
figcaption, footer, header, hgroup, menu, nav,
output, ruby, section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--color-background);
  color-scheme: dark;
}

body {
  min-height: 100vh;
  background: var(--color-background);
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

/* Remove default list styles */
ul, ol {
  list-style: none;
}

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

/* ===============================================================
   BASE STYLES
   =============================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-primary);
  font-weight: bold;
  line-height: var(--line-height-tight);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

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

section > p,
div > p {
  margin-inline: auto;
}

p {
  max-width: 75ch;
  margin-bottom: var(--space-4);
  color: var(--color-text);
  line-height: var(--line-height-relaxed);
}

strong, b {
  color: var(--color-primary);
  font-weight: bold;
}

hr {
  border: none;
  border-bottom: 1px solid var(--color-neutral-600);
  margin: var(--space-6) 0;
}

/* 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;
}

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

.container {
  width: 100%;
  max-width: 1180px;
  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; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.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); }
.gap-6 { gap: var(--space-6); }

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

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

/* Button */
.button, button, [type="button"], [type="submit"] {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-base), box-shadow var(--transition-base);
}
.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-color: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
  outline: 2px solid var(--color-primary);
}
.button:disabled, button:disabled, [type="button"]:disabled, [type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--color-neutral-500);
  color: var(--color-neutral-200);
}

/* Input, Textarea, Select */
input, textarea, select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-neutral-500);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  box-shadow: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  outline: 2px solid var(--color-primary);
}
input:disabled, textarea:disabled {
  background: var(--color-neutral-600);
  color: var(--color-neutral-400);
  opacity: 0.7;
  cursor: not-allowed;
}

/* Card */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
}

/* Success, Warning, Danger utility classes */
.success {
  color: var(--color-success);
}
.warning {
  color: var(--color-warning);
}
.danger {
  color: var(--color-danger);
}

/* Focus-visible accessibility, avoid on mouse */
:focus:not(:focus-visible) {
  outline: none;
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    scroll-behavior: auto !important;
    animation-duration: 0s !important;
  }
}

/* ===============================================================
   Header & Footer styles (shared across all pages)
   =============================================================== */

/* HEADER & NAVIGATION */
.header {
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-logo {
  font-size: var(--font-size-2xl);
  font-weight: bold;
  font-family: var(--font-serif);
  text-decoration: none;
  color: var(--color-primary);
  letter-spacing: 1px;
  transition: color var(--transition-base);
}
.nav-bar {
  min-height: 64px;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.nav-list {
  display: flex;
  flex-direction: row;
  gap: var(--space-3);
  flex-wrap: nowrap;
  align-items: center;
}

.nav-list li a {
  font-size: var(--font-size-sm);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), color var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}
.nav-list li a:hover,
.nav-list li a:focus-visible {
  background: var(--color-primary);
  color: var(--color-surface);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 4px;
  padding: 6px 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 26px;
  height: 3px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  display: block;
  transition: all var(--transition-base);
}

/* MOBILE MENU */
@media (max-width: 1024px) {
  .nav-list {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--color-surface);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-4) var(--space-4);
    box-shadow: var(--shadow-md);
    z-index: 999;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
    gap: var(--space-2);
  }
  .nav-list li {
    width: 100%;
  }
  .nav-list li a {
    display: block;
    width: 100%;
    font-size: var(--font-size-base);
    padding: var(--space-3) var(--space-4);
  }
  .nav-list.open {
    display: flex;
    opacity: 1;
    visibility: visible;
  }
  .nav-toggle {
    display: flex;
  }
}

/* FOOTER */
.footer {
  background: var(--color-surface);
  box-shadow: var(--shadow-md) 0 -4px 12px 0 rgba(0,0,0,0.18);
  padding: var(--space-6) 0 var(--space-10) 0;
  font-size: var(--font-size-sm);
  position: relative;
}
.footer-main {
  flex-wrap: wrap;
}
.footer-site-name {
  font-size: var(--font-size-lg);
  font-family: var(--font-serif);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}
.footer-nav ul, .footer-legal ul {
  display: flex;
  flex-direction: row;
  gap: var(--space-4);
}
.footer-copyright {
  color: var(--color-neutral-400);
  font-size: var(--font-size-xs);
  margin-top: var(--space-1);
}

/* COOKIE BANNER */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 -6px 32px rgba(0,0,0,0.22);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  font-size: var(--font-size-sm);
  transition: transform 0.2s ease, opacity 0.2s;
}
.cookie-consent-banner[hidden] {
  display: none !important;
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
}
.cookie-message a {
  color: var(--color-primary);
  text-decoration: underline;
}
.cookie-actions {
  display: flex;
  gap: var(--space-2);
}
.button-secondary {
  background: none;
  color: var(--color-warning);
  border: 1.5px solid var(--color-warning);
}
.button-secondary:hover, .button-secondary:focus-visible {
  background: var(--color-warning);
  color: var(--color-surface);
}

/* HEADER & FOOTER RESPONSIVENESS */
@media (max-width: 1200px) {
  .container {
    max-width: 99vw;
    padding-left: var(--space-2);
    padding-right: var(--space-2);
  }
}
@media (max-width: 600px) {
  .footer {
    padding: var(--space-4) 0 var(--space-10) 0;
  }
  .footer-main {
    flex-direction: column;
    gap: var(--space-4);
  }
  .cookie-consent-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}
/* ===============================================================
   END base.css
   =============================================================== */
