:root {
  color-scheme: dark;
  --bg: #08070a;
  --panel: rgba(22, 20, 26, 0.72);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f0e8;
  --muted: #aaa4b4;
  --gold: #f2c14e;
  --pink: #ff3d9a;
  --cyan: #3de0ff;
  --violet: #8b5cff;
  --grad: linear-gradient(100deg, var(--gold), var(--pink) 40%, var(--violet) 70%, var(--cyan));
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --wrap: 1240px;
  --ease: cubic-bezier(0.2, 0.9, 0.2, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--sans);
  overflow-x: hidden;
}

/* Film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  background-image: 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #ffd77a; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

img { display: block; max-width: 100%; }

/* Drifting colour fields behind the page */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  animation: drift 28s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { background: var(--violet); top: -25vmax; left: -15vmax; }
.aurora i:nth-child(2) { background: var(--pink); top: 30vh; right: -30vmax; animation-duration: 34s; opacity: 0.14; }
.aurora i:nth-child(3) { background: var(--gold); bottom: -35vmax; left: 20vw; animation-duration: 40s; opacity: 0.1; }
@keyframes drift {
  to { transform: translate(12vw, 10vh) scale(1.2); }
}

/* Header */
.top, main, .foot-inner {
  width: min(var(--wrap), 100% - 32px);
  margin-inline: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  transition: padding 0.3s var(--ease);
}
.top::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background: rgba(8, 7, 10, 0.6);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.3s;
}
.scrolled .top::before { opacity: 1; }
.scrolled .top { padding: 10px 0; }

.wordmark img { height: 28px; width: auto; transition: filter 0.3s; }
.wordmark:hover img { filter: drop-shadow(0 0 10px rgba(242, 193, 78, 0.8)); }
.home .wordmark { opacity: 0; pointer-events: none; transition: opacity 0.4s; }
.home.scrolled .wordmark { opacity: 1; pointer-events: auto; }

.top-actions { display: flex; align-items: center; gap: 8px; }

.shop, .sound {
  font: 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 14px;
  white-space: nowrap;
}
.shop {
  color: var(--bg);
  background: var(--gold);
  font-weight: 600;
  box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.6);
  transition: box-shadow 0.3s, transform 0.2s;
}
.shop:hover { color: var(--bg); box-shadow: 0 0 24px 2px rgba(242, 193, 78, 0.55); transform: translateY(-1px); }

.sound {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  cursor: pointer;
}
.sound:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }
.sound[aria-pressed="true"] { color: var(--cyan); border-color: rgba(61, 224, 255, 0.5); }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.bars i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; }
.sound[aria-pressed="true"] .bars i { animation: eq 0.9s ease-in-out infinite alternate; }
.bars i:nth-child(2) { animation-delay: -0.3s !important; }
.bars i:nth-child(3) { animation-delay: -0.6s !important; }
.bars i:nth-child(4) { animation-delay: -0.15s !important; }
@keyframes eq { from { height: 2px; } to { height: 12px; } }

/* Labels */
.label {
  margin: 0 0 16px;
  font: 12px var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.label a { text-decoration: none; }

/* Hero with live oscilloscope */
.hero {
  position: relative;
  min-height: calc(100svh - 64px);
  display: grid;
  align-items: center;
  padding: 40px 0 96px;
}
.hero.small { min-height: 70svh; }
.scope {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  z-index: -1;
}
.hero-inner { position: relative; }
.hero-inner::before {
  /* Dark backing so the waves don't fight the text */
  content: "";
  position: absolute;
  inset: 8% 25% 0 -10%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(8, 7, 10, 0.75), transparent);
  filter: blur(20px);
}
.lede { text-shadow: 0 1px 12px var(--bg), 0 0 2px var(--bg); }

.hero-logo {
  width: min(100%, 640px);
  height: auto;
  margin-bottom: clamp(28px, 5vw, 48px);
  animation: logo-in 1.4s var(--ease) both, glow 5s ease-in-out 1.4s infinite;
}
@keyframes logo-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); filter: blur(12px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(242, 193, 78, 0.35)); }
  50% { filter: drop-shadow(0 0 22px rgba(255, 61, 154, 0.6)) drop-shadow(0 0 40px rgba(139, 92, 255, 0.35)); }
}

.hero h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(44px, 8.5vw, 112px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; }
.w > span {
  display: inline-block;
  animation: rise 1s var(--ease) both;
  animation-delay: calc(0.35s + var(--d) * 0.09s);
}
.w:nth-child(3) > span, .w:nth-child(4) > span {
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 1s var(--ease) both, shimmer 6s linear infinite;
  animation-delay: calc(0.35s + var(--d) * 0.09s), 0s;
}
@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }
@keyframes shimmer { to { background-position: -200% 0; } }

.lede {
  max-width: 44ch;
  margin: 26px 0 0;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--muted);
  animation: fade-up 1s var(--ease) 0.8s both;
}
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.cats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; animation: fade-up 1s var(--ease) 1s both; }
.cats a {
  position: relative;
  font: 13px var(--mono);
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.cats a:hover {
  transform: translateY(-3px);
  border-color: var(--pink);
  box-shadow: 0 8px 30px -8px rgba(255, 61, 154, 0.6);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  animation: fade-up 1s var(--ease) 1.4s both;
}
.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--gold);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Product name ticker */
.marquee {
  position: relative;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  padding: 22px 0;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transform: rotate(-1.5deg);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: scroll-x 60s linear infinite;
}
.marquee span {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(244, 240, 232, 0.3);
  white-space: nowrap;
}
.marquee span:nth-of-type(3n + 1) {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.marquee b { font-size: 34px; color: var(--pink); font-weight: 400; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* Categories */
.cat { padding: 96px 0 24px; scroll-margin-top: 60px; }
.cat-head { position: relative; display: grid; gap: 6px; margin-bottom: 40px; }
.cat-num {
  font: 13px var(--mono);
  letter-spacing: 0.2em;
  color: var(--pink);
}
.cat-head h2 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.cat-head p { margin: 4px 0 0; color: var(--muted); max-width: 50ch; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 26px;
  perspective: 1200px;
}

/* Cards: module-panel plates that tilt toward the pointer */
.card a {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 14px 30px;
  background: var(--panel);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease), box-shadow 0.4s;
  isolation: isolate;
}
.card a::before {
  /* Gradient rim that lights up on hover */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--mx) var(--my), var(--pink), var(--violet) 30%, var(--line) 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.card a:hover { transition: transform 0.12s linear, box-shadow 0.4s; box-shadow: 0 30px 60px -20px rgba(139, 92, 255, 0.45), 0 0 0 1px transparent; }
.card a:hover::before { opacity: 1; }

.hole {
  position: absolute;
  bottom: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.15);
}
.hole.l { left: 12px; }
.hole.r { right: 12px; }

.card-body { padding: 18px 6px 0; transform: translateZ(30px); }
.card h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.more-link {
  display: inline-block;
  margin-top: 14px;
  font: 12px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.more-link b { display: inline-block; transition: transform 0.3s var(--ease); }
.card a:hover .more-link b { transform: translateX(6px); }

.frame {
  position: relative;
  aspect-ratio: 1;
  background: #e8e5df;
  border-radius: 9px;
  overflow: hidden;
  transform: translateZ(20px);
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.card a:hover .frame img { transform: scale(1.07); }
.shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.35), transparent 45%);
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity 0.3s;
}
.card a:hover .shine, .tilt:hover .shine { opacity: 1; }

/* Scroll reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.1s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* Product page */
.product {
  display: grid;
  gap: 40px;
  padding: 32px 0 56px;
}
@media (min-width: 900px) {
  .product { grid-template-columns: 1.2fr 1fr; gap: 64px; padding-top: 48px; min-height: calc(100svh - 64px); align-items: center; }
  .info { position: sticky; top: 100px; align-self: start; }
}
.gallery { perspective: 1200px; }
.gallery .main { animation: logo-in 1.1s var(--ease) both; box-shadow: 0 40px 80px -30px rgba(139, 92, 255, 0.5); }
.tilt {
  --rx: 0deg;
  --ry: 0deg;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s var(--ease);
}
.tilt:hover { transition: transform 0.12s linear; }
.more { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; margin-top: 16px; }

.info > * { animation: fade-up 0.9s var(--ease) both; }
.info > :nth-child(2) { animation-delay: 0.1s; }
.info > :nth-child(3) { animation-delay: 0.2s; }
.info > :nth-child(4) { animation-delay: 0.3s; }
.info h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}
.info > p:not(.label) { color: var(--muted); max-width: 44ch; font-size: 18px; }

.buy {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 16px 28px;
  background: var(--gold);
  color: var(--bg);
  border-radius: 999px;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s var(--ease), box-shadow 0.3s;
}
.buy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--grad);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.35s;
  animation: shimmer 3s linear infinite;
}
.buy::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  animation: sweep 3.2s ease-in-out 1.2s infinite;
}
@keyframes sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.buy:hover { color: #fff; transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 40px -10px rgba(255, 61, 154, 0.7); }
.buy:hover::before { opacity: 1; }
.buy b { transition: transform 0.3s var(--ease); }
.buy:hover b { transform: translateX(5px); }

.related { padding-bottom: 40px; }
.related .cat-head h2 { font-size: clamp(30px, 4vw, 48px); }

/* Footer with a slow wave */
.foot { position: relative; margin-top: 120px; padding: 90px 0 48px; color: var(--muted); font-size: 15px; overflow: hidden; }
.foot-wave { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.foot-logo { width: min(70%, 380px); height: auto; margin-bottom: 26px; opacity: 0.9; }
.foot p { margin: 0 0 6px; }
.foot .fine { font: 12px var(--mono); letter-spacing: 0.08em; }

/* Click ripples, drawn by main.js */
.ripple {
  position: fixed;
  z-index: 90;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  border: 2px solid var(--c, var(--gold));
  pointer-events: none;
  animation: ripple 0.8s var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(14); opacity: 0; } }

@media (max-width: 560px) {
  .shop span, .sound-label { display: none; }
  .sound { padding: 8px 11px; }
  .hero { min-height: calc(100svh - 60px); }
  .cat { padding-top: 72px; }
}

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