/* The storefront: an edgy boutique.
 *
 * Black, white and lavender. A high-contrast serif for the big words, echoing
 * the logo's lettering; Inter for everything you read or tap. Details lifted
 * from the logo - barbed wire between sections, its four-point sparkle - and
 * a violet glow where things can be touched. See
 * docs/superpowers/specs/2026-10-13-storefront-redesign-design.md.
 *
 * Every colour, the corner radius and the spacing scale come from custom
 * properties, because the admin panel's Look tab sets exactly these
 * (lib/theme.mjs). The values below are the Nightshade preset, so the page is
 * right before the theme arrives as well as after.
 *
 * Named styles.css, not anything else, because the backend's own 404 page
 * (api/p.mjs) links /styles.css. Under any other name it arrives unstyled.
 */

/* ============================================================== tokens */

:root {
  --paper: #000000;
  --ink: #f4f0f7;
  --ink-soft: #b6aac0;
  --aurora: #caa7d9;
  --periwinkle: #8b5cf6;
  --lilac: #e3cdec;
  --blossom: #e09ac8;
  --peach: #f0b8c8;
  --mint: #9fd8cf;
  --line: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.08);
  --paper-raised: rgba(255, 255, 255, 0.06);
  --ink-faint: rgba(255, 255, 255, 0.45);
  --radius: 20px;
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.75rem;
  --s4: 3rem;
  --s5: 5.5rem;
  --s6: 9rem;

  /* Fixed by the design rather than the Look tab. */
  --card-radius: min(var(--radius), 18px);
  --page-width: 80rem;
  --gutter: 1.25rem;
  --header-h: 4.5rem;
  --serif: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glow: 0 0 0 1px color-mix(in srgb, var(--periwinkle) 55%, transparent),
    0 12px 48px -12px color-mix(in srgb, var(--periwinkle) 70%, transparent);

  /* The logo's four-point sparkle and a strand of barbed wire, as masks so
   * they take whatever colour the theme gives them. */
  --sparkle-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c.9 6.6 4.4 10.4 12 12-7.6 1.6-11.1 5.4-12 12-.9-6.6-4.4-10.4-12-12C7.6 10.4 11.1 6.6 12 0Z'/%3E%3C/svg%3E");
  --wire-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='28' viewBox='0 0 160 28'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M0 14c20-6 40-6 60 0s40 6 60 0 30-5 40-2'/%3E%3Cpath d='M0 14c20 6 40 6 60 0s40-6 60 0 30 5 40 2'/%3E%3Cpath d='M72 6l16 16M88 6 72 22'/%3E%3Cpath d='M76 11.5c2.5-1.2 5.5-1.2 8 0M76 16.5c2.5 1.2 5.5 1.2 8 0'/%3E%3C/g%3E%3C/svg%3E");
  --grain: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (min-width: 750px) {
  :root { --gutter: 2.5rem; --header-h: 5.5rem; }
}

/* ================================================================ base */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.is-locked { overflow: hidden; }

/* The page stays put on a phone. Three things used to move it:
 *
 * - the rubber-band bounce and pull-to-refresh when scrolling back up past
 *   the top, which dragged the whole page, fixed header and all;
 * - anything a hair wider than the screen, which lets the page be nudged
 *   sideways. clip rather than hidden: hidden makes the root a scroll
 *   container and the sticky header stops sticking;
 * - see the form-control rule below for the third. */
html,
body {
  overscroll-behavior: none;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Film grain over the black, so it reads as rich rather than flat. Above
 * everything, ignoring clicks, and faint enough never to touch legibility. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.05;
  mix-blend-mode: overlay;
}

.main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.25em; }
button, input, select { font: inherit; color: inherit; }

/* An iPhone zooms the whole page in when you tap a box whose text is smaller
 * than 16px - the sort menu, the search, a quantity - and leaves it zoomed, so
 * the page seems to lurch. Sixteen pixels on phones, whatever the design says
 * elsewhere. */
@media (max-width: 749px) {
  input,
  select,
  textarea { font-size: 16px !important; }
}
::selection { background: var(--aurora); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--aurora);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { margin: 0 0 var(--s2); line-height: 1.15; font-weight: 600; }

.page-width {
  width: 100%;
  max-width: calc(var(--page-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.page-width--narrow { max-width: calc(46rem + var(--gutter) * 2); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  margin: -1px;
}

.skip-link {
  position: absolute;
  left: var(--s2);
  top: -5rem;
  z-index: 60;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--aurora);
  color: var(--paper);
  font-weight: 600;
}
.skip-link:focus { top: var(--s1); }

/* =========================================================== type roles */

/* The big words: the logo's high-contrast serif, set large and tight. */
.display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.display em { font-style: italic; color: var(--aurora); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 var(--s2);
  color: var(--aurora);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.eyebrow::before,
.eyebrow::after {
  content: '';
  width: 0.7em;
  height: 0.7em;
  background: currentColor;
  -webkit-mask: var(--sparkle-shape) center / contain no-repeat;
  mask: var(--sparkle-shape) center / contain no-repeat;
}

.label {
  margin: 0 0 var(--s2);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.sparkle {
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  vertical-align: -0.05em;
  background: var(--aurora);
  -webkit-mask: var(--sparkle-shape) center / contain no-repeat;
  mask: var(--sparkle-shape) center / contain no-repeat;
}
.sparkle--big { width: 2.5rem; height: 2.5rem; margin-bottom: var(--s2); filter: drop-shadow(0 0 18px var(--periwinkle)); }

/* A strand of the logo's barbed wire between sections. */
.wire {
  height: 28px;
  background: var(--ink-soft);
  opacity: 0.35;
  -webkit-mask: var(--wire-shape) left center / 160px 28px repeat-x;
  mask: var(--wire-shape) left center / 160px 28px repeat-x;
}

/* ============================================================= buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.1rem;
  padding: 0 1.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s;
}
.btn:hover { border-color: var(--aurora); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; box-shadow: none; transform: none; }

/* Lavender with black words, glowing violet: the one thing to press. */
.btn--glow {
  border-color: var(--aurora);
  background: var(--aurora);
  color: var(--paper);
  box-shadow: var(--glow);
}
.btn--glow:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--periwinkle), 0 18px 60px -10px var(--periwinkle); }

.btn--ghost:hover { background: var(--paper-raised); }
.btn--large { min-height: 3.6rem; padding: 0 2.6rem; font-size: 0.9rem; }
.btn--block { width: 100%; }
.btn--grow { flex: 1; }

.link {
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-decoration: underline;
  text-decoration-color: var(--line);
  transition: color 0.2s;
}
.link:hover { color: var(--aurora); }

.icon { width: 1.35rem; height: 1.35rem; flex: none; }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--paper-raised); color: var(--aurora); }
.icon-btn--small { width: 2.25rem; height: 2.25rem; }
.icon-btn--small .icon { width: 1.1rem; height: 1.1rem; }

.cart-count {
  position: absolute;
  top: 0.2rem;
  right: 0.1rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--aurora);
  color: var(--paper);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  box-shadow: 0 0 12px var(--periwinkle);
}

/* ============================================================== header */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}

.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
}

.header__nav { display: flex; gap: var(--s3); }
.header__nav a,
.landing-bar__nav a {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.header__nav a:hover,
.landing-bar__nav a:hover { color: var(--ink); }

.header__logo img {
  height: calc(var(--header-h) - 1.1rem);
  width: auto;
  transition: transform 0.4s var(--ease), filter 0.4s;
}
.header__logo:hover img { transform: rotate(-4deg) scale(1.04); filter: drop-shadow(0 0 14px color-mix(in srgb, var(--periwinkle) 70%, transparent)); }

.header__actions { display: flex; justify-content: flex-end; gap: 0.25rem; }

@media (max-width: 600px) {
  .header__about { display: none; }
}

/* ============================================================= landing */

.landing-bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s2) var(--gutter);
}
.landing-bar__nav { display: flex; gap: var(--s3); }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6rem var(--gutter) 5rem;
  text-align: center;
}

/* Product photographs drifting slowly in the dark behind the words. */
.hero__collage { position: absolute; inset: 0; z-index: -2; opacity: 0; transition: opacity 1.6s var(--ease); }
.hero__collage.is-ready { opacity: 1; }

.collage__tile {
  position: absolute;
  width: clamp(7rem, 17vw, 15rem);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--card-radius);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9);
  opacity: 0.55;
  animation: drift 26s ease-in-out infinite alternate;
}
.collage__tile img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); }

.collage__tile--1 { top: 6%;  left: 3%;  rotate: -9deg; animation-duration: 24s; }
.collage__tile--2 { top: 10%; right: 4%; rotate: 8deg;  animation-duration: 29s; animation-delay: -6s; }
.collage__tile--3 { bottom: 8%; left: 8%; rotate: 6deg;  animation-duration: 31s; animation-delay: -12s; }
.collage__tile--4 { bottom: 5%; right: 9%; rotate: -7deg; animation-duration: 27s; animation-delay: -3s; }
.collage__tile--5 { top: 40%; left: -3%; rotate: 4deg;  width: clamp(5rem, 12vw, 10rem); animation-delay: -9s; }
.collage__tile--6 { top: 38%; right: -2%; rotate: -5deg; width: clamp(5rem, 12vw, 10rem); animation-delay: -15s; }
.collage__tile--7 { top: -4%; left: 34%; rotate: 3deg;  width: clamp(5rem, 11vw, 9rem); opacity: 0.35; animation-delay: -18s; }
.collage__tile--8 { bottom: -6%; left: 44%; rotate: -4deg; width: clamp(5rem, 11vw, 9rem); opacity: 0.35; animation-delay: -21s; }

@keyframes drift {
  from { translate: 0 0; }
  to   { translate: 1.5rem -2rem; }
}

@media (max-width: 749px) {
  .collage__tile--5, .collage__tile--6, .collage__tile--7, .collage__tile--8 { display: none; }
  .collage__tile { opacity: 0.4; }
}

/* A violet bloom behind the words, darkening toward the edges so the
 * photographs frame the text rather than fight it. */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 50% 45%, color-mix(in srgb, var(--periwinkle) 28%, transparent), transparent 70%),
    radial-gradient(ellipse 75% 70% at 50% 50%, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.35) 70%, rgba(0, 0, 0, 0.75));
}

.hero__inner { max-width: 52rem; display: grid; justify-items: center; }

.hero__logo {
  width: min(62vw, 20rem);
  margin-bottom: var(--s3);
  filter: drop-shadow(0 0 28px color-mix(in srgb, var(--periwinkle) 55%, transparent));
  animation: heartbeat 5s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.025) rotate(-1.5deg); }
}

.hero__title {
  margin: 0 0 var(--s2);
  font-family: var(--serif);
  font-size: clamp(3rem, 10vw, 7.5rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.hero__title span { display: block; }
.hero__title em {
  display: block;
  font-style: italic;
  color: var(--aurora);
  text-shadow: 0 0 40px color-mix(in srgb, var(--periwinkle) 75%, transparent);
}

.hero__lede {
  max-width: 34rem;
  margin: 0 0 var(--s3);
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
}

.hero__scroll {
  position: absolute;
  bottom: var(--s3);
  left: 50%;
  translate: -50% 0;
  width: 1.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.hero__scroll span {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  width: 3px;
  height: 0.5rem;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--aurora);
  animation: scroll-cue 2s var(--ease) infinite;
}
@keyframes scroll-cue {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(0.9rem); opacity: 0; }
}

/* "Follow the chaos" */
.follow { padding-bottom: var(--s5); }
.follow__inner { padding-top: var(--s5); text-align: center; }
.follow__title { margin: 0 0 var(--s4); font-size: clamp(2.6rem, 7vw, 5rem); }

.follow__buttons {
  display: grid;
  gap: var(--s2);
  max-width: 44rem;
  margin: 0 auto var(--s4);
}
@media (min-width: 640px) { .follow__buttons { grid-template-columns: 1fr 1fr; } }

.social-btn {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 1.15rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--paper-raised);
  text-align: left;
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.social-btn .icon { width: 2rem; height: 2rem; color: var(--aurora); }
.social-btn span { display: grid; font-weight: 600; }
.social-btn small { color: var(--ink-soft); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.social-btn:hover { border-color: var(--aurora); box-shadow: var(--glow); transform: translateY(-2px); }

.follow__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0 0 var(--s4);
  padding: 0;
  list-style: none;
}
@media (min-width: 750px) { .follow__grid { grid-template-columns: repeat(6, 1fr); gap: 0.75rem; } }

.follow__tile {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: calc(var(--card-radius) * 0.7);
  background: var(--paper-raised);
}
.follow__tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), filter 0.4s; filter: grayscale(0.25); }
.follow__tile:hover img { transform: scale(1.07); filter: none; }

/* ======================================================= page headings */

.page-head { padding: var(--s4) 0 var(--s3); }
.page-head__title { margin: 0; font-size: clamp(2.6rem, 7vw, 4.8rem); }
.page-head--row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2); }

/* ================================================================ shop */

.shop { padding-bottom: var(--s5); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 0 calc(var(--gutter) * -1) var(--s2);
  padding: 0.25rem var(--gutter);
  scrollbar-width: none;
}
.chips--scroll::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  min-height: 2.5rem;
  padding: 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.25s;
}
.chip:hover { color: var(--ink); border-color: var(--ink-soft); }
.chip[aria-pressed='true'] { border-color: var(--aurora); background: var(--aurora); color: var(--paper); box-shadow: var(--glow); }
.chip[disabled] { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; }

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem var(--s2);
  margin-bottom: var(--s3);
}
.toolbar .search { grid-column: 1 / -1; }
.toolbar__count { margin: 0; color: var(--ink-soft); font-size: 0.86rem; }
@media (min-width: 750px) {
  .toolbar { grid-template-columns: minmax(0, 24rem) 1fr auto; }
  .toolbar .search { grid-column: auto; }
  .toolbar__count { text-align: right; }
}

.search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1.1rem;
  min-height: 2.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink-soft);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within { border-color: var(--aurora); box-shadow: var(--glow); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); }
.search input::placeholder { color: var(--ink-soft); }

.select select {
  appearance: none;
  min-height: 2.9rem;
  padding: 0 2.6rem 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%) calc(100% - 1.35rem) 52% / 0.35rem 0.35rem no-repeat,
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%) calc(100% - 1rem) 52% / 0.35rem 0.35rem no-repeat,
    var(--paper);
  font-size: 0.86rem;
  cursor: pointer;
}
.select select:focus { border-color: var(--aurora); outline: none; box-shadow: var(--glow); }

/* ================================================================ grid */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3) 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 750px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4) 1.25rem; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.grid__item { min-width: 0; }

.card { display: block; text-decoration: none; }

.card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: var(--paper-raised);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.card:hover .card__media { box-shadow: var(--glow); transform: translateY(-4px); }

.card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s var(--ease), transform 0.8s var(--ease);
}
.card__img--alt { opacity: 0; }
.card--flip:hover .card__img--alt { opacity: 1; }
.card:hover .card__img { transform: scale(1.04); }

.card__info { padding: 0.9rem 0.15rem 0; }
.card__name {
  display: -webkit-box;
  margin: 0 0 0.3rem;
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card__price { margin: 0; color: var(--aurora); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em; }

.tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.tag--inline { position: static; margin-left: 0.5rem; vertical-align: middle; background: var(--paper-raised); }

/* ============================================================= product */

/* Two columns from tablet up: photographs left, the piece and its buy button
 * right, held in view while the photographs scroll. */
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s3);
  padding: var(--s3) 0 var(--s4);
}
.detail > * { min-width: 0; }
@media (min-width: 900px) {
  .detail { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s5); padding-top: var(--s4); }
  .buy { position: sticky; top: calc(var(--header-h) + var(--s3)); align-self: start; }
}

.gallery__main {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--card-radius);
  background: var(--paper-raised);
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; animation: fade-in 0.45s var(--ease); }
@keyframes fade-in { from { opacity: 0.4; } to { opacity: 1; } }

.gallery__arrow {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s, background 0.2s;
}
.gallery__arrow--prev { left: 0.75rem; }
.gallery__arrow--next { right: 0.75rem; }
.gallery__main:hover .gallery__arrow,
.gallery__arrow:focus-visible { opacity: 1; }
.gallery__arrow:hover { background: var(--aurora); color: var(--paper); }
@media (hover: none) { .gallery__arrow { display: none; } }

.gallery__count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.gallery__thumbs {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0 0 0.25rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.gallery__thumbs button {
  display: block;
  width: 4.5rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-raised);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s;
}
.gallery__thumbs button:hover { opacity: 1; }
.gallery__thumbs button[aria-pressed='true'] { border-color: var(--aurora); opacity: 1; }
.gallery__thumbs img { aspect-ratio: 1; object-fit: cover; width: 100%; }

.buy__title { margin: 0 0 var(--s2); font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.buy__price { margin: 0 0 var(--s2); color: var(--aurora); font-size: 1.35rem; font-weight: 600; }

.perks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 0 0 var(--s3);
  padding: 0 0 var(--s3);
  border-bottom: 1px solid var(--line-soft);
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.86rem;
}
.perks li { display: inline-flex; align-items: center; gap: 0.45rem; }
.perks li::before {
  content: '';
  width: 0.65em;
  height: 0.65em;
  background: var(--aurora);
  -webkit-mask: var(--sparkle-shape) center / contain no-repeat;
  mask: var(--sparkle-shape) center / contain no-repeat;
}

.option { margin: 0 0 var(--s3); padding: 0; border: 0; min-width: 0; }
.option__label {
  display: block;
  margin-bottom: 0.75rem;
  padding: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.option__label span { color: var(--ink); letter-spacing: 0.04em; text-transform: none; font-size: 0.86rem; }

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr));
  gap: 0.6rem;
}
.swatch-btn {
  display: grid;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  cursor: pointer;
}
.swatch-btn img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s var(--ease);
}
.swatch-btn span {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.swatch-btn:hover img { border-color: var(--ink-soft); transform: translateY(-2px); }
.swatch-btn[aria-pressed='true'] img { border-color: var(--aurora); box-shadow: var(--glow); }
.swatch-btn[aria-pressed='true'] span { color: var(--ink); }
.swatch-btn[disabled] { cursor: not-allowed; }
.swatch-btn[disabled] img { opacity: 0.3; filter: grayscale(1); }
.swatch-btn[disabled] span { text-decoration: line-through; }

.option--colour { display: block; }
.option--colour input {
  width: 4rem;
  height: 2.75rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
}

.buy__row { display: flex; gap: 0.75rem; margin-bottom: var(--s1); }

.stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.stepper button {
  width: 2.4rem;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.stepper button:hover:not([disabled]) { background: var(--paper-raised); color: var(--aurora); }
.stepper button[disabled] { opacity: 0.3; cursor: not-allowed; }
.stepper input {
  width: 2.4rem;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
}
.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper--large { min-height: 3.1rem; }
.stepper--large button { width: 2.9rem; }

.buy__note { margin: 0 0 var(--s1); color: var(--blossom); font-size: 0.85rem; }
.form-error { margin: var(--s1) 0; color: var(--blossom); font-size: 0.9rem; }

.buy__desc { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line-soft); color: var(--ink-soft); }
.prose-text p { margin: 0 0 var(--s2); }

.related { padding-bottom: var(--s5); }
.related__title { margin: var(--s4) 0 var(--s3); font-size: clamp(2.2rem, 5vw, 3.4rem); }

/* The server's own version of a piece (lib/page-meta.mjs, productBody), shown
 * to crawlers and until the script redraws it. Styled so the moment before
 * the redraw looks like the page rather than bare text. */
.detail__media img { width: 100%; border-radius: var(--card-radius); }
.detail .label { color: var(--aurora); letter-spacing: 0.24em; }
.detail h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 4.6vw, 3.6rem); letter-spacing: -0.02em; }
.detail__price { color: var(--aurora); font-size: 1.35rem; font-weight: 600; }
.detail__desc { color: var(--ink-soft); }

/* =============================================================== cart */

.lines { margin: 0; padding: 0; list-style: none; }

.line {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--s2);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--line-soft);
}
.line__media { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 12px; background: var(--paper-raised); }
.line__media img { width: 100%; height: 100%; object-fit: cover; }
.line__name { display: block; margin-bottom: 0.2rem; font-weight: 500; line-height: 1.35; text-decoration: none; }
.line__name:hover { color: var(--aurora); }
.line__option { margin: 0; color: var(--ink-soft); font-size: 0.82rem; line-height: 1.5; }
.line__price { margin: 0.35rem 0 0.6rem; color: var(--aurora); font-size: 0.9rem; font-weight: 600; }
.line__controls { display: flex; align-items: center; gap: 0.5rem; }
.line .stepper { min-height: 2.3rem; }

.swatch {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  vertical-align: -0.12rem;
}

.totals { padding-top: var(--s3); }
.totals__row { display: flex; justify-content: space-between; gap: var(--s2); margin: 0 0 0.45rem; }
.totals__row--soft { color: var(--ink-soft); font-size: 0.9rem; }
.totals__row--total { margin: var(--s1) 0 var(--s3); padding-top: var(--s2); border-top: 1px solid var(--line-soft); font-family: var(--serif); font-size: 1.6rem; }
.totals__note { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: var(--s2) 0 0; color: var(--ink-soft); font-size: 0.8rem; }

.notice {
  margin: 0 0 var(--s2);
  padding: 0.85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--blossom) 45%, transparent);
  border-radius: 12px;
  color: var(--ink);
  font-size: 0.88rem;
}

.cart-page { padding-bottom: var(--s5); }
.cart-page .totals { max-width: 26rem; margin-left: auto; }

/* The drawer: slides in over any page, so buying one thing does not end the
 * browsing. */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.32s var(--ease);
}
.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(27rem, 100vw);
  height: 100%;
  border-left: 1px solid var(--line);
  background: #0a080e;
  box-shadow: -30px 0 80px -30px color-mix(in srgb, var(--periwinkle) 45%, transparent);
  transform: translateX(100%);
  transition: transform 0.38s var(--ease);
  outline: none;
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s2) var(--s2) var(--s2) var(--s3);
  border-bottom: 1px solid var(--line-soft);
}
.drawer__title { margin: 0; font-size: 2rem; }
.drawer__body { flex: 1; overflow-y: auto; padding: 0 var(--s3) var(--s3); overscroll-behavior: contain; }

/* ======================================================= words pages */

.prose { padding-bottom: var(--s5); }
.prose h2 { margin: var(--s4) 0 var(--s2); font-family: var(--serif); font-weight: 500; font-size: 1.8rem; letter-spacing: -0.01em; }
.prose p { color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--aurora); }

.pull-quote {
  margin: 0 0 var(--s3);
  padding-left: var(--s3);
  border-left: 2px solid var(--aurora);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-style: italic;
  line-height: 1.3;
}
.signature { color: var(--aurora) !important; font-family: var(--serif); font-style: italic; font-size: 1.2rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 var(--s4); padding: 0; list-style: none; }
.tags li { padding: 0.3rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font-size: 0.85rem; }
.h3 { font-size: 1.1rem; }

.thanks { padding: var(--s5) var(--gutter); text-align: center; }
.thanks p { color: var(--ink-soft); }

/* ============================================================== states */

.loading,
.empty {
  padding: var(--s5) 0;
  color: var(--ink-soft);
  text-align: center;
}
.empty p:first-child { color: var(--ink); font-family: var(--serif); font-size: 1.6rem; }
.loading { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.4; } }

/* ============================================================== footer */

.footer { margin-top: auto; padding-bottom: var(--s3); }
.footer__inner {
  display: grid;
  gap: var(--s4);
  padding-top: var(--s4);
  padding-bottom: var(--s4);
}
@media (min-width: 750px) {
  .footer__inner { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
}

.footer__logo { width: 7.5rem; margin-bottom: var(--s2); }
.footer__story { max-width: 34rem; color: var(--ink-soft); font-size: 0.9rem; }
.footer__story p { margin: 0 0 var(--s1); }

.footer__col ul { margin: 0; padding: 0; list-style: none; }
.footer__col li { margin-bottom: 0.5rem; }
.footer__col a { color: var(--ink-soft); font-size: 0.92rem; text-decoration: none; transition: color 0.2s; }
.footer__col a:hover { color: var(--aurora); }
.footer__email { word-break: break-all; }

.social-icons { display: flex; gap: 0.25rem; margin: var(--s2) 0 0 -0.6rem !important; }
.social-icons a {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}
.social-icons a:hover { background: var(--paper-raised); }

.footer__legal { margin: 0; color: var(--ink-faint); font-size: 0.75rem; letter-spacing: 0.06em; }
.footer__legal .sparkle { margin: 0 0.4rem; width: 0.6em; height: 0.6em; }

/* ===================================================== scroll reveal */

/* Only with a script present (js/theme-early.js sets the class), so content
 * is never hidden by something that cannot bring it back. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease) var(--delay, 0ms), transform 0.7s var(--ease) var(--delay, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ========================================================== heart zoom */

/* The page under a reveal starts hidden (js/theme-early.js), and
 * js/transition.js uncovers it. If that script never runs, this uncovers it
 * anyway after a second: a page that stays hidden is worse than no effect. */
.reveal-pending .main,
.reveal-pending .header,
.reveal-pending .footer {
  opacity: 0;
  animation: unhide 0s linear 1.2s forwards;
}
@keyframes unhide { to { opacity: 1; } }

.fade-out body { opacity: 0; transition: opacity 0.2s; }

.zoom {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background: var(--paper);
}
.zoom__heart { width: min(60vw, 22rem); will-change: transform, opacity; }
.zoom__glow {
  position: absolute;
  width: 40vmax;
  height: 40vmax;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--periwinkle) 65%, transparent), transparent 65%);
  will-change: transform, opacity;
}

/* First half, on the landing page: black falls, the heart turns and comes at
 * you. */
.zoom--out { animation: zoom-curtain 0.72s var(--ease) forwards; }
.zoom--out .zoom__heart { animation: heart-in 0.72s cubic-bezier(0.7, 0, 0.84, 0) forwards; }
.zoom--out .zoom__glow { animation: glow-in 0.72s var(--ease) forwards; }

@keyframes zoom-curtain { from { opacity: 0; } 25% { opacity: 1; } to { opacity: 1; } }
@keyframes heart-in {
  0% { transform: scale(0.85) rotate(0deg); opacity: 0; }
  25% { transform: scale(1) rotate(-6deg); opacity: 1; }
  100% { transform: scale(7) rotate(-12deg); opacity: 1; }
}
@keyframes glow-in { from { transform: scale(0.3); opacity: 0; } to { transform: scale(2.4); opacity: 1; } }

/* Second half, on the shop: the heart keeps coming, the black opens through
 * it, and the shop is there. */
.zoom--in { animation: zoom-open 0.76s var(--ease) forwards; }
.zoom--in .zoom__heart { animation: heart-through 0.76s var(--ease) forwards; }
.zoom--in .zoom__glow { animation: glow-out 0.76s var(--ease) forwards; }

@keyframes zoom-open {
  0% { opacity: 1; clip-path: circle(150% at 50% 50%); background: var(--paper); }
  100% { opacity: 0; clip-path: circle(150% at 50% 50%); background: transparent; }
}
@keyframes heart-through {
  from { transform: scale(7) rotate(-12deg); opacity: 1; }
  to { transform: scale(22) rotate(-16deg); opacity: 0; }
}
@keyframes glow-out { from { transform: scale(2.4); opacity: 1; } to { transform: scale(4); opacity: 0; } }

/* ==================================================== reduced motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ============================================ the backend's own pages */

/* api/p.mjs serves its own not-found page with these classes and this
 * stylesheet. Styled here so a dead product link still looks like the shop. */
.wrap {
  max-width: calc(var(--page-width) + var(--gutter) * 2);
  margin: 0 auto;
  padding: var(--s6) var(--gutter);
}
.not-found { text-align: center; }
.not-found h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.4rem, 6vw, 4rem); }
.not-found p { color: var(--ink-soft); }
.btn-primary {
  display: inline-flex;
  align-items: center;
  min-height: 3.1rem;
  margin-top: var(--s2);
  padding: 0 1.8rem;
  border-radius: 999px;
  background: var(--aurora);
  color: var(--paper);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--glow);
}
