:root {
  --void: #08080b;
  --ink: #111318;
  --panel: rgba(13, 17, 24, 0.9);
  --bone: #f2ead8;
  --muted: #b8b3a7;
  --green: #62ff8f;
  --amber: #ffb000;
  --magenta: #ff3bd4;
  --cyan: #38dfff;
  --red: #ff4b4b;
  --line: rgba(242, 234, 216, 0.16);
  --shadow: rgba(0, 0, 0, 0.5);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--bone);
  background: var(--void);
  overflow-x: hidden;
}

body.cart-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

#alley-canvas,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#alley-canvas {
  z-index: -3;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 59, 212, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 8%, rgba(56, 223, 255, 0.14), transparent 24rem),
    linear-gradient(180deg, #08080b 0%, #101315 60%, #060709 100%);
}

.scanlines {
  z-index: 50;
  opacity: 0.09;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(242, 234, 216, 0.7) 4px);
  mix-blend-mode: overlay;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  padding: 0.75rem clamp(1rem, 3vw, 2rem);
  background: rgba(8, 8, 11, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand-mark,
.site-header nav,
.cart-trigger,
.button,
.icon-button {
  min-height: 44px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--bone);
  font-family: "Courier New", ui-monospace, monospace;
  font-weight: 800;
  text-decoration: none;
}

.brand-sigil {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--void);
  background: var(--green);
  border: 2px solid var(--bone);
  box-shadow: 4px 4px 0 var(--magenta);
}

.site-header nav {
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.4rem);
  align-items: center;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--green);
}

.cart-trigger,
.button,
.icon-button {
  border: 1px solid var(--line);
  background: rgba(8, 8, 11, 0.75);
  cursor: pointer;
}

.cart-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.85rem;
}

.cart-trigger strong {
  min-width: 1.8rem;
  padding: 0.25rem 0.45rem;
  color: var(--void);
  background: var(--amber);
  text-align: center;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: min(760px, calc(100vh - 190px));
  padding: clamp(2.25rem, 5.5vw, 4.5rem) clamp(1rem, 5vw, 5rem) 3rem;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(0deg, var(--void), transparent);
  pointer-events: none;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.2) contrast(1.1);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 820px;
  align-self: center;
}

.eyebrow,
.meta,
.status,
.product-id,
.checkout-status {
  font-family: "Courier New", ui-monospace, monospace;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 9ch;
  color: var(--bone);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(4.8rem, 18vw, 13rem);
  line-height: 0.82;
  letter-spacing: 0;
  text-shadow: 0.05em 0 var(--magenta), -0.04em 0 var(--cyan), 0 0 22px rgba(98, 255, 143, 0.4);
}

.hero-subhead {
  max-width: 680px;
  margin: 1.4rem 0 0;
  color: var(--green);
  font-size: clamp(1.35rem, 4vw, 2.4rem);
  line-height: 1;
  font-weight: 900;
}

.hero-text {
  max-width: 560px;
  margin: 1rem 0 0;
  color: var(--bone);
  font-size: 1.05rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 11rem;
  padding: 0.8rem 1rem;
  color: var(--bone);
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  color: var(--void);
  background: var(--green);
  border-color: var(--green);
  box-shadow: 5px 5px 0 var(--magenta);
}

.button.secondary {
  color: var(--bone);
  background: rgba(8, 8, 11, 0.78);
  box-shadow: 5px 5px 0 rgba(56, 223, 255, 0.55);
}

.button:focus-visible,
.cart-trigger:focus-visible,
.icon-button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.stripe-card:focus-within {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(6, auto);
  gap: 0.7rem 1rem;
  align-items: center;
  padding: 0.85rem clamp(1rem, 5vw, 5rem);
  color: var(--muted);
  background: var(--bone);
}

.status-band strong {
  color: var(--void);
  font-family: "Courier New", ui-monospace, monospace;
}

.status-band span {
  color: #5e5545;
}

section:not(.hero) {
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 5vw, 5rem);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.product-collections {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  min-width: 0;
}

.collection-group {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.collection-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  color: var(--bone);
}

.collection-heading h3 {
  color: var(--bone);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
}

.collection-heading p:not(.eyebrow) {
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.1;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1rem;
  min-width: 0;
}

.product-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  min-height: 520px;
  background: rgba(8, 8, 11, 0.82);
  border: 1px solid var(--line);
  box-shadow: 0 22px 60px var(--shadow);
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  pointer-events: none;
}

.product-card:hover::before {
  border-color: var(--green);
  box-shadow: inset 0 0 0 2px rgba(255, 59, 212, 0.35);
  animation: glitch 0.22s steps(2, end);
}

.product-image {
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  min-width: 0;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(98, 255, 143, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(255, 176, 0, 0.14), transparent 42%),
    #111318;
}

.product-image img {
  width: 100%;
  max-width: 280px;
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
}

.product-body {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  padding: 1rem;
}

.product-meta-row,
.product-actions,
.cart-line,
.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.chip,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line);
  color: var(--green);
  background: rgba(98, 255, 143, 0.08);
  font-size: 0.78rem;
}

.price {
  color: var(--amber);
  font-size: 1.25rem;
  font-weight: 900;
}

.product-card p,
.split-section p,
.faq-grid p,
.checkout-status,
.signal-queue p {
  color: var(--muted);
  line-height: 1.55;
}

.product-actions {
  padding: 0 1rem 1rem;
}

.product-actions .button {
  min-width: 0;
  width: 100%;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: center;
  background: var(--bone);
  color: var(--void);
}

.split-section .eyebrow {
  color: #0a7a35;
}

.split-section p {
  color: #2f302d;
  font-size: 1.15rem;
}

.signal-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 1rem;
}

.signal-section .section-heading {
  grid-column: 1 / -1;
}

.signal-form {
  display: grid;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--bone);
  background: rgba(8, 8, 11, 0.82);
}

input {
  min-height: 46px;
  padding: 0 0.75rem;
}

textarea {
  min-height: 120px;
  padding: 0.75rem;
  resize: vertical;
}

.signal-queue {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.signal-item,
.faq-grid details {
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(13, 17, 24, 0.86);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 900;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(100%, 430px);
  height: 100vh;
  padding: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #0b0d12;
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.55);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

body.cart-open .cart-panel {
  transform: translateX(0);
}

.cart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--bone);
  font-weight: 900;
}

.cart-lines {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  min-height: 0;
  overflow: auto;
  padding: 1rem 0;
}

.cart-line {
  align-items: start;
  padding: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.qty-controls button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  color: var(--bone);
  background: transparent;
}

.cart-total {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  font-size: 1.2rem;
}

.checkout-button {
  width: 100%;
}

.checkout-form {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.checkout-form label {
  font-size: 0.82rem;
}

.checkout-form input {
  min-height: 40px;
}

.stripe-payment {
  display: grid;
  gap: 0.75rem;
}

.stripe-card {
  min-height: 46px;
  padding: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(8, 8, 11, 0.82);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  background: rgba(0, 0, 0, 0.55);
}

body.cart-open .scrim {
  display: block;
}

.product-dialog {
  width: min(920px, calc(100% - 2rem));
  padding: 0;
  color: var(--bone);
  background: #0b0d12;
  border: 1px solid var(--line);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
}

.product-dialog::backdrop {
  background: rgba(0, 0, 0, 0.74);
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1fr);
}

.detail-layout .product-image {
  min-height: 100%;
  aspect-ratio: auto;
}

.detail-copy {
  display: grid;
  gap: 1rem;
  align-content: center;
  padding: clamp(1rem, 4vw, 2rem);
}

.product-id {
  color: var(--cyan);
  font-size: 0.82rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem clamp(1rem, 5vw, 5rem);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--void);
}

.site-footer a {
  color: var(--green);
}

@keyframes glitch {
  0% {
    transform: translate(0);
  }
  50% {
    transform: translate(4px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-header nav {
    grid-column: 1 / -1;
    justify-content: start;
    overflow-x: auto;
  }

  .hero {
    min-height: 690px;
    padding-top: 3rem;
  }

  .status-band {
    grid-template-columns: 1fr 1fr;
  }

  .section-heading,
  .collection-heading,
  .product-meta-row,
  .product-actions,
  .split-section,
  .signal-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .product-actions,
  .product-meta-row {
    align-items: start;
  }

  .product-actions {
    display: grid;
  }

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

  .product-card,
  .product-image,
  .product-body {
    width: 100%;
    max-width: 100%;
  }

  .cart-panel {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(96vh, 820px);
    border-left: 0;
    border-top: 1px solid var(--line);
    transform: translateY(100%);
  }

  body.cart-open .cart-panel {
    transform: translateY(0);
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }
}

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

  #alley-canvas {
    display: none;
  }
}
