:root {
  --bg: #050308;
  --panel: rgba(21, 14, 31, 0.84);
  --card: #120c1d;
  --ink: #f3ecff;
  --muted: #b7a6d8;
  --line: rgba(197, 163, 255, 0.16);
  --accent: #8b3dff;
  --accent-dark: #6720d9;
  --accent-soft: #2a183d;
  --highlight: #bb86ff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(139, 61, 255, 0.28), transparent 26%),
    radial-gradient(circle at top right, rgba(187, 134, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #0b0711 0%, var(--bg) 100%);
}

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

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

code {
  font-family: "Space Grotesk", monospace;
  font-size: 0.95em;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 8.5rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 1.2rem;
  border: 1px solid rgba(197, 163, 255, 0.16);
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(18, 12, 29, 0.96), rgba(11, 7, 17, 0.88)),
    rgba(10, 7, 16, 0.82);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -28% auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 61, 255, 0.28), transparent 62%);
  pointer-events: none;
}

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

.brand-lockup {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  height: 66px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), #c06bff);
  color: #fffaff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 18px 40px rgba(139, 61, 255, 0.3);
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--highlight);
  text-shadow: 0 0 18px rgba(187, 134, 255, 0.2);
}

.hero h1,
.section-heading h2,
.product-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.94;
}

.top-cta,
.button,
.purchase-link {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.top-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-weight: 800;
}

.top-cta {
  border: 1px solid var(--line);
  background: rgba(25, 17, 39, 0.88);
  color: var(--ink);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  max-width: 640px;
  padding: 4rem 0 2rem;
}

.hero-intro {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  color: var(--ink);
}

.hero-text,
.product-description,
.setup-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-top: 0.35rem;
}

.button-primary,
.purchase-link {
  background: linear-gradient(135deg, var(--accent), #b15cff);
  color: #fffaff;
  box-shadow: 0 16px 30px rgba(139, 61, 255, 0.28);
}

.button-secondary {
  border: 1px solid rgba(197, 163, 255, 0.16);
  background: rgba(25, 17, 39, 0.88);
  color: var(--ink);
}

.section-heading {
  padding: 3.5rem 0 1.4rem;
}

.section-heading h2 {
  max-width: 16ch;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.02;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.2rem;
}

.catalog-notice {
  grid-column: 1 / -1;
  padding: 1.3rem 1.4rem;
  border: 1px solid rgba(197, 163, 255, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(21, 14, 31, 0.92);
  color: var(--muted);
}

.catalog-notice p {
  margin: 0;
  line-height: 1.7;
}

.product-card {
  grid-column: span 4;
  display: grid;
  grid-template-rows: auto 1fr;
  isolation: isolate;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid rgba(197, 163, 255, 0.14);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  transform: translateY(24px);
  opacity: 0;
  animation: rise-in 700ms ease forwards;
}

.product-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(139, 61, 255, 0.14), rgba(187, 134, 255, 0.08)),
    #120c1d;
}

.product-image {
  height: 100%;
  object-fit: cover;
}

.image-fallback {
  position: absolute;
  inset: 0;
  background: transparent;
}

.product-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.95rem;
  padding: 1.35rem;
  height: 100%;
}

.product-category {
  margin: 0;
  color: var(--highlight);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-title {
  font-size: 1.45rem;
  line-height: 1.15;
}

.purchase-link {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  max-width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  margin-top: auto;
  padding: 0.95rem 1.1rem;
  border-radius: 16px;
  font-weight: 800;
  text-align: center;
  pointer-events: auto;
}

.brand-lockup .eyebrow {
  color: #b15cff;
}

.chat-header h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.floating-chat {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  display: grid;
  justify-items: end;
  gap: 0.85rem;
  pointer-events: none;
}

.quick-prompts {
  display: grid;
  gap: 0.65rem;
}

.quick-prompts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.quick-prompts-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-prompts-toggle {
  border: 0;
  padding: 0.2rem 0.35rem;
  background: transparent;
  color: var(--highlight);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.prompt-chips.is-collapsed {
  display: none;
}

.prompt-chip {
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(197, 163, 255, 0.14);
  border-radius: 999px;
  background: rgba(34, 22, 52, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.prompt-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(187, 134, 255, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.chat-fab {
  border: 0;
  min-height: 46px;
  max-width: 220px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #b15cff);
  color: #fffaff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(139, 61, 255, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease;
  pointer-events: auto;
}

.chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(139, 61, 255, 0.34);
}

.chat-shell {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  width: min(420px, calc(100vw - 1.5rem));
  height: min(680px, calc(100vh - 6.5rem));
  border: 1px solid rgba(197, 163, 255, 0.16);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(12, 8, 18, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  transform-origin: bottom right;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease;
  pointer-events: auto;
}

.chat-shell.is-collapsed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px) scale(0.96);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.2rem 1rem;
  border-bottom: 1px solid rgba(197, 163, 255, 0.14);
  background: linear-gradient(135deg, rgba(139, 61, 255, 0.16), rgba(28, 17, 42, 0.88));
}

.chat-label {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(139, 61, 255, 0.16);
  color: var(--highlight);
  font-size: 0.82rem;
  font-weight: 800;
}

.chat-status[data-mode="loading"] {
  background: rgba(255, 205, 96, 0.12);
  color: #ffdd8c;
}

.chat-status[data-mode="warning"] {
  background: rgba(255, 159, 159, 0.12);
  color: #ffb1b1;
}

.chat-status[data-mode="error"] {
  background: rgba(255, 119, 119, 0.16);
  color: #ffbaba;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.chat-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.chat-intro {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(197, 163, 255, 0.12);
  background: rgba(20, 13, 31, 0.92);
}

.chat-intro p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 0.9rem;
  max-height: 100%;
  padding: 1.2rem;
  overflow-y: auto;
}

.chat-bubble {
  max-width: min(88%, 34rem);
  padding: 0.95rem 1rem;
  border-radius: 20px;
  line-height: 1.6;
  box-shadow: 0 12px 26px rgba(24, 34, 47, 0.07);
}

.chat-bubble.loading {
  opacity: 0.78;
}

.chat-message-content p {
  margin: 0;
}

.chat-bubble p {
  margin: 0;
}

.chat-bubble a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.chat-bubble.user {
  justify-self: end;
  border-bottom-right-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #b15cff);
  color: #fffaff;
}

.chat-bubble.bot {
  justify-self: start;
  border-bottom-left-radius: 8px;
  background: #181022;
  color: var(--ink);
}

.chat-response-products {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.chat-product-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid rgba(197, 163, 255, 0.14);
  border-radius: 16px;
  background: rgba(34, 22, 52, 0.66);
}

.chat-product-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  line-height: 1.2;
}

.chat-product-meta,
.chat-product-status,
.chat-next-action,
.chat-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.chat-product-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 61, 255, 0.18), rgba(177, 92, 255, 0.28));
  color: #fffaff;
  font-weight: 800;
}

.chat-next-action {
  margin-top: 0.8rem;
  color: #d9c5ff;
}

.chat-hint {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: #ac94d1;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem;
  padding: 1rem 1.2rem 1.2rem;
  border-top: 1px solid rgba(197, 163, 255, 0.12);
  background: rgba(12, 8, 18, 0.98);
}

.chat-form input {
  width: 100%;
  min-width: 0;
  padding: 1rem 1rem;
  border: 1px solid rgba(197, 163, 255, 0.16);
  border-radius: 16px;
  background: #140d1f;
  color: var(--ink);
  font: inherit;
}

.chat-form input:focus {
  outline: 2px solid rgba(187, 134, 255, 0.16);
  border-color: rgba(187, 134, 255, 0.34);
}

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

.top-cta:hover,
.button:hover,
.purchase-link:hover {
  transform: translateY(-2px);
}

.button-primary:hover,
.purchase-link:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
}

.button-secondary:hover,
.top-cta:hover {
  border-color: rgba(187, 134, 255, 0.26);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card:nth-child(2) {
  animation-delay: 90ms;
}

.product-card:nth-child(3) {
  animation-delay: 160ms;
}

.product-card:nth-child(4) {
  animation-delay: 220ms;
}

.product-card:nth-child(5) {
  animation-delay: 280ms;
}

.product-card:nth-child(6) {
  animation-delay: 340ms;
}

@media (max-width: 960px) {
  .product-card {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 1rem, 1180px);
    padding-bottom: 7.5rem;
  }

  .hero {
    border-radius: 28px;
  }

  .topbar {
    flex-direction: column;
  }

  .hero-copy {
    padding-top: 2rem;
  }

  .product-card {
    grid-column: 1 / -1;
  }

  .floating-chat {
    right: 0.5rem;
    left: auto;
    bottom: 0.5rem;
    justify-items: end;
  }

  .chat-shell {
    width: 100%;
    height: min(70vh, 640px);
    border-radius: 24px;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .button,
  .top-cta,
  .purchase-link,
  .prompt-chip {
    width: 100%;
  }

  .hero-actions {
    display: grid;
  }
}
