@font-face {
  font-family: 'DM Sans';
  src: url('./dm-sans.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #202a24;
  --muted: #525e55;
  --paper: #f7f3e9;
  --surface: #fffdf8;
  --line: #d6d7c9;
  --focus: #165848;
  --juniper: #123c36;
  --mulberry: #512b40;
  --cream: #e4c998;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.48 'DM Sans', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, figure, dl, dd { margin: 0; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, .product-gallery:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.page-width { width: min(calc(100% - 80px), 1220px); margin-inline: auto; }
.top-bar { border-bottom: 1px solid var(--line); }
.top-content {
  display: flex;
  min-height: 65px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: .82rem;
}
.wordmark { color: var(--ink); font-size: 1.33rem; font-weight: 800; letter-spacing: -.08em; }

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(305px, 1fr);
  grid-template-areas: 'gallery intro' 'gallery options' 'details details';
  grid-template-rows: auto 1fr auto;
  align-items: start;
  column-gap: clamp(32px, 5vw, 76px);
  row-gap: 22px;
  padding-block: clamp(32px, 4.8vw, 65px) 58px;
}
.product-intro { grid-area: intro; padding-top: 5px; }
h1 {
  max-width: 11ch;
  font-size: clamp(2.6rem, 4.4vw, 4.25rem);
  font-weight: 650;
  line-height: .99;
  letter-spacing: -.075em;
  text-wrap: balance;
}
h2 { font-size: 1.4rem; line-height: 1.2; letter-spacing: -.035em; }
.product-intro > p { margin-top: 15px; max-width: 42ch; color: var(--muted); }
.price { display: flex; align-items: center; gap: 12px; }
.price strong { color: var(--ink); font-size: 1.67rem; line-height: 1; letter-spacing: -.06em; }
.price span { font-size: .83rem; }

.product-gallery { grid-area: gallery; align-self: start; min-width: 0; }
.media-stage { background: #e9e2d5; border-radius: 15px; overflow: hidden; }
.hero-image, .mat-art { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
#artwork-view { padding: clamp(13px, 2.5vw, 28px); aspect-ratio: 1; background: #e6e0d2; }
.mat { position: relative; isolation: isolate; aspect-ratio: 1; width: 100%; background: var(--juniper); }
.mat[data-palette='mulberry'] { background: var(--mulberry); }
.photo-window {
  position: absolute;
  left: 50%;
  top: 78%;
  width: 15.3%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  clip-path: circle(50%);
  background: inherit;
}
.photo-window img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-window img.show-whole { object-fit: contain; }
.group-name {
  position: absolute;
  top: 89%;
  left: 50%;
  width: 76%;
  transform: translate(-50%, -50%);
  color: var(--cream);
  font-size: clamp(.56rem, 1.37vw, 1.02rem);
  font-weight: 700;
  letter-spacing: .115em;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.media-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 12px; padding: 11px 0 0; }
.media-footer p { color: var(--muted); font-size: .75rem; }
.media-switch { display: inline-flex; gap: 4px; }
.media-switch button {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 650;
}
.media-switch button[aria-pressed='true'] { border-color: var(--line); background: var(--surface); color: var(--ink); }

.product-options { grid-area: options; max-width: 510px; border-top: 1px solid var(--line); padding-top: 20px; }
.color-field { min-width: 0; margin: 15px 0; padding: 0; border: 0; }
legend, .photo-field > label:first-child, .name-field > span { display: block; margin: 0 0 6px; padding: 0; font-weight: 700; font-size: .89rem; }
.colors { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.color { position: relative; display: inline-block; }
.color input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.color span { display: flex; min-height: 43px; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: .86rem; font-weight: 650; }
.color input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.color input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.swatch { width: 15px; height: 15px; border-radius: 50%; }
.swatch.juniper { background: var(--juniper); }
.swatch.mulberry { background: var(--mulberry); }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.photo-actions input { max-width: 100%; min-width: 0; font-size: .8rem; }
.photo-actions input::file-selector-button {
  min-height: 42px;
  margin-right: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
#clear-photo, #sample-photo { min-height: 40px; padding: 0; color: var(--muted); border: 0; background: transparent; text-decoration: underline; font-size: .8rem; }
.input-help, #photo-status, .launch-note { margin-top: 5px; color: var(--muted); font-size: .79rem; }
#photo-status[data-error='true'] { color: #8e2c26; }
.photo-fit { display: flex; min-height: 35px; align-items: center; gap: 6px; color: var(--muted); font-size: .83rem; }
.photo-fit input { width: 17px; height: 17px; margin-inline: 0 4px; accent-color: var(--juniper); }
.name-field { display: block; margin-top: 14px; }
small { margin-left: 3px; color: var(--muted); font-size: .8em; font-weight: 500; }
.name-field input {
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #a8ad9d;
  border-radius: 7px;
  background: var(--surface);
}
.preview-button {
  display: flex;
  min-height: 46px;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  background: var(--juniper);
  color: #fff;
  font-weight: 700;
}
.preview-button:hover { background: #24574b; }
.launch-note { margin-top: 8px; }

.product-specs { grid-area: details; margin-top: clamp(8px, 2.4vw, 30px); padding-top: 20px; border-top: 1px solid var(--line); }
.product-specs dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 12px; }
.product-specs dt { font-size: .85rem; font-weight: 700; }
.product-specs dd { margin-top: 3px; color: var(--muted); font-size: .87rem; }

@media (max-width: 800px) {
  .page-width { width: min(calc(100% - 36px), 560px); }
  .top-content { min-height: 56px; }
  .product { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'intro' 'gallery' 'options' 'details'; row-gap: 18px; }
  .product-intro { padding: 0; }
  h1 { max-width: 15ch; font-size: clamp(2.35rem, 8.3vw, 3.8rem); }
  .product-intro > p { margin-top: 11px; }
  .group-name { font-size: clamp(.6rem, 2.4vw, .9rem); }
}
@media (max-width: 380px) {
  .media-footer { align-items: flex-start; flex-direction: column; }
  .product-specs dl { grid-template-columns: 1fr; }
}

.interest { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.interest h2 { font-size: 1.16rem; }
#consider-price {
  min-height: 44px; padding: 8px 12px; margin-top: 10px; border: 1px solid var(--juniper);
  border-radius: 7px; background: var(--surface); color: var(--juniper); font-weight: 700;
}
#consider-price:hover:not(:disabled) { background: #e9f0e9; }
#consider-price:disabled { cursor: default; opacity: .65; }
.confirmation { max-width: 560px; padding-block: 64px; }
.confirmation h1 { max-width: 16ch; }
.confirmation p, .confirmation a { margin-top: 15px; }
.confirmation a { display: inline-block; color: var(--juniper); }
