:root {
  --ink: #181616;
  --sage: #5f7c65;
  --sage-dark: #4f6854;
  --cream: #ece2c7;
  --yellow: #f2c230;
  --yellow-dark: #d7a91b;
  --white: #ffffff;
  --line: #d9d6cd;
  --muted: #5c5a55;
  --header-offset: 76px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
a[href], button, summary, select, label[for], input[type="checkbox"], input[type="radio"] { cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }

.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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  background: var(--ink);
  color: var(--white);
  padding: 12px 18px;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--sage-dark); outline-offset: 3px; }
.band--ink :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }

.container { width: min(100% - 48px, 1200px); margin-inline: auto; }

.announce {
  background: var(--yellow);
  color: var(--ink);
  text-align: center;
  font-size: 13px;
  padding: 9px 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand img { width: 190px; height: auto; }

.site-nav { margin-left: auto; }

.site-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover { color: var(--sage-dark); }

.nav-toggle { display: none; }

.header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-link { font-size: 14px; font-weight: 600; text-decoration: none; }
.header-link:hover { color: var(--sage-dark); }
.header-link--contact {
  background: var(--yellow);
  color: var(--ink);
  padding: 11px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.header-link--contact:hover { background: var(--yellow-dark); color: var(--ink); }

.search input {
  width: 190px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
}
.search input::placeholder { color: var(--muted); opacity: 1; }

h1, h2, h3 {
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.06;
}
h1 { font-size: clamp(2.6rem, 5.6vw, 4.8rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
h3 { font-size: 1rem; }

p { margin: 0 0 1rem; }
.band p, .footer-grid p { max-width: 70ch; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  background: var(--yellow);
  color: var(--ink);
  border: 1px solid var(--yellow);
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.btn--light { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn--light:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); color: var(--ink); }

.text-link {
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--sage-dark); }
.band--ink .text-link:hover { color: var(--yellow); }

.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  padding: 84px 24px;
  background: var(--ink);
  scroll-margin-top: var(--header-offset);
}
.hero picture { display: block; position: absolute; inset: 0; z-index: -2; }
.hero picture img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(24, 22, 22, 0.78);
}
.hero-inner { color: var(--white); }
.hero > .container, .band > .container, .section > .container { width: min(100%, 1200px); }
.hero-inner h1 { max-width: 18ch; }
.hero-inner p { max-width: 68ch; margin: 16px 0 0; font-size: 1.0625rem; line-height: 1.6; }

.search-status {
  padding: 14px 24px;
  background: var(--cream);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.section { padding: 80px 24px; scroll-margin-top: var(--header-offset); }
.section--tight { padding-block: 56px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.band { padding: 64px 24px; }
.band--cream { background: var(--cream); }
.band--ink { background: var(--ink); color: var(--white); scroll-margin-top: var(--header-offset); }
.band--story { padding-block: 80px; }
.band-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
.band-inner p:last-child { margin-bottom: 20px; }

.grid { display: grid; gap: 24px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.product-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.product-media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--cream);
  margin-bottom: 6px;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease; }
.product-media--catalog { background: var(--white); }
.product-media--catalog img { object-fit: contain; padding: 8%; }
.product-media:hover img { transform: scale(1.03); }
.product-card h3 { font-weight: 700; }
.price { margin: 0; font-weight: 700; }
.product-card .text-link { margin-top: auto; padding-top: 8px; }

.tile { display: block; text-decoration: none; }
.tile-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream);
}
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease; }
.tile:hover .tile-media img { transform: scale(1.03); }
.tile-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.series {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.series a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 24px;
  background: var(--white);
  font-weight: 700;
  text-decoration: none;
}
.series a:hover { background: var(--yellow); }

.site-footer { padding-block: 56px 32px; background: var(--ink); color: var(--white); border-top: 6px solid var(--yellow); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.footer-logo { width: 220px; height: auto; margin-bottom: 20px; }
.site-footer h3 {
  margin-bottom: 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-channel img {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  flex: none;
}
.credits {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #3a3835;
  color: #cfcbc2;
  font-size: 12px;
  line-height: 1.6;
}
.credits a { color: #cfcbc2; text-decoration: underline; }

.index-page { background: var(--white); }
.index-intro { padding: 56px 24px 32px; border-bottom: 1px solid var(--line); }
.index-intro h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.index-intro p { max-width: 70ch; margin: 16px 0 0; color: var(--muted); }

.filter-status, .no-results {
  margin: 0;
  padding: 14px 24px;
  background: var(--cream);
  font-size: 14px;
  font-weight: 600;
}
.no-results { color: var(--muted); }

.category-section { padding: 56px 24px; }
.category-section:nth-of-type(2n) { background: var(--cream); }
.category-section > h2, .product-rows { width: min(100%, 1200px); margin-inline: auto; }
.category-section > h2 { margin-bottom: 24px; }
.product-rows { border-top: 1px solid var(--line); }

.product-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.product-thumb {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  background: var(--white);
  border: 1px solid var(--line);
  cursor: zoom-in;
  font: inherit;
  color: inherit;
}
.product-thumb:focus-visible { outline-color: var(--ink); }
.product-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.product-thumb--plain {
  padding: 4px;
  background: var(--cream);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  overflow-wrap: anywhere;
}
.product-copy h3 { font-weight: 700; }
.product-code {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.product-code span { color: var(--ink); letter-spacing: 0; text-transform: none; }
.product-row .price { justify-self: end; white-space: nowrap; }

.lightbox {
  width: min(92vw, 960px);
  max-height: 90vh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
.lightbox::backdrop { background: rgba(24, 22, 22, 0.78); }
.lightbox-inner { display: grid; gap: 14px; padding: 20px; }
.lightbox-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lightbox__image {
  max-width: min(92vw, 900px);
  max-height: 78vh;
  max-height: min(78vh, calc(90vh - 140px));
  object-fit: contain;
  margin-inline: auto;
}
.lightbox__name { margin: 0; font-weight: 700; }
.lightbox__close {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--ink);
  font-weight: 700;
}
.lightbox__close:hover { background: var(--yellow); }

.pagination { background: var(--ink); color: var(--white); }
.pagination-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 24px;
}
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--white);
  font-weight: 700;
  text-decoration: none;
}
.pagination a + a { margin-left: 8px; }
.pagination a:hover { background: var(--white); color: var(--ink); }
.pagination a[aria-current="page"] { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.pagination a[aria-current="page"]:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); }

.credits-nav { margin-left: auto; }
.credits-page { padding-block: 64px; }
.credits-list h1 { margin-bottom: 20px; }
.credits-list ul { max-width: 70ch; padding-left: 20px; }
.credits-list li { margin-bottom: 10px; }
.credits-list a { color: var(--sage-dark); }

@media (max-width: 1023px) {
  .header-inner { gap: 18px; }
  .site-nav ul { gap: 16px; }
  .search input { width: 150px; }
  .grid, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .series { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-inner { gap: 40px; }
}

@media (max-width: 900px) {
  :root { --header-offset: 124px; }
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "brand tools toggle"
      "search search search";
    align-items: center;
    min-height: 64px;
    padding-block: 10px;
    gap: 12px;
  }
  .brand {
    grid-area: brand;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .brand img { width: 168px; }
  .nav-toggle {
    grid-area: toggle;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    background: var(--white);
    border: 1px solid var(--ink);
    font-weight: 700;
    cursor: pointer;
  }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    z-index: 31;
    display: none;
    padding: 8px 24px 16px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    max-width: 1200px;
    margin-inline: auto;
  }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .header-tools { grid-area: tools; justify-self: end; margin-left: 0; }
  .credits-nav { grid-area: tools; justify-self: end; margin-left: 0; }
  .search { grid-area: search; width: 100%; }
  .search input { width: 100%; }
}

@media (max-width: 639px) {
  .hero { min-height: 500px; padding-block: 56px; }
  .section { padding-block: 56px; }
  .section--tight { padding-block: 40px; }
  .band, .band--story { padding-block: 48px; }
  .band-inner { grid-template-columns: 1fr; gap: 24px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .grid, .grid--3 { grid-template-columns: 1fr; gap: 28px; }
  .series { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .brand img { width: 140px; }
  .header-link { font-size: 13px; }
  .header-tools .header-link:not(.header-link--contact) { display: none; }
  .index-intro { padding-block: 40px 24px; }
  .category-section { padding-block: 40px; }
  .product-row { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; }
  .product-thumb { width: 56px; height: 56px; }
  .product-row .price { grid-column: 2; justify-self: start; }
  .pagination-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product-media img, .tile-media img { transition: none; }
  .product-media:hover img, .tile:hover .tile-media img { transform: none; }
}
