:root {
  color-scheme: dark;
  --store-bg: #0b0c0e;
  --store-surface: #121417;
  --store-surface-raised: #181b1f;
  --store-text: #f1ede4;
  --store-muted: #aaa69e;
  --store-border: #30343a;
  --store-accent: #ed3d2d;
  --store-header-height: 4.5rem;
  --sk-text-link: var(--store-accent);
  --sk-radius-0: 0;
  --sk-radius-1: 0;
  --sk-radius-2: 0;
  --sk-radius-3: 0;
}

html { overflow-x: clip; background: var(--store-bg); }
body { margin: 0; background: var(--store-bg); color: var(--store-text); }
body[data-menu-open] { overflow: hidden; }

*,
*::before,
*::after { border-radius: 0 !important; }

main a:not(.sk-button):not(.listing-card-button) { color: var(--store-accent); }

h1,
h2,
h3,
h4,
h5,
h6,
.store-brand,
.footer-brand,
.listing-card-title,
.mobile-menu-inner > a {
  font-family: var(--sk-font-mono);
}

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; }

.store-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--store-header-height);
  border-bottom: 1px solid var(--store-border);
  background-color: var(--store-bg);
  isolation: isolate;
}

body:has(.home) .store-header {
  background-color: rgba(11,12,14,.72);
  backdrop-filter: blur(8px);
}

.store-nav {
  min-height: var(--store-header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.store-brand,
.store-nav a,
.desktop-nav a,
.mobile-menu a,
.store-footer a { color: inherit; text-decoration: none; }

.store-brand {
  font-weight: 800;
  letter-spacing: .09em;
  white-space: nowrap;
}

.desktop-nav { display: flex; align-items: center; gap: 1.5rem; }
.desktop-nav a { color: var(--store-muted); transition: color 160ms ease; }
.desktop-nav a:hover,
.desktop-nav a:focus-visible { color: var(--store-text); }

.mobile-actions { display: none; align-items: center; gap: .5rem; }
.icon-button {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--store-text);
  border: 1px solid var(--store-border);
  border-radius: .5rem;
  background: var(--store-surface);
  cursor: pointer;
}
.icon-button svg { width: 1.35rem; height: 1.35rem; }
.cart-count {
  position: absolute;
  top: -.3rem;
  right: -.3rem;
  min-width: 1.2rem;
  height: 1.2rem;
  display: grid;
  place-items: center;
  padding-inline: .22rem;
  border: 2px solid var(--store-bg);
  border-radius: 99px;
  background: var(--store-accent);
  color: white;
  font-size: .65rem;
  font-weight: 800;
  line-height: 1;
}
.close-icon { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon { display: none; }
.menu-toggle[aria-expanded="true"] .close-icon { display: block; }

.mobile-menu {
  position: fixed;
  inset: var(--store-header-height) 0 0;
  z-index: 49;
  overflow-y: auto;
  background: var(--store-bg);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-inner { min-height: 100%; display: flex; flex-direction: column; padding-block: 1rem 2rem; }
.mobile-menu-inner > a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--store-border);
  font-size: clamp(2.25rem, 12vw, 4.5rem);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1;
}
.mobile-menu-inner > a span { color: var(--store-accent); font-size: .72rem; letter-spacing: .08em; }
.mobile-menu-network { margin-top: auto; display: flex; flex-wrap: wrap; gap: 1.25rem; padding-top: 2.5rem; }
.mobile-menu-network a { color: var(--store-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }

.home,
.page-shell,
.product-shell { padding-block: clamp(2.75rem, 7vw, 6rem); }
.home { position: relative; isolation: isolate; }
.hero {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: min(48rem, calc(100svh - var(--store-header-height)));
  padding: clamp(2rem, 6vw, 6rem) 0;
}
.hero-copy { position: relative; z-index: 2; width: min(100%, 46rem); }
.hero h1 { max-width: 10ch; font-size: clamp(3rem, 10vw, 8rem); line-height: .9; }
.hero-copy > p:not(.eyebrow) { max-width: 46rem; color: var(--store-muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.hero-art {
  position: absolute;
  z-index: 0;
  top: calc(-1 * var(--store-header-height) - 1px);
  left: 50%;
  width: 100vw;
  height: calc(var(--store-header-height) + clamp(2.75rem, 7vw, 6rem) + min(48rem, calc(100svh - var(--store-header-height))));
  overflow: hidden;
  transform: translateX(-50%);
  isolation: isolate;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--store-bg) 0%, rgba(11,12,14,.96) 31%, rgba(11,12,14,.56) 58%, rgba(11,12,14,.16) 82%),
    linear-gradient(180deg, rgba(11,12,14,.08) 58%, var(--store-bg) 100%),
    url("../images/hero/commerce-dither.webp") 72% center / cover no-repeat;
}
.hero-art::before,
.hero-art::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.hero-art::before {
  inset: 0;
  background:
    linear-gradient(90deg, var(--store-bg) 0%, rgba(11,12,14,.9) 31%, transparent 65%),
    url("../images/hero/commerce-dither.webp") 72% center / cover no-repeat;
  mix-blend-mode: screen;
  opacity: .08;
  animation: commerce-glitch 4.8s steps(1, end) infinite;
}
.hero-art::after {
  inset: -12px;
  background:
    repeating-linear-gradient(180deg, transparent 0 3px, rgba(255,255,255,.1) 3px 4px),
    repeating-radial-gradient(circle at 70% 42%, rgba(255,255,255,.2) 0 1px, transparent 1px 4px);
  background-size: 100% 4px, 9px 9px;
  mix-blend-mode: screen;
  opacity: .12;
  animation: commerce-static .22s steps(2, end) infinite;
}
.hero-signal {
  position: absolute;
  z-index: 3;
  inset: auto 2rem clamp(2rem, 5vw, 5rem) auto;
  display: flex;
  gap: .75rem;
  padding: .45rem .65rem;
  background: rgba(0,0,0,.8);
  color: var(--store-muted);
  font-family: var(--sk-font-mono);
  font-size: .65rem;
  letter-spacing: .08em;
}
.hero-signal span:first-child { color: var(--store-accent); }
.home-features { position: relative; z-index: 2; }

@keyframes commerce-glitch {
  0%, 86%, 100% { clip-path: inset(0); opacity: .08; transform: translate(0); }
  87% { clip-path: inset(13% 0 71% 0); opacity: .72; transform: translate(-14px, 2px); }
  88% { clip-path: inset(58% 0 26% 0); opacity: .48; transform: translate(18px, -2px); }
  89% { clip-path: inset(33% 0 51% 0); opacity: .64; transform: translate(-7px, 1px); }
  90% { clip-path: inset(76% 0 10% 0); opacity: .4; transform: translate(11px, 0); }
  91% { clip-path: inset(0); opacity: .08; transform: translate(0); }
}

@keyframes commerce-static {
  0% { transform: translate(0); }
  25% { transform: translate(3px, -2px); }
  50% { transform: translate(-2px, 3px); }
  75% { transform: translate(1px, 2px); }
  100% { transform: translate(-3px, -1px); }
}
.eyebrow { color: var(--store-accent); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }
.lede { max-width: 55ch; font-size: 1.25rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.feature-grid,
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.25rem; }

.product-grid { margin-top: .75rem; }
.product-grid > .listing-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  list-style: none;
  border: 1px solid var(--store-border);
  border-radius: .85rem;
  background: var(--store-surface);
  box-shadow: 0 1.2rem 3rem rgba(0,0,0,.18);
  transition: transform 180ms ease, border-color 180ms ease;
}
.product-grid > .listing-card:hover { transform: translateY(-4px); border-color: #555b64; }
.listing-card-image-link { display: block; aspect-ratio: 1; overflow: hidden; background: #08090a; }
.listing-card-image,
.listing-card-image-placeholder { width: 100%; height: 100%; display: block; object-fit: cover; }
.listing-card-image { transition: transform 300ms ease; }
.listing-card:hover .listing-card-image { transform: scale(1.025); }
.listing-card-image-placeholder { background: linear-gradient(135deg, var(--store-surface-raised), #08090a); }
.listing-card-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 1.35rem; }
.listing-card-title { margin: 0; font-size: clamp(1.2rem, 3vw, 1.55rem); line-height: 1.1; }
.listing-card-excerpt { flex: 1; margin: .85rem 0 1.25rem; color: var(--store-muted); line-height: 1.6; }
.listing-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .65rem 1rem;
  border-radius: .45rem;
  background: var(--store-accent);
  color: white;
  font-weight: 750;
  text-decoration: none;
}

.product-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(20rem, .92fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}
.product-media { position: sticky; top: calc(var(--store-header-height) + 1.5rem); min-width: 0; }
.product-shell .featured-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  margin: 0;
  border: 1px solid var(--store-border);
  border-radius: .85rem;
  background: var(--store-surface);
}
.product-details { min-width: 0; padding-top: clamp(.25rem, 1vw, 1rem); }
.product-shell h1 { margin-bottom: 1rem; font-size: clamp(2.5rem, 5vw, 5.25rem); line-height: .92; }
.product-shell .prose { max-width: 40rem; margin-top: 2rem; }
.prose > p + .commerce-product { margin-top: clamp(1.75rem, 4vw, 3rem); }
.commerce-product {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  padding: 1.35rem;
  border: 1px solid var(--store-border);
  border-radius: .75rem;
  background: var(--store-surface);
}
.commerce-price { margin: 0; font-size: 1.5rem; font-weight: 800; }
.commerce-status { min-height: 1.5rem; flex-basis: 100%; margin: 0; color: var(--store-muted); }
.commerce-product .sk-button { margin-left: auto; }

[data-commerce-cart] { display: grid; gap: 1rem; margin-top: 1.5rem; }
[data-commerce-cart] > .sk-card { display: grid; gap: 1rem; padding: 1.35rem; }
[data-commerce-cart] h2,
[data-commerce-cart] p { margin: 0; }
[data-commerce-cart] label { display: grid; gap: .45rem; max-width: 8rem; color: var(--store-muted); }
[data-commerce-cart] input {
  width: 100%;
  min-height: 2.75rem;
  padding: .5rem .75rem;
  border: 1px solid var(--store-border);
  border-radius: .4rem;
  background: var(--store-bg);
  color: var(--store-text);
}
[data-commerce-remove] {
  width: fit-content;
  min-height: 2.6rem;
  padding: .55rem .85rem;
  border: 1px solid var(--store-border);
  border-radius: .4rem;
  background: transparent;
  color: var(--store-text);
  cursor: pointer;
}
[data-commerce-mock-checkout] { margin-top: 1.5rem; padding: 1.35rem; border: 1px solid var(--store-border); border-radius: .75rem; background: var(--store-surface); }
[data-commerce-mock-checkout] ul { display: grid; gap: .65rem; margin: 1.25rem 0; padding: 0; list-style: none; }
[data-commerce-mock-checkout] li { padding: .8rem 1rem; border: 1px solid var(--store-border); border-radius: .4rem; background: var(--store-bg); }

.store-footer { margin-top: 5rem; border-top: 1px solid var(--store-border); background: #08090a; }
.footer-grid { display: grid; grid-template-columns: minmax(10rem, 1.5fr) repeat(2, minmax(9rem, 1fr)); gap: 2rem; padding-block: 3.5rem; }
.footer-brand { align-self: start; display: inline-flex; align-items: center; gap: .75rem; font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.footer-brand img { width: 2rem; height: 2rem; display: block; }
.footer-grid nav { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.footer-grid nav a { color: var(--store-muted); }
.footer-grid nav a:hover,
.footer-grid nav a:focus-visible { color: var(--store-text); }
.footer-meta { display: flex; justify-content: space-between; gap: 1.5rem; padding-block: 1.25rem 2rem; border-top: 1px solid var(--store-border); color: var(--store-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-meta p { margin: 0; }

@media (max-width: 720px) {
  .store-brand-prefix,
  .desktop-nav { display: none; }
  .mobile-actions { display: flex; }
  .store-brand { letter-spacing: .12em; }
  body:has(.home) .store-header { background-color: rgba(11,12,14,.9); }
  .hero { min-height: calc(100svh - var(--store-header-height)); }
  .hero h1 { font-size: 3.4rem; }
  .hero-art {
    height: calc(100svh + clamp(2.75rem, 7vw, 6rem));
    background:
      linear-gradient(180deg, rgba(11,12,14,.42) 0%, rgba(11,12,14,.84) 45%, var(--store-bg) 100%),
      linear-gradient(90deg, rgba(11,12,14,.76) 0%, rgba(11,12,14,.22) 100%),
      url("../images/hero/commerce-dither.webp") 68% center / cover no-repeat;
  }
  .hero-art::before {
    background:
      linear-gradient(180deg, transparent 0%, rgba(11,12,14,.5) 70%, var(--store-bg) 100%),
      url("../images/hero/commerce-dither.webp") 68% center / cover no-repeat;
  }
  .hero-signal { right: 1rem; bottom: 1.25rem; }
  .product-grid { grid-template-columns: 1fr; gap: 1rem; }
  .product-shell { grid-template-columns: 1fr; gap: 1.75rem; }
  .product-media { position: static; }
  .product-details { padding-top: 0; }
  .commerce-product { align-items: stretch; }
  .commerce-product .sk-button { width: 100%; margin-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-meta { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: 0s !important; }
  .hero-art::before,
  .hero-art::after { animation: none !important; }
}
