:root {
  --ivory: #f8f5ef;
  --parchment: #efe8de;
  --parchment-deep: #e4dacd;
  --ink: #1d1a17;
  --muted: #69615a;
  --espresso: #2d221c;
  --rule: #d9d0c6;
  --control-border: #bdb5ad;
  --paper: #fcfaf6;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --page-gutter: clamp(1.25rem, 3.7vw, 4.25rem);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

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

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--espresso);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--ivory);
}

.header-nav {
  min-height: 7.75rem;
  padding: 1rem var(--page-gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.75rem);
}

.nav-group a,
.nav-group button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 0;
  padding: 0.45rem 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  font-family: var(--sans);
  font-size: 0.77rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.nav-group a,
.nav-group button span {
  position: relative;
}

.nav-group a::after,
.nav-group button span::after {
  position: absolute;
  right: 0;
  bottom: -0.15rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-group a:hover::after,
.nav-group button:hover span::after {
  transform: scaleX(1);
}

.nav-primary {
  justify-content: flex-start;
}

.nav-utilities {
  justify-content: flex-end;
}

.nav-utilities button {
  min-width: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-utilities svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
}

.wordmark {
  display: grid;
  justify-items: center;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

.house-mark {
  width: 3rem;
  height: 1.5rem;
  margin-bottom: 0.2rem;
  display: grid;
  place-items: center;
}

.house-mark img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.wordmark-name {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 2.5vw, 2.8rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wordmark-date {
  margin-top: 0.55rem;
  font-family: var(--serif);
  font-size: 0.67rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.65rem;
}

.breadcrumbs a {
  min-width: 2.75rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--ink);
}

.collection-page {
  max-width: 100rem;
  min-height: calc(100vh - 15rem);
  margin: 0 auto;
  padding: 2.35rem var(--page-gutter) 4.5rem;
}

.collection-heading {
  margin-top: 1.6rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.collection-heading h1 {
  max-width: 30ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 5.5rem);
  padding: 2.25rem clamp(0rem, 5vw, 5rem) 0;
}

.product-card {
  min-width: 0;
}

.product-card-link {
  display: grid;
  justify-items: center;
  text-decoration: none;
}

.product-card-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--parchment);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.product-card-link:hover .product-card-image img {
  transform: scale(1.012);
}

.product-card-name {
  margin-top: 0.8rem;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.25vw, 2.25rem);
  line-height: 1.2;
}

.product-card-price {
  margin-top: 0.3rem;
  font-family: var(--serif);
  font-size: 1.05rem;
}

.product-page {
  max-width: 112rem;
  min-height: calc(100vh - 7.75rem);
  margin: 0 auto;
  padding: 2.2rem var(--page-gutter) 0;
}

.product-breadcrumbs {
  margin-bottom: 2rem;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.43fr) minmax(24rem, 1fr);
  gap: clamp(3rem, 5.2vw, 6.5rem);
  align-items: start;
  padding-bottom: 4.5rem;
}

.product-gallery {
  display: grid;
  grid-template-columns: clamp(4.5rem, 7vw, 7rem) minmax(0, 1fr);
  gap: clamp(1rem, 1.8vw, 1.75rem);
  min-width: 0;
}

.thumbnail-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.thumbnail {
  width: 100%;
  padding: 0;
  border: 1px solid transparent;
  background: var(--parchment);
  cursor: pointer;
}

.thumbnail.is-selected {
  border-color: var(--ink);
}

.thumbnail img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.thumbnail picture,
.primary-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.primary-image {
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  background: var(--parchment);
}

.primary-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.primary-image img.is-cover {
  object-fit: cover;
}

.product-information {
  position: sticky;
  top: 2rem;
  padding-top: 0.35rem;
}

.product-title-block {
  padding-bottom: 1.7rem;
  border-bottom: 1px solid var(--rule);
}

.product-title-block h1 {
  max-width: 15ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 4vw, 4.5rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.03;
  text-wrap: balance;
}

.product-price {
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.product-description {
  max-width: 65ch;
  min-height: 7.5rem;
  padding: 1.55rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.7;
}

.product-description p {
  margin: 0;
}

.purchase-form {
  padding-top: 1.55rem;
}

.size-selector {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}

.size-selector legend {
  margin-bottom: 0.8rem;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.size-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(3rem, 4.25rem)) 1fr;
  gap: 0.75rem;
  align-items: center;
}

.size-options label {
  position: relative;
  display: block;
}

.size-options input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.size-options label span {
  display: grid;
  min-height: 3rem;
  place-items: center;
  border: 1px solid var(--control-border);
  background: var(--paper);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.size-options input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.size-options input:focus-visible + span {
  outline: 2px solid var(--espresso);
  outline-offset: 3px;
}

.size-guide {
  justify-self: end;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0.55rem 0.15rem;
  display: inline-flex;
  align-items: center;
  background: transparent;
  font-family: var(--serif);
  cursor: pointer;
}

.button {
  width: 100%;
  min-height: 3.8rem;
  border: 1px solid var(--ink);
  padding: 0.9rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 200ms ease,
    color 200ms ease;
}

.button + .button {
  margin-top: 0.8rem;
}

.button-primary {
  background: var(--ink);
  color: var(--paper);
}

.button-primary:hover {
  background: var(--espresso);
}

.button-secondary {
  background: transparent;
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

.delivery-note {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-top: 1.4rem;
  font-family: var(--serif);
  font-size: 0.97rem;
}

.delivery-note svg {
  width: 1.5rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
}

.delivery-note p {
  display: grid;
  gap: 0.15rem;
  margin: 0;
}

.delivery-note strong {
  font-weight: 400;
}

.service-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  background: var(--paper);
}

.service {
  min-width: 0;
  min-height: 8.25rem;
  padding: 1.6rem clamp(1rem, 2.6vw, 3rem);
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 1.4vw, 1.5rem);
}

.service + .service {
  border-left: 1px solid var(--rule);
}

.service-icon {
  flex: 0 0 auto;
}

.service-icon svg {
  width: 2.75rem;
  height: 2.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.service h2 {
  margin: 0 0 0.3rem;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.service p {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.93rem;
  line-height: 1.35;
}

@media (max-width: 72rem) {
  .header-nav {
    min-height: auto;
    grid-template-columns: 1fr auto;
    gap: 1.25rem 2rem;
    padding-block: 1.15rem;
  }

  .wordmark {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .nav-primary,
  .nav-utilities {
    grid-row: 2;
  }

  .product-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(21rem, 0.8fr);
    gap: 2.5rem;
  }

  .service-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service:nth-child(3) {
    border-left: 0;
  }

  .service:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }
}

@media (max-width: 52rem) {
  .header-nav {
    grid-template-columns: 1fr;
  }

  .header-nav > * {
    min-width: 0;
    max-width: 100%;
  }

  .wordmark {
    grid-column: 1;
  }

  .wordmark-name {
    max-width: 100%;
    text-align: center;
    white-space: normal;
  }

  .nav-primary,
  .nav-utilities {
    width: 100%;
    grid-row: auto;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-primary {
    flex-wrap: wrap;
  }

  .nav-utilities {
    padding-top: 0.8rem;
    border-top: 1px solid var(--rule);
  }

  .nav-utilities button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .collection-page {
    padding-top: 1.65rem;
  }

  .product-grid {
    gap: 1.1rem;
    padding-inline: 0;
  }

  .product-card-name {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
    text-align: center;
  }

  .product-page {
    padding-top: 1.6rem;
  }

  .product-layout {
    grid-template-columns: 1fr;
  }

  .product-information {
    position: static;
  }

  .product-gallery {
    grid-template-columns: 1fr;
  }

  .thumbnail-list {
    grid-row: 2;
    flex-direction: row;
    gap: 0.65rem;
  }

  .thumbnail {
    width: calc((100% - 1.95rem) / 4);
  }
}

@media (max-width: 34rem) {
  .nav-group {
    column-gap: 0.25rem;
    row-gap: 0.5rem;
  }

  .wordmark-name {
    font-size: 1.65rem;
    letter-spacing: 0.1em;
  }

  .breadcrumbs {
    font-size: 0.67rem;
  }

  .collection-page .breadcrumbs li:last-child {
    display: none;
  }

  .collection-page .breadcrumbs li:nth-last-child(2)::after {
    display: none;
  }

  .collection-heading h1 {
    max-width: 20ch;
    font-size: 2.15rem;
    overflow-wrap: normal;
    white-space: normal;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .product-title-block h1 {
    font-size: 2.55rem;
  }

  .size-options {
    grid-template-columns: repeat(5, 1fr);
  }

  .size-guide {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 0.35rem;
  }

  .service-strip {
    grid-template-columns: 1fr;
  }

  .service + .service {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }

  .service > div {
    min-width: 0;
  }

  .service h2 {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
