:root {
  color-scheme: dark;
  --bg: #0d0b1a;
  --surface: #17142d;
  --surface-strong: #211c3d;
  --text: #f7f3ff;
  --muted: #b9b1cc;
  --line: rgba(232, 222, 255, 0.13);
  --accent: #d5a7ff;
  --accent-strong: #a970ff;
  --gold: #ffd487;
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow: 0 20px 60px rgba(4, 2, 14, 0.32);
  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;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 8%, rgba(141, 85, 220, 0.2), transparent 28rem),
    radial-gradient(circle at 12% 38%, rgba(255, 188, 106, 0.08), transparent 24rem),
    var(--bg);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #171022;
  background: var(--gold);
  border-radius: 10px;
  transform: translateY(-160%);
}

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

.site-header,
.hero,
.catalog,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  border-bottom: 1px solid var(--line);
}

.brand,
.primary-link,
.demo-link {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-weight: 760;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  color: #171022;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  border-radius: 13px;
  box-shadow: 0 8px 28px rgba(199, 141, 255, 0.25);
  font-size: 0.78rem;
}

.language-switcher {
  display: inline-flex;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.language-switcher button,
.category-filters button {
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.language-switcher button {
  min-width: 42px;
  min-height: 34px;
  border-radius: 9px;
}

.language-switcher button[aria-pressed="true"] {
  color: #171022;
  background: var(--gold);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.4fr);
  gap: 72px;
  align-items: center;
  min-height: 570px;
  padding-block: 80px;
}

.hero-copy,
.section-heading > div,
.product-card {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(2.65rem, 6vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  overflow-wrap: anywhere;
}

.primary-link,
.demo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  color: #191124;
  background: linear-gradient(135deg, var(--gold), #e6b4ff);
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(178, 113, 255, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-link:hover,
.demo-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(178, 113, 255, 0.3);
}

.hero-orbit {
  position: relative;
  display: grid;
  width: min(25vw, 290px);
  min-width: 220px;
  aspect-ratio: 1;
  place-content: center;
  justify-self: end;
  text-align: center;
  background: radial-gradient(circle, rgba(188, 125, 255, 0.18), transparent 66%);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.hero-orbit::before,
.hero-orbit::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(213, 167, 255, 0.28);
  border-radius: 50%;
}

.hero-orbit::before {
  inset: 17%;
}

.hero-orbit::after {
  width: 10px;
  height: 10px;
  top: 12%;
  left: 22%;
  background: var(--gold);
  box-shadow: 0 0 26px var(--gold);
}

.orbit-core {
  font-size: 5rem;
  font-weight: 850;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.orbit-label {
  margin-top: 8px;
  color: var(--muted);
}

.catalog {
  padding-block: 72px 100px;
}

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

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -0.04em;
}

.category-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}

.category-filters button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 99px;
}

.category-filters button:hover {
  color: var(--text);
  border-color: rgba(213, 167, 255, 0.38);
}

.category-filters button[aria-pressed="true"] {
  color: #171022;
  background: var(--text);
  border-color: var(--text);
}

.category + .category {
  margin-top: 40px;
}

.category-header {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.category-title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.category-count {
  display: grid;
  min-width: 30px;
  height: 30px;
  padding-inline: 8px;
  place-items: center;
  color: var(--accent);
  background: rgba(213, 167, 255, 0.09);
  border: 1px solid rgba(213, 167, 255, 0.16);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  position: relative;
  display: flex;
  min-height: 0;
  padding: 16px;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(35, 29, 64, 0.94), rgba(22, 18, 43, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.product-card::after {
  position: absolute;
  width: 150px;
  height: 150px;
  right: -60px;
  bottom: -70px;
  content: "";
  background: radial-gradient(circle, rgba(190, 126, 255, 0.22), transparent 68%);
  pointer-events: none;
}

.product-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  place-items: center;
  color: var(--gold);
  background: rgba(255, 212, 135, 0.08);
  border: 1px solid rgba(255, 212, 135, 0.18);
  border-radius: 10px;
  font-size: 0.95rem;
}

.product-card.featured {
  border-color: rgba(255, 212, 135, 0.25);
}

.card-meta {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 8px;
}

.status,
.featured-label {
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status {
  color: var(--accent);
  background: rgba(213, 167, 255, 0.1);
}

.featured-label {
  color: var(--gold);
  background: rgba(255, 212, 135, 0.09);
}

.product-card h3 {
  max-width: 580px;
  margin-bottom: 6px;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.product-description {
  display: -webkit-box;
  max-width: 590px;
  margin-bottom: 12px;
  overflow: hidden;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.demo-link {
  z-index: 1;
  align-self: flex-start;
  margin-top: auto;
  background: var(--text);
  min-height: 36px;
  padding-inline: 13px;
  font-size: 0.78rem;
}

.catalog-message,
.loading {
  padding: 28px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.catalog-message strong {
  color: var(--text);
}

.site-footer {
  display: flex;
  gap: 40px;
  justify-content: space-between;
  padding-block: 42px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  line-height: 1.6;
}

.site-footer strong {
  color: var(--text);
}

.site-footer p {
  margin: 5px 0 0;
}

.copyright {
  text-align: right;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .site-header,
  .hero,
  .catalog,
  .site-footer {
    width: calc(100% - 28px);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: 72px 54px;
  }

  h1 {
    font-size: clamp(2.15rem, 11vw, 3rem);
    line-height: 1.02;
  }

  .hero-orbit {
    display: none;
  }

  .catalog {
    padding-block: 54px 72px;
  }

  .section-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    margin-bottom: 38px;
  }

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

  .product-card {
    min-height: 0;
  }

  .copyright {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .primary-link,
  .demo-link {
    transition: none;
  }
}
