/* ==========================================================================
   Caffenation — shared design tokens
   Premium, minimal, confident. Warm neutral palette.
   Every page and webshop step links to THIS file; do not redefine tokens.
   ========================================================================== */

:root {
  /* ---- Core palette : warm neutrals -------------------------------- */
  --c-cream:        #f6f1e9; /* page background, warm paper            */
  --c-ivory:        #fbf8f3; /* raised surfaces, cards, nav            */
  --c-sand:         #e9e1d4; /* subtle fills, dividers, trust bar      */
  --c-linen:        #ddd2c1; /* borders, hairlines                     */
  --c-taupe:        #b3a48f; /* muted meta text, captions              */
  --c-stone:        #8a7c6a; /* secondary body text                    */
  --c-roast:        #4a3b31; /* strong body / subheads                 */
  --c-espresso:     #241b16; /* primary text, footer background        */
  --c-ink:          #14100d; /* max-contrast, headlines on light       */

  /* ---- Accents ------------------------------------------------------ */
  --c-caramel:      #c07a3e; /* primary accent, CTAs, links            */
  --c-caramel-dk:   #9d5f2b; /* hover / pressed                        */
  --c-terracotta:   #a8492f; /* editorial highlight, sale              */
  --c-leaf:         #7ba05b; /* sparing "shopable"/success accent      */

  /* ---- Semantic ----------------------------------------------------- */
  --c-bg:           var(--c-cream);
  --c-surface:      var(--c-ivory);
  --c-text:         var(--c-espresso);
  --c-text-muted:   var(--c-stone);
  --c-border:       var(--c-linen);
  --c-accent:       var(--c-caramel);
  --c-on-dark:      var(--c-cream);
  --c-focus:        var(--c-caramel);

  /* ---- Type scale (1.25 major third, fluid) ------------------------- */
  --font-display: "Helvetica Neue", "Arial Narrow", Inter, system-ui, sans-serif;
  --font-body:    "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-editorial: Georgia, "Times New Roman", serif;

  --fs-xs:   0.75rem;   /* 12px  micro labels, eyebrow             */
  --fs-sm:   0.875rem;  /* 14px  meta, captions                    */
  --fs-base: 1rem;      /* 16px  body                              */
  --fs-md:   1.25rem;   /* 20px  lead paragraphs                   */
  --fs-lg:   1.563rem;  /* 25px  h4 / card titles                  */
  --fs-xl:   1.953rem;  /* 31px  h3                                */
  --fs-2xl:  2.441rem;  /* 39px  h2 / section heads                */
  --fs-3xl:  3.052rem;  /* 49px  h1 display                        */
  --fs-4xl:  3.815rem;  /* 61px  hero, desktop                     */

  --lh-tight: 1.05;
  --lh-snug:  1.2;
  --lh-base:  1.6;

  --track-wide:  0.18em;  /* uppercase eyebrow / nav labels         */
  --track-normal: 0.01em;
  --track-tight: -0.02em; /* display headlines                      */

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-bold:    700;
  --fw-black:   800;

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

  /* ---- Layout ------------------------------------------------------- */
  --container-max: 1280px;
  --container-wide: 1440px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --grid-gap: var(--sp-5);
  --nav-h: 72px;
  --trustbar-h: 44px;

  /* ---- Radii -------------------------------------------------------- */
  --radius-none: 0;
  --radius-sm: 2px;
  --radius-md: 6px;
  --radius-pill: 999px;

  /* ---- Elevation ---------------------------------------------------- */
  --shadow-sm: 0 1px 2px rgba(36, 27, 22, 0.06);
  --shadow-md: 0 6px 20px rgba(36, 27, 22, 0.10);
  --shadow-lg: 0 18px 48px rgba(36, 27, 22, 0.16);

  /* ---- Motion ------------------------------------------------------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 140ms;
  --dur-base: 260ms;
  --dur-slow: 520ms;

  /* ---- Z-index ------------------------------------------------------ */
  --z-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;
}

/* ==========================================================================
   Base / reset
   ========================================================================== */

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

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

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

h1, h2, h3, h4 {
  margin: 0 0 var(--sp-4);
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
  text-transform: uppercase;
  color: var(--c-ink);
}

h1 { font-size: clamp(var(--fs-2xl), 6vw, var(--fs-4xl)); }
h2 { font-size: clamp(var(--fs-xl), 4vw, var(--fs-2xl)); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); letter-spacing: var(--track-normal); }

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

a { color: var(--c-accent); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--c-caramel-dk); }

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--container-wide); }

.section { padding-block: clamp(var(--sp-8), 9vw, var(--sp-10)); }
.section--tight { padding-block: var(--sp-7); }
.section--dark { background: var(--c-espresso); color: var(--c-on-dark); }
.section--sand { background: var(--c-sand); }

.grid { display: grid; gap: var(--grid-gap); }
.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--auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

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

/* ==========================================================================
   Type helpers
   ========================================================================== */

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--c-taupe);
}

.lead { font-size: var(--fs-md); line-height: var(--lh-snug); color: var(--c-roast); }
.text-muted { color: var(--c-text-muted); }

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

/* Navigation — sticky, hairline base, uppercase labels */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: var(--nav-h);
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--c-ivory) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.nav__logo { font-family: var(--font-display); font-weight: var(--fw-black); font-size: var(--fs-md); letter-spacing: var(--track-tight); text-transform: uppercase; color: var(--c-ink); }
.nav__links { display: flex; gap: var(--sp-5); margin-inline: auto; list-style: none; padding: 0; }
.nav__links a {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--c-roast);
}
.nav__links a:hover { color: var(--c-accent); }
.nav__actions { display: flex; gap: var(--sp-4); }

/* Trust bar */
.trustbar { background: var(--c-sand); border-bottom: 1px solid var(--c-border); }
.trustbar__inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); padding-block: var(--sp-3); text-align: center; }
.trustbar__item { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--c-stone); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  border: 1px solid var(--c-espresso);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.btn--primary { background: var(--c-espresso); color: var(--c-cream); }
.btn--primary:hover { background: var(--c-caramel); border-color: var(--c-caramel); color: var(--c-ink); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--c-espresso); }
.btn--ghost:hover { background: var(--c-sand); }

/* Cards */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__media { aspect-ratio: 4 / 5; background: var(--c-sand); object-fit: cover; width: 100%; }
.card__body { padding: var(--sp-5); }
.card__price { font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--c-roast); }

/* Hero */
.hero { position: relative; min-height: clamp(420px, 62vh, 680px); display: grid; place-items: center; overflow: hidden; }
.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,16,13,0.15), rgba(20,16,13,0.55)); }
.hero__content { position: relative; text-align: center; color: var(--c-cream); max-width: 56ch; padding-inline: var(--gutter); }
.hero__content h1 { color: var(--c-cream); }

/* Footer */
.footer { background: var(--c-espresso); color: var(--c-cream); padding-block: var(--sp-8); }
.footer a { color: var(--c-sand); }
.footer a:hover { color: var(--c-caramel); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-7); }

/* Forms */
.input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--c-text);
  background: var(--c-ivory);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
.input::placeholder { color: var(--c-taupe); }

@media (max-width: 800px) {
  .nav__links { display: none; }
  .trustbar__inner { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

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