:root {
  --ink: #181818;
  --paper: #f3f3ef;
  --white: #ffffff;
  --line: #d8d8d2;
  --muted: #6d6d68;
  --purple: #9b72f9;
  --acid: #c7ee52;
  --coral: #ee6f57;
  --max-width: 1440px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

button,
a {
  color: inherit;
}

button {
  font: inherit;
}

a {
  text-decoration: none;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--acid);
  color: var(--ink);
  transform: translateY(-160%);
}

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

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

.announcement {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 7px 24px;
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 243, 239, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.brand-logo {
  width: 104px;
  height: auto;
}

.brand-suffix {
  font-size: 17px;
  font-weight: 700;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 13px;
  font-weight: 700;
}

.primary-nav a,
.text-link {
  border-bottom: 1px solid transparent;
}

.primary-nav a:hover,
.text-link:hover {
  border-color: currentColor;
}

.bag-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bag-count {
  min-width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-size: 11px;
}

.intro {
  min-height: 390px;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: end;
  gap: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 32px 58px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 900px;
  margin: 0;
  font-size: 96px;
  font-weight: 700;
  line-height: 0.9;
}

.intro-copy {
  max-width: 420px;
  padding-bottom: 4px;
}

.intro-copy > p {
  margin: 0 0 38px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  line-height: 1.2;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
}

.catalog {
  padding: 58px 32px 96px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.section-heading,
.catalog-tools,
.product-grid {
  width: 100%;
  max-width: var(--max-width);
  margin-right: auto;
  margin-left: auto;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  font-weight: 400;
  line-height: 1.05;
}

.collection-note {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.catalog-tools {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.filters {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-button {
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.filter-button:hover {
  color: var(--ink);
  border-color: var(--line);
}

.filter-button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding-top: 1px;
  background: var(--line);
}

.product-card {
  min-width: 0;
  background: var(--white);
}

.product-link {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 8 / 9;
  overflow: hidden;
  background: var(--image-matte, #f7f5f2);
}

.product-media::after {
  content: "View";
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 10px;
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1);
  transition: transform 320ms ease;
}

.cropped-product-image {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transform: scale(1);
  transition: transform 320ms ease;
}

.product-link:hover .product-media img,
.product-link:hover .cropped-product-image {
  transform: scale(1.018);
}

.product-link:hover .product-media::after,
.product-link:focus-visible .product-media::after {
  opacity: 1;
  transform: translateY(0);
}

.product-info {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 26px;
  border-top: 1px solid var(--line);
}

.product-category {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.product-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.product-title-row h3,
.product-title-row p {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.product-title-row h3 {
  font-weight: 700;
}

.product-title-row p {
  flex: 0 0 auto;
}

.product-description {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.product-reference {
  position: relative;
  margin: auto 0 0;
  padding: 22px 0 0 17px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.35;
}

.product-reference::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--product-accent, var(--purple));
}

.site-footer {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  background: var(--ink);
  color: #aaa;
  border-top: 1px solid #383838;
  font-size: 11px;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
}

dialog {
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(24, 24, 24, 0.58);
  backdrop-filter: blur(4px);
}

.product-dialog {
  width: min(980px, calc(100% - 40px));
  height: min(720px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
  grid-template-columns: 1.05fr 0.95fr;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.product-dialog[open] {
  display: grid;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: var(--white);
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.dialog-media {
  min-height: 620px;
  overflow: hidden;
  background: var(--image-matte, #f7f5f2);
}

.dialog-media img {
  width: 108%;
  max-width: none;
  height: auto;
  margin-left: -4%;
  clip-path: inset(0 0 25% 0);
}

.dialog-media .cropped-product-image {
  width: 100%;
  height: 100%;
  transform: none;
}

.dialog-content {
  display: flex;
  flex-direction: column;
  padding: 58px 46px 40px;
  overflow-y: auto;
}

.dialog-category {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.dialog-content h2 {
  max-width: 320px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.03;
}

.dialog-description {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.dialog-price {
  margin: 28px 0 0;
  font-size: 22px;
}

.reference-block {
  margin: 34px 0;
  padding: 20px;
  border-left: 4px solid var(--dialog-accent, var(--purple));
  background: var(--paper);
}

.reference-block p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.4;
}

.reference-block .reference-label {
  margin-bottom: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.size-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.size-fieldset legend {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
}

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

.size-option {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.size-option[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.add-button,
.checkout-button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 3px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.add-button {
  margin-top: 28px;
}

.add-button:hover,
.checkout-button:hover {
  background: var(--purple);
}

.fine-print {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.bag-dialog {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--white);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.bag-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.bag-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
}

.bag-items {
  max-height: 55vh;
  overflow-y: auto;
}

.bag-item {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.bag-item-image {
  width: 78px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--image-matte, var(--paper));
}

.bag-item-image img,
.bag-item-image .cropped-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
}

.bag-item-name,
.bag-item-meta,
.bag-item-price {
  margin: 0;
}

.bag-item-name {
  font-size: 13px;
  font-weight: 700;
}

.bag-item-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.bag-item-price {
  font-size: 12px;
}

.remove-button {
  margin-top: 10px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.empty-bag {
  padding: 64px 24px;
  color: var(--muted);
  text-align: center;
}

.empty-bag strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 400;
}

.empty-bag p {
  margin: 0;
  font-size: 12px;
}

.bag-footer {
  padding: 20px 22px 22px;
}

.bag-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 13px;
}

.checkout-button {
  background: var(--purple);
}

.checkout-button:hover {
  background: var(--ink);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: min(360px, calc(100% - 48px));
  padding: 13px 16px;
  border-radius: 3px;
  background: var(--acid);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .intro {
    min-height: 340px;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 44px;
    padding-top: 58px;
  }

  .intro h1 {
    font-size: 72px;
  }

  .intro-copy {
    max-width: 560px;
  }

  .intro-copy > p {
    margin-bottom: 26px;
    font-size: 24px;
  }

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

  .dialog-media {
    min-height: 520px;
  }

  .dialog-content {
    padding: 48px 30px 32px;
  }
}

@media (max-width: 680px) {
  .announcement {
    min-height: 30px;
    padding: 6px 16px;
    font-size: 9px;
  }

  .site-header {
    min-height: 64px;
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .brand-logo {
    width: 86px;
  }

  .brand-suffix {
    font-size: 14px;
  }

  .primary-nav {
    display: none;
  }

  .intro {
    min-height: 355px;
    gap: 34px;
    padding: 48px 18px 42px;
  }

  .intro h1 {
    font-size: 55px;
  }

  .intro-copy > p {
    font-size: 21px;
  }

  .catalog {
    padding: 44px 18px 68px;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    font-size: 37px;
  }

  .collection-note {
    margin-top: 14px;
  }

  .catalog-tools {
    min-height: 76px;
    overflow-x: auto;
  }

  .filters {
    flex: 0 0 auto;
  }

  .result-count {
    flex: 0 0 auto;
  }

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

  .product-info {
    min-height: 205px;
  }

  .product-media::after {
    display: none;
  }

  .site-footer {
    min-height: 110px;
    display: block;
    padding: 28px 18px;
  }

  .site-footer p + p {
    margin-top: 10px;
  }

  .product-dialog {
    width: calc(100% - 20px);
    height: auto;
    max-height: calc(100vh - 20px);
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .product-dialog[open] {
    display: block;
  }

  .dialog-media {
    min-height: 0;
    aspect-ratio: 8 / 9;
  }

  .dialog-media img {
    width: 115%;
    margin-left: -7.5%;
  }

  .dialog-content {
    overflow: visible;
    padding: 34px 22px 28px;
  }

  .dialog-content h2 {
    font-size: 36px;
  }

  .reference-block {
    margin: 28px 0;
  }

  .bag-dialog {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
  }

  .bag-item {
    grid-template-columns: 68px 1fr auto;
    padding: 14px 16px;
  }

  .bag-item-image {
    width: 68px;
  }

  .bag-header,
  .bag-footer {
    padding-right: 16px;
    padding-left: 16px;
  }
}

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

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