@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Nav override — fixed to the top of the hero. Solid white like every other
   page's header rather than the old transparent gradient. */

.nav--home {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Fixed + z-index makes this its own stacking context, so its children
     (the off-canvas #navLinks panel, z-index 100) only out-rank each other,
     not elements elsewhere in the document. At the old z-index: 30, the
     whole header — panel included — got buried under .nav-backdrop (z-index
     90) once the mobile menu opened, so every tap on a link actually hit the
     backdrop underneath it and just closed the menu instead of navigating.
     95 clears the backdrop while staying under the cart drawer (z-index 100)
     so that still overlays the header as intended. */
  z-index: 95;
}

/* Hero */

.hero-wrap {
  position: relative;
  overflow: hidden;
  height: 100vh;
  /* svh accounts for mobile browser chrome (address bar) so the hero doesn't
     overshoot the visible viewport on load; falls back to 100vh above where
     svh isn't supported. */
  height: 100svh;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 170px 48px 110px;
  max-width: 1680px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* The hero photo carries no overlay, and it's a mid-tone brown throughout.
   Theme-coloured text can't work against it — in light mode the dark copy
   measured 1.0–1.2:1 against the bread, i.e. effectively invisible. So the
   hero copy is pinned to light with a soft shadow instead. The photo itself
   stays completely untinted. */
.hero-copy {
  flex: 1;
  max-width: 620px;
  animation: fadeUp .9s ease both;
  color: #fff;
  text-align: left;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .45);
}

.hero-copy h1 {
  font: 500 clamp(38px, 5.2vw, 68px)/1.06 var(--font-display);
  margin: 0 0 32px;
  color: #fff;
}

.hero-copy .cta-shop {
  color: #fff;
  border-color: rgba(255, 255, 255, .9);
}

.hero-copy .cta-shop:hover {
  background: #fff;
  color: #181712;
  text-shadow: none;
}

.hero-copy .cta-ghost {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, .7);
}

.hero-para {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 400px;
  margin: 0 0 32px;
}

.hero-ctas { display: flex; gap: 16px; align-items: center; }

.cta-shop {
  display: inline-block;
  border: 1px solid var(--text);
  color: var(--text);
  padding: 14px 32px;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all .25s;
}

.cta-shop:hover { background: var(--text); color: var(--bg); }

/* Full --text rather than --muted: this sits over a photo, and the muted
   grey only reached ~3.8:1 against the lighter areas of the scrimmed image
   (under the 4.5:1 AA floor for text this size). It stays visually
   secondary to the boxed CTA via its smaller size and underline treatment. */
.cta-ghost {
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
}

/* Favourites */

.favourites {
  padding: 60px 48px 100px;
  box-sizing: border-box;
  max-width: 1680px;
  margin: 0 auto;
}

.favourites-head { text-align: center; margin-bottom: 40px; }

/* Category directory — large photo cards, each linking to its own page. */

/* Three across, so five categories lay out as 3 + 2. */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1500px;
  margin: 0 auto;
  width: 100%;
}

/* The category name is printed into the artwork itself, so there's no text
   overlay here — one would duplicate it. The card matches the source images'
   4:5 portrait ratio so the title band at the top is never cropped away. */
.cat-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--border-faint);
  background: var(--card-bg);
  transition: transform .3s ease;
}

.cat-card:hover { transform: translateY(-6px); }

.cat-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .5s ease;
}

.cat-card:hover img { transform: scale(1.04); }

.favourites h2 {
  font: 500 42px var(--font-display);
  margin: 0 0 40px;
}

.h-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1500px;
  margin: 0 auto;
  width: 100%;
}

.h-card {
  background: var(--card-bg);
  border: 1px solid var(--border-faint);
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  opacity: 1;
  transition: transform .3s;
}

.h-card:hover { transform: translateY(-6px); }

.h-card-photo {
  height: 190px;
  background: repeating-linear-gradient(135deg, var(--stripe-a), var(--stripe-a) 9px, var(--stripe-b) 9px, var(--stripe-b) 18px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: 11px ui-monospace, Menlo, monospace;
  color: var(--muted-faint);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.h-card-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.h-card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font: 11px var(--font-display);
  letter-spacing: 1px;
  padding: 3px 8px;
  text-transform: uppercase;
}

.h-card-body {
  padding: 20px 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.h-card-name { display: block; font: 500 19px var(--font-display); }
.h-card-name:hover { color: var(--accent); }

.h-card-price { font-size: 15px; color: var(--accent); }

.h-card-add {
  margin-top: 10px;
  padding: 10px 0;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .8px;
  text-transform: uppercase;
  transition: all .2s;
}

.h-card-add:hover { border-color: var(--accent); color: var(--accent); }

.h-card-add.added {
  border-color: var(--accent);
  background: var(--overlay-soft);
  color: var(--accent);
}

.view-all-wrap { text-align: center; padding-top: 40px; }

.view-all {
  display: inline-block;
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 14px 36px;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all .25s;
}

.view-all:hover { border-color: var(--accent); color: var(--accent); }

/* Story */

.story {
  display: flex;
  align-items: center;
  gap: 70px;
  padding: 20px 48px 100px;
  max-width: 1500px;
  margin: 0 auto;
  box-sizing: border-box;
}

.story-img {
  position: relative;
  flex: 1;
  height: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: 12px ui-monospace, Menlo, monospace;
  color: var(--muted-faint);
  padding: 20px;
  box-sizing: border-box;
}

.story-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 60px;
  box-sizing: border-box;
}

.story-copy { flex: 1; }

.story-copy h2 {
  font: 500 38px/1.2 var(--font-display);
  margin: 0 0 20px;
}

.quote {
  font: 20px var(--font-display);
  color: var(--text);
  margin: 28px 0 0;
}

.story-cta { margin-top: 28px; padding: 12px 28px; font-size: 13px; }

/* Footer */

.footer--home { max-width: 1500px; }

@media (max-width: 1100px) {
  .hero { padding-top: 150px; }
  .hero-copy { max-width: 100%; }
  .hero-para { max-width: 100%; }
  .h-grid, .fav-cats, .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .story { flex-direction: column; gap: 40px; }
  .story-img { width: 100%; }
}

@media (max-width: 560px) {
  .h-grid, .fav-cats, .cat-grid { grid-template-columns: 1fr; }
  .favourites { padding: 50px 24px 80px; }
  .hero { padding: 130px 24px 70px; }
  .story { padding: 20px 24px 80px; }
  .footer--home { flex-direction: column; gap: 8px; padding: 32px 24px; }
}
