:root {
  --sand-50: #f7f2ed;
  --sand-100: #efe7df;
  --sand-200: #e5ddd5;
  --sand-300: #d3c7bd;
  --sand-500: #b19e92;
  --sand-700: #6b5b52;
  --sand-900: #2c1f18;
  --lavender-500: #bba4f2;
  --rose-500: #f38ba0;
  --mint-500: #9dd9c5;
  --shadow-outer:
    12px 12px 32px rgba(138, 117, 96, 0.28), -12px -12px 32px rgba(255, 255, 255, 0.8);
  --shadow-inner:
    inset 8px 8px 18px rgba(138, 117, 96, 0.35), inset -8px -8px 18px rgba(255, 255, 255, 0.8);
  --shadow-soft: 10px 10px 24px rgba(138, 117, 96, 0.25), -10px -10px 24px rgba(255, 255, 255, 0.9);
  --radius-lg: 28px;
  --radius-md: 18px;
  --space-1: clamp(0.3rem, 0.2rem + 0.25vw, 0.55rem);
  --space-2: clamp(0.55rem, 0.4rem + 0.35vw, 0.85rem);
  --space-3: clamp(0.85rem, 0.6rem + 0.4vw, 1.15rem);
  --space-4: clamp(1rem, 0.8rem + 0.45vw, 1.4rem);
  --space-5: clamp(1.35rem, 1rem + 0.6vw, 2rem);
  --space-6: clamp(1.75rem, 1.2rem + 0.9vw, 2.8rem);
  --shell-width: min(1040px, 90vw);
}

* {
  box-sizing: border-box;
}

body,
.site-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.4), transparent 45%) no-repeat,
    var(--sand-200);
  font-family:
    'Space Grotesk',
    'Inter',
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--sand-900);
  line-height: 1.6;
  padding-bottom: var(--space-6);
}

.page-main {
  padding-bottom: var(--space-6);
}

img,
svg {
  display: block;
}

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

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

.site-shell {
  width: var(--shell-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-2);
  padding-right: var(--space-2);
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-3);
  padding-bottom: var(--space-5);
}

.section {
  background: var(--sand-50);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-outer);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.stack--tight {
  gap: var(--space-2);
}

.stack--compact {
  gap: var(--space-1);
}

.stack--loose {
  gap: var(--space-4);
}

.cluster {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

[data-units='metric'] .unit-imperial {
  display: none;
}

[data-units='imperial'] .unit-metric {
  display: none;
}

.category-hero {
  background: var(--sand-50);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 2.5rem 0;
  margin-bottom: 2rem;
}

.category-hero__title {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.category-hero__detail {
  margin-top: 1.25rem;
  color: var(--sand-700);
  max-width: 720px;
}

.category-hero__lead {
  color: var(--sand-700);
  margin-top: 0.35rem;
}

.breadcrumb-link {
  font-size: 0.85rem;
  color: var(--sand-700);
}

.category-icon-pill {
  width: 80px;
  height: 80px;
  border-radius: 28px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: var(--shadow-inner);
}

.category-layout {
  display: flex;
  gap: 2rem;
}

.category-content {
  flex: 1;
  min-width: 0;
}

.category-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.toolbar-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar-select {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.category-toolbar #results-subtitle {
  color: var(--sand-700);
  margin-top: 0.35rem;
}

.hero {
  padding: 0;
}

.hero h1 {
  font-size: clamp(1.85rem, 3.4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 0.65rem;
  color: var(--sand-900);
}

.hero__lead {
  font-size: 0.98rem;
  color: var(--sand-700);
  max-width: 640px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--sand-700);
  margin-bottom: 0.5rem;
}

.hero__controls {
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
}

.hero__controls .surface,
.hero__controls .filter-pills {
  width: 100%;
}

.surface {
  background: var(--sand-50);
  border-radius: var(--radius-lg);
  padding: clamp(0.65rem, 0.55rem + 0.35vw, 0.9rem) 1rem;
  box-shadow: var(--shadow-inner);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
}

.search-bar svg {
  width: 20px;
  height: 20px;
  color: var(--sand-700);
}

.search-bar input {
  flex: 1;
  margin: 0 0.5rem;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--sand-900);
  outline: none;
}

.search-bar button {
  border: none;
  background: transparent;
  color: var(--sand-700);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  cursor: pointer;
}

.filter-pills__label {
  font-size: 0.8rem;
  color: var(--sand-700);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-pill {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  background: var(--sand-50);
  box-shadow: var(--shadow-soft);
  color: var(--sand-700);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
}

.category-pill.is-active {
  background: #fff;
  color: var(--sand-900);
  box-shadow:
    inset 4px 4px 8px rgba(138, 117, 96, 0.25),
    inset -4px -4px 12px rgba(255, 255, 255, 0.9);
}

.results-meta {
  background: var(--sand-50);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 0.9rem + 0.35vw, 1.5rem);
  box-shadow: var(--shadow-outer);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.results-meta h2 {
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
  margin-bottom: 0.25rem;
}

.results-meta p {
  color: var(--sand-700);
}

.results-subtitle {
  margin: 0;
}

.results-counter {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.results-counter__value {
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--sand-900);
}

.results-counter__label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--sand-700);
}

.empty-state {
  text-align: center;
  margin-top: var(--space-5);
  background: var(--sand-50);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.2rem + 0.6vw, 2.25rem) 1.5rem;
  box-shadow: var(--shadow-inner);
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.empty-state__hint {
  color: var(--sand-700);
  margin-top: 0.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(229, 221, 213, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.site-header__shell,
.site-footer__shell {
  padding: var(--space-3) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--lavender-500), var(--mint-500));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  font-size: 1.5rem;
}

.brand-label {
  font-weight: 600;
  color: var(--sand-900);
}

.chip {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--sand-700);
  background: var(--sand-100);
}

.header-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stat-pill {
  background: var(--sand-50);
  border-radius: 18px;
  padding: 0.65rem 1.1rem;
  box-shadow: var(--shadow-inner);
  text-align: center;
}

.stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  display: block;
  color: var(--sand-700);
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.unit-toggle {
  display: inline-flex;
  padding: 0.25rem;
  background: var(--sand-50);
  border-radius: 999px;
  box-shadow: var(--shadow-inner);
}

.unit-toggle__btn {
  border: none;
  background: transparent;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--sand-700);
  cursor: pointer;
}

.unit-toggle__btn.active {
  background: #fff;
  color: var(--sand-900);
  box-shadow:
    inset 4px 4px 8px rgba(138, 117, 96, 0.2),
    inset -4px -4px 8px rgba(255, 255, 255, 0.7);
}

.site-footer {
  margin-top: var(--space-6);
  padding: var(--space-4) 0 var(--space-6);
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.microcopy {
  color: var(--sand-700);
  font-size: 0.85rem;
}

/* Buttons shared */
.btn,
.btn-primary,
.btn-secondary {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.btn {
  background: var(--sand-50);
  color: var(--sand-700);
  box-shadow: var(--shadow-soft);
}

.btn-primary {
  background: linear-gradient(120deg, var(--lavender-500), var(--mint-500));
  color: var(--sand-900);
}

.btn-secondary {
  background: var(--sand-50);
  color: var(--sand-700);
  box-shadow: var(--shadow-soft);
}

/* Category + robot detail pages */
.card-dark {
  background: #fff;
  border-radius: 24px;
  padding: 1.75rem;
  box-shadow: var(--shadow-outer);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: var(--sand-50);
  color: var(--sand-700);
}

.status-available {
  background: rgba(157, 217, 197, 0.35);
}

.status-coming-soon,
.status-pre-order,
.status-pilot-program,
.status-development,
.status-research-only {
  background: rgba(243, 139, 160, 0.2);
}

.filter-sidebar {
  background: #fff;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow-outer);
}

.filter-group + .filter-group {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 1rem;
}

.checkbox-dark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  appearance: none;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.checkbox-dark:checked {
  background: var(--lavender-500);
  border-color: transparent;
}

.checkbox-dark:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: #fff;
  border-radius: 4px;
}

.select-dark,
.select {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.5rem 1.25rem;
  background: #fff;
  font-size: 0.95rem;
}

.view-toggle {
  display: inline-flex;
  background: var(--sand-50);
  border-radius: 999px;
  box-shadow: var(--shadow-inner);
}

.view-toggle button {
  border: none;
  background: transparent;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}

.view-toggle button.active {
  background: #fff;
  border-radius: 999px;
}

.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.filter-sidebar-mobile {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 90vw);
  background: #fff;
  transform: translateX(100%);
  transition: transform 200ms ease;
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
}

.filter-sidebar-mobile.open,
.filter-sidebar-mobile.active {
  transform: translateX(0);
}

.filter-overlay.visible,
.filter-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.spec-item {
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  background: var(--sand-50);
  box-shadow: var(--shadow-inner);
}
.spec-label {
  font-size: 0.8rem;
  color: var(--sand-700);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.spec-value {
  color: var(--sand-900);
  font-weight: 600;
}

/* Utilities */
.hidden {
  display: none !important;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 900px) {
  .site-header__shell,
  .site-footer__shell,
  .hero__content,
  .surface,
  .results-meta {
    width: 92vw;
  }

  .site-header__shell {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .category-layout {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .hero__content {
    padding: 1.25rem;
  }

  .robot-card {
    padding: 1.25rem;
  }

  .robot-card__body {
    flex-direction: column;
    align-items: flex-start;
  }

  .robot-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}
