/* Shop — shares the lab's design tokens and visual language with styles.css. */

:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0d0d0d;
  --line: #262626;
  --line-strong: #f4f4f4;
  --text: #f5f5f5;
  --muted: #a7a7a7;
  --subtle: #707070;
  --accent: #7df2c3;
  --accent-dim: rgba(125, 242, 195, 0.32);
  --danger: #ff857d;
  /* After Hours imprint mark — a country-club navy, distinct from the lab's
     mint accent, standing in the After Hours brand board's oxblood slot.
     Lightened off true navy (#1d2747) so it still reads on a near-black
     ground; a true navy sinks into invisibility here. */
  --ah-navy: #5c76c4;
  --ah-navy-dim: rgba(92, 118, 196, 0.35);
  --serif: "Bodoni Moda", Georgia, "Times New Roman", serif;
  --max: 1120px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --speed: 190ms;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  /* Transparent so the fixed starfield (z-index: -1) shows through. */
  background: transparent;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

body.drawer-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button {
  cursor: pointer;
}

button,
input,
select {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 1px solid rgba(245, 245, 245, 0.72);
  outline-offset: 5px;
}

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

[hidden] {
  display: none !important;
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0.08em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 16px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- ambient layers ---------- */

.starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 41;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(245, 245, 245, 0.013) 0 1px,
    transparent 1px 3px
  );
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(245, 245, 245, 0.045) 0%,
    rgba(125, 242, 195, 0.02) 34%,
    transparent 68%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms var(--ease);
  will-change: transform;
}

body.has-cursor-glow .cursor-glow {
  opacity: 1;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--text), var(--accent));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- fault line ---------- */

.faultline {
  position: fixed;
  top: 0;
  left: clamp(10px, 2.4vw, 30px);
  z-index: 45;
  width: 12px;
  height: 100vh;
  --fault: 0;
  pointer-events: none;
}

.faultline-track {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(245, 245, 245, 0.14) 10%,
    rgba(245, 245, 245, 0.14) 90%,
    transparent
  );
  transform: translateX(-50%);
}

.faultline-core {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(125, 242, 195, 0.15),
    var(--accent) 78%,
    var(--accent)
  );
  box-shadow: 0 0 9px var(--accent-dim);
  transform: translateX(-50%) scaleY(var(--fault));
  transform-origin: top;
  will-change: transform;
}

.faultline-head {
  position: absolute;
  top: 0;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent), 0 0 22px var(--accent-dim);
  transform: translate(-50%, calc(var(--fault) * (100vh - 7px)));
  will-change: transform;
  animation: fault-head-pulse 2.2s var(--ease) infinite;
}

.faultline-node {
  position: absolute;
  left: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(245, 245, 245, 0.35);
  border-radius: 50%;
  background: var(--bg);
  transform: translate(-50%, -50%);
  transition:
    border-color 300ms var(--ease),
    box-shadow 300ms var(--ease),
    background-color 300ms var(--ease);
}

.faultline-node.passed {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-dim);
}

.faultline-node.active {
  animation: fault-node-pulse 1.8s var(--ease) infinite;
}

@keyframes fault-head-pulse {
  0%,
  100% {
    box-shadow: 0 0 10px var(--accent), 0 0 16px var(--accent-dim);
  }
  50% {
    box-shadow: 0 0 16px var(--accent), 0 0 30px var(--accent-dim);
  }
}

@keyframes fault-node-pulse {
  0%,
  100% {
    box-shadow: 0 0 8px var(--accent-dim);
  }
  50% {
    box-shadow: 0 0 16px var(--accent), 0 0 26px var(--accent-dim);
  }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
  background: rgba(5, 5, 5, 0.84);
  backdrop-filter: blur(16px);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  transition:
    opacity var(--speed) var(--ease),
    text-shadow var(--speed) var(--ease);
}

/* The primary lockup from the After Hours brand board: house mark in
   wide-tracked caps, hairline, imprint in italic didone directly beneath.
   It ships as one unit — never the half. */
.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.lockup-rule {
  width: 100%;
  height: 1px;
  background: rgba(245, 245, 245, 0.3);
}

.lockup-imprint {
  color: var(--ah-navy);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: -0.01em;
  /* The house mark is caps; the imprint is not. Don't inherit it. */
  text-transform: none;
  text-shadow: 0 0 24px var(--ah-navy-dim);
}

.brand-link .brand-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
  transition:
    opacity var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}

/* The wordmark is artwork, not type — height-driven, width follows aspect. */
.brand-link .brand-wordmark {
  height: 13px;
  width: auto;
  flex: 0 0 auto;
  transition: opacity var(--speed) var(--ease);
}

.brand-link:hover,
.brand-link:focus-visible {
  text-shadow: 0 0 18px rgba(245, 245, 245, 0.18);
}

.brand-link:hover .brand-icon,
.brand-link:focus-visible .brand-icon {
  opacity: 0.88;
  transform: scale(1.035);
}

.brand-link:hover .brand-wordmark,
.brand-link:focus-visible .brand-wordmark {
  opacity: 0.88;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.desktop-nav a {
  color: var(--muted);
  white-space: nowrap;
  transition:
    color var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
}

.cart-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(245, 245, 245, 0.46);
  background: transparent;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  transition:
    border-color var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}

.cart-trigger:hover,
.cart-trigger:focus-visible {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.cart-count {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(56px, 9vh, 104px) 0 0;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to right, rgba(245, 245, 245, 0.028) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(to bottom, rgba(245, 245, 245, 0.028) 0 1px, transparent 1px 90px);
  -webkit-mask-image: radial-gradient(ellipse 82% 78% at 50% 38%, #000 32%, transparent 78%);
  mask-image: radial-gradient(ellipse 82% 78% at 50% 38%, #000 32%, transparent 78%);
  animation: grid-drift 26s linear infinite;
}

.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    112deg,
    transparent 32%,
    rgba(125, 242, 195, 0.045) 46%,
    rgba(150, 180, 255, 0.035) 56%,
    transparent 70%
  );
  background-size: 240% 100%;
  -webkit-mask-image: radial-gradient(ellipse 78% 70% at 50% 42%, #000 30%, transparent 76%);
  mask-image: radial-gradient(ellipse 78% 70% at 50% 42%, #000 30%, transparent 76%);
  animation: aurora-pan 17s ease-in-out infinite alternate;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(48px, 8vh, 90px);
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 34px;
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 600;
  animation: rise-in 900ms var(--ease) both;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-dim);
  animation: pulse-dot 2.4s var(--ease) infinite;
}

.hero h1 {
  max-width: 920px;
  margin: 16px 0 0;
  font-size: clamp(3rem, 9vw, 5.6rem);
  font-weight: 800;
  line-height: 0.86;
  text-transform: uppercase;
  animation: rise-in 900ms 80ms var(--ease) both;
}

.hero-subtitle {
  max-width: 620px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.55;
  animation: rise-in 900ms 160ms var(--ease) both;
}

.hero-actions {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  animation: rise-in 900ms 240ms var(--ease) both;
}

.hero-action-primary,
.hero-action-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(245, 245, 245, 0.5);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  transition:
    background-color var(--speed) var(--ease),
    color var(--speed) var(--ease),
    border-color var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}

.hero-action-primary {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.hero-action-secondary {
  color: var(--muted);
  font-size: 0.68rem;
}

.hero-action-primary:hover,
.hero-action-primary:focus-visible,
.hero-action-secondary:hover,
.hero-action-secondary:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero-action-secondary:hover,
.hero-action-secondary:focus-visible {
  color: var(--text);
}

.hero-readout {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
}

.hero-readout strong {
  color: var(--accent);
  font-weight: 700;
}

.hero-readout span:last-child {
  margin-left: auto;
  text-align: right;
  text-transform: none;
  letter-spacing: 0.04em;
}

body[data-launch-status="available"] .coming-only,
body[data-launch-status="coming-soon"] .available-only {
  display: none;
}

/* ---------- sections ---------- */

.section {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 104px 0;
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  margin: 0;
  color: var(--subtle);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 36px;
}

.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(2.4rem, 7vw, 4.15rem);
  font-weight: 800;
  line-height: 0.98;
  text-transform: uppercase;
}

.section-note {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- catalog ---------- */

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.category-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.filter-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  transition:
    border-color var(--speed) var(--ease),
    color var(--speed) var(--ease);
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button[aria-pressed="true"] {
  border-color: rgba(245, 245, 245, 0.55);
  color: var(--text);
}

.product-count {
  margin: 0;
  color: var(--subtle);
  font-size: 0.66rem;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Mirrors the lab's service-grid treatment: bright top rule, hairline cells. */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line);
}

.product-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(245, 245, 245, 0.035), rgba(245, 245, 245, 0) 42%),
    rgba(13, 13, 13, 0.72);
  transition:
    background-color var(--speed) var(--ease),
    box-shadow var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}

.product-card:hover {
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42), 0 0 26px rgba(125, 242, 195, 0.05);
  transform: translateY(-2px);
}

.product-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}

.product-open:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -3px;
}

.product-image-wrap {
  position: relative;
  display: block;
  aspect-ratio: 0.84;
  overflow: hidden;
  background: rgba(5, 5, 5, 0.6);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease);
}

.product-open:hover .product-image,
.product-open:focus-visible .product-image {
  transform: scale(1.03);
}

.product-state {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.82);
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
}

.product-state:empty {
  display: none;
}

.product-info {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  min-height: 96px;
  padding: 22px;
  border-top: 1px solid var(--line);
}

.product-info > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.product-type {
  color: var(--subtle);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
}

.product-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}

.product-price {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
}

.product-skeleton {
  padding-bottom: 22px;
}

.product-skeleton div {
  aspect-ratio: 0.84;
  background: linear-gradient(
    105deg,
    rgba(245, 245, 245, 0.02) 20%,
    rgba(245, 245, 245, 0.06) 40%,
    rgba(245, 245, 245, 0.02) 60%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.product-skeleton span {
  display: block;
  width: 55%;
  height: 9px;
  margin: 22px 22px 0;
  background: rgba(245, 245, 245, 0.06);
}

.product-skeleton span:last-child {
  width: 30%;
  margin-top: 9px;
}

.catalog-empty {
  padding: clamp(56px, 10vw, 110px) 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(245, 245, 245, 0.035), rgba(245, 245, 245, 0) 42%),
    rgba(13, 13, 13, 0.72);
  text-align: center;
}

.empty-index {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 600;
}

.catalog-empty h3 {
  margin: 22px 0 14px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.catalog-empty p {
  max-width: 480px;
  margin: 0 auto 28px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(245, 245, 245, 0.5);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  transition:
    background-color var(--speed) var(--ease),
    color var(--speed) var(--ease),
    border-color var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}

.button-primary {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.button-outline {
  background: transparent;
  color: var(--text);
}

.button:hover,
.button:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ---------- manifesto ---------- */

.manifesto {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.manifesto h2 {
  max-width: 760px;
  margin: 14px 0 0;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 0.98;
}

.manifesto-lede {
  max-width: 640px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.6;
}

.manifesto-specs {
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.manifesto-specs div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.manifesto-specs dt,
.manifesto-specs dd {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
}

.manifesto-specs dt {
  color: var(--subtle);
}

.manifesto-specs dd {
  color: var(--text);
}

/* ---------- join ---------- */

.join-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 8vw, 100px);
  align-items: end;
}

.join-section h2 {
  margin: 14px 0 0;
  font-size: clamp(2.4rem, 7vw, 4.15rem);
  font-weight: 800;
  line-height: 0.98;
  text-transform: uppercase;
}

.join-form-wrap {
  max-width: 620px;
}

.join-lede {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

.join-form {
  display: grid;
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid rgba(245, 245, 245, 0.42);
  transition: border-color var(--speed) var(--ease);
}

.join-form:focus-within {
  border-color: var(--accent);
}

.join-form input {
  min-width: 0;
  padding: 16px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.4rem);
}

.join-form input::placeholder {
  color: var(--subtle);
}

.join-form button {
  min-width: 96px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.join-form button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.button-loader {
  display: none;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid rgba(125, 242, 195, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.join-form.is-loading .button-label {
  display: none;
}

.join-form.is-loading .button-loader {
  display: block;
}

.form-trap {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
}

.form-status {
  min-height: 20px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.form-status[data-state="error"] {
  color: var(--danger);
}

.form-status[data-state="success"] {
  color: var(--accent);
}

.form-fineprint {
  margin: 7px 0 0;
  color: var(--subtle);
  font-size: 0.72rem;
}

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 42px;
  color: var(--subtle);
  font-size: 0.86rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.social-links a {
  transition:
    color var(--speed) var(--ease),
    text-shadow var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--text);
  text-shadow: 0 0 16px rgba(245, 245, 245, 0.14);
  transform: translateY(-1px);
}

.site-footer p {
  margin: 0;
}

.footer-telemetry {
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 600;
}

/* ---------- drawers ---------- */

.drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
  cursor: default;
  animation: fade-in 0.25s ease;
}

.cart-drawer,
.product-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100%);
  border-left: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(245, 245, 245, 0.03), transparent 40%),
    rgba(8, 8, 8, 0.98);
  box-shadow: -25px 0 70px rgba(0, 0, 0, 0.5);
  animation: slide-in 0.35s var(--ease);
}

.cart-drawer {
  display: flex;
  flex-direction: column;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 10px 0 0;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(245, 245, 245, 0.16);
  background: rgba(13, 13, 13, 0.58);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  transition:
    border-color var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 28px;
}

.cart-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  min-height: 60vh;
  text-align: center;
}

.cart-empty strong {
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cart-empty p {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.cart-loading {
  padding: 40px 0;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.cart-line {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line img {
  width: 92px;
  height: 112px;
  object-fit: cover;
  background: rgba(245, 245, 245, 0.04);
}

.cart-line-copy {
  min-width: 0;
}

.cart-line-copy strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.cart-line-copy > span {
  display: block;
  margin-top: 7px;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.cart-line-price {
  font-family: var(--mono);
  font-size: 0.7rem;
  white-space: nowrap;
}

.quantity-control {
  display: grid;
  grid-template-columns: 30px 28px 30px;
  align-items: center;
  width: max-content;
  margin-top: 16px;
  border: 1px solid var(--line);
}

.quantity-control button {
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--text);
  transition: color var(--speed) var(--ease);
}

.quantity-control button:hover {
  color: var(--accent);
}

.quantity-control span {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-align: center;
}

.line-remove {
  display: block;
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.6rem;
  text-decoration: underline;
  text-transform: uppercase;
}

.line-remove:hover {
  color: var(--text);
}

.cart-footer {
  padding: 24px 28px 28px;
  border-top: 1px solid var(--line);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.92rem;
  font-weight: 700;
}

.cart-footer > p {
  margin: 10px 0 20px;
  color: var(--subtle);
  font-size: 0.72rem;
  line-height: 1.5;
}

.checkout-button {
  width: 100%;
}

/* ---------- product detail ---------- */

.product-drawer {
  width: min(700px, 100%);
  overflow-y: auto;
}

.product-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  background: rgba(5, 5, 5, 0.75);
}

.detail-image {
  width: 100%;
  aspect-ratio: 1.08;
  object-fit: cover;
  background: rgba(245, 245, 245, 0.04);
}

.detail-copy {
  padding: clamp(26px, 5vw, 48px);
}

.detail-type {
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-copy h2 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 0.98;
  text-transform: uppercase;
}

.detail-price {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.detail-description {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.option-group {
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.option-group legend {
  margin-bottom: 12px;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.option-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-value {
  position: relative;
}

.option-value input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-value span {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color var(--speed) var(--ease),
    color var(--speed) var(--ease);
}

.option-value input:checked + span,
.option-value input:focus-visible + span {
  border-color: var(--accent);
  color: var(--text);
}

.option-value input:disabled + span {
  opacity: 0.25;
  cursor: not-allowed;
  text-decoration: line-through;
}

.add-to-cart {
  width: 100%;
  margin-top: 32px;
}

.detail-note,
.detail-status {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 0.64rem;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
}

.detail-note {
  color: var(--subtle);
}

.detail-status {
  min-height: 18px;
  color: var(--danger);
}

/* ---------- keyframes ---------- */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 6px var(--accent-dim);
  }
  50% {
    opacity: 0.35;
    box-shadow: 0 0 14px var(--accent-dim);
  }
}

@keyframes grid-drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 90px 0, 0 90px;
  }
}

@keyframes aurora-pan {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

@keyframes shimmer {
  to {
    background-position-x: -200%;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes slide-in {
  from {
    transform: translateX(100%);
  }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  /* The lockup scales rather than shedding its house mark — shipping the
     half is the one thing the brand board rules out. */
  .brand-link .brand-wordmark {
    height: 11px;
  }

  .lockup-imprint {
    font-size: 1.02rem;
  }

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

  .manifesto,
  .join-section {
    grid-template-columns: 1fr;
  }

  .section-heading {
    flex-direction: column;
    align-items: start;
    gap: 18px;
  }

  .section-note {
    max-width: 520px;
  }
}

@media (max-width: 640px) {
  .faultline {
    display: none;
  }

  .site-header {
    padding: 16px 0;
  }

  .brand-link .brand-wordmark {
    height: 9px;
  }

  .lockup-imprint {
    font-size: 0.86rem;
  }

  .desktop-nav {
    gap: 16px;
    font-size: 0.66rem;
  }

  .section {
    padding: 72px 0;
  }

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

  .hero-readout {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .hero-readout span:last-child {
    flex-basis: 100%;
    margin-left: 0;
    text-align: left;
  }

  .site-footer {
    flex-direction: column;
    align-items: start;
    gap: 18px;
  }

  .cart-line {
    grid-template-columns: 74px 1fr;
  }

  .cart-line img {
    width: 74px;
    height: 92px;
  }

  .cart-line-price {
    grid-column: 2;
  }
}

@media (max-width: 460px) {
  .desktop-nav a:not(.account-link) {
    display: none;
  }
}

@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;
  }
}
