/* ==========================================================================
   22b — Design System
   Family Style Restaurant & B&B · Antwerp
   Single source of truth for tokens, site chrome and reusable components.
   Mobile-first: every layout enhancement lives in a min-width media query.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette --------------------------------------------------------- */
  --color-primary: #b4542a;          /* terracotta — the house colour */
  --color-primary-dark: #8e3f1e;
  --color-primary-light: #d97a4e;
  --color-secondary: #4a5d3a;        /* olive — ecological / garden */
  --color-secondary-dark: #37452b;
  --color-secondary-light: #6f8459;
  --color-accent: #e0a458;           /* warm gold — highlights */
  --color-accent-dark: #c4863a;

  /* Neutrals -------------------------------------------------------------- */
  --color-bg: #fbf7f0;               /* warm cream page background */
  --color-surface: #ffffff;
  --color-surface-alt: #f3ece1;
  --color-border: #e5dccf;
  --color-text: #2b2622;
  --color-text-muted: #6b6259;
  --color-text-invert: #fdfaf5;
  --color-overlay: rgba(43, 38, 34, 0.55);

  /* Status ---------------------------------------------------------------- */
  --color-success: #3f7d4e;
  --color-warning: #c4863a;
  --color-danger: #a33a2b;

  /* Type ------------------------------------------------------------------ */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Georgia", "Times New Roman", serif;

  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.375rem;     /* 22px */
  --text-2xl: 1.75rem;     /* 28px */
  --text-3xl: 2.25rem;     /* 36px */
  --text-4xl: 3rem;        /* 48px */

  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --tracking-wide: 0.08em;
  --tracking-normal: 0;

  /* Spacing scale (4px base) --------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --space-9: 4rem;
  --space-10: 5rem;
  --space-11: 6.5rem;

  /* Radius ---------------------------------------------------------------- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadow ---------------------------------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(43, 38, 34, 0.06);
  --shadow-sm: 0 2px 6px rgba(43, 38, 34, 0.08);
  --shadow-md: 0 8px 20px rgba(43, 38, 34, 0.10);
  --shadow-lg: 0 18px 40px rgba(43, 38, 34, 0.14);
  --shadow-focus: 0 0 0 3px rgba(180, 84, 42, 0.35);

  /* Motion ---------------------------------------------------------------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;

  /* Layout ---------------------------------------------------------------- */
  --container-max: 72rem;   /* 1152px */
  --container-narrow: 48rem;
  --header-height: 4.5rem;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-7) 0;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); font-family: var(--font-sans); }

p {
  margin: 0 0 var(--space-4);
}

small,
.text-small {
  font-size: var(--text-sm);
}

.text-muted {
  color: var(--color-text-muted);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-primary);
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--space-8);
}

.section--alt {
  background-color: var(--color-surface-alt);
}

.section__head {
  max-width: 44rem;
  margin-bottom: var(--space-6);
}

.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

.grid--2,
.grid--3,
.grid--4 {
  grid-template-columns: 1fr;
}

.stack > * + * {
  margin-top: var(--space-4);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-invert);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: var(--color-text-invert);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-text-invert);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--color-secondary-dark);
  color: var(--color-text-invert);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-ghost:hover {
  background-color: var(--color-primary);
  color: var(--color-text-invert);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: var(--text-lg);
}

.btn--block {
  display: flex;
  width: 100%;
}

/* --------------------------------------------------------------------------
   6. Cards
   -------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card__media {
  aspect-ratio: 4 / 3;
  background-color: var(--color-surface-alt);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: var(--space-5);
}

.card__title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-lg);
  font-family: var(--font-display);
}

.card__text {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.card__footer {
  margin-top: auto;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.card--featured {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   7. Site chrome — header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(251, 247, 240, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-height);
}

.site-brand {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-brand:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.site-brand__mark {
  color: var(--color-primary);
}

.site-brand__tag {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Mobile toggle: a real, CSS-only disclosure driven by a checkbox. */
.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.nav-toggle__label {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-text);
  border-radius: var(--radius-pill);
  transition: transform var(--duration-base) var(--ease-out),
              opacity var(--duration-fast) var(--ease-out);
}

.nav-toggle:checked + .nav-toggle__label .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle:checked + .nav-toggle__label .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle:checked + .nav-toggle__label .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-toggle:focus-visible + .nav-toggle__label {
  box-shadow: var(--shadow-focus);
}

.site-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: none;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.nav-toggle:checked ~ .site-nav {
  display: flex;
}

.site-nav__link {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  text-decoration: none;
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  background-color: var(--color-surface-alt);
  color: var(--color-primary);
  text-decoration: none;
}

.site-nav__cta {
  margin-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   8. Site chrome — footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: var(--space-9);
  background-color: var(--color-secondary-dark);
  color: var(--color-text-invert);
}

.site-footer a {
  color: rgba(253, 250, 245, 0.85);
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding-block: var(--space-8);
}

.footer-col__title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin: 0 0 var(--space-3);
  color: #ffffff;
}

.footer-tagline {
  margin: 0;
  max-width: 28rem;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: rgba(253, 250, 245, 0.8);
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.footer-list address {
  font-style: normal;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-block: var(--space-5);
  border-top: 1px solid rgba(253, 250, 245, 0.18);
  font-size: var(--text-xs);
  color: rgba(253, 250, 245, 0.7);
}

.footer-bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* --------------------------------------------------------------------------
   9. Utility helpers
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   10. Responsive upgrades (mobile-first → min-width)
   -------------------------------------------------------------------------- */
@media (min-width: 48rem) {
  .container {
    padding-inline: var(--space-6);
  }

  .section {
    padding-block: var(--space-10);
  }

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

  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    padding-block: var(--space-9);
  }

  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  /* Desktop nav replaces the mobile disclosure. */
  .nav-toggle,
  .nav-toggle__label {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-1);
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .site-nav__link {
    padding: var(--space-2) var(--space-3);
  }

  .site-nav__cta {
    margin-top: 0;
    margin-left: var(--space-2);
  }
}

@media (min-width: 64rem) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   11. Accessibility preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
