:root {
  --linen: #F5F1E8;
  --paper: #FBF9F4;
  --ink: #1C1C1A;
  --muted: #6E6A62;
  --line: #DDD6C8;
  --red: #C2342B;      /* her embroidery thread */
  --indigo: #22263F;
  --radius: 2px;
  --gutter: clamp(16px, 4vw, 56px);
  --font: "Jost", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* prototype banner */
.proto-bar {
  background: var(--indigo); color: #fff; text-align: center;
  font-size: 13px; letter-spacing: .04em; padding: 6px 16px;
}

/* nav */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  background: rgba(245, 241, 232, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { font-weight: 300; letter-spacing: .32em; text-decoration: none; font-size: 20px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.cart-btn {
  background: none; border: 1px solid var(--ink); padding: 6px 14px; cursor: pointer; font-size: 15px;
}
.cart-btn span {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px;
  background: var(--red); color: #fff; border-radius: 10px; font-size: 12px; padding: 0 5px;
}

/* hero */
.hero {
  position: relative; min-height: calc(100svh - 90px); display: grid; place-items: center;
  overflow: hidden; color: #fff; text-align: center;
}
.hero-media {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  animation: drift 24s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.12) translateY(-2%); } }
@media (prefers-reduced-motion: reduce) { .hero-media { animation: none; } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,22,40,.25), rgba(20,22,40,.55)); }
.hero-inner { position: relative; padding: 0 var(--gutter); }
.wordmark {
  margin: 0; font-weight: 300; letter-spacing: .3em; font-size: clamp(56px, 13vw, 160px); line-height: 1;
  padding-left: .3em; /* balance letter-spacing */
}
.wordmark.small { font-size: 28px; }
.hero-sub { margin: 4px 0 28px; font-size: clamp(20px, 3vw, 30px); font-weight: 300; letter-spacing: .08em; }
.hero-line { margin: 0 auto 32px; max-width: 30em; font-size: 18px; opacity: .95; }
.hero-note {
  position: absolute; bottom: 16px; right: 16px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px dashed rgba(255,255,255,.7); padding: 4px 10px; opacity: .8;
}

/* buttons */
.btn {
  display: inline-block; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  padding: 13px 28px; text-decoration: none; cursor: pointer; letter-spacing: .04em; transition: .2s;
}
.btn:hover { background: var(--red); border-color: var(--red); }
.btn-light { background: transparent; border-color: #fff; color: #fff; }
.btn-light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; background: var(--ink); border-color: var(--ink); }

/* sections */
.section { padding: clamp(64px, 10vw, 120px) var(--gutter); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.eyebrow { margin: 0 0 8px; color: var(--red); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
h2 { margin: 0 0 14px; font-weight: 300; font-size: clamp(32px, 5vw, 52px); line-height: 1.1; }
h3 { font-weight: 400; }
.lead { margin: 0; color: var(--muted); font-size: 18px; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.center { text-align: center; }

/* categories */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 28px); }
.cat { text-decoration: none; display: block; }
.cat-img {
  aspect-ratio: 3 / 4; background-size: cover; background-position: center;
  transition: transform .5s ease;
}
.cat:hover .cat-img { transform: scale(1.02); }
.cat h3 { margin: 16px 0 2px; font-size: 24px; font-weight: 300; }
.cat-cta { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; border-bottom: 1px solid currentColor; }

/* customisation */
.custom { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.custom-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.step { border: 0; padding: 0; margin: 0 0 32px; min-width: 0; }
.step legend { font-size: 20px; margin-bottom: 14px; padding: 0; }
.step legend small { color: var(--muted); font-size: 14px; margin-left: 6px; }
.num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px;
  border: 1px solid var(--ink); border-radius: 50%; font-size: 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: block; padding: 9px 16px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: .15s; }
.chip input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

.patterns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pattern {
  border: 1px solid var(--line); background: #fff; padding: 8px; cursor: pointer; text-align: center;
}
.pattern .pat { aspect-ratio: 1; }
.pattern span { display: block; margin-top: 8px; font-size: 15px; }
.pattern small { color: var(--muted); }
.pattern[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.colours { display: flex; flex-wrap: wrap; gap: 14px; }
.colour { background: none; border: 0; padding: 0; cursor: pointer; text-align: center; width: 72px; }
.colour i {
  display: block; width: 52px; height: 52px; margin: 0 auto 6px; border-radius: 46% 54% 40% 60% / 55% 40% 60% 45%;
  border: 1px solid rgba(0,0,0,.12); transition: transform .15s;
}
.colour span { font-size: 13px; color: var(--muted); }
.colour[aria-pressed="true"] i { transform: scale(1.08); box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--ink); }
.colour[aria-pressed="true"] span { color: var(--ink); }

input[type=text], input[type=email], textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
#sizeOther { margin-top: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.form-error { color: var(--red); min-height: 1.4em; margin: 0 0 10px; }

.preview-sticky { position: sticky; top: 90px; }
.swatch { aspect-ratio: 4 / 5; border: 1px solid var(--line); background: var(--linen); overflow: hidden; }
.swatch svg { width: 100%; height: 100%; display: block; }
.swatch-haft {
  margin-top: -64px; position: relative; text-align: center; min-height: 40px;
  color: var(--red); font-size: 22px; letter-spacing: .06em; font-style: italic;
  text-shadow: 0 0 6px rgba(255,255,255,.9);
}
.summary { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 36px 0 0; font-size: 15px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; }

/* gallery */
.gallery { columns: 4 240px; column-gap: 14px; }
.gallery img { margin-bottom: 14px; width: 100%; cursor: zoom-in; break-inside: avoid; }
.lightbox {
  position: fixed; inset: 0; z-index: 80; background: rgba(20,20,18,.92);
  display: none; place-items: center; padding: 24px; cursor: zoom-out;
}
.lightbox.open { display: grid; }
.lightbox img { max-height: 90vh; width: auto; }

/* shop */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filters button { background: none; border: 1px solid var(--line); padding: 8px 16px; cursor: pointer; }
.filters button.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 40px 24px; }
.product .imgs { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--paper); cursor: pointer; }
.product .imgs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s; }
.product .imgs .spread { opacity: 0; }
.product .imgs:hover .spread, .product .imgs.show .spread { opacity: 1; }
.product .tag {
  position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--paper);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px;
}
.product .tag.sold { background: var(--ink); color: #fff; }
.product .view { position: absolute; bottom: 10px; right: 10px; z-index: 2; font-size: 12px; background: rgba(255,255,255,.85); padding: 2px 8px; }
.product h3 { margin: 14px 0 0; font-size: 20px; font-weight: 400; }
.product .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; margin: 2px 0 10px; }
.product .meta strong { color: var(--ink); font-weight: 500; }
.product p.desc { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.product .btn { padding: 10px 18px; font-size: 15px; }
.empty { color: var(--muted); }

/* about */
.about { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); align-items: center; background: var(--paper); }
.about img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.about p { max-width: 34em; }
.signoff { color: var(--red); font-size: 22px; font-style: italic; }

/* footer */
.footer { padding: 64px var(--gutter) 40px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.footer .wordmark { color: var(--ink); margin-bottom: 14px; }
.footer a { color: var(--ink); }
.legal { font-size: 14px; margin-top: 24px; }

/* drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: .25s; z-index: 50; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(420px, 100%);
  background: var(--paper); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s ease;
}
body.cart-open .drawer { transform: none; }
body.cart-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 22px; font-weight: 300; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 22px; }
.drawer-foot { padding: 18px 22px; border-top: 1px solid var(--line); }
.icon-btn { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line img { width: 64px; height: 80px; object-fit: cover; }
.line h4 { margin: 0; font-weight: 400; }
.line small { color: var(--muted); }
.line button { background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; font-size: 14px; }
.ship { display: block; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.ship select { margin-top: 4px; }
.total { display: flex; justify-content: space-between; font-size: 18px; margin-bottom: 14px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.4); display: none; place-items: center; padding: 16px; }
.modal.open { display: grid; }
.modal-card { position: relative; background: var(--paper); max-width: 480px; width: 100%; padding: 36px 30px 28px; max-height: 90vh; overflow: auto; }
.modal-close { position: absolute; top: 8px; right: 8px; }
.modal-card h3 { margin: 0 0 10px; font-size: 26px; font-weight: 300; }
.modal-card ul { padding-left: 18px; color: var(--muted); }

/* responsive */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .cart-btn { margin-left: auto; }
  .custom-grid { grid-template-columns: 1fr; }
  .preview { order: -1; }
  .preview-sticky { position: static; }
  .swatch { aspect-ratio: 16 / 9; }
  .summary { display: none; }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cats { grid-template-columns: 1fr; }
  .cat-img { aspect-ratio: 4 / 3; }
  .two { grid-template-columns: 1fr; }
  .colour { width: 64px; }
  .patterns { gap: 8px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .product h3 { font-size: 17px; }
  .product p.desc { display: none; }
  .product .meta { flex-direction: column; }
  body { font-size: 16px; }
}
