/* Sugar & Glass — storefront styles */
:root {
  /* Watercolor (default) */
  --paper: #FFFDFA;
  --cream: #F5F0F6;
  --card: #FFFFFF;
  --ink: #2F2A44;
  --mauve: #696379;
  --gold: #946F33;
  --gold-soft: #D9BE88;
  --line: rgba(47, 42, 68, .13);
  --announce-bg: #3F3A5E;
  --announce-ink: #F4F0FB;
  --btn-hover: #4A4468;
  --alert: #FCE8EF;
  --scrim: rgba(47, 42, 68, .35);
  --shadow: rgba(47, 42, 68, .15);
  --rose: #F4C8D9;
  --lilac: #DCCFF5;
  --sky: #C8E6F3;
  --mint: #D6F0E3;
  --sheen: linear-gradient(125deg, var(--rose), var(--lilac) 35%, var(--sky) 65%, var(--mint) 85%, var(--rose));
  --wash-a: url(/images/wash/rose.webp);
  --wash-b: url(/images/wash/sky.webp);
  --wash-c: url(/images/wash/lilac.webp);
  --wash-d: url(/images/wash/mint.webp);
  --wash-opacity: 1;
  --display: 'Fraunces', Georgia, serif;
  --ui: 'Figtree', system-ui, sans-serif;
  --arch: 999px 999px 14px 14px;
  --wrap: min(1180px, 100% - 2.5rem);
  color-scheme: light;
}
/* Sugar Paper: the original cream-and-plum look */
[data-theme="paper"] {
  --paper: #FBF5F0; --cream: #F3E8E0; --card: #FFFFFF;
  --ink: #3A2A35; --mauve: #7D6873; --gold: #9C7A3C; --gold-soft: #D8BF8E;
  --line: rgba(58, 42, 53, .14);
  --announce-bg: #3A2A35; --announce-ink: #F6EAF0; --btn-hover: #523D4B; --alert: #FBE7EC;
  --scrim: rgba(58, 42, 53, .35); --shadow: rgba(58, 42, 53, .15);
  --wash-opacity: 0;
}
/* Candy: bright sugared pastels */
[data-theme="candy"] {
  --paper: #FFF5F9; --cream: #FFE6F0; --card: #FFFFFF;
  --ink: #4A2342; --mauve: #7E5574; --gold: #B0742F; --gold-soft: #F3C98E;
  --line: rgba(74, 35, 66, .14);
  --announce-bg: #FFD3E4; --announce-ink: #4A2342; --btn-hover: #6B3561; --alert: #FFE0EC;
  --scrim: rgba(74, 35, 66, .3); --shadow: rgba(200, 80, 140, .18);
  --rose: #FFB3D1; --lilac: #D9C2FF; --sky: #A8E3FF; --mint: #B5F2D6;
  --wash-a: url(/images/wash/rose.webp); --wash-b: url(/images/wash/mint.webp);
  --wash-c: url(/images/wash/peach.webp); --wash-d: url(/images/wash/sky.webp);
  --wash-opacity: 1;
}
[data-theme="candy"] .announce {
  background: repeating-linear-gradient(-45deg, #FFD3E4 0 14px, #FFF0F6 14px 28px);
  font-weight: 600;
}
[data-theme="candy"] .btn:not(.ghost) { background: #E2558F; border-color: #E2558F; color: #fff; box-shadow: 0 4px 0 #B93C70; }
[data-theme="candy"] .btn:not(.ghost):hover { background: #D1457F; border-color: #D1457F; }
[data-theme="candy"] .btn:not(.ghost):active { transform: translateY(2px); box-shadow: 0 2px 0 #B93C70; }
[data-theme="candy"] .btn.ghost { border-width: 2px; border-color: #E2558F; color: #B93C70; }
[data-theme="candy"] .btn.ghost:hover { background: #FFE6F0; }
[data-theme="candy"] .btn[disabled] { background: #E9C9D7; border-color: #E9C9D7; box-shadow: none; color: #7E5574; }
[data-theme="candy"] .arch::after { padding: 4px; }
[data-theme="candy"] .quick-add { border-width: 2px; border-color: #FFC6DC; }
[data-theme="candy"] .quick-add:hover { background: #FFE6F0; border-color: #E2558F; }
[data-theme="candy"] .bag-count { background: #E2558F; color: #fff; }
[data-theme="candy"] .hero-kicker, [data-theme="candy"] .category-label { color: #D1457F; }
[data-theme="candy"] .jar .count { color: #B0742F; }
[data-theme="candy"] .site-header { border-bottom: 3px dotted #FFC6DC; }

/* Rock Candy: clear glass and sugar crystals, no washes */
[data-theme="rockcandy"] {
  --paper: #F6F5FB; --cream: #ECEAF6; --card: rgba(255, 255, 255, .55);
  --ink: #2C2840; --mauve: #625C78; --gold: #8F6C32; --gold-soft: #D6BC86;
  --line: rgba(44, 40, 64, .12);
  --announce-bg: #2C2840; --announce-ink: #F3F1FA; --btn-hover: #433D5E; --alert: #F1E6F4;
  --scrim: rgba(44, 40, 64, .3); --shadow: rgba(90, 80, 150, .16);
  --wash-opacity: 0;
}
[data-theme="rockcandy"] body {
  background-color: #F6F5FB;
  background-image:
    url(/images/sparkle.svg),
    radial-gradient(60% 45% at 85% 0%, rgba(244, 200, 217, .45), transparent 70%),
    radial-gradient(55% 40% at 0% 35%, rgba(200, 230, 243, .5), transparent 70%),
    radial-gradient(50% 40% at 100% 70%, rgba(220, 207, 245, .45), transparent 70%),
    linear-gradient(180deg, #FAF9FD, #F3F1FA);
  background-attachment: fixed;
}
[data-theme="rockcandy"] .jar, [data-theme="rockcandy"] .card {
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 26px; padding: .6rem .6rem 1rem;
  box-shadow: 0 12px 32px rgba(90, 80, 150, .12), inset 0 1px 0 #fff;
}
[data-theme="rockcandy"] .jar h3, [data-theme="rockcandy"] .jar p, [data-theme="rockcandy"] .jar .count,
[data-theme="rockcandy"] .card h3, [data-theme="rockcandy"] .card .price { padding-inline: .35rem; }
[data-theme="rockcandy"] .quick-add { background: rgba(255, 255, 255, .7); }
[data-theme="rockcandy"] .site-header { background: rgba(250, 249, 253, .7); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); }
[data-theme="rockcandy"] .btn:not(.ghost) { background: linear-gradient(180deg, #3B3554, #2C2840); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 16px rgba(44, 40, 64, .2); }
[data-theme="rockcandy"] .btn.ghost { background: rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
[data-theme="rockcandy"] .hero-window .arch { box-shadow: 0 30px 60px rgba(90, 80, 150, .22); }
[data-theme="rockcandy"] .drawer { background: rgba(250, 249, 253, .92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
[data-theme="rockcandy"] .section + .section { border-top-color: rgba(44, 40, 64, .08); }

/* Midnight: dark */
[data-theme="midnight"] {
  --paper: #17131F; --cream: #231D2D; --card: #1F1928;
  --ink: #F2EAF3; --mauve: #B9ADC4; --gold: #E0C48E; --gold-soft: #8E7448;
  --line: rgba(242, 234, 243, .13);
  --announce-bg: #2B2338; --announce-ink: #F2EAF3; --btn-hover: #FFFFFF; --alert: #3A2433;
  --scrim: rgba(0, 0, 0, .55); --shadow: rgba(0, 0, 0, .5);
  --wash-opacity: .14;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--ui);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
main { flex: 1; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { width: var(--wrap); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; font-variation-settings: 'SOFT' 100, 'WONK' 0; line-height: 1.08; margin: 0; letter-spacing: -.01em; }

/* ---------- Announcement + header ---------- */
.announce {
  background: var(--announce-bg);
  color: var(--announce-ink);
  text-align: center;
  font-size: .85rem;
  padding: .5rem 1rem;
}
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand span {
  font-family: var(--display);
  font-variation-settings: 'SOFT' 100;
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: .01em;
}
.nav { display: flex; gap: 1.5rem; }
.nav a { text-decoration: none; color: var(--mauve); font-weight: 500; padding: .25rem 0; border-bottom: 1.5px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-color: var(--gold-soft); }
.bag-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: .5rem .95rem; cursor: pointer; font-weight: 600;
}
.bag-btn:hover { border-color: var(--gold-soft); }
.bag-btn svg { width: 18px; height: 18px; }
.bag-count {
  min-width: 1.35rem; height: 1.35rem; border-radius: 999px;
  background: var(--sheen); font-size: .78rem; display: grid; place-items: center; padding: 0 .3rem;
}
@media (max-width: 720px) {
  .nav { display: none; }
  .brand span { font-size: 1.2rem; }
  .site-header .wrap { height: 62px; }
}

/* ---------- Arched glass frame (signature) ---------- */
.arch {
  position: relative;
  border-radius: var(--arch);
  overflow: hidden;
  background: var(--cream);
  isolation: isolate;
}
.arch::after { /* thin iridescent rim */
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 3px;
  background: var(--sheen);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero-kicker { font-family: var(--display); font-style: italic; color: var(--gold); font-size: 1.15rem; margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); font-weight: 400; max-width: 12ch; }
.hero p.lede { font-size: 1.12rem; color: var(--mauve); max-width: 46ch; margin: 1.5rem 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-window { position: relative; aspect-ratio: 4 / 5; max-width: 440px; width: 100%; justify-self: center; }
.hero-window .arch { position: absolute; inset: 0; }
.hero-window .arch img { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero-window .arch img.on { opacity: 1; }
.hero-mark {
  position: absolute; top: -34px; left: 50%; translate: -50% 0;
  width: 92px; z-index: 3; filter: drop-shadow(0 8px 16px rgba(157, 120, 170, .35));
}
.hero-caption {
  position: absolute; z-index: 3; left: 50%; bottom: 1rem; translate: -50% 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  border-radius: 999px; padding: .4rem 1rem; font-size: .88rem; white-space: nowrap;
  text-decoration: none;
}
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-window { max-width: 270px; order: -1; margin-top: 1.75rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 999px; padding: .85rem 1.5rem; font-weight: 600; text-decoration: none;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--cream); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }

/* ---------- Sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.section-head a { color: var(--mauve); font-weight: 500; }
.section + .section { border-top: 1px solid var(--line); }

/* Collections shelf */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2rem 1.5rem; }
.jar { text-decoration: none; display: block; }
.jar .arch { aspect-ratio: 3 / 4; }
.jar .arch img { transition: transform .6s ease; }
.jar:hover .arch img { transform: scale(1.04); }
.jar h3 { font-size: 1.45rem; margin-top: 1rem; }
.jar p { margin: .3rem 0 0; color: var(--mauve); font-size: .95rem; }
.jar .count { color: var(--gold); font-size: .88rem; margin-top: .4rem; display: block; }
.jar.soon .arch { display: grid; place-items: center; background: var(--sheen); }
.jar.soon .arch img { width: 46%; height: auto; object-fit: contain; opacity: .9; }
.category-label { font-family: var(--display); font-style: italic; color: var(--gold); font-size: 1.25rem; margin: 2.5rem 0 1rem; }
.category-label:first-child { margin-top: 0; }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2.25rem 1.5rem; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr 1fr; gap: 1.75rem .9rem; } }
.card { position: relative; }
.card > a { text-decoration: none; display: block; }
.card .arch { aspect-ratio: 4 / 5; }
.card h3 { font-family: var(--ui); font-weight: 600; font-size: 1rem; line-height: 1.35; margin-top: .85rem; letter-spacing: 0; }
.card .price { color: var(--mauve); margin-top: .15rem; }
.card.sold .arch img { filter: grayscale(.65) opacity(.7); }
.tag {
  position: absolute; z-index: 3; left: 50%; bottom: .75rem; translate: -50% 0;
  background: var(--paper); border-radius: 999px; padding: .25rem .8rem; font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.tag.hold { background: var(--lilac); }
.quick-add {
  margin-top: .6rem; width: 100%;
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: .5rem; font-weight: 600; font-size: .9rem; cursor: pointer;
}
.quick-add:hover { border-color: var(--gold-soft); background: color-mix(in srgb, var(--cream) 60%, transparent); }
.quick-add.in { background: var(--sheen); border-color: transparent; }

/* ---------- Collection page ---------- */
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.crumb { color: var(--mauve); text-decoration: none; font-size: .92rem; }
.crumb:hover { color: var(--ink); }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 400; margin-top: .75rem; }
.page-head p { color: var(--mauve); font-size: 1.08rem; max-width: 52ch; margin: .75rem 0 0; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0 2rem; color: var(--mauve); font-size: .95rem; border-top: 1px solid var(--line); margin-top: 1.75rem; }
.switch { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; }
.switch input { accent-color: var(--gold); width: 1.05rem; height: 1.05rem; }

/* ---------- Piece page ---------- */
.piece { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); padding: clamp(1.5rem, 4vw, 3rem) 0 4rem; align-items: start; }
.gallery .arch { aspect-ratio: 4 / 5; }
.thumbs { display: flex; gap: .6rem; margin-top: .9rem; flex-wrap: wrap; }
.thumbs button { width: 68px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--cream); }
.thumbs button[aria-current="true"] { border-color: var(--gold); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.piece-info { position: sticky; top: 100px; }
.piece-info h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); font-weight: 400; margin-top: .75rem; }
.piece-info .price { font-size: 1.4rem; margin: 1rem 0 1.25rem; }
.details { white-space: pre-line; color: var(--mauve); margin: 0 0 1.75rem; max-width: 48ch; }
.assure { list-style: none; padding: 1.25rem 0 0; margin: 1.75rem 0 0; border-top: 1px solid var(--line); color: var(--mauve); font-size: .95rem; display: grid; gap: .5rem; }
.assure li::before { content: '✦'; color: var(--gold-soft); margin-right: .6rem; }
@media (max-width: 820px) { .piece { grid-template-columns: 1fr; } .piece-info { position: static; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 220px 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.about img { width: 100%; max-width: 220px; }
.about h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 1rem; }
.about p { color: var(--mauve); max-width: 60ch; font-family: var(--display); font-size: 1.15rem; line-height: 1.75; font-variation-settings: 'SOFT' 50; }
@media (max-width: 640px) { .about { grid-template-columns: 1fr; } .about img { max-width: 120px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; margin-top: 2rem; color: var(--mauve); font-size: .92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.site-footer img { width: 220px; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------- Bag drawer ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer {
  position: fixed; z-index: 41; top: 0; right: 0; height: 100%; width: min(420px, 100%);
  background: var(--paper); display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), visibility 0s .3s;
}
body.bag-open .scrim { opacity: 1; pointer-events: auto; }
body.bag-open .drawer { transform: none; visibility: visible; transition-delay: 0s; box-shadow: -20px 0 60px var(--shadow); }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-size: 1.6rem; }
.icon-btn { background: none; border: 0; cursor: pointer; padding: .4rem; border-radius: 999px; line-height: 0; }
.icon-btn:hover { background: var(--cream); }
.drawer .items { flex: 1; overflow-y: auto; padding: .5rem 1.5rem; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.line img { width: 64px; height: 80px; object-fit: cover; border-radius: 999px 999px 8px 8px; }
.line a { text-decoration: none; font-weight: 600; line-height: 1.3; display: block; }
.line .muted { color: var(--mauve); font-size: .9rem; }
.line .remove { background: none; border: 0; color: var(--mauve); text-decoration: underline; cursor: pointer; font-size: .85rem; padding: 0; margin-top: .25rem; }
.line.gone { opacity: .55; }
.drawer footer { padding: 1.25rem 1.5rem 1.5rem; border-top: 1px solid var(--line); }
.subtotal { display: flex; justify-content: space-between; font-weight: 600; font-size: 1.1rem; }
.drawer .note { color: var(--mauve); font-size: .88rem; margin: .35rem 0 1rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--mauve); }
.empty img { width: 70px; margin: 0 auto 1rem; opacity: .85; }
.alert { background: var(--alert); border-radius: 10px; padding: .75rem 1rem; font-size: .9rem; margin: 1rem 0 0; }

/* Toast */
.toast {
  position: fixed; z-index: 50; left: 50%; bottom: 1.5rem; translate: -50% 1rem; opacity: 0;
  background: var(--ink); color: var(--paper); padding: .75rem 1.25rem; border-radius: 999px; font-size: .92rem;
  transition: opacity .2s, translate .2s; pointer-events: none;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* Skeletons */
.skel { background: linear-gradient(90deg, var(--cream), var(--paper), var(--cream)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Simple centered pages */
.center-page { text-align: center; padding: clamp(3rem, 10vw, 7rem) 0; }
.center-page img { width: 110px; margin: 0 auto 1.5rem; }
.center-page h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 400; }
.center-page p { color: var(--mauve); max-width: 46ch; margin: 1rem auto 2rem; font-size: 1.08rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ---------- Watercolor washes ---------- */
body { position: relative; overflow-x: hidden; transition: background-color .3s, color .3s; }
body::before { /* paper grain */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: calc(var(--wash-opacity) * .5);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .4 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .site-footer, .announce { position: relative; z-index: 1; }
.wash { position: absolute; pointer-events: none; z-index: -1; background-repeat: no-repeat; background-size: contain; opacity: var(--wash-opacity); }
.hero { position: relative; isolation: isolate; }
.hero .wash-1 { width: min(720px, 80vw); aspect-ratio: 5 / 4; right: -6%; top: -8%; background-image: var(--wash-a); }
.hero .wash-2 { width: min(520px, 70vw); aspect-ratio: 5 / 4; right: 22%; top: 38%; background-image: var(--wash-b); }
.hero .wash-3 { width: min(460px, 60vw); aspect-ratio: 5 / 4; left: -12%; top: -20%; background-image: var(--wash-c); opacity: calc(var(--wash-opacity) * .6); }
.section { position: relative; isolation: isolate; }
#about .wash-4 { width: min(560px, 80vw); aspect-ratio: 5 / 4; left: -8%; top: -10%; background-image: var(--wash-d); }
.page-head { position: relative; isolation: isolate; }
.page-head .wash-1 { width: min(560px, 80vw); aspect-ratio: 5 / 4; right: -4%; top: -30%; background-image: var(--wash-c); }
.page-head .wash-2 { width: min(380px, 60vw); aspect-ratio: 5 / 4; right: 30%; top: -10%; background-image: var(--wash-a); opacity: calc(var(--wash-opacity) * .7); }
.drawer { background: var(--paper); }
.quick-add, .bag-btn { background: color-mix(in srgb, var(--card) 70%, transparent); }
.thumbs button, .arch { background: var(--cream); }
.tag { background: var(--card); color: var(--ink); }
.tag.hold { background: var(--lilac); color: #2F2A44; }
.quick-add.in { color: #2F2A44; }
.bag-count { color: #2F2A44; }
.hero-caption { background: color-mix(in srgb, var(--paper) 88%, transparent); color: var(--ink); }
.site-header { background: color-mix(in srgb, var(--paper) 88%, transparent); }

/* Theme toggle */
.mode-btn { background: none; border: 1px solid var(--line); border-radius: 999px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.mode-btn:hover { border-color: var(--gold-soft); }
.mode-btn svg { width: 18px; height: 18px; }
.mode-btn .sun { display: none; }
[data-theme="midnight"] .mode-btn .sun { display: block; }
[data-theme="midnight"] .mode-btn .moon { display: none; }

/* Footer wordmark (text version for the new logos) */
.foot-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.foot-brand img { width: 40px; height: 40px; }
.foot-brand span { font-family: var(--display); font-variation-settings: 'SOFT' 100; font-size: 1.35rem; color: var(--gold); }
[data-theme="midnight"] .hero-mark { filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .6)); }

/* ---------- Welcome animation (first visit) ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--paper); transition: opacity .7s ease, visibility 0s .7s;
}
.intro.out { opacity: 0; visibility: hidden; }
.intro .wash { opacity: calc(var(--wash-opacity) * .9); z-index: 0; }
.intro .wash-1 { width: min(620px, 90vw); aspect-ratio: 5 / 4; left: 50%; top: 50%; translate: -70% -65%; background-image: var(--wash-a); animation: sg-bloom 3.5s ease-out both; }
.intro .wash-2 { width: min(520px, 80vw); aspect-ratio: 5 / 4; left: 50%; top: 50%; translate: -25% -30%; background-image: var(--wash-b); animation: sg-bloom 3.5s .2s ease-out both; }
.intro-inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: .5rem; transition: transform .7s ease; }
.intro.out .intro-inner { transform: scale(.94) translateY(-10px); }
.intro svg { width: min(300px, 70vw); height: auto; overflow: visible; }
.intro .thread { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; animation: sg-draw .9s .1s ease-in-out forwards; opacity: .8; }
.intro .bead { transform-box: fill-box; transform-origin: center; animation: sg-bead .5s cubic-bezier(.34, 1.56, .64, 1) both; }
.intro .clasp { opacity: 0; animation: sg-fade .4s 1.55s ease forwards; }
.intro .pendant { transform-box: view-box; transform-origin: 120px 196px; opacity: 0; animation: sg-fade .3s 1.65s ease forwards, sg-swing 1.8s 1.65s ease-out both; }
.intro .mono { opacity: 0; animation: sg-rise .6s ease forwards; }
.intro .m1 { animation-delay: 1.85s; } .intro .m2 { animation-delay: 2s; } .intro .m3 { animation-delay: 2.15s; }
.intro .glint { opacity: 0; transform-box: fill-box; transform-origin: center; animation: sg-twinkle 1s ease both; }
.intro .name { font-family: var(--display); font-variation-settings: 'SOFT' 100; font-size: clamp(1.7rem, 5vw, 2.3rem); color: var(--ink); opacity: 0; animation: sg-rise .7s 2.35s ease forwards; }
.intro .name i { color: var(--gold); }
.intro .tag-line { color: var(--mauve); font-size: .95rem; letter-spacing: .06em; opacity: 0; animation: sg-rise .7s 2.5s ease forwards; }
.intro-skip { position: absolute; z-index: 2; right: 1.25rem; bottom: 1.25rem; background: none; border: 1px solid var(--line); color: var(--mauve); border-radius: 999px; padding: .45rem 1rem; cursor: pointer; font-size: .85rem; }
.intro-skip:hover { color: var(--ink); border-color: var(--gold-soft); }
@keyframes sg-draw { to { stroke-dashoffset: 0; } }
@keyframes sg-bead { from { transform: scale(0) translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sg-fade { to { opacity: 1; } }
@keyframes sg-swing { 0% { transform: rotate(22deg); } 30% { transform: rotate(-12deg); } 55% { transform: rotate(6deg); } 78% { transform: rotate(-2.5deg); } 100% { transform: rotate(0); } }
@keyframes sg-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sg-twinkle { 0% { opacity: 0; transform: scale(.2) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } 100% { opacity: 0; transform: scale(.3) rotate(90deg); } }
@keyframes sg-bloom { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); } }

/* ---------- Site motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* hero entrance (plays once per page load) */
  .hero-kicker, .hero h1, .hero .lede, .hero-actions, .hero-window { animation: sg-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero h1 { animation-delay: .08s; } .hero .lede { animation-delay: .18s; } .hero-actions { animation-delay: .28s; } .hero-window { animation-delay: .15s; }
  body.intro-on .hero-kicker, body.intro-on .hero h1, body.intro-on .hero .lede, body.intro-on .hero-actions, body.intro-on .hero-window { animation-play-state: paused; }
  /* floating mark on the hero window */
  .hero-mark { animation: sg-float 6s ease-in-out infinite; }
  @keyframes sg-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(3deg); } }
  /* watercolor washes breathe very slowly */
  .wash { animation: sg-breathe 18s ease-in-out infinite alternate; }
  .hero .wash-2, #about .wash-4 { animation-duration: 23s; }
  @keyframes sg-breathe { from { transform: scale(1) rotate(0); } to { transform: scale(1.06) rotate(1.5deg); } }
  /* reveal on scroll */
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
  .reveal.in { opacity: 1; transform: none; }
  /* iridescent rim shimmers on hover */
  .arch::after { background-size: 250% 250%; transition: background-position 1.2s ease; }
  .jar:hover .arch::after, .card:hover .arch::after { background-position: 100% 100%; }
  .card .arch img { transition: transform .6s ease; }
  .card:hover .arch img { transform: scale(1.035); }
  /* bag count pops when something is added */
  .bag-count.pop { animation: sg-pop .5s cubic-bezier(.34, 1.56, .64, 1); }
  @keyframes sg-pop { 40% { transform: scale(1.45); } }
  /* bag items slide in */
  body.bag-open .line { animation: sg-slide .4s cubic-bezier(.2, .7, .2, 1) both; }
  body.bag-open .line:nth-child(2) { animation-delay: .05s; } body.bag-open .line:nth-child(3) { animation-delay: .1s; } body.bag-open .line:nth-child(n+4) { animation-delay: .15s; }
  @keyframes sg-slide { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
  .quick-add.in { animation: sg-pop .45s ease; }
}
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }
