/* ==========================================================================
   KOTO B&B — ANTWERP
   Shared design system: tokens + reusable chrome & content components.
   Mobile-first. Every page links this file and reuses the classes below.
   --------------------------------------------------------------------------
   Sections
   01. Design tokens (palette, type, spacing, radius, shadow, layout)
   02. Reset & base
   03. Typography
   04. Layout: container, section, grid/flex helpers
   05. Buttons
   06. Cards & media
   07. Site header / navigation (chrome)
   08. Site footer (chrome)
   09. Utility & accessibility helpers
   10. Motion, print & reduced-motion
   ========================================================================== */

/* ==========================================================================
   01. DESIGN TOKENS
   ========================================================================== */
:root {
  /* --- Brand palette -------------------------------------------------- */
  --color-primary:        #a84b2a; /* warm terracotta / clay — primary CTA */
  --color-primary-strong: #8a3a1e; /* pressed / hover deepen */
  --color-primary-soft:   #efd9cc; /* tinted surfaces, badges */

  --color-secondary:        #2e4a3c; /* deep forest green — headings, green bands */
  --color-secondary-strong: #22382d;
  --color-secondary-soft:   #d8e3da;

  --color-accent:      #c08a2e; /* golden accent (the "goud" floor) */
  --color-accent-soft: #f3e3c2;

  --color-heritage: #6b0505; /* legacy oxblood — used sparingly for heritage marks */

  /* --- Neutrals & surfaces ------------------------------------------- */
  --color-bg:          #faf6f0; /* cream page background */
  --color-surface:     #ffffff; /* cards, panels */
  --color-surface-alt: #f2eae0; /* alternating bands, quiet sections */
  --color-border:      #e3d8cb;
  --color-border-strong: #cbbca9;

  /* --- Text ----------------------------------------------------------- */
  --color-text:       #2a2723; /* charcoal body / headings */
  --color-text-muted: #6a6258; /* secondary copy, meta, captions */
  --color-text-invert: #fdf9f4;
  --color-link:       #8a3a1e;
  --color-link-hover: #6b0505;

  /* --- Feedback ------------------------------------------------------- */
  --color-success: #2f6b4f;
  --color-error:   #a33a2a;

  /* --- Typography families ------------------------------------------- */
  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-body:    "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI",
                  Roboto, Helvetica, Arial, sans-serif;
  --font-accent:  "Raleway", "Montserrat", -apple-system, BlinkMacSystemFont,
                  "Segoe UI", Roboto, sans-serif;

  /* --- Type scale (fluid where it helps) ----------------------------- */
  --fs-h1:    clamp(2.25rem, 1.6rem + 3.2vw, 4rem);
  --fs-h2:    clamp(1.75rem, 1.35rem + 2vw, 2.75rem);
  --fs-h3:    clamp(1.375rem, 1.15rem + 1vw, 1.875rem);
  --fs-h4:    clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-lead:  clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --fs-body:  1rem;
  --fs-small: 0.875rem;
  --fs-xs:    0.75rem;

  --lh-tight:  1.15;
  --lh-snug:   1.3;
  --lh-body:   1.65;

  --tracking-wide:  0.08em;
  --tracking-wider: 0.16em;

  /* --- Spacing scale (4px base) -------------------------------------- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2rem;
  --space-xl:  3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* --- Radius --------------------------------------------------------- */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --radius-pill: 999px;

  /* --- Shadow --------------------------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(42, 39, 35, 0.06);
  --shadow-sm: 0 2px 6px rgba(42, 39, 35, 0.08);
  --shadow-md: 0 10px 24px -12px rgba(42, 39, 35, 0.28);
  --shadow-lg: 0 24px 48px -20px rgba(42, 39, 35, 0.34);

  /* --- Layout --------------------------------------------------------- */
  --container-narrow: 44rem;
  --container-max:    72rem;
  --container-wide:   84rem;
  --header-height:    4.5rem;

  /* --- Motion --------------------------------------------------------- */
  --transition-fast: 150ms;
  --transition:      250ms;
  --ease:            cubic-bezier(0.2, 0.7, 0.3, 1);

  --z-header: 100;
  --z-overlay: 200;
}

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

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

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

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

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

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

::selection {
  background: var(--color-primary-soft);
  color: var(--color-secondary-strong);
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

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

/* ==========================================================================
   03. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--color-secondary);
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.01em;
}

h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4, .h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); }

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

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--color-text-muted);
}

.eyebrow,
.kicker {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

small,
.text-small {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

blockquote {
  margin: var(--space-lg) 0;
  padding-left: var(--space-md);
  border-left: 3px solid var(--color-accent);
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-style: italic;
  color: var(--color-secondary);
}

/* ==========================================================================
   04. LAYOUT — container, section, grid & flex helpers
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

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

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

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

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

.section-green {
  background-color: var(--color-secondary);
  color: var(--color-text-invert);
}

.section-green h1,
.section-green h2,
.section-green h3 {
  color: var(--color-text-invert);
}

.section-header {
  max-width: var(--container-narrow);
  margin-bottom: var(--space-xl);
}

.section-header.is-centered {
  margin-inline: auto;
  text-align: center;
}

/* Grid helpers — 1 col mobile, scale up */
.grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

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

/* Flex helpers */
.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

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

.split {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
  grid-template-columns: 1fr;
}

/* Chaptered editorial blocks (Asia / Morocco / Africa / India) */
.chapter {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
  grid-template-columns: 1fr;
}

.chapter-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

.chapter-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* ==========================================================================
   05. BUTTONS
   ========================================================================== */
.btn {
  --btn-bg: var(--color-primary);
  --btn-fg: #ffffff;
  --btn-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.8em 1.6em;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  line-height: 1;
  color: var(--btn-fg);
  background-color: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-fast) var(--ease),
              border-color var(--transition-fast) var(--ease),
              color var(--transition-fast) var(--ease),
              transform var(--transition-fast) var(--ease),
              box-shadow var(--transition-fast) var(--ease);
}

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

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary {
  --btn-bg: var(--color-primary);
  --btn-fg: #ffffff;
  --btn-border: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-strong);
  border-color: var(--color-primary-strong);
  color: #ffffff;
}

.btn-secondary {
  --btn-bg: transparent;
  --btn-fg: var(--color-secondary);
  --btn-border: var(--color-secondary);
}

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

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--color-accent);
  --btn-border: var(--color-accent);
}

.btn-ghost:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-secondary-strong);
}

.btn-lg {
  padding: 1em 2em;
  font-size: var(--fs-body);
}

.btn-sm {
  padding: 0.6em 1.2em;
  font-size: var(--fs-xs);
}

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

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

/* ==========================================================================
   06. CARDS & MEDIA
   ========================================================================== */
.card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition) var(--ease),
              box-shadow var(--transition) var(--ease);
}

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

.card-media {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  background-color: var(--color-surface-alt);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md);
  flex: 1 1 auto;
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
  color: var(--color-secondary);
  margin: 0;
}

.card-text {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  margin: 0;
}

.card-meta {
  font-family: var(--font-accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent);
}

.card-footer {
  margin-top: auto;
  padding: 0 var(--space-md) var(--space-md);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  padding: 0.25em 0.7em;
  font-family: var(--font-accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-secondary-strong);
  background-color: var(--color-accent-soft);
  border-radius: var(--radius-pill);
}

.badge-primary {
  color: var(--color-primary-strong);
  background-color: var(--color-primary-soft);
}

.media-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

.avatar {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-pill);
  object-fit: cover;
  border: 2px solid var(--color-surface);
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   07. SITE HEADER / NAVIGATION  (shared chrome)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background-color: rgba(250, 246, 240, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-secondary);
  text-decoration: none;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1;
}

.brand-text small {
  display: block;
  font-family: var(--font-accent);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Mobile toggle (progressive-enhancement checkbox + label) */
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-secondary);
  border-radius: var(--radius-pill);
}

.site-nav {
  display: none;
  order: 3;
  width: 100%;
}

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

.nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
  padding: var(--space-xs) 0 var(--space-sm);
}

.nav-link {
  display: block;
  padding: var(--space-2xs) 0;
  font-family: var(--font-accent);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-primary);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-cta {
  display: none;
}

/* ==========================================================================
   08. SITE FOOTER  (shared chrome)
   ========================================================================== */
.site-footer {
  background-color: var(--color-secondary);
  color: var(--color-text-invert);
  padding-block: var(--space-2xl) var(--space-lg);
  margin-top: var(--space-2xl);
}

.site-footer a {
  color: var(--color-text-invert);
  text-decoration: none;
  opacity: 0.85;
}

.site-footer a:hover {
  opacity: 1;
  color: var(--color-accent);
  text-decoration: none;
}

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

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-title {
  font-family: var(--font-accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 var(--space-2xs);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-invert);
  margin: 0 0 var(--space-2xs);
}

.footer-tagline {
  font-size: var(--fs-small);
  line-height: 1.6;
  opacity: 0.85;
  margin: 0;
  max-width: 32ch;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

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

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(253, 249, 244, 0.18);
  font-size: var(--fs-small);
  opacity: 0.8;
}

.footer-bottom p {
  margin: 0;
}

/* ==========================================================================
   09. UTILITY & ACCESSIBILITY HELPERS
   ========================================================================== */
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }

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

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -100px;
  z-index: var(--z-overlay);
  padding: var(--space-2xs) var(--space-sm);
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--transition-fast) var(--ease);
}

.skip-link:focus {
  top: var(--space-sm);
  color: #ffffff;
  text-decoration: none;
}

/* ==========================================================================
   10. RESPONSIVE — min-width media queries (mobile-first)
   ========================================================================== */

/* --- ≥ 40rem : small tablets ------------------------------------------- */
@media (min-width: 40rem) {
  .container {
    padding-inline: var(--space-lg);
  }

  .grid-2,
  .split,
  .chapter {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* --- ≥ 56rem : tablets & small laptops — nav goes horizontal ----------- */
@media (min-width: 56rem) {
  .section {
    padding-block: var(--space-3xl);
  }

  .nav-toggle-label {
    display: none;
  }

  .site-nav {
    display: block !important;
    order: 0;
    width: auto;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
    padding: 0;
  }

  .nav-cta {
    display: inline-flex;
  }

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

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

/* --- ≥ 64rem : desktops ------------------------------------------------ */
@media (min-width: 64rem) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .split {
    gap: var(--space-2xl);
  }
}

/* ==========================================================================
   MOTION & PRINT
   ========================================================================== */
@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;
  }
}

@media print {
  .site-header,
  .site-footer,
  .nav-toggle-label {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }
}
