/* Noble Sourdough
   Design system after the Noble Sourdough Brand Guidelines (Jan 2026):
   Aboreto for display type, Gotham for text, the six brand colours, and a
   calm, "quietly confident" motion language (no flash, nothing performative).
   Layout references: editorial product photography (RF-001), menu typography
   (RF-002), catalogue grids (DD-001, MD-001..003). */

@font-face { font-family: "Aboreto"; src: url("../fonts/aboreto/Aboreto-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Gotham"; src: url("../fonts/gotham/Gotham-Book.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gotham"; src: url("../fonts/gotham/Gotham-BookItalic.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Gotham"; src: url("../fonts/gotham/Gotham-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Gotham"; src: url("../fonts/gotham/Gotham-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  /* Brand palette */
  --royal: #093fa4;
  --duke: #002e89;
  --navy: #00163a;
  --cream: #fcf5e6;
  --off-white: #f2f1eb;
  --dark: #1d1b1a;

  --text: var(--dark);
  --muted: rgb(29 27 26 / 0.62);
  --line: rgb(29 27 26 / 0.14);
  --line-strong: rgb(29 27 26 / 0.85);
  --line-dark: rgb(252 245 230 / 0.18);

  --font-display: "Aboreto", "Didot", "Bodoni 72", Georgia, serif;
  --font-text: "Gotham", "Helvetica Neue", Arial, sans-serif;

  --page-max: 1360px;
  --gutter: clamp(18px, 4.2vw, 64px);
  --radius: 26px;
  --radius-sm: 16px;
  --header-h: 84px;

  /* Motion: slow, eased, never bouncy */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 1s;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 72px); }
body {
  margin: 0; background: var(--cream); color: var(--text);
  font-family: var(--font-text); font-size: 1rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.02; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--royal); color: var(--cream); }
:focus-visible { outline: 2px solid var(--royal); outline-offset: 4px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--page-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(80px, 11vw, 168px); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- type */
.display, .title, .statement, .cat-category-head h3 {
  font-family: var(--font-text); font-weight: 700; letter-spacing: -0.045em; text-transform: uppercase;
}
.range-name, .footer-word {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; text-transform: uppercase;
}
.display { font-size: clamp(3rem, 8.4vw, 8.4rem); line-height: 0.92; color: var(--royal); }
.title { font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 0.98; color: var(--royal); }
.statement { font-size: clamp(1.7rem, 3.6vw, 3.2rem); line-height: 1.12; color: var(--royal); }
.accent { color: var(--navy); }
.on-dark .display, .on-dark .title, .on-dark .statement { color: var(--cream); }
.on-dark .accent { color: #b9c9ef; }
.lead { font-size: clamp(1.02rem, 1.25vw, 1.15rem); line-height: 1.7; max-width: 34em; color: var(--muted); }
.on-dark .lead { color: rgb(252 245 230 / 0.78); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-text); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--royal);
}
.on-dark .eyebrow { color: var(--cream); }

/* --------------------------------------------------------------- buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px; isolation: isolate; overflow: hidden;
  padding: 16px 28px; border-radius: 999px; border: 1px solid var(--royal);
  font-family: var(--font-text); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer; background: none;
  color: var(--royal); transition: color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.btn::before { /* fill that rises from below on hover */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--royal);
  transform: translateY(101%); transition: transform 0.6s var(--ease);
}
.btn:hover { color: var(--cream); }
.btn:hover::before { transform: translateY(0); }
.btn svg { width: 14px; height: 14px; transition: transform 0.5s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--solid { background: var(--royal); color: var(--cream); }
.btn--solid::before { background: var(--navy); }
.btn--solid:hover { border-color: var(--navy); }
.btn--line { border-color: var(--line-strong); color: var(--text); }
.btn--line::before { background: var(--text); }
.on-dark .btn { border-color: rgb(252 245 230 / 0.6); color: var(--cream); }
.on-dark .btn::before { background: var(--cream); }
.on-dark .btn:hover { color: var(--royal); }
.on-dark .btn--solid { background: var(--cream); color: var(--royal); border-color: var(--cream); }
.on-dark .btn--solid::before { background: #ffffff; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: clamp(28px, 4vw, 44px); }

.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; color: var(--royal); }
.link-arrow span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.5s var(--ease); padding-bottom: 3px; }
.link-arrow:hover span { background-size: 100% 1px; }
.link-arrow svg { width: 14px; height: 14px; }

.circle-btn {
  display: inline-grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), opacity 0.3s;
}
.circle-btn:hover { background: var(--text); color: var(--cream); }
.circle-btn:disabled { opacity: 0.3; cursor: default; background: transparent; color: var(--text); }
.circle-btn svg { width: 16px; height: 16px; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.74rem; }
.tag img { height: 13px; width: auto; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; color: var(--royal);
  transition: transform 0.6s var(--ease), background 0.5s var(--ease), box-shadow 0.5s var(--ease), color 0.4s;
}
.header-inner {
  display: flex; align-items: center; gap: 28px; height: var(--header-h);
  max-width: calc(var(--page-max) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter);
  transition: height 0.5s var(--ease);
}
.brand { margin-right: auto; display: block; position: relative; }
.brand img { height: 44px; width: auto; transition: opacity 0.4s, height 0.5s var(--ease); }
.brand-cream { position: absolute; inset: 0; opacity: 0; }
.site-header:is([data-theme="dark"], .is-solid) { color: var(--cream); }
.site-header:is([data-theme="dark"], .is-solid) .brand-blue { opacity: 0; }
.site-header:is([data-theme="dark"], .is-solid) .brand-cream { opacity: 1; }
.site-header.is-solid { background: rgb(9 63 164 / 0.97); }
.site-header.is-solid .header-inner { height: 68px; }
.site-header.is-solid .brand img { height: 36px; }
.site-header:is([data-theme="dark"], .is-solid) :focus-visible, .on-dark :focus-visible { outline-color: var(--cream); }
.site-header.is-hidden { transform: translateY(-100%); }

.site-nav ul { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 30px); }
.nav-link { font-weight: 500; font-size: 0.72rem; letter-spacing: 0.16em; text-decoration: none; white-space: nowrap; }
.nav-link { padding: 8px 0; opacity: 0.82; transition: opacity 0.3s; }
.nav-link:hover, .nav-link[aria-current="page"] { opacity: 1; }
.nav-link[aria-current="page"] { font-weight: 700; }
.nav-cta { padding: 11px 20px; font-size: 0.7rem; border-color: currentColor; color: inherit; }
.site-header:is([data-theme="dark"], .is-solid) .nav-cta::before { background: var(--cream); }
.site-header:is([data-theme="dark"], .is-solid) .nav-cta:hover { color: var(--royal); }

.menu-toggle { display: none; position: relative; z-index: 2; width: 52px; height: 52px; border-radius: 50%; border: 1px solid currentColor; background: none; cursor: pointer; }
.menu-lines, .menu-lines::before, .menu-lines::after { position: absolute; left: 50%; width: 18px; height: 1.5px; margin-left: -9px; background: currentColor; transition: transform 0.5s var(--ease), opacity 0.3s; }
.menu-lines { top: 50%; }
.menu-lines::before, .menu-lines::after { content: ""; left: 0; margin: 0; }
.menu-lines::before { transform: translateY(-6px); }
.menu-lines::after { transform: translateY(6px); }
.menu-toggle[aria-expanded="true"] .menu-lines { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-lines::before { transform: rotate(45deg); background: var(--cream); }
.menu-toggle[aria-expanded="true"] .menu-lines::after { transform: rotate(-45deg); background: var(--cream); }

@media (max-width: 1080px) {
  .menu-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 0; z-index: 1; display: flex; align-items: flex-end;
    padding: 120px var(--gutter) 48px; background: var(--navy); color: var(--cream);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path 0.8s var(--ease-in-out), visibility 0s 0.8s;
  }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; }
  .site-nav li { overflow: hidden; width: 100%; padding-bottom: 6px; }
  .site-nav li:last-child { border: 0; padding-top: 22px; }
  .nav-link { display: inline-block; font-family: var(--font-text); font-weight: 500; font-size: clamp(1.7rem, 7vw, 3rem); letter-spacing: 0.01em; transform: translateY(110%); transition: transform 0.8s var(--ease); }
  .nav-cta { transform: translateY(150%); transition: transform 0.8s var(--ease), color 0.5s; border-color: var(--cream); }
  .nav-cta::before { background: var(--cream) !important; }
  .nav-cta:hover { color: var(--royal) !important; }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-header { color: var(--cream); background: none; box-shadow: none; backdrop-filter: none; transform: none; }
  body.menu-open .brand-blue { opacity: 0; }
  body.menu-open .brand-cream { opacity: 1; z-index: 2; }
  body.menu-open .brand { z-index: 2; }
  body.menu-open .site-nav { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.8s var(--ease-in-out), visibility 0s; }
  body.menu-open .nav-link, body.menu-open .nav-cta { transform: none; transition-delay: calc(0.25s + var(--i) * 0.06s); }
}

main { display: block; }
.has-header-space { padding-top: var(--header-h); }

/* -------------------------------------------------------------- marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 22px; background: var(--cream); }
.marquee--dark { background: var(--royal); border-color: transparent; color: var(--cream); }
.marquee-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-run { display: flex; align-items: center; gap: 36px; padding-right: 36px; }
.marquee-run span { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2.2rem); white-space: nowrap; color: var(--royal); }
.marquee--dark .marquee-run span { color: var(--cream); }
.marquee-run img { width: 34px; height: 34px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------- page hero */
.page-hero { padding-top: calc(var(--header-h) + clamp(56px, 9vw, 130px)); padding-bottom: clamp(48px, 7vw, 96px); }
.page-hero .display { margin-top: 22px; }
.page-hero .lead { margin-top: 26px; }

/* ---------------------------------------------------------------- home */
.hero { position: relative; min-height: 100svh; background: var(--royal); color: var(--cream); padding-top: calc(var(--header-h) + 24px); padding-bottom: clamp(32px, 4vw, 56px); display: grid; }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero-copy { padding-bottom: clamp(8px, 2vw, 24px); }
.hero-lockup { max-width: 580px; margin-top: 22px; }
.hero-lockup img { width: 100%; }
.hero .lead { margin-top: 24px; }
.hero-location { margin-top: 16px; color: var(--cream); font-size: 0.9rem; }
.hero-media { position: relative; height: min(78svh, 820px); border-radius: var(--radius); overflow: hidden; background: var(--off-white); }
.hero-media img { position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover; }
.hero-badge { position: absolute; right: clamp(-8px, -1vw, -18px); top: clamp(-18px, -2vw, -30px); }
.hero-media-wrap { position: relative; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { height: 62svh; }
}

/* Rotating round badge (brand icons are round stamps) */
.badge { position: relative; width: clamp(112px, 11vw, 150px); aspect-ratio: 1; border-radius: 50%; background: var(--royal); color: var(--cream); display: grid; place-items: center; box-shadow: 0 18px 50px rgb(0 22 58 / 0.22); }
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 26s linear infinite; }
.badge text { font-family: var(--font-text); font-weight: 500; font-size: 9.4px; letter-spacing: 0.32em; fill: currentColor; text-transform: uppercase; }
.badge img { width: 38%; height: auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.statement-block { text-align: center; }
.statement-block .statement { max-width: 22em; margin: 0 auto; }
.statement-block .eyebrow { margin-bottom: 20px; }
.brand-values {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 26px); max-width: 820px; margin: clamp(32px, 6vw, 72px) auto 0;
}
.brand-values li {
  display: grid; place-items: center; aspect-ratio: 1; padding: 8%;
  border-radius: 50%; overflow: hidden; background: #fff;
}
.brand-values img { width: 100%; height: 100%; object-fit: contain; filter: brightness(1.14); }
@media (max-width: 520px) { .brand-values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
[data-scrub] .word { opacity: 0.16; transition: opacity 0.25s linear; }
[data-scrub] .word.is-on { opacity: 1; }

.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px 48px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .lead { max-width: 28em; }

/* Category rail */
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 22vw, 300px); gap: clamp(14px, 1.6vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-controls { display: flex; gap: 10px; justify-content: flex-end; margin-top: 28px; }
.cat-card { scroll-snap-align: start; display: grid; gap: 16px; text-decoration: none; }
.cat-card-media { display: block; aspect-ratio: 4 / 5; border-radius: var(--radius-sm); overflow: hidden; background: #ffffff; }
.cat-card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform 1.2s var(--ease); }
.cat-card:hover .cat-card-media img { transform: scale(1.1); }
.cat-card-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-inline: 4px; }
.cat-card-label span { font-weight: 700; font-size: 1.15rem; color: var(--royal); }
.cat-card-label small { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* Sourdough tiles (home) */
.loaf-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); }
.loaf-tile { position: relative; display: grid; gap: 14px; text-decoration: none; }
.loaf-tile-media { display: block; aspect-ratio: 3 / 4; border-radius: var(--radius-sm); overflow: hidden; background: #ffffff; position: relative; }
.loaf-tile-media::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: var(--loaf); transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease); }
.loaf-tile:hover .loaf-tile-media::after { transform: scaleX(1); }
.loaf-tile-media img { width: 100%; height: 100%; object-fit: contain; padding: 12%; transition: transform 1.1s var(--ease); }
.loaf-tile:hover .loaf-tile-media img { transform: scale(1.07) rotate(-1.5deg); }
.loaf-tile-name { font-family: var(--font-display); font-size: clamp(1.1rem, 1.6vw, 1.45rem); color: var(--loaf); padding-inline: 4px; }
.loaf-tile-go { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); color: var(--loaf); opacity: 0; transform: scale(0.6); transition: opacity 0.4s, transform 0.5s var(--ease); }
.loaf-tile-go svg { width: 14px; height: 14px; }
.loaf-tile:hover .loaf-tile-go { opacity: 1; transform: none; }
@media (max-width: 900px) { .loaf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .loaf-tile:last-child { grid-column: span 2; } .loaf-tile:last-child .loaf-tile-media { aspect-ratio: 16 / 9; } }

/* Blue panels with the brand pattern */
.panel { position: relative; overflow: hidden; margin-inline: clamp(10px, 1.4vw, 20px); border-radius: var(--radius); background: var(--royal); color: var(--cream); isolation: isolate; }
.panel--navy { background: var(--navy); }
.pattern::before { content: ""; position: absolute; inset: -160px; z-index: -1; background: url("../img/brand/pattern-cream.webp") 0 0 / 160px 160px repeat; opacity: 0.08; transform: translate3d(0, var(--pattern-y, 0px), 0); }

/* Reels */
.reels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.8vw, 28px); }
.reel { position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius-sm); overflow: hidden; background: var(--navy); }
.reel video, .reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-play {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 20px;
  border: 0; background: linear-gradient(180deg, rgb(0 22 58 / 0) 45%, rgb(0 22 58 / 0.7)); color: var(--cream); cursor: pointer; text-align: left;
  transition: opacity 0.5s var(--ease);
}
.reel-play .circle { align-self: flex-end; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); color: var(--royal); transition: transform 0.6s var(--ease); }
.reel-play .circle svg { width: 18px; height: 18px; margin-left: 3px; }
.reel-play:hover .circle { transform: scale(1.1); }
.reel-play .reel-title { font-family: var(--font-display); font-size: clamp(1.2rem, 1.8vw, 1.6rem); line-height: 1.1; }
.reel-play .reel-title small { display: block; margin-top: 6px; font-family: var(--font-text); font-size: 0.7rem; letter-spacing: 0.16em; opacity: 0.8; }
.reel.is-playing .reel-play { opacity: 0; pointer-events: none; }
@media (max-width: 760px) { .reels { grid-template-columns: repeat(3, 72vw); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; } .reel { scroll-snap-align: center; } }

/* Mosaic of bakery photos */
.mosaic { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(10px, 1.4vw, 20px); align-items: start; }
.mosaic figure { overflow: hidden; border-radius: var(--radius-sm); background: var(--off-white); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic .m1 { grid-column: 1 / span 5; aspect-ratio: 4 / 5; }
.mosaic .m2 { grid-column: 6 / span 4; aspect-ratio: 3 / 4; margin-top: clamp(40px, 8vw, 120px); }
.mosaic .m3 { grid-column: 10 / span 3; aspect-ratio: 3 / 4; }
.mosaic .m4 { grid-column: 10 / span 3; aspect-ratio: 1; margin-top: calc(-1 * clamp(80px, 14vw, 220px)); align-self: end; }
@media (max-width: 760px) { .mosaic .m1 { grid-column: 1 / -1; } .mosaic .m2 { grid-column: 1 / span 7; margin-top: 0; } .mosaic .m3 { grid-column: 8 / span 5; } .mosaic .m4 { display: none; } }

/* Two-column content */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Order tiles */
.order { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.order a { position: relative; display: grid; place-items: center; padding: clamp(32px, 5vw, 72px); text-decoration: none; overflow: hidden; }
.order a + a { border-left: 1px solid var(--line); }
.order a::before { content: ""; position: absolute; inset: 0; background: #ffffff; transform: scaleY(0); transform-origin: bottom; transition: transform 0.7s var(--ease); z-index: -1; }
.order a:hover::before { transform: scaleY(1); }
.order { isolation: isolate; }
.order img { width: min(360px, 100%); aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.9s var(--ease); }
.order a:hover img { transform: scale(1.05); }
@media (max-width: 600px) { .order { grid-template-columns: 1fr; } .order a + a { border-left: 0; border-top: 1px solid var(--line); } }

/* -------------------------------------------------------------- catalogue */
.cat-hero { background: var(--royal); padding-top: calc(var(--header-h) + clamp(56px, 9vw, 130px)); padding-bottom: clamp(36px, 5vw, 64px); }
.cat-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.cat-stats { display: flex; gap: clamp(24px, 4vw, 56px); }
.cat-stats div { display: grid; }
.cat-stats strong { font-weight: 700; font-size: clamp(2.4rem, 4.6vw, 4rem); line-height: 1; color: var(--cream); }
.cat-stats span { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cream); margin-top: 8px; }
@media (max-width: 760px) { .cat-hero-grid { grid-template-columns: 1fr; } }

.cat-toolbar { position: sticky; top: 0; z-index: 30; background: rgb(252 245 230 / 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: top 0.6s var(--ease); }
body.header-visible .cat-toolbar { top: 68px; }
.cat-toolbar-inner { display: grid; grid-template-columns: minmax(200px, 300px) 1fr auto; gap: 18px; align-items: center; padding-block: 14px; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 18px; height: 48px; border: 1px solid transparent; border-radius: 999px; background: #ffffff; transition: box-shadow 0.4s var(--ease); }
.search:focus-within { box-shadow: 0 0 0 4px rgb(9 63 164 / 0.12); border-color: var(--royal); }
.search svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 0.92rem; color: var(--text); outline: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; background: rgb(9 63 164 / 0.08); color: var(--royal); font-size: 0.8rem; cursor: pointer; transition: background 0.4s var(--ease), color 0.4s, border-color 0.4s; }
.chip span { font-size: 0.68rem; color: var(--muted); transition: color 0.4s; }
.chip:hover { background: rgb(9 63 164 / 0.15); }
.chip.is-active { background: var(--royal); border-color: var(--royal); color: var(--cream); }
.chip.is-active span { color: rgb(252 245 230 / 0.7); }
.cat-count { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) { .cat-toolbar-inner { grid-template-columns: 1fr; gap: 12px; } .cat-count { display: none; } }

.cat-body { padding-bottom: clamp(48px, 7vw, 96px); }
.cat-group { padding-top: clamp(64px, 9vw, 128px); }
.cat-group-head { display: grid; gap: 18px; margin-bottom: clamp(24px, 3vw, 40px); }
.cat-category { padding-top: clamp(36px, 5vw, 64px); }
.cat-category-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px 48px; align-items: end; margin-bottom: 22px; }
.cat-category-head h3 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); color: var(--royal); }
.cat-category-head p { color: var(--muted); max-width: 36em; justify-self: end; font-size: 0.95rem; }
@media (max-width: 760px) { .cat-category-head { grid-template-columns: 1fr; } .cat-category-head p { justify-self: start; } }
[hidden] { display: none !important; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr)); gap: clamp(12px, 1.4vw, 20px); }
@media (max-width: 560px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.product { position: relative; display: flex; flex-direction: column; border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.product:target, .product:focus-within { outline: 2px solid var(--royal); outline-offset: 3px; }
.product-media { aspect-ratio: 1; background: #fff; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.product-open { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; }
.product-open-icon {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--cream); color: var(--royal);
  transition: background 0.3s, color 0.3s;
}
.product-open:hover .product-open-icon, .product-open:focus-visible .product-open-icon { background: var(--royal); color: var(--cream); }
.product-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: var(--off-white); }
.product-media .product-placeholder img { width: 28%; height: auto; object-fit: contain; opacity: 0.3; transform: none; }
.product-body { display: grid; gap: 6px; padding: 12px 16px 18px; }
.product-tag { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--royal); }
.product-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.product-head h4 { font-family: var(--font-text); font-weight: 700; font-size: 0.95rem; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.02em; }
.product-weight { flex: none; font-weight: 500; font-size: 0.82rem; color: var(--royal); }
.product-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.74rem; color: var(--muted); }
.product-allergens { font-style: italic; font-size: 0.78rem; color: var(--muted); }
@media (max-width: 560px) { .product-body { padding: 12px; } .product-head { flex-direction: column; gap: 2px; } .product-head h4 { font-size: 0.8rem; } }
.cat-empty { padding: 80px 0; text-align: center; font-family: var(--font-display); font-size: 1.6rem; color: var(--muted); }
.cat-cta { text-align: center; }
.cat-cta .email { display: inline-block; max-width: 100%; overflow-wrap: anywhere; margin-top: 18px; font-family: var(--font-display); font-size: clamp(1.15rem, 5.4vw, 3rem); color: var(--royal); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 0.7s var(--ease); }
.cat-cta .email:hover { background-size: 100% 2px; }

/* Catalogue product detail */
html:has(.product-view[open]) { overflow: hidden; }
.product-view {
  width: min(960px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto;
  overflow: auto; overscroll-behavior: contain; padding: clamp(16px, 3vw, 34px);
  border: 0; border-radius: var(--radius); background: var(--royal); color: var(--cream);
}
.product-view[open] { animation: product-view-in 0.45s var(--ease) both; }
.product-view::backdrop { background: rgb(0 22 58 / 0.74); backdrop-filter: blur(5px); }
@keyframes product-view-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.product-view-top, .product-view-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-view-top .eyebrow, .product-view .product-tag { color: var(--cream); }
.view-control {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; min-width: 44px; min-height: 44px; padding: 6px 14px;
  background: rgb(252 245 230 / 0.14); color: inherit; cursor: pointer; transition: background 0.25s;
}
.view-control:hover { background: rgb(252 245 230 / 0.27); }
.view-control:disabled { opacity: 0.5; cursor: default; }
.product-view :focus-visible { outline-color: var(--cream); }
.product-view-top .view-control, .view-photo-nav .view-control { font-size: 1.35rem; line-height: 1; }
.product-view-content {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center;
  gap: clamp(24px, 4vw, 52px); margin: 16px 0 20px; touch-action: pan-y pinch-zoom;
}
.product-view-gallery { display: grid; gap: 8px; }
.product-view-stage {
  aspect-ratio: 1; max-height: 53dvh; overflow: hidden;
  border-radius: var(--radius-sm); background: #fff; user-select: none;
}
.product-view-stage > img { width: 100%; height: 100%; object-fit: contain; }
.product-view-stage .product-placeholder img { width: 22%; opacity: 0.4; }
.view-photo-nav { display: flex; justify-content: center; align-items: center; gap: 14px; font-size: 0.78rem; }
.product-view-copy { display: grid; gap: 12px; }
.product-view-copy h2 { font-size: clamp(1.75rem, 4.5vw, 3.7rem); font-weight: 700; letter-spacing: -0.055em; overflow-wrap: anywhere; }
.product-view-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin-top: 4px; }
.product-view-specs dt { font-size: 0.72rem; color: var(--cream); opacity: 0.82; }
.product-view-specs dd { font-size: 0.9rem; font-weight: 500; overflow-wrap: anywhere; }
.product-view-nav { font-size: 0.78rem; }
.product-view-nav > span { white-space: nowrap; }
@media (max-width: 680px) {
  .product-view { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: var(--radius-sm); }
  .product-view-content { grid-template-columns: 1fr; gap: 16px; }
  .product-view-stage { width: 100%; max-height: 36dvh; }
  .product-view-copy { gap: 8px; }
  .product-view-nav .view-control { padding-inline: 10px; }
}

/* ---------------------------------------------------- sourdough range */
.range-list { display: grid; gap: clamp(64px, 10vw, 150px); padding-bottom: clamp(80px, 10vw, 150px); }
.range-item { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 110px); align-items: center; }
.range-item:nth-child(even) .range-media { order: 2; }
.range-media { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #ffffff; }
.range-media img { width: 100%; height: 100%; object-fit: contain; padding: 8%; transition: transform 1.3s var(--ease); }
.range-media:hover img { transform: scale(1.05); }
.range-text { display: grid; gap: 18px; justify-items: start; }
.range-index { font-size: 0.72rem; letter-spacing: 0.2em; color: var(--muted); }
.range-text .eyebrow { color: var(--loaf); }
.range-name { font-size: clamp(1.9rem, 8.6vw, 5.4rem); color: var(--loaf); line-height: 0.95; overflow-wrap: anywhere; }
.range-item > * { min-width: 0; }
.range-desc { font-style: italic; color: var(--muted); max-width: 30em; font-size: 1.02rem; }
.range-text .btn { margin-top: 10px; }
@media (max-width: 860px) { .range-item { grid-template-columns: 1fr; } .range-item:nth-child(even) .range-media { order: 0; } }

/* ------------------------------------------------------------ loaf page */
.loaf-page { padding-top: calc(var(--header-h) + 20px); }
.loaf-top { display: flex; align-items: center; gap: 16px 24px; padding-block: 18px 8px; }
.loaf-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 3.5vw, 56px); align-items: start; padding-top: 16px; }
.loaf-summary {
  display: flex; flex-wrap: wrap; gap: 4px 18px;
  font-size: 0.75rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted);
}
.loaf-summary li:first-child { color: var(--loaf); font-weight: 700; }
.loaf-photo-frame { border-radius: var(--radius); overflow: hidden; background: #ffffff; aspect-ratio: 1; }
.loaf-photo { width: 100%; height: 100%; object-fit: cover; }
.loaf-info { display: grid; gap: 22px; position: sticky; top: 100px; }
.loaf-hero > * { min-width: 0; }
.loaf-info h1 { font-family: var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; font-size: clamp(1.9rem, 8.6vw, 5rem); line-height: 0.95; color: var(--loaf); }
.loaf-desc { font-size: 1.08rem; color: var(--muted); max-width: 30em; }
.facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-strong); }
.facts > div { padding: 20px 18px 20px 0; }
.facts .ingredients { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
.facts > div:nth-child(3) { border-left: 1px solid var(--line); padding-left: 18px; }
.facts h2 { font-family: var(--font-text); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.2em; color: var(--loaf); margin-bottom: 12px; }
.facts li { font-size: 0.94rem; line-height: 1.8; }
.facts .ingredients ul { columns: var(--ingredient-columns, 2); column-gap: 24px; }
.facts .tags { flex-direction: column; align-items: flex-start; }
.nutrition { margin-top: clamp(48px, 7vw, 96px); border-radius: var(--radius); background: #ffffff; border: 1px solid var(--line); padding: clamp(14px, 2.4vw, 36px); }
.nutrition img { width: 100%; height: auto; }
.more { margin-top: clamp(64px, 9vw, 128px); }
.more-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); margin-top: 28px; }
.more-item { display: grid; gap: 12px; text-decoration: none; }
.more-item img { aspect-ratio: 4 / 3; object-fit: contain; padding: 10%; background: #ffffff; border-radius: var(--radius-sm); transition: transform 0.9s var(--ease); }
.more-item:hover img { transform: translateY(-6px); }
.more-item span { font-family: var(--font-display); font-size: 1.15rem; color: var(--loaf); }
@media (max-width: 960px) { .loaf-hero { grid-template-columns: 1fr; } .loaf-info { position: static; } .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --------------------------------------------------------------- about */
.about-hero-grid { display: grid; grid-template-columns: 1fr 0.8fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.about-hero video { width: 100%; aspect-ratio: 9 / 13; object-fit: cover; border-radius: var(--radius); background: var(--off-white); }
.about-hero .whatsapp { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); transition: background 0.4s; }
.about-hero .whatsapp:hover { background: #ffffff; }
.about-hero .whatsapp img { width: 26px; height: 26px; }
@media (max-width: 860px) { .about-hero-grid { grid-template-columns: 1fr; } }
.wide-media { overflow: hidden; border-radius: var(--radius); aspect-ratio: 21 / 9; margin-inline: clamp(10px, 1.4vw, 20px); background: var(--off-white); }
.wide-media img { width: 100%; height: 120%; object-fit: cover; margin-top: -10%; }
.why-list { counter-reset: why; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); border-top: 1px solid var(--line-dark); margin-top: clamp(40px, 6vw, 72px); }
.why-list > div { counter-increment: why; padding: 30px 28px 34px 0; border-bottom: 1px solid var(--line-dark); }
.why-list dt { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; }
.why-list dt::before { content: counter(why, decimal-leading-zero); display: block; font-family: var(--font-text); font-size: 0.7rem; letter-spacing: 0.2em; opacity: 0.6; margin-bottom: 22px; }
.why-list dd { margin-top: 12px; color: rgb(252 245 230 / 0.78); font-size: 0.95rem; }
.badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); }
.badges img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); transition: transform 0.8s var(--ease); }
.badges img:hover { transform: rotate(-2deg) scale(1.03); }
@media (max-width: 640px) { .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 80px); }
.duo figure { overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 4 / 5; background: var(--off-white); }
.duo figure img { width: 100%; height: 115%; object-fit: cover; }
.duo .lead { margin-top: 26px; color: var(--text); }
.duo > div:nth-child(2) { margin-top: clamp(40px, 10vw, 160px); }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } .duo > div:nth-child(2) { margin-top: 0; } }
.soon-card { position: relative; overflow: hidden; display: grid; gap: 22px; align-content: start; padding: clamp(32px, 4.4vw, 56px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--off-white); }
.soon-card .title { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.soon-card .tag { justify-self: start; letter-spacing: 0.14em; font-size: 0.7rem; font-weight: 500; border-color: var(--royal); color: var(--royal); }

.media-round { width: 100%; border-radius: var(--radius); object-fit: cover; }

/* -------------------------------------------------------------- contact */
.contact-card { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: clamp(28px, 4.4vw, 56px); border-radius: var(--radius); background: var(--royal); color: var(--cream); }
.contact-card .email { display: inline-block; margin-top: 14px; font-family: var(--font-display); font-size: clamp(1.5rem, 4.4vw, 3.6rem); line-height: 1.05; color: var(--cream); text-decoration: none; overflow-wrap: anywhere; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 0.7s var(--ease); }
.contact-card .email:hover { background-size: 100% 2px; }
.contact-card .icon-link img { width: 72px; height: 72px; border-radius: 50%; background: var(--cream); padding: 14px; transition: transform 0.6s var(--ease); }
.contact-card .icon-link:hover img { transform: rotate(-8deg) scale(1.05); }
.contact-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line-strong); padding-top: 28px; }
.contact-details address { font-style: normal; line-height: 1.8; }
@media (max-width: 640px) { .contact-card, .contact-details { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- footer */
.site-footer { position: relative; overflow: hidden; background: var(--navy); color: rgb(252 245 230 / 0.82); padding-top: clamp(64px, 8vw, 112px); margin-top: clamp(80px, 10vw, 150px); }
.footer-top { display: grid; grid-template-columns: 1fr repeat(3, minmax(0, 0.8fr)); gap: 40px; }
.footer-brand img { width: 120px; height: auto; }
.footer-col h2 { font-family: var(--font-text); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream); margin-bottom: 18px; }
.site-footer address { font-style: normal; font-size: 0.92rem; line-height: 1.8; }
.site-footer address strong { font-weight: 500; color: var(--cream); }
.footer-social li { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 0.92rem; }
.footer-social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-dark); transition: background 0.4s var(--ease), transform 0.5s var(--ease); }
.footer-social a:hover { background: rgb(252 245 230 / 0.12); transform: translateY(-3px); }
.footer-social img { width: 17px; height: 17px; object-fit: contain; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { font-size: 0.78rem; letter-spacing: 0.16em; text-decoration: none; color: rgb(252 245 230 / 0.82); transition: color 0.3s; }
.footer-links a:hover { color: var(--cream); }
.footer-word { font-size: clamp(1.6rem, 6.6vw, 6.4rem); line-height: 1; color: var(--cream); opacity: 0.95; white-space: nowrap; margin: clamp(56px, 8vw, 112px) 0 0; text-align: center; letter-spacing: 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 26px 30px; margin-top: 24px; font-size: 0.78rem; }
.footer-bottom .legal { color: var(--cream); }
.copyright { display: flex; align-items: center; gap: 8px; color: rgb(252 245 230 / 0.6); }
.copyright img { width: 14px; height: 14px; opacity: 0.6; }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

/* ================================================================ motion
   Everything below only applies once site.js has added .js to <html>, so the
   site is fully readable without JavaScript. */
.js [data-reveal="fade"], .js [data-reveal="card"] { opacity: 0; transform: translateY(28px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal="rise"] { opacity: 0; transform: translateY(60%); transition: opacity var(--dur) var(--ease), transform 1.2s var(--ease); }
.js [data-reveal="mask"] { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 1.4s var(--ease-in-out); }
.js [data-reveal="mask"] img, .js [data-reveal="mask"] video { transform: scale(1.18); transition: transform 2s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="mask"].is-in { clip-path: inset(0 0 0 0 round var(--radius)); }
.js [data-reveal="mask"].is-in img, .js [data-reveal="mask"].is-in video { transform: none; }

/* Split headings: each word rises out of its own line box. */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.2s var(--ease); transition-delay: calc(var(--w) * 70ms + var(--split-delay, 0ms)); }
.js [data-split].is-in .w > span { transform: none; }

/* Slow drift for hero imagery */
.js .ken-burns { animation: kenburns 24s var(--ease-in-out) infinite alternate; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }

/* Page-to-page transitions (supported browsers); loaf photos glide between pages. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.45s var(--ease) both; }
::view-transition-new(root) { animation: vt-in 0.7s var(--ease) both; }
::view-transition-group(*) { animation-duration: 0.8s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-split] .w > span, .js [data-reveal="mask"] img { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .marquee-track, .badge svg, .js .ken-burns { animation: none !important; }
  [data-scrub] .word { opacity: 1 !important; }
  @view-transition { navigation: none; }
}
