/* Shop components — built on tokens.css + site.css primitives */

body.locked { overflow: hidden; }
main { min-height: 60vh; }

/* ----- Buttons ------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 28px;
  font-size: 12px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase;
  border-radius: 2px;
  transition: background 200ms var(--ease-out), color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.btn-solid { background: var(--fg-primary); color: var(--bg-page); }
.btn-solid:hover { background: var(--color-terracotta); color: #fff; }
.btn-line { border: 1px solid currentColor; }
.btn-line:hover { border-color: var(--color-terracotta); color: var(--color-terracotta); }
.btn-light { background: #fff; color: var(--color-near-black); }
.btn-light:hover { background: var(--color-terracotta); color: #fff; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn-block { width: 100%; }

.link-u {
  font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 500;
  border-bottom: 1px solid currentColor; padding-bottom: 3px;
  transition: color 200ms var(--ease-out);
}
.link-u:hover { color: var(--color-terracotta); }

.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-secondary); position: relative;
  transition: color 150ms var(--ease-out);
}
.icon-btn:hover { color: var(--fg-primary); }
.cart-count {
  position: absolute; top: 2px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--color-terracotta); color: #fff;
  font-family: var(--font-mono); font-size: 10px; line-height: 16px; text-align: center;
}

/* ----- Announcement bar --------------------------------------- */
.announce {
  background: var(--color-warm-sand); color: var(--fg-secondary);
  height: 36px; position: relative; font-size: 12px;
}
body[data-theme="dark"] .announce { background: #0a0a0a; border-bottom: 1px solid var(--color-border-cream); }
.announce-inner {
  max-width: 1520px; height: 100%; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 1fr minmax(0, 560px) 1fr; align-items: center; gap: 16px;
}
.announce-side { font-size: 11px; color: var(--fg-tertiary); letter-spacing: 0.02em; }
.announce-side.right { text-align: right; }
.announce-track { display: grid; grid-template-columns: 28px 1fr 28px; align-items: center; height: 100%; }
.announce-arrow { height: 28px; display: inline-flex; align-items: center; justify-content: center; color: var(--fg-tertiary); }
.announce-arrow:hover { color: var(--fg-primary); }
.announce-arrow svg { width: 14px; height: 14px; }
.announce-msgs { position: relative; height: 100%; overflow: hidden; }
.announce-msg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(8px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.announce-msg.on { opacity: 1; transform: none; }

/* ----- Header -------------------------------------------------- */
/* Solid by default; on the homepage it sits over the hero (negative margin) and turns
   transparent with the stacked nav until the page scrolls. */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-page);
  border-bottom: 1px solid var(--color-border-cream);
  transition: background 300ms var(--ease-out), border-color 300ms var(--ease-out);
}
.header.on-home { margin-bottom: -69px; }
/* At the very top: a faint tint (light or dark to match the theme) over the hero video. */
.header.over {
  background: rgba(var(--hero-scrim), 0.06);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border-bottom-color: transparent;
}
.header-inner {
  max-width: 1520px; margin: 0 auto; padding: 0 32px; height: 68px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.header .nav-mark { font-size: 24px; color: var(--fg-primary); transition: color 300ms var(--ease-out); }
.header-right { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.header-right .theme-toggle { margin-left: 8px; }
.menu-btn { margin-left: -8px; transition: margin 300ms var(--ease-out), opacity 300ms var(--ease-out), width 300ms var(--ease-out); }
.header .cart-count {
  position: absolute; top: 2px; right: -2px;
  background: var(--color-terracotta); color: #fff;
}

/* Ink over the hero video follows the theme: dark text on the light video, white on the dark one. */
body { --hero-ink: var(--color-near-black); --hero-paper: var(--color-parchment); --hero-scrim: 245, 244, 237; }
body[data-theme="dark"] { --hero-ink: #fff; --hero-paper: var(--color-near-black); --hero-scrim: 0, 0, 0; }

.header.over .nav-mark, .header.over .icon-btn { color: var(--hero-ink); }
.header.over .theme-toggle { color: var(--hero-ink); border-color: color-mix(in srgb, var(--hero-ink) 40%, transparent); }

/* Stacked nav over the hero (desktop) */
.hero-nav {
  position: absolute; top: 100%; left: max(32px, calc((100vw - 1520px) / 2 + 32px));
  display: flex; flex-direction: column; gap: 12px; padding-top: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), visibility 300ms;
}
.header.over .hero-nav { opacity: 1; visibility: visible; transform: none; }
.header.over .menu-btn { width: 0; margin-left: -14px; opacity: 0; pointer-events: none; overflow: hidden; }
.hero-nav a {
  color: var(--hero-ink); font-size: 12px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(var(--hero-scrim), 0.35); width: fit-content;
  border-bottom: 1px solid transparent; transition: border-color 150ms var(--ease-out);
}
.hero-nav a:hover { border-bottom-color: var(--color-terracotta); }


/* Mobile drawer */
.scrim {
  position: fixed; inset: 0; z-index: 80; background: rgba(10,10,10,0.45);
  opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease-out), visibility 300ms;
}
.scrim.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; bottom: 0; z-index: 90;
  width: min(440px, 100vw);
  background: var(--bg-page); color: var(--fg-primary);
  display: flex; flex-direction: column;
  transition: transform 420ms var(--ease-out);
}
.drawer-right { right: 0; transform: translateX(100%); border-left: 1px solid var(--color-border-warm); }
.drawer-left { left: 0; transform: translateX(-100%); border-right: 1px solid var(--color-border-warm); }
.drawer.open { transform: none; }
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--color-border-cream);
}
.drawer-head h5 { font-size: 22px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer-foot { padding: 20px 24px 28px; border-top: 1px solid var(--color-border-cream); }
.mobile-nav a {
  display: block; padding: 16px 0; border-bottom: 1px solid var(--color-border-cream);
  font-family: var(--font-serif); font-size: 26px;
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--color-terracotta); font-style: italic; }
/* Link back to the portfolio, under the nav links and in the footer */
.site-link {
  display: inline-block; font-size: 13px; color: var(--color-terracotta);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
  transition: opacity 150ms var(--ease-out);
}
.site-link:hover { opacity: 0.75; }
/* In the menu drawer it sits in the lower third, but never over the links on short screens. */
.drawer .site-link { position: absolute; left: 24px; top: max(66.7%, 360px); }
.footer .site-link { margin-top: 10px; }
.hero-nav .site-link { margin-top: 10px; text-transform: none; letter-spacing: 0.01em; font-size: 13px; border-bottom: none; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120;
  transform: translate(-50%, 20px); opacity: 0;
  background: var(--fg-primary); color: var(--bg-page);
  padding: 12px 20px; border-radius: 2px; font-size: 13px;
  transition: all 300ms var(--ease-out); pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ----- Boot screen (while the catalog loads) ----------------- */
.boot {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-serif); font-size: 22px; color: var(--fg-secondary);
}
.boot span { color: var(--color-terracotta); font-size: 17px; }

/* ----- Product imagery ---------------------------------------- */
.pimg {
  position: relative; overflow: hidden; background: var(--color-warm-sand);
  border-radius: 2px;
}
.pimg img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity 600ms var(--ease-out), transform 1200ms var(--ease-out);
}
.pimg .alt { opacity: 0; }
.ar-portrait { aspect-ratio: 4/5; }
.ar-square { aspect-ratio: 1/1; }
.ar-tall { aspect-ratio: 3/4; }

/* Placeholder jewelry imagery — replace with photography */
.ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--tone) 55%, transparent) 0 18%, transparent 19%),
    radial-gradient(circle at 50% 46%, transparent 0 24%, color-mix(in srgb, var(--tone) 30%, transparent) 24.5% 25.5%, transparent 26%),
    linear-gradient(160deg, var(--color-warm-sand), color-mix(in srgb, var(--tone) 22%, var(--color-warm-sand)));
  transition: transform 1200ms var(--ease-out);
}
.ph .mk {
  font-family: var(--font-serif); font-size: clamp(28px, 4vw, 48px);
  color: color-mix(in srgb, var(--tone) 70%, #000);
  opacity: 0.75; transform: translateY(-4%);
}
.ph .ph-tag {
  position: absolute; left: 12px; bottom: 10px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-tertiary);
}
.thumbs .ph-tag, .cart-line .ph-tag, .split-mini .ph-tag, .mega .ph-tag { display: none; }
.thumbs .ph .mk, .cart-line .ph .mk { font-size: 18px; }
.ph.alt-ph { filter: saturate(1.4) brightness(0.95); }

/* ----- Product card ------------------------------------------- */
.pcard { position: relative; display: block; }
.pcard .pimg { cursor: pointer; }
.pcard:hover .pimg .alt { opacity: 1; }
.pcard:hover .pimg img { transform: scale(1.03); }
.pcard:hover .ph { transform: scale(1.04); }
.pbadge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 500;
  background: var(--bg-page); color: var(--fg-primary); padding: 5px 9px; border-radius: 2px;
}
.pbadge.sold { background: var(--color-near-black); color: var(--color-ivory); }
.quick-add {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-page); color: var(--fg-primary);
  opacity: 0; transform: translateY(6px);
  transition: opacity 250ms var(--ease-out), transform 350ms var(--ease-out), background 200ms, color 200ms;
}
.quick-add svg { width: 17px; height: 17px; }
.pcard:hover .quick-add, .quick-add:focus-visible { opacity: 1; transform: none; }
.quick-add:hover { background: var(--fg-primary); color: var(--bg-page); }
.pcard-meta { margin-top: 12px; }
.pcard-meta .t { font-size: 13px; line-height: 1.4; color: var(--fg-primary); }
.pcard-meta .p { font-size: 13px; color: var(--fg-secondary); margin-top: 2px; }
.pcard-meta .p.sold { color: var(--fg-tertiary); text-decoration: line-through; }

/* ----- Section heads ------------------------------------------ */
.shead {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.shead h2 { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -0.01em; }
.shead .view-all {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--fg-secondary);
}
.shead .view-all svg { width: 14px; height: 14px; transform: rotate(-45deg); color: var(--color-terracotta); }
.shead .view-all:hover { color: var(--color-terracotta); }
.title-dot { color: var(--color-terracotta); font-style: italic; }
.tabs { display: flex; gap: 22px; flex-wrap: wrap; }
.tab {
  font-size: 13px; color: var(--fg-tertiary); padding-bottom: 4px; border-bottom: 1px solid transparent;
  transition: color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}
.tab:hover { color: var(--fg-primary); }
.tab.on { color: var(--fg-primary); border-bottom-color: var(--color-terracotta); }

.text-link {
  display: inline-block; font-size: 14px; border-bottom: 1px solid currentColor; padding-bottom: 2px;
  transition: color 150ms var(--ease-out);
}
.text-link:hover { color: var(--color-terracotta); }

/* ----- Hero (background video + headline) ---------------------- */
.hero-c {
  position: relative; height: calc(100vh - 36px); min-height: 560px; max-height: 1000px;
  overflow: hidden; background: var(--hero-paper); color: var(--hero-ink);
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 600ms var(--ease-out); }
.hero-video.on { opacity: 1; }
.hero-c::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--hero-scrim), 0.4) 0%, rgba(var(--hero-scrim), 0) 28%),
    linear-gradient(180deg, rgba(var(--hero-scrim), 0.45) 0%, rgba(var(--hero-scrim), 0) 24%, rgba(var(--hero-scrim), 0) 55%, rgba(var(--hero-scrim), 0.5) 100%);
}
.hero-content {
  position: absolute; left: 0; right: 0; bottom: 88px; z-index: 2;
  padding: 0 24px; color: var(--hero-ink); text-align: center;
  animation: riseIn 1400ms var(--ease-out) 300ms both;
}
.hero-kicker {
  font-size: 9px; font-weight: 500; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--hero-ink); opacity: 0.8; margin: 4px 0 22px;
}
.hero-content h1 {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(40px, 5vw, 76px); line-height: 1.05; letter-spacing: -0.025em;
  color: var(--hero-ink); margin: 0;
}
.hero-content h1 .title-dot { font-style: normal; }
/* One red underline that sits under Shop and moves to whichever link is hovered or focused. */
.hero-ctas { display: flex; justify-content: center; gap: 28px; }
.hero-cta {
  font-size: 14px; color: var(--hero-ink); padding-bottom: 2px;
  border-bottom: 1px solid transparent; transition: border-color 200ms var(--ease-out);
}
.hero-cta:first-child,
.hero-cta:hover, .hero-cta:focus-visible { border-bottom-color: var(--color-terracotta); }
.hero-ctas:has(.hero-cta:hover, .hero-cta:focus-visible) .hero-cta:not(:hover):not(:focus-visible) { border-bottom-color: transparent; }
@keyframes riseIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ----- Homepage sections -------------------------------------- */
.ctabs { padding-top: 64px; padding-bottom: 96px; scroll-margin-top: 20px; }
.ctabs-row { display: grid; grid-template-columns: 1.15fr repeat(3, 1fr); gap: 32px 14px; align-items: start; }
.ctabs-lead { display: block; grid-row: span 2; align-self: stretch; overflow: hidden; background: var(--color-warm-sand); }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 48px; }
.pager button {
  min-width: 38px; height: 38px; padding: 0 6px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--fg-secondary); transition: color 150ms var(--ease-out), background 150ms var(--ease-out);
}
.pager button:hover:not(:disabled) { color: var(--fg-primary); }
.pager .pager-num.on { background: var(--color-terracotta); color: #fff; }
.pager .pager-step svg { width: 16px; height: 16px; }
.pager button:disabled { opacity: 0.3; cursor: default; }
.ctabs-lead img { width: 100%; height: 100%; object-fit: cover; animation: fadeIn 600ms var(--ease-out) both; }
/* Subscription page shown inside the Collections tab */
.sub-embed { margin-top: 8px; }
.sub-embed .split { overflow: hidden; border-radius: 2px; background: var(--color-warm-sand); }
.sub-embed .split-img { min-height: 520px; }
.sub-embed .split-body { padding: 56px clamp(28px, 4vw, 72px); }
.sub-embed .section { padding: 72px 0; }
.sub-embed .container-wide, .sub-embed .container { padding: 0; }
.sub-embed .section-dark { padding: 64px clamp(24px, 4vw, 56px); border-radius: 2px; }

/* ----- Carousel rail ------------------------------------------ */
.rail-wrap { position: relative; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 24px) / 4);
  gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-bottom: 4px;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-arrows { display: flex; gap: 8px; }
.rail-arrows button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--color-border-warm); color: var(--fg-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 200ms var(--ease-out);
}
.rail-arrows button:hover { color: var(--fg-primary); border-color: var(--color-ring-deep); }

/* ----- Category tiles ----------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { position: relative; display: block; aspect-ratio: 3/4; overflow: hidden; border-radius: 2px; background: var(--color-warm-sand); }
.tile img, .tile .ph { transition: transform 1400ms var(--ease-out); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile:hover img, .tile:hover .ph { transform: scale(1.04); }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.55)); }
.tile-cap { position: absolute; left: 28px; right: 28px; bottom: 26px; z-index: 2; color: #fff; }
.tile-cap .overline { color: rgba(255,255,255,0.75); }
.tile-cap h3 { font-size: clamp(26px, 2.6vw, 38px); font-style: italic; color: #fff; margin: 6px 0 12px; line-height: 1.05; }
.tile-cap .link-u { color: #fff; }
.mega-tiles .tile { aspect-ratio: 4/3; }
.mega-tiles .tile-cap { left: 18px; bottom: 16px; }
.mega-tiles .tile-cap h3 { font-size: 20px; margin: 0; }

/* ----- Editorial split ---------------------------------------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; align-items: stretch; }
.split-img { position: relative; min-height: 640px; overflow: hidden; background: var(--color-warm-sand); }
.split-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split-body { display: flex; flex-direction: column; justify-content: center; padding: 80px clamp(32px, 6vw, 112px); }
.split-body h2 { font-size: clamp(40px, 5vw, 72px); line-height: 1.0; letter-spacing: -0.025em; margin: 16px 0 28px; }
.split-body h2 em { color: var(--color-terracotta); }
.split-body p.lead { font-family: var(--font-serif); font-size: 19px; line-height: 1.65; color: var(--fg-secondary); max-width: 480px; margin-bottom: 36px; }
.split-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; max-width: 420px; }

/* ----- Subscription ------------------------------------------- */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 440px)); justify-content: center; gap: 20px; }
.tier {
  border: 1px solid var(--color-border-dark); border-radius: 4px;
  padding: 36px 32px 32px; display: flex; flex-direction: column;
  transition: border-color 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.tier:hover { border-color: var(--color-terracotta); transform: translateY(-4px); }
.tier.featured { border-color: var(--color-terracotta); position: relative; }
.tier .flag {
  position: absolute; top: -11px; left: 32px; background: var(--color-terracotta); color: #fff;
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; padding: 4px 10px; border-radius: 2px;
}
.tier .cad { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--fg-tertiary); }
.tier h3 { font-size: 40px; font-style: italic; margin: 10px 0 6px; }
.tier .price { font-family: var(--font-mono); font-size: 15px; margin-bottom: 18px; }
.tier .price small { color: var(--fg-tertiary); font-size: 12px; }
.tier .blurb { font-family: var(--font-serif); font-size: 16px; line-height: 1.55; margin-bottom: 22px; }
.tier ul { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
.tier li { font-size: 13px; padding: 9px 0; border-top: 1px solid var(--color-border-dark); display: flex; gap: 10px; }
.tier li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--color-terracotta); margin-top: 8px; flex: none; }
.section-dark .tier .blurb { color: var(--color-warm-silver); }
.section-dark .tier h3, .section-dark .tier .price { color: var(--color-ivory); }
.section-dark .tier li { color: var(--color-warm-silver); }
.section-dark .btn-line { color: var(--color-ivory); }
.section-dark .btn-solid { background: var(--color-ivory); color: var(--color-near-black); }
.section-dark .btn-solid:hover { background: var(--color-terracotta); color: #fff; }
body:not([data-theme="dark"]) .tier:not(.on-dark) { border-color: var(--color-border-warm); }
body:not([data-theme="dark"]) .tier:not(.on-dark) li { border-top-color: var(--color-border-warm); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.step .n { font-family: var(--font-mono); font-size: 12px; color: var(--color-terracotta); letter-spacing: 0.15em; }
.step h4 { font-size: 28px; font-style: italic; margin: 12px 0 10px; }
.step p { color: var(--fg-secondary); font-size: 15px; }

/* ----- Promises row ------------------------------------------- */
.promises {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--color-border-warm); border-bottom: 1px solid var(--color-border-warm);
}
.promise { padding: 40px 28px; }
.promise + .promise { border-left: 1px solid var(--color-border-warm); }
.promise svg { color: var(--color-terracotta); margin-bottom: 18px; }
.promise h6 { font-size: 19px; font-style: italic; margin-bottom: 8px; }
.promise p { font-size: 13px; color: var(--fg-secondary); line-height: 1.55; }

/* ----- Product popup ----------------------------------------- */
/* Eases in with a long expo-out (soft settle), out with a quicker expo-in. Bottom sheet on phones. */
.qv { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 32px; pointer-events: none; }
.qv.open { pointer-events: auto; }
.qv-scrim {
  position: absolute; inset: 0; background: rgba(10,10,10,0.42);
  -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px); opacity: 0;
  transition: opacity 320ms cubic-bezier(0.7, 0, 0.84, 0), backdrop-filter 320ms cubic-bezier(0.7, 0, 0.84, 0), -webkit-backdrop-filter 320ms cubic-bezier(0.7, 0, 0.84, 0);
}
.qv.open .qv-scrim {
  opacity: 1; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition-duration: 600ms; transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
.qv-panel {
  position: relative; width: min(1180px, 100%); max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-page); border-radius: 6px; box-shadow: 0 40px 120px rgba(0,0,0,0.28);
  padding: 48px 48px 40px;
  opacity: 0; transform: translateY(28px) scale(0.965); filter: blur(4px);
  transition: opacity 300ms cubic-bezier(0.7, 0, 0.84, 0), transform 320ms cubic-bezier(0.7, 0, 0.84, 0), filter 300ms cubic-bezier(0.7, 0, 0.84, 0);
}
.qv.open .qv-panel {
  opacity: 1; transform: none; filter: none;
  transition-duration: 520ms, 720ms, 520ms; transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
.qv-close { position: sticky; top: 0; float: right; margin: -28px -28px 0 0; z-index: 3; background: var(--bg-page); border-radius: 50%; }
.qv .pdp { padding: 0; gap: 48px; grid-template-columns: 1.15fr 1fr; }
.qv .pdp-info { position: static; }
.qv .pdp-info h1 { font-size: clamp(32px, 3.4vw, 48px); }
@media (prefers-reduced-motion: reduce) {
  .qv-scrim, .qv-panel { transition-duration: 1ms !important; }
  .qv-panel { transform: none; filter: none; }
}
@media (max-width: 960px) {
  .qv { padding: 0; align-items: flex-end; }
  .qv-panel {
    width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; padding: 28px 20px 32px;
    transform: translateY(100%); filter: none;
  }
  .qv.open .qv-panel { transform: none; }
  .qv-close { margin: -12px -8px 0 0; }
  .qv .pdp { grid-template-columns: 1fr; gap: 24px; }
}

/* ----- Shop page ---------------------------------------------- */
.page-head { padding: 72px 0 40px; }
.page-head h1 { font-size: clamp(52px, 8vw, 120px); line-height: 0.95; letter-spacing: -0.035em; margin: 14px 0 20px; }
.page-head p { font-family: var(--font-serif); font-size: 19px; color: var(--fg-secondary); max-width: 560px; }
.crumbs { font-size: 12px; color: var(--fg-tertiary); letter-spacing: 0.04em; }
.crumbs a:hover { color: var(--fg-primary); }
.toolbar {
  position: sticky; top: 68px; z-index: 20;
  background: var(--bg-page);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 16px 0; border-top: 1px solid var(--color-border-warm); border-bottom: 1px solid var(--color-border-warm);
  margin-bottom: 40px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 34px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--color-border-warm); font-size: 13px; color: var(--fg-secondary);
  transition: all 150ms var(--ease-out);
}
.chip:hover { color: var(--fg-primary); border-color: var(--color-ring-deep); }
.chip.on { background: var(--fg-primary); color: var(--bg-page); border-color: var(--fg-primary); }
.toolbar-right { display: flex; gap: 20px; align-items: center; }
.toolbar .count { font-family: var(--font-mono); font-size: 12px; color: var(--fg-tertiary); }
.select {
  font-family: var(--font-sans); font-size: 13px; color: var(--fg-primary);
  background: transparent; border: 1px solid var(--color-border-warm); border-radius: 2px;
  height: 34px; padding: 0 10px;
}
.select option { background: var(--bg-page); color: var(--fg-primary); }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--fg-secondary); cursor: pointer; }
.check input { accent-color: var(--color-terracotta); }
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px 24px; padding-bottom: 120px; }
.pgrid-3 { grid-template-columns: repeat(3, 1fr); }
.empty { padding: 80px 0; text-align: center; font-family: var(--font-serif); font-style: italic; color: var(--fg-secondary); font-size: 20px; }

/* ----- PDP ---------------------------------------------------- */
.pdp { display: grid; grid-template-columns: 1.25fr 1fr; gap: 72px; padding: 40px 0 120px; align-items: start; }
.gallery { display: grid; grid-template-columns: 76px 1fr; gap: 16px; }
.thumbs { display: flex; flex-direction: column; gap: 10px; }
.thumbs button { aspect-ratio: 4/5; position: relative; overflow: hidden; border-radius: 2px; opacity: 0.55; transition: opacity 200ms; outline: 1px solid transparent; }
.thumbs button.on { opacity: 1; outline-color: var(--fg-primary); outline-offset: 2px; }
.thumbs button:hover { opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main { aspect-ratio: 4/5; }
.gallery-main img { object-fit: contain; background: var(--color-warm-sand); }
.pdp-info { position: sticky; top: 100px; }
.pdp-info h1 { font-size: clamp(40px, 4.4vw, 60px); line-height: 1.0; letter-spacing: -0.025em; font-style: italic; margin: 14px 0 16px; }
.pdp-price { font-family: var(--font-mono); font-size: 18px; margin-bottom: 8px; }
.pdp-medium { font-size: 14px; color: var(--fg-secondary); }
.pdp-desc { font-family: var(--font-serif); font-size: 18px; line-height: 1.6; color: var(--fg-secondary); margin: 28px 0; }
.opt-label { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--fg-tertiary); margin-bottom: 10px; font-weight: 500; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.opt {
  min-height: 40px; padding: 0 16px; border: 1px solid var(--color-border-warm); border-radius: 2px;
  font-size: 13px; color: var(--fg-secondary); transition: all 150ms var(--ease-out);
}
.opt:hover { border-color: var(--color-ring-deep); color: var(--fg-primary); }
.opt.on { border-color: var(--fg-primary); color: var(--fg-primary); box-shadow: inset 0 0 0 1px var(--fg-primary); }
.buy-row { display: flex; gap: 12px; align-items: stretch; margin-bottom: 16px; }
.buy-row .qty { margin: 0; height: 48px; }
.buy-row .qty button { width: 38px; }
.buy-row .btn { flex: 1; }
.pdp-assure { display: flex; gap: 20px; flex-wrap: wrap; font-size: 12px; color: var(--fg-tertiary); margin: 18px 0 36px; }
.pdp-assure span::before { content: '— '; color: var(--color-terracotta); }

.acc { border-top: 1px solid var(--color-border-warm); }
.acc:last-child { border-bottom: 1px solid var(--color-border-warm); }
.acc-h {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 500; text-align: left;
}
.acc-h .pm { font-family: var(--font-mono); font-size: 16px; color: var(--fg-tertiary); transition: transform 300ms var(--ease-out); }
.acc.open .acc-h .pm { transform: rotate(45deg); }
.acc-b { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 360ms var(--ease-out); }
.acc.open .acc-b { grid-template-rows: 1fr; }
.acc-b > div { overflow: hidden; }
.acc-b p, .acc-b dl { font-size: 14px; color: var(--fg-secondary); padding-bottom: 20px; margin: 0; line-height: 1.65; }
.acc-b dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 16px; }
.acc-b dt { color: var(--fg-tertiary); }
.acc-b dd { margin: 0; color: var(--fg-primary); }

/* ----- Footer ------------------------------------------------- */
.footer { border-top: 1px solid var(--color-border-warm); padding: 72px 0 40px; font-size: 13px; color: var(--fg-tertiary); }
.footer-brand { margin-bottom: 48px; }
.footer .mark { font-family: var(--font-serif); font-size: 26px; color: var(--fg-primary); }
.footer .mark .zh { font-size: 18px; color: var(--color-terracotta); margin-left: 8px; }
.footer-about { font-family: var(--font-serif); font-size: 15px; color: var(--fg-secondary); margin-top: 14px; max-width: 280px; line-height: 1.6; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--color-border-cream); }

/* ----- Content pages ------------------------------------------ */
.prose { max-width: 680px; padding-bottom: 120px; }
.prose p { font-family: var(--font-serif); font-size: 19px; line-height: 1.7; margin-bottom: 22px; }
.prose h3 { font-size: 28px; font-style: italic; margin: 40px 0 14px; }
.about-split { display: grid; grid-template-columns: 1fr 1.3fr; gap: 80px; align-items: start; padding-bottom: 120px; }
.about-split .pimg { position: sticky; top: 100px; }

/* ----- Responsive --------------------------------------------- */
@media (max-width: 1100px) {
  .ctabs-row { grid-template-columns: repeat(3, 1fr); }
  .ctabs-lead { display: none; }
  .rail { grid-auto-columns: calc((100% - 2 * 24px) / 3); }
  .pgrid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .container, .container-wide { padding: 0 20px; }
  .announce-inner { grid-template-columns: 1fr; padding: 0 8px; }
  .announce-side { display: none; }
  .header.on-home { margin-bottom: -61px; }
  .header-inner { padding: 0 12px; height: 60px; gap: 8px; }
  .header-left { gap: 6px; }
  .header .nav-mark { font-size: 20px; }
  .header-right { gap: 0; }
  .header-right a.icon-btn:first-child { display: none; }
  .header-right .theme-toggle { margin-left: 4px; }
  .hero-nav { display: none; }
  .header.over .menu-btn { width: 36px; margin-left: -8px; opacity: 1; pointer-events: auto; }
  .hero-c { height: 82vh; min-height: 480px; }
  .hero-content { bottom: 64px; }
  .pbadge { top: 8px; left: 8px; font-size: 9px; padding: 4px 7px; }
  
  
  
  .ctabs { padding-top: 40px; padding-bottom: 64px; }
  .ctabs .tabs { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; gap: 18px; scrollbar-width: none; }
  .ctabs-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ctabs-lead { display: none; }
  .rail { grid-auto-columns: 64%; gap: 14px; }
  .rail-arrows { display: none; }
  .tiles { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 4/3; }
  .split { grid-template-columns: 1fr; }
  .split-img { min-height: 420px; }
  .split-body { padding: 56px 20px; }
  .tiers, .steps { grid-template-columns: 1fr; }
  .promises { grid-template-columns: 1fr 1fr; }
  .promise { padding: 28px 16px; }
  .promise:nth-child(3) { border-left: none; }
  .promise:nth-child(n+3) { border-top: 1px solid var(--color-border-warm); }
  .pgrid, .pgrid-3 { grid-template-columns: 1fr 1fr; gap: 32px 14px; }
  .toolbar { position: static; }
  .pdp { grid-template-columns: 1fr; gap: 32px; padding-top: 16px; }
  .pdp-info { position: static; }
  .gallery { grid-template-columns: 1fr; }
  .thumbs { flex-direction: row; order: 2; }
  .thumbs button { width: 64px; }
  .about-split { grid-template-columns: 1fr; gap: 40px; }
  .about-split .pimg { position: static; }
  .quick-add { opacity: 1; transform: none; width: 32px; height: 32px; right: 8px; bottom: 8px; }
  .medium-strip-inner { font-size: 17px; }
}
