/* ==========================================================================
   Domestic — Heritage Bakery, Antwerp
   Shared design tokens & base stylesheet.
   All pages link this file; do not redefine tokens downstream.
   ========================================================================== */

:root {
  /* ---- Palette: warm neutrals, crust & butter ---- */
  --color-cream:        #FAF6EF; /* page background */
  --color-linen:        #F2EBDF; /* section surface */
  --color-sand:         #E7DCC9; /* cards, dividers */
  --color-clay:         #C9B79E; /* muted borders, captions */
  --color-crust:        #8C6A4A; /* primary warm accent (baked crust) */
  --color-crust-deep:   #5E442E; /* hover / pressed accent */
  --color-espresso:     #2B211A; /* headings, primary text */
  --color-cocoa:        #4A3B2F; /* body text */
  --color-stone:        #7A726B; /* secondary text, meta */
  --color-butter:       #E4B85C; /* highlight, ratings, underline accent */
  --color-leaf:         #5B6B4A; /* subtle organic secondary */
  --color-white:        #FFFFFF;

  /* ---- Semantic ---- */
  --bg:                 var(--color-cream);
  --bg-alt:             var(--color-linen);
  --surface:            var(--color-white);
  --text:               var(--color-espresso);
  --text-body:          var(--color-cocoa);
  --text-muted:         var(--color-stone);
  --accent:             var(--color-crust);
  --accent-hover:       var(--color-crust-deep);
  --highlight:          var(--color-butter);
  --border:             var(--color-sand);
  --border-strong:      var(--color-clay);

  /* ---- Type scale (fluid) ---- */
  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-xs:   clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --fs-sm:   clamp(0.875rem, 0.84rem + 0.2vw, 0.9375rem);
  --fs-base: clamp(1rem, 0.96rem + 0.25vw, 1.0625rem);
  --fs-md:   clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
  --fs-lg:   clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --fs-xl:   clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --fs-2xl:  clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
  --fs-3xl:  clamp(3rem, 1.8rem + 5.5vw, 6rem);

  --lh-tight: 1.08;
  --lh-snug:  1.25;
  --lh-body:  1.65;
  --tracking-wide: 0.14em;
  --tracking-mega: 0.28em;

  /* ---- Spacing scale ---- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --section-y: clamp(4rem, 3rem + 6vw, 8rem);
  --gutter:    clamp(1.25rem, 4vw, 3rem);
  --maxw:      1240px;
  --maxw-text: 68ch;

  /* ---- Radius & elevation ---- */
  --radius-sm: 2px;
  --radius:    4px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(43, 33, 26, 0.06);
  --shadow:    0 10px 30px -14px rgba(43, 33, 26, 0.22);
  --shadow-lg: 0 28px 60px -24px rgba(43, 33, 26, 0.30);

  --transition: 220ms cubic-bezier(0.22, 0.61, 0.36, 1);

  /* ---- Layout tokens ---- */
  --nav-h: 72px;
  --hairline: 1px solid var(--border);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

/* ==========================================================================
   Base
   ========================================================================== */
body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: var(--lh-tight);
  font-weight: 500;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); font-weight: 600; }

p { max-width: var(--maxw-text); }
p + p { margin-top: var(--space-4); }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
strong { color: var(--text); font-weight: 600; }
small { font-size: var(--fs-xs); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mega);
  color: var(--accent);
}
.display { font-family: var(--font-display); }
.lead { font-size: var(--fs-md); line-height: 1.55; color: var(--text-body); }
.muted { color: var(--text-muted); }
.rule {
  border: 0;
  height: 1px;
  background: var(--border-strong);
  width: 48px;
  opacity: 0.6;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 860px; }
.container--wide { max-width: 1480px; }
.stack > * + * { margin-top: var(--space-6); }
.stack-sm > * + * { margin-top: var(--space-3); }
.center { text-align: center; }
.center p { margin-inline: auto; }

.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--color-espresso); color: var(--color-linen); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--color-cream); }

.grid { display: grid; gap: var(--space-8); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--split { grid-template-columns: 1.1fr 1fr; align-items: center; }

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--split { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Navigation — sticky, transparent over hero, solids on scroll
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: var(--hairline);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav__brand {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text);
}
.nav__links { display: flex; gap: var(--space-6); align-items: center; }
.nav__links a {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-body);
}
.nav__links a[aria-current="page"], .nav__links a:hover { color: var(--accent); }
@media (max-width: 720px) { .nav__links { display: none; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: clamp(520px, 82vh, 880px);
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--space-24);
  background: var(--color-espresso);
  color: var(--color-linen);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43,33,26,.45) 0%, rgba(43,33,26,.72) 100%); }
.hero__content { position: relative; z-index: 1; max-width: 900px; }
.hero__title { color: var(--color-cream); font-size: var(--fs-3xl); }
.hero h1, .hero p { color: var(--color-cream); }
.hero__tagline { letter-spacing: var(--tracking-mega); text-transform: uppercase; font-size: var(--fs-xs); color: var(--color-butter); }

/* ==========================================================================
   Cards & surfaces
   ========================================================================== */
.card {
  background: var(--surface);
  border: var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card--flat { box-shadow: none; background: transparent; }
.card__meta { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-muted); }

.store-card__hours { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-body); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.85em 1.9em;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-cream);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--color-cream); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--text); border-color: var(--text); color: var(--color-cream); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--color-espresso); color: var(--color-sand); padding-block: var(--space-16); }
.footer a { color: var(--color-sand); }
.footer a:hover { color: var(--color-butter); }
.footer h4 { color: var(--color-cream); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.footer__meta { font-size: var(--fs-xs); color: var(--color-stone); border-top: 1px solid rgba(250,246,239,.12); margin-top: var(--space-12); padding-top: var(--space-6); }

/* ==========================================================================
   Utilities
   ========================================================================== */
.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;
}
.flow-tight { line-height: var(--lh-snug); }
.hairline-top { border-top: var(--hairline); }
.hairline-bottom { border-bottom: var(--hairline); }
:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; border-radius: var(--radius-sm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
