/* Hol's Stitch and Sparkle. Heather paper, moss ink, plum velvet, antique-gold thread.
   The one loud thing is the stitching: the thread under the name, the stitched photo edges. */
:root {
  --paper: #eadde6;
  --paper-2: #f3eaf0;
  --ink: #2c3a2a;
  --ink-2: #4f5a4c;
  --plum: #4a1d3f;
  --plum-ink: #fbf1f7;
  --gold: #a87a1f;
  --gold-soft: #d9b45f;
  --line: #c9b6c3;
  --alert: #8a2531;
  --link: #6b2a5b;
  --display: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --body: "Alegreya Sans", "Gill Sans", "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1f1420; --paper-2: #2a1c2b; --ink: #efe4ec; --ink-2: #c9b9c6; --plum: #8e4a7c; --plum-ink: #fff6fb;
    --gold: #d9b45f; --gold-soft: #b98a2c; --line: #4a3549; --alert: #f2a3ad; --link: #e8b4d8; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1f1420; --paper-2: #2a1c2b; --ink: #efe4ec; --ink-2: #c9b9c6; --plum: #8e4a7c; --plum-ink: #fff6fb;
  --gold: #d9b45f; --gold-soft: #b98a2c; --line: #4a3549; --alert: #f2a3ad; --link: #e8b4d8; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.075rem/1.55 var(--body);
  /* faint woven texture: two crossing hairlines, barely there */
  background-image:
    repeating-linear-gradient(0deg, transparent 0 5px, color-mix(in srgb, var(--ink) 2%, transparent) 5px 6px),
    repeating-linear-gradient(90deg, transparent 0 5px, color-mix(in srgb, var(--ink) 1.6%, transparent) 5px 6px);
}
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px dashed var(--gold); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.small { font-size: 0.88rem; color: var(--ink-2); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--paper-2); padding: 0.4rem 0.7rem; z-index: 9; }
main { max-width: 1080px; margin: 0 auto; padding: 0 16px 3rem; }

.bar { max-width: 1080px; margin: 0 auto; padding: 14px 16px 0; }
.bar-name { font: italic 400 1.35rem/1.1 var(--display); color: var(--ink); text-decoration: none; }

/* hero: the shop name, sewn underneath */
.hero { padding: clamp(2.2rem, 9vw, 4.5rem) 0 1.4rem; max-width: 42rem; }
.name { margin: 0; font: 400 clamp(2.9rem, 13.5vw, 5.6rem)/0.92 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.name-line { display: block; position: relative; width: fit-content; }
.name-line + .name-line { font-style: italic; margin-left: clamp(1.2rem, 9vw, 4.5rem); }
.spark { position: absolute; fill: var(--gold); }
.s1 { width: 0.34em; height: 0.34em; right: -0.42em; top: -0.12em; }
.s2 { width: 0.17em; height: 0.17em; right: -0.66em; top: 0.3em; fill: var(--gold-soft); }
.thread { display: block; width: min(100%, 26rem); height: 22px; margin: 0.7rem 0 0 clamp(1.2rem, 9vw, 4.5rem); overflow: visible; }
.thread path { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 9 7;
  animation: sew 1.6s cubic-bezier(.5, 0, .2, 1) both 0.25s; }
@keyframes sew { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (min-width: 860px) {
  .hero { max-width: none; display: grid; grid-template-columns: auto minmax(16rem, 22rem); gap: 4rem; align-items: end; }
  .hero-words { padding-bottom: 0.6rem; }
}
.intro { margin: 1.3rem 0 0; font-size: clamp(1.1rem, 4.2vw, 1.3rem); max-width: 34ch; color: var(--ink-2); }
.soon { margin: 1.2rem 0 0; display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 500;
  padding: 0.45rem 0.9rem; border: 1.5px dashed var(--gold); border-radius: 999px; }
.spark-inline { width: 14px; height: 14px; fill: var(--gold); }

/* the grid: photos with a stitched label edge */
.grid { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 14px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem 26px; } }
.card a { display: grid; gap: 0.35rem; text-decoration: none; color: inherit; }
.frame { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: var(--paper-2); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame::after { content: ""; position: absolute; inset: 7px; border: 1.5px dashed color-mix(in srgb, var(--gold-soft) 85%, white);
  border-radius: 3px; pointer-events: none; opacity: 0.9; }
.card-title { font: italic 400 1.18rem/1.15 var(--display); margin-top: 0.35rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; align-items: baseline; font-weight: 500; }
.note { font-weight: 400; font-size: 0.9rem; color: var(--ink-2); }
.card.gone .frame img { filter: grayscale(0.7) opacity(0.65); }
.nophoto { display: grid; place-items: center; height: 100%; }
.nophoto svg { width: 34px; height: 34px; fill: var(--gold-soft); }
.empty { margin-top: 2rem; max-width: 36ch; color: var(--ink-2); }

/* product page */
.product { display: grid; gap: 1.4rem; padding-top: 0.8rem; }
@media (min-width: 860px) { .product { grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: start; padding-top: 1.6rem; } }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; border-radius: 8px;
  margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img, .nophoto.big { flex: 0 0 86%; scroll-snap-align: center; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px;
  background: var(--paper-2); }
.gallery > :only-child { flex-basis: 100%; }
@media (min-width: 860px) {
  .gallery { margin: 0; padding: 0; display: grid; gap: 14px; overflow: visible; }
  .dots { display: none; }
  .buy { position: sticky; top: 1.5rem; }
}
.dots { display: flex; gap: 6px; justify-content: center; margin: -0.6rem 0 0; }
.dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.buy { max-width: 34rem; }
.title { margin: 0; font: 400 clamp(2rem, 8vw, 2.8rem)/1.02 var(--display); }
.price { margin: 0.5rem 0 1.2rem; font-size: 1.4rem; font-weight: 700; }
.alert { margin: 0 0 1rem; padding: 0.7rem 0.9rem; border-left: 3px solid var(--alert); background: var(--paper-2); color: var(--alert); font-weight: 500; }
.order { display: grid; gap: 1.1rem; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
legend { font-weight: 700; margin-bottom: 0.45rem; padding: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.opts legend { width: 100%; }
.opt input, .dl input { position: absolute; opacity: 0; }
.opt span { display: inline-block; padding: 0.5rem 1rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper-2);
  cursor: pointer; }
.opt input:checked + span { border: 1.5px dashed var(--gold); outline: 1.5px solid var(--plum); outline-offset: 2px; font-weight: 700; }
.opt input:focus-visible + span, .dl input:focus-visible + span { outline: 2px dashed var(--gold); outline-offset: 3px; }
.opt.out span { opacity: 0.45; text-decoration: line-through; cursor: not-allowed; }
.mto { margin: -0.3rem 0 0; color: var(--ink-2); font-style: italic; }
.qty { display: flex; align-items: center; gap: 0.8rem; font-weight: 700; }
.qty input { width: 4.5rem; font: inherit; padding: 0.45rem 0.6rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper-2); color: var(--ink); }
.dl span { display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 1rem; padding: 0.75rem 0.9rem; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--paper-2); cursor: pointer; }
.dl small { grid-column: 1 / -1; color: var(--ink-2); font-size: 0.88rem; }
.dl input:checked + span { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); }
.buy-btn { font: 700 1.12rem/1 var(--body); padding: 1.05rem 1.2rem; border: 0; border-radius: 999px; background: var(--plum);
  color: var(--plum-ink); cursor: pointer; position: relative; }
.buy-btn::after { content: ""; position: absolute; inset: 5px; border: 1.5px dashed color-mix(in srgb, var(--gold-soft) 80%, transparent); border-radius: 999px; }
.buy-btn:disabled { opacity: 0.6; cursor: default; }
.secure { margin: -0.4rem 0 0; text-align: center; }
.sold { font-size: 1.1rem; }
.desc { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1.5px dashed var(--line); max-width: 60ch; }
.desc p { margin: 0 0 0.8rem; }

/* plain pages */
.plain { max-width: 40rem; padding-top: 2.4rem; }
.plain h2 { font: italic 400 1.45rem/1.2 var(--display); margin: 1.8rem 0 0.4rem; }
.rates { list-style: none; padding: 0; margin: 0.6rem 0; max-width: 22rem; }
.rates li { display: flex; justify-content: space-between; padding: 0.35rem 0; border-bottom: 1.5px dashed var(--line); }
.thanks .spark-big { width: 42px; height: 42px; fill: var(--gold); }

.foot { max-width: 1080px; margin: 0 auto; padding: 1.6rem 16px 2.4rem; border-top: 1.5px dashed var(--line);
  display: grid; gap: 0.2rem; color: var(--ink-2); }
.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) { .thread path { animation: none; } }
