:root {
  color-scheme: dark;
  --page: #050406;
  --panel: #1a1326;
  --line: #372849;
  --text: #f7f3ff;
  --muted: #c4b7d4;
  --accent: #6d28d9;
  --accent-hover: #7835df;
  --accent-text: #c4a1ff;
  --on-accent: #fff;
  --mono: 'Cascadia Code', Consolas, monospace;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--page);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--page), #09060d 8rem, #10081b 16rem, #1e0c31 27rem, #331052 45rem, #42196c 66rem, #492077 84rem);
}
.background-sparks {
  position: absolute;
  inset: 4rem 0 0;
  z-index: -2;
  max-height: 60rem;
  overflow: clip;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 65%, #6d28d929, transparent 65%);
}
.background-sparks span {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: 3px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #c4a1ff;
  box-shadow: 0 0 .6rem .1rem #8b46ffaa;
  opacity: .42;
}
.background-sparks span:nth-child(3n + 1) {
  width: 4px;
  background: #e6d5ff;
  box-shadow: 0 0 .85rem .15rem #a176edaa;
}
@media (prefers-reduced-motion: no-preference) {
  .background-sparks span { animation: spark-drift var(--duration) linear var(--delay) infinite; }
}
@keyframes spark-drift {
  0% { opacity: 0; transform: translate(0, 1rem); }
  28%, 60% { opacity: .8; }
  100% { opacity: 0; transform: translate(var(--drift), -5rem); }
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 5px; }
.wrap { width: min(100% - 3rem, 73rem); margin-inline: auto; }
.masthead, footer { border-color: var(--line); border-style: solid; border-width: 0 0 1px; }
.header-inner, .footer-inner { align-items: center; gap: .75rem; }
.header-inner {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  min-height: 3.5rem;
  padding-inline: clamp(1rem, 2.8vw, 2rem);
}
.header-inner .brand { font: 700 clamp(1.25rem, 3vw, 1.75rem)/1 var(--mono); letter-spacing: .14em; }
.footer-inner { display: flex; min-height: 4.5rem; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; font-size: 1.25rem; font-weight: 900; letter-spacing: .08em; }
.brand-mark { width: 1.1rem; height: 1.1rem; margin-right: .65rem; background: var(--accent-text); clip-path: polygon(0 0, 100% 0, 68% 48%, 100% 100%, 0 100%, 32% 48%); }
.brand-scope {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent-text);
  background:
    radial-gradient(circle, currentColor 1px, transparent 1.5px),
    linear-gradient(to right, currentColor 33%, transparent 33% 67%, currentColor 67%) center / 100% 1px no-repeat,
    linear-gradient(to bottom, currentColor 33%, transparent 33% 67%, currentColor 67%) center / 1px 100% no-repeat;
}
.brand-scope::before {
  position: absolute;
  inset: 2px;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 .45rem #6d28d999;
  content: '';
}
.brand-period { color: var(--accent-text); }
.nav-link, footer a:last-child { color: var(--muted); font-size: .9375rem; }
.nav-link { justify-self: end; text-align: right; }
.nav-link span {
  display: block;
  text-decoration: underline 2px transparent;
  text-underline-offset: .3em;
  transition: color .16s ease, text-decoration-color .16s ease, text-shadow .16s ease, transform .16s ease;
}
.nav-link:is(:hover, :focus-visible) span {
  color: var(--text);
  text-decoration-color: var(--accent-text);
  text-shadow: 0 0 .75rem #a176ed90;
  transform: translateY(-2px);
}
footer a:last-child:hover { color: var(--accent-text); }

.hero { padding-block: 4.75rem; }
.eyebrow { color: var(--accent-text); font: .875rem var(--mono); letter-spacing: .115em; text-transform: uppercase; }
.eyebrow span { display: inline-block; width: .5rem; height: .5rem; margin-right: .4rem; background: currentColor; }
h1 { margin-block: 1.35rem 1.15rem; font-size: clamp(3.2rem, 6.6vw, 6rem); line-height: .97; letter-spacing: -.075em; }
h1 em { color: var(--accent-text); font-style: normal; text-shadow: 0 0 1.5rem #6d28d965; }
.hero-red-glow { text-shadow: 0 0 .85rem #f0444e2e; }
.intro { max-width: 28rem; margin-bottom: 1.8rem; color: var(--muted); font-size: 1.125rem; line-height: 1.6; }
.button { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: .4rem; padding: .65rem 1rem; font-size: .9375rem; font-weight: 700; }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.button:disabled { cursor: default; }
.secondary { background: transparent; border-color: #624984; }
.secondary:hover { border-color: var(--accent-text); color: var(--accent-text); }

.catalog { padding-block: 2.25rem 4.5rem; border-top: 1px solid var(--line); }
.product.featured-product {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  margin-top: 1.25rem;
  border-color: #624087;
  background: radial-gradient(ellipse 28% 70% at 32% 55%, #5d21ae60, transparent), linear-gradient(100deg, #08050e 0%, #11071d 42%, #32105b 70%, #471782 100%);
}
.featured-product-media {
  position: relative;
  min-height: clamp(19rem, 40vw, 28rem);
  overflow: hidden;
}
.featured-product-media img {
  position: absolute;
  inset: clamp(2rem, 6vw, 4.25rem) auto auto -30%;
  width: 100%;
  height: auto;
  mask: url('featured-operator-mask.png') center / 100% 100% no-repeat;
}
.featured-product .product-body {
  position: relative;
  isolation: isolate;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
}
.featured-product .product-body::before {
  position: absolute;
  inset: 0 -4rem 0 -.25rem;
  z-index: -1;
  transform: skewX(-11deg);
  border-left: 1px solid #b781ff80;
  background: linear-gradient(105deg, #3d196bd9, #42167c2e 58%, transparent);
  content: '';
}
.featured-product h3 { margin: 0 0 .85rem; font-size: clamp(2rem, 4.5vw, 3.65rem); line-height: 1; }
.featured-product .description { max-width: 30ch; margin-bottom: 0; color: #e3d4f5; font-size: clamp(1rem, 1.7vw, 1.2rem); }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.08; letter-spacing: -.055em; }
.catalog-heading p { margin-top: .55rem; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.filter { min-height: 2.5rem; padding: .4rem .75rem; border: 1px solid var(--line); border-radius: 2rem; background: transparent; color: var(--muted); font-size: .875rem; }
.filter:hover { border-color: var(--accent-text); }
.filter[aria-pressed='true'] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.product { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: .75rem; background: var(--panel); }
.product-art { display: grid; min-height: 8.75rem; place-items: center; background-color: var(--art); background-image: radial-gradient(#ffffff3d 1px, transparent 1px); background-size: 12px 12px; }
.files { --art: #342651; --symbol: #d4b8ff; }
.relay { --art: #382062; --symbol: #c4a1ff; }
.focus { --art: #292347; --symbol: #dfcafc; }
.product-symbol { position: relative; display: block; width: 3.2rem; height: 3.2rem; border: 2px solid var(--symbol); color: var(--symbol); }
.files .product-symbol { height: 2.3rem; border-radius: .25rem; transform: rotate(-9deg); box-shadow: .36rem .36rem 0 #d4b8ff5c; }
.files .product-symbol::before { position: absolute; top: -.52rem; left: -2px; width: 1.4rem; height: .52rem; border: 2px solid; border-bottom: 0; border-radius: .25rem .25rem 0 0; content: ''; }
.relay .product-symbol { width: 0; height: 0; border: 0; }
.relay .product-symbol::before { position: absolute; inset: -1.7rem; background: var(--symbol); clip-path: polygon(58% 0, 17% 55%, 46% 55%, 36% 100%, 84% 39%, 56% 39%); content: ''; }
.focus .product-symbol { border-radius: 50%; box-shadow: inset 0 0 0 .35rem var(--art), inset 0 0 0 .46rem #dfcafc7c; }
.focus .product-symbol::before { position: absolute; top: .65rem; left: 1.38rem; width: .75rem; height: .85rem; border: solid var(--symbol); border-width: 0 0 2px 2px; content: ''; }
.product-body { display: flex; flex: 1; flex-direction: column; padding: 1.15rem; }
.product-meta { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: .3rem .7rem; }
.product-category { color: var(--accent-text); font: .875rem var(--mono); }
.platform, .description, #product-details, #checkout-status { color: var(--muted); }
.platform { font-size: .875rem; }
h3 { margin-block: .6rem .35rem; font-size: 1.45rem; letter-spacing: -.035em; }
.description { margin-bottom: 1.1rem; line-height: 1.5; }
.product-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.price { font-size: 1.15rem; font-weight: 700; }
footer { border-width: 1px 0 0; }

dialog { width: min(100% - 2rem, 32rem); max-height: calc(100% - 2rem); padding: 1.75rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--panel); color: var(--text); }
dialog::backdrop { background: #080810c9; }
dialog form { float: right; margin-left: .75rem; }
.close { width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: .4rem; background: transparent; font-size: 1.5rem; }
dialog h2 { margin-block: .5rem 1rem; overflow-wrap: anywhere; }
#product-details { line-height: 1.6; }
dl { display: flex; flex-wrap: wrap; gap: .85rem 2rem; margin-block: 1.35rem; }
dt { color: var(--muted); font-size: .875rem; }
dd { margin: .25rem 0 0; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 56rem) {
  .hero { padding-block: 3rem; }
  .catalog-heading { align-items: start; flex-direction: column; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .wrap { width: calc(100% - 2rem); }
  .product.featured-product { grid-template-columns: 1fr; background: radial-gradient(ellipse 60% 34% at 62% 34%, #5d21ae60, transparent), linear-gradient(170deg, #08050e, #1a0c2e 52%, #471782); }
  .featured-product-media { min-height: 0; aspect-ratio: 1.18; }
  .featured-product .product-body::before { inset: 0 -1rem -2rem; transform: skewY(-5deg); border: 0; border-top: 1px solid #b781ff80; }
  .product-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-link span { transition: none; }
  .nav-link:is(:hover, :focus-visible) span { transform: none; }
}
