/* Food Bench — Vipp-direction rebuild. Tokens per docs/vipp-teardown.md */

:root {
  --paper: #ffffff;
  --linen: #f5f2ec;
  --ink: #2b2926;
  --mute: #6f6a61;
  --hairline: #e5e1d8;
  --oak: #b8874f;
  --font-display: "Schibsted Grotesk", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --font-caption: "Source Serif 4", Georgia, serif;
  --measure: 62ch;
  --gutter: clamp(20px, 4vw, 64px);
  --band: clamp(64px, 10vw, 140px);
  --header-h: 72px;
  --ease-quint: cubic-bezier(0.16, 1, 0.3, 1); /* Vipp motion grammar: quintic ease-out, no bounce */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }

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

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 0 var(--gutter); height: var(--header-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.brand img { width: 200px; height: auto; }
.site-nav { display: flex; gap: clamp(16px, 2.5vw, 36px); }
.nav-a {
  font-family: var(--font-display);
  font-size: 0.9375rem; font-weight: 500;
  text-decoration: none; padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.nav-a:hover, .nav-a.is-active { border-bottom-color: var(--ink); }
.nav-toggle { display: none; }

/* mobile nav */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .nav-toggle {
    display: grid; gap: 6px; place-content: center;
    width: 44px; height: 44px; background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform 0.25s ease; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
}
.mobile-nav[hidden] { display: none; }
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 40;
  background: var(--ink); color: #fff;
  padding: clamp(32px, 8vh, 80px) var(--gutter);
  display: flex; flex-direction: column; justify-content: space-between;
}
.mobile-nav nav { display: grid; gap: 4px; }
.mobile-nav nav a {
  font-family: var(--font-display); font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 500; text-decoration: none; padding: 8px 0;
}
.mobile-nav nav a:hover { color: #a3a099; }
.mobile-nav__contact { display: grid; gap: 8px; }
.mobile-nav__contact a { color: #a3a099; text-decoration: none; font-size: 1rem; }

/* ---------- primitives ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--oak); margin-bottom: 16px;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.625rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h1 + p, h2 + p, h3 + p { margin-top: clamp(20px, 2.6vw, 32px); }
p { text-wrap: pretty; }
p + p { margin-top: 1em; }
/* long-form copy reads left-aligned even inside centred blocks; headings stay centred */
.center > p:not(.eyebrow) { text-align: left; }

.caption {
  font-family: var(--font-caption); font-style: italic;
  font-size: 0.9375rem; color: var(--mute);
}

.linkrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-display); font-weight: 500; font-size: 1rem;
  text-decoration: none;
  padding: 14px 0; border-bottom: 1px solid var(--hairline);
  max-width: 420px;
  transition: border-color 0.25s ease;
}
.linkrow:hover { border-bottom-color: var(--ink); }
.linkrow__chevron { font-size: 1.25rem; line-height: 1; transition: transform 0.25s ease; }
.linkrow:hover .linkrow__chevron { transform: translateX(4px); }

.btn {
  display: inline-block; background: var(--ink); color: #fff;
  font-family: var(--font-display); font-weight: 500; font-size: 1rem;
  text-decoration: none; text-align: center;
  padding: 16px 40px; border: 0; cursor: pointer;
  transition: background 0.25s ease;
}
.btn:hover { background: #3a3833; }

/* ---------- layout ---------- */
.band { padding: var(--band) var(--gutter); }
.band--linen { background: var(--linen); }
.measure { max-width: var(--measure); }
.center { margin-inline: auto; text-align: center; }

/* full-bleed photo */
.bleed { width: 100%; }
.bleed img, .bleed video { width: 100%; height: min(88vh, 900px); object-fit: cover; display: block; }
.bleed--half img, .bleed--half video { height: min(64vh, 640px); }

/* hero */
.hero { position: relative; height: calc(100svh - var(--header-h)); min-height: 560px; overflow: hidden; }
.hero img, .hero video { width: 100%; height: 100%; object-fit: cover; }
.hero video { position: absolute; inset: 0; }
.hero__overlay {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  color: #fff; background: linear-gradient(rgba(20, 18, 14, 0.18), rgba(20, 18, 14, 0.3));
  padding: var(--gutter);
}
.hero__overlay h1 { text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35); }
.hero__sub {
  font-family: var(--font-caption); font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.375rem); margin-top: 12px;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.45);
}
.hero__cta { margin-top: 32px; }
.hero__cta .linkrow { color: #fff; border-color: rgba(255,255,255,0.5); margin-inline: auto; justify-content: center; }
.hero__cta .linkrow:hover { border-color: #fff; }

/* home: pinned video hero, the white page slides over it (Vipp pattern) */
.page-home .site-header {
  position: fixed; left: 0; right: 0;
  background: transparent; border-bottom-color: transparent; backdrop-filter: none;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.page-home .site-header .brand img { filter: brightness(0) invert(1); transition: filter 0.35s ease; }
.page-home .site-header .nav-a { color: #fff; }
.page-home .site-header .nav-toggle span { background: #fff; }
.page-home .site-header.is-scrolled { background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px); border-bottom-color: var(--hairline); }
.page-home .site-header.is-scrolled .brand img { filter: none; }
.page-home .site-header.is-scrolled .nav-a { color: var(--ink); }
.page-home .site-header.is-scrolled .nav-toggle span { background: var(--ink); }
.page-home .hero { position: sticky; top: 0; height: 100svh; z-index: 0; background: var(--ink); }
.page-home main > *:not(.hero) { position: relative; z-index: 1; background: var(--paper); }
.page-home main > .band--linen { background: var(--linen); }
.page-home .hero + * { box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.04); }
.site-footer { background: var(--paper); position: relative; z-index: 1; }

/* editorial split */
.split {
  display: grid; grid-template-columns: 5fr 6fr;
  gap: clamp(32px, 6vw, 96px); align-items: center;
  padding: var(--band) var(--gutter);
}
.split--flip { grid-template-columns: 6fr 5fr; }
.split--flip .split__media { order: 2; }
.split__media img { width: 100%; height: min(70vh, 620px); object-fit: cover; }
.split__text h2 { margin-bottom: 20px; }
.split__text .linkrow { margin-top: 28px; }
@media (max-width: 900px) {
  .split, .split--flip { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .split__media img { height: auto; max-height: 60vh; }
}

/* product tiles (Vipp caption-overlay grammar) */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tiles--2 { grid-template-columns: repeat(2, 1fr); }
.tile { position: relative; display: block; overflow: hidden; }
.tile img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 0.6s var(--ease-quint); }
.tile:hover img { transform: scale(1.025); }
.tile__caption {
  position: absolute; left: 24px; bottom: 20px; color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5);
}
.tile__caption .tile__name { font-family: var(--font-display); font-weight: 500; font-size: 1.375rem; }
.tile__caption .tile__meta { font-family: var(--font-caption); font-style: italic; font-size: 0.9375rem; }
.tiles__footnote { padding: 20px var(--gutter); }
@media (max-width: 720px) { .tiles, .tiles--2 { grid-template-columns: 1fr; } }

/* spec strip — the signature element */
.spec {
  display: flex; flex-wrap: wrap; gap: 0;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.spec__item { flex: 1 1 180px; padding: 24px; border-right: 1px solid var(--hairline); }
.spec__item:last-child { border-right: 0; }
.spec__k {
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute);
}
.spec__v { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; margin-top: 6px; }
.spec__v small { font-family: var(--font-caption); font-style: italic; font-weight: 400; font-size: 0.875rem; color: var(--mute); }

/* technical drawing panel */
.drawing { background: var(--linen); padding: var(--band) var(--gutter); }
.drawing img { max-width: 900px; margin-inline: auto; mix-blend-mode: multiply; }

/* photo grid (galleries) */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.grid--masonry-tall img:nth-child(4n+1) { aspect-ratio: 3 / 4; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

/* finishes */
.finishes { display: flex; gap: 40px; margin-top: 32px; }
.finish { text-align: center; }
.finish img { width: 128px; height: 128px; object-fit: cover; border-radius: 50%; }
.finish figcaption { margin-top: 12px; font-family: var(--font-display); font-weight: 500; }

/* form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-family: var(--font-display); font-weight: 500; font-size: 0.9375rem; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; padding: 13px 14px;
  font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
textarea { min-height: 140px; resize: vertical; }
.checks { display: grid; gap: 10px; }
.check { display: flex; gap: 10px; align-items: baseline; font-size: 1rem; }
.check input { accent-color: var(--ink); }
fieldset { border: 0; }
fieldset legend { font-family: var(--font-display); font-weight: 500; font-size: 0.9375rem; margin-bottom: 10px; }

/* about: Ian sits in the top third of the 4:3 portrait — bias the wide crop upward
   or the cover-fit band cuts his face off on large screens */
.page-about .bleed--half img { object-position: 50% 22%; }

/* legal pages */
.page-legal h2 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); margin-top: clamp(40px, 5vw, 64px); }
.page-legal h2 + p { margin-top: 16px; }
.page-legal table { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: 0.9375rem; }
.page-legal th, .page-legal td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
.page-legal th {
  font-family: var(--font-display); font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute);
}

/* footer */
.site-footer { border-top: 1px solid var(--hairline); }
.footer-cta { padding: var(--band) var(--gutter); }
.footer-cta__h { margin-bottom: 24px; }
.footer-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 40px; padding: 0 var(--gutter) var(--band);
}
.footer-grid a { display: block; text-decoration: none; color: var(--mute); padding: 4px 0; }
.footer-grid a:hover { color: var(--ink); }
.footer-grid address { font-style: normal; color: var(--mute); line-height: 1.9; }
.footer-legal {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 24px var(--gutter); border-top: 1px solid var(--hairline);
  font-size: 0.875rem; color: var(--mute);
}
.footer-legal nav { display: flex; gap: 20px; }
.footer-legal a { color: var(--mute); text-decoration: none; }
.footer-legal a:hover { color: var(--ink); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* reveals */
.reveal { opacity: 0.02; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* home: sections slide over the pinned video, so they must stay opaque —
   no section-level fade (its opacity would let the video ghost through the background) */
.page-home main > .reveal { opacity: 1; transform: none; }

/* stagger within grids only — never uniform section entrances */
.tiles.reveal .tile, .grid.reveal img { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.tiles.reveal.is-in .tile, .grid.reveal.is-in img { opacity: 1; transform: none; }
.tiles.reveal.is-in .tile:nth-child(2), .grid.reveal.is-in img:nth-child(3n+2) { transition-delay: 0.06s; }
.tiles.reveal.is-in .tile:nth-child(3), .grid.reveal.is-in img:nth-child(3n+3) { transition-delay: 0.12s; }
@media (prefers-reduced-motion: reduce) {
  .tiles.reveal .tile, .grid.reveal img { opacity: 1; transform: none; transition: none; }
}

/* gallery lightbox (native dialog) */
.grid img { cursor: zoom-in; }
.lightbox { border: 0; padding: 0; margin: 0; background: rgba(20, 18, 14, 0.94); max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox[open] { display: grid; place-content: center; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 82vh; width: auto; height: auto; }
.lightbox__caption { color: #fff; text-align: center; margin-top: 14px; font-family: var(--font-caption); font-style: italic; }
.lightbox__close { position: fixed; top: 16px; right: 20px; background: none; border: 0; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; padding: 10px; }
.lightbox::backdrop { background: transparent; }

/* sticky spec strip on product pages (desktop) */
@media (min-width: 901px) {
  .page-product .spec { position: sticky; top: var(--header-h); z-index: 5; background: var(--paper); }
}

/* prev / next model navigation */
.product-nav { display: flex; justify-content: space-between; gap: 16px; padding: 0 var(--gutter) var(--band); }
.product-nav .linkrow { max-width: none; }
.product-nav .linkrow--prev .linkrow__chevron { transform: scaleX(-1); }
.product-nav .linkrow--prev:hover .linkrow__chevron { transform: scaleX(-1) translateX(4px); }

/* 3D model viewer, replaces the static elevation inside .drawing */
.drawing { background: #F6F2EC; }
.drawing model-viewer {
  width: 100%; max-width: 900px; height: min(64vh, 560px);
  margin-inline: auto; display: block; background: #F6F2EC;
  --poster-color: #F6F2EC;
}
.viewer3d__hint { text-align: center; margin-top: 16px; font-family: var(--font-caption); font-style: italic; font-size: 0.875rem; color: var(--mute); }

/* spec cards — replaces the flat spec strip + 3D Details panel on product pages */
.speccards { background: var(--linen); padding: var(--band) var(--gutter); }
.speccards__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  max-width: 1100px; margin-inline: auto;
}
.speccard {
  background: var(--paper); border: 1px solid var(--hairline);
  padding: 30px 28px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.6s var(--ease-quint);
}
.speccard:hover {
  border-color: var(--oak);
  box-shadow: 0 14px 36px rgba(43, 41, 38, 0.09);
  transform: translateY(-3px);
}
.speccard__icon { color: var(--oak); }
.speccard__icon svg { width: 26px; height: 26px; display: block; }
.speccard__k {
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute);
  margin-top: 16px;
}
.speccard__v { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; margin-top: 8px; line-height: 1.2; }
.speccard__note { font-family: var(--font-caption); font-style: italic; font-size: 0.875rem; color: var(--mute); margin-top: 6px; }
.speccard--price { background: var(--ink); border-color: var(--ink); color: #fff; }
.speccard--price .speccard__k { color: rgba(255, 255, 255, 0.65); }
.speccard--price .speccard__note { color: rgba(255, 255, 255, 0.65); }
.speccard--price:hover { border-color: var(--oak); }
@media (max-width: 900px) { .speccards__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .speccards__grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .speccard, .speccard:hover { transform: none; transition: none; }
}
