:root {
  color-scheme: dark;
  --bg: #080912;
  --surface: #101322;
  --text: #f6f4ff;
  --muted: #b9bad0;
  --line: #313452;
  --accent: #bcb1ff;
  font: 100%/1.55 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(ellipse at 90% 10%, #30205e 0, transparent 44rem), radial-gradient(ellipse at 0% 38%, #123364 0, transparent 35rem), var(--bg);
}
a { color: var(--accent); text-underline-offset: .22em; }
:focus-visible { outline: 2px solid #bcb1ff; outline-offset: 4px; }
.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }
header { border-bottom: 1px solid var(--line); background: #080912; }
.bar, nav { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.4rem; }
.bar { min-height: 4.5rem; justify-content: space-between; padding-block: .8rem; }
.bar a { text-decoration: none; }
.bar a:hover { text-decoration: underline; }
.brand { color: var(--text); font-weight: 850; letter-spacing: .12em; }
.brand span { color: var(--accent); }
nav a { color: var(--muted); }
nav a[aria-current] { color: #fff; }
.hero {
  margin-block: clamp(1.5rem, 4vw, 3rem) 3rem;
  padding: clamp(1.35rem, 6vw, 4.5rem);
  border: 1px solid #816eda;
  border-radius: 1.35rem;
  background:
    radial-gradient(ellipse at 90% 3%, #4e75dbb0, transparent 52%),
    radial-gradient(ellipse at 85% 105%, #c447a290, transparent 52%),
    linear-gradient(115deg, #171c4a 8%, #44268a 72%);
}
.eyebrow { color: var(--accent); font-size: .875rem; font-weight: 750; letter-spacing: .12em; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2rem, 7vw, 5rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h4 { font-size: 1.35rem; }
p { color: var(--muted); }
.hero .button { margin: .35rem .35rem .35rem 0; }
.address { margin-bottom: 0; }
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: 1rem;
}
article {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1.35rem;
  background: linear-gradient(145deg, #171a31, var(--surface) 65%);
  border: 1px solid var(--line);
  border-radius: 1rem;
}
article:hover { border-color: #6864a0; }
article p { margin: 0 0 auto; }
.icon { font-size: 1.5rem; }
.price { padding-top: .5rem; font-size: 1.2rem; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.75rem;
  padding: .55rem .85rem;
  border: 1px solid #565b86;
  border-radius: .55rem;
  background: #222540;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #30365a; }
.primary { background: linear-gradient(115deg, #3b57d1, #813ac0); }
.primary:hover { background: linear-gradient(115deg, #4660db, #8940cc); }
footer { margin-top: 3rem; border-top: 1px solid var(--line); color: var(--muted); }
dialog {
  width: min(35rem, 100% - 2rem);
  max-height: calc(100% - 2rem);
  padding: 1.4rem;
  border: 1px solid #565b86;
  border-radius: 1rem;
  background: var(--surface);
  color: var(--text);
}
dialog::backdrop { background: #04050cba; }
dialog h2 { padding-right: 2.2rem; }
.close {
  position: absolute;
  inset: .65rem .65rem auto auto;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: .5rem;
  background: #222540;
  color: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}
label { display: block; margin-block: 1rem; }
input, textarea {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .55rem;
  border: 1px solid #565b86;
  border-radius: .4rem;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; }
#result .button { margin-block: .15rem; }

.catalog article {
  --product-color: #9cc7ff;
  --product-surface: #143464;
  background: radial-gradient(ellipse at top left, var(--product-surface), transparent 86%), #14162b;
  border-color: color-mix(in srgb, var(--product-color) 40%, #24203e);
}

.catalog article:hover {
  border-color: var(--product-color);
}

.catalog article.product-cosmos {
  --product-color: #d9b8ff;
  --product-surface: #4a287d;
}

.catalog article.product-custom {
  --product-color: #ffa4df;
  --product-surface: #652451;
}

.catalog article.product-support {
  --product-color: #8ce9ea;
  --product-surface: #10505e;
}

.catalog article.product-rename {
  --product-color: #ffda8c;
  --product-surface: #614021;
}

.catalog article.product-unban {
  --product-color: #ffb3a5;
  --product-surface: #642c3e;
}

.catalog .icon {
  display: grid;
  place-items: center;
  width: 2.85rem;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--product-color) 48%, transparent);
  border-radius: .75rem;
  background: color-mix(in srgb, var(--product-color) 17%, transparent);
  color: var(--product-color);
}

.catalog .price {
  color: var(--product-color);
}

.catalog .order {
  background: color-mix(in srgb, var(--product-color) 13%, #15172c);
  border-color: color-mix(in srgb, var(--product-color) 44%, #26223c);
}

.catalog .order:hover {
  background: color-mix(in srgb, var(--product-color) 24%, #15172c);
  border-color: var(--product-color);
}

.category-nav {
  gap: .5rem;
  margin: 1.25rem 0 2rem;
}

.category-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .45rem .9rem;
  border: 1px solid #6354a1;
  border-radius: 999px;
  background: #251d43;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.category-nav a:hover {
  background: #3b2b65;
}

.category {
  margin-top: 2.25rem;
  scroll-margin-top: 1rem;
}

.category h3 {
  margin-bottom: .9rem;
  font-size: clamp(1.3rem, 3vw, 1.85rem);
}

.category:target h3 {
  color: var(--accent);
}

#access .catalog {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 44rem) {
  .catalog .product-access {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .35rem 1.25rem;
  }

  .product-access .icon { grid-row: 1 / span 2; }
  .product-access p { grid-column: 2; }
  .product-access .price { grid-column: 3; grid-row: 1; padding: 0; }
  .product-access .order { grid-column: 3; grid-row: 2; }
}

.category-nav a[aria-current="true"] {
  background: #5139a3;
  border-color: #9c85f1;
  color: #fff;
}

.purchases {
  margin-top: 2.75rem;
  padding: clamp(1rem, 3vw, 1.55rem);
  border: 1px solid #45487b;
  border-radius: 1rem;
  background: linear-gradient(115deg, #181830, #131d38);
}

.purchases h2 {
  font-size: clamp(1.3rem, 3vw, 1.85rem);
}

.purchases p {
  margin-bottom: 0;
}

.purchase-list {
  display: grid;
  gap: .45rem;
  padding-left: 1.3rem;
  margin-bottom: 0;
}

.purchases:has(.purchase-list > li) .purchase-empty,
.purchase-list:empty {
  display: none;
}

.product-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: .55rem;
}

.product-access .product-image {
  grid-column: 1 / -1;
  grid-row: 3;
}


.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 18%, #72a4ff50 42%, #f196ee62 52%, transparent 77%);
  background-size: 220% 100%;
  background-position: 85% 50%;
  animation: hero-shimmer 7s ease-in-out infinite alternate;
}

.button,
.category-nav a,
.catalog article {
  transition: background-color 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease, transform 180ms ease;
}

.category-nav a:hover,
.button:hover {
  transform: translateY(-2px);
}

.catalog article:hover {
  box-shadow: 0 8px 28px #06081755;
}

.category:not([hidden]) .catalog article {
  animation: product-enter 340ms cubic-bezier(.22, 1, .36, 1) both;
}

.category:not([hidden]) .catalog article:nth-child(2) {
  animation-delay: 45ms;
}

.category:not([hidden]) .catalog article:nth-child(3) {
  animation-delay: 90ms;
}

dialog[open] {
  animation: product-enter 220ms cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes hero-shimmer {
  from { background-position: 85% 50%; }
  to { background-position: 15% 50%; }
}

@keyframes product-enter {
  from { opacity: 0; transform: translateY(.55rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .category:not([hidden]) .catalog article,
  dialog[open] {
    animation: none;
  }

  .button,
  .category-nav a,
  .catalog article {
    transition: none;
  }

  .category-nav a:hover,
  .button:hover {
    transform: none;
  }
}

@supports (background-clip: text) {
  .hero h1 {
    background: linear-gradient(105deg, #fff 22%, #acccff 43%, #ffbdef 57%, #fff 78%) 85% center / 220% 100%;
    background-clip: text;
    color: transparent;
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero h1 {
      animation: hero-shimmer 7s ease-in-out infinite alternate;
    }
  }

  @media (forced-colors: active) {
    .hero h1 {
      background: none;
      color: CanvasText;
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .catalog article:focus-within,
  .catalog article:hover {
    translate: 0 -3px;
  }

  .catalog article {
    transition: border-color 180ms ease, box-shadow 180ms ease, translate 200ms ease;
  }

  .catalog .icon {
    transition: transform 230ms cubic-bezier(.22, 1, .36, 1);
  }

  .catalog article:focus-within .icon,
  .catalog article:hover .icon {
    transform: rotate(-8deg) scale(1.08);
  }

  dialog[open]::backdrop {
    animation: backdrop-enter 220ms ease-out both;
  }

  #result:not([hidden]) {
    animation: product-enter 260ms ease-out both;
  }
}

@keyframes backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
