/*
  KuneMind — 3D scene layout (js/scene3d.js).
  Without html.has-3d (no WebGL / modules blocked) the hero keeps its glass
  panels and the vision steps render as a plain readable list.
*/

/* ---------------------------------------------------------------- */
/* Hero canvas — sits behind the floating product panels             */
/* ---------------------------------------------------------------- */

.hero-canvas {
  position: absolute;
  /* wider than the stage so the orbiting products never reach the edge */
  inset: -10% -18%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
  /* fade only the outermost edges so nothing ends in a hard line */
  -webkit-mask-image: radial-gradient(ellipse at center, #000 68%, transparent 96%);
  mask-image: radial-gradient(ellipse at center, #000 68%, transparent 96%);
}

/* the wider canvas must not add sideways page scroll */
.has-3d .hero { overflow-x: clip; }

.hero-canvas.is-ready { opacity: 1; }
.hero-canvas canvas { display: block; }

/* With 3D, the stage is split: the data center scene fills the top and the
   four module panels (one per product) sit in a 2x2 grid along the bottom,
   so they frame the model instead of covering it. */
.has-3d .float-stage { height: 38rem; }

.has-3d .float-panel {
  --gap: 0.75rem;
  --ph: 6.6rem;
  top: auto;
  right: auto;
  width: calc((100% - var(--gap)) / 2);
  height: var(--ph);
  padding: 0.75rem 0.9rem;
  /* the 3D scene above carries the motion; keep the grid crisply aligned */
  animation: none;
  opacity: 1;
}

.has-3d .float-panel.panel-a { left: 0; bottom: calc(var(--ph) + var(--gap)); }
.has-3d .float-panel.panel-b { left: calc((100% - var(--gap)) / 2 + var(--gap)); bottom: calc(var(--ph) + var(--gap)); }
.has-3d .float-panel.panel-c { left: 0; bottom: 0; }
.has-3d .float-panel.panel-d { left: calc((100% - var(--gap)) / 2 + var(--gap)); bottom: 0; }

.has-3d .float-panel .panel-label { font-size: 0.56rem; margin-bottom: 0.45rem; white-space: nowrap; overflow: hidden; }
.has-3d .float-panel .panel-label::before { flex: none; }
.has-3d .float-panel .panel-row { font-size: 0.74rem; padding: 0.25rem 0; gap: 0.5rem; white-space: nowrap; }
.has-3d .float-panel .panel-row > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.has-3d .float-panel .panel-bar { margin-top: 0.45rem; }

/* without 3D: give the fourth panel a spot in the floating layout */
html:not(.has-3d) .float-panel.panel-d { top: 50%; left: 52%; animation-name: drift-a; animation-duration: 10s; }

@media (max-width: 991.98px) {
  .has-3d .float-stage { height: 33rem; }
  .has-3d .float-panel { --ph: 6.2rem; padding: 0.65rem 0.7rem; text-align: left; }
  .has-3d .float-panel .panel-label { font-size: 0.5rem; letter-spacing: 0.03em; }
  .has-3d .float-panel .panel-row { font-size: 0.68rem; }
}

/* ---------------------------------------------------------------- */
/* Vision story                                                       */
/* ---------------------------------------------------------------- */

/* Ambient backdrop: violet and brass glows over a faint grid */
.vision-section {
  position: relative;
  isolation: isolate;
  padding: 6rem 0 5rem;
}

.vision-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40rem 28rem at 12% 8%, rgba(var(--violet-rgb), 0.16), transparent 70%),
    radial-gradient(36rem 26rem at 92% 70%, rgba(var(--brass-rgb), 0.1), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  pointer-events: none;
}

.vision-head {
  max-width: 46rem;
  margin: 0 auto 3.5rem;
}

.vision-head h2 {
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.vision-head h2 span {
  background: linear-gradient(90deg, var(--lilac), var(--violet) 55%, var(--brass));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.vision-head p {
  color: var(--ash);
  font-size: 1.1rem;
  line-height: 1.6;
}

.vision-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vision-step { padding: 0.75rem 0; }

.step-card {
  padding: 1.6rem 1.75rem;
  border-radius: 1.25rem;
  border: 1px solid var(--panel-border);
  background: rgba(27, 28, 34, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
}

.step-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  font-size: 1.1rem;
  color: var(--lilac);
  background: rgba(var(--violet-rgb), 0.14);
  border: 1px solid rgba(var(--violet-rgb), 0.35);
  transition: color 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
}

.step-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
}

.vision-step h3 {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.2;
  margin: 1rem 0 0.75rem;
  color: var(--paper);
}

.vision-step p {
  color: var(--ash);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 0;
}

.vision-step .card-stats { justify-content: flex-start; margin-top: 1.1rem; }

.vision-stage-wrap { display: none; }

/* With 3D: a compact sticky stage beside step cards that scroll the story */
.has-3d .vision-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: start;
}

.has-3d .vision-steps {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  padding-left: 2.75rem;
  --progress: 0;
}

/* progress rail: a track plus a fill that follows the scroll */
.has-3d .vision-steps::before,
.has-3d .vision-steps::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0;
  width: 2px;
  border-radius: 2px;
}

.has-3d .vision-steps::before {
  bottom: 0;
  background: var(--panel-border);
}

.has-3d .vision-steps::after {
  height: calc(var(--progress) * 100%);
  background: linear-gradient(180deg, var(--violet), var(--brass));
  box-shadow: 0 0 12px rgba(var(--violet-rgb), 0.5);
}

.has-3d .vision-step {
  position: relative;
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* rail node beside each step */
.has-3d .vision-step::before {
  content: "";
  position: absolute;
  left: calc(-2.75rem + 0.85rem - 6px);
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--panel-border-hover);
  transition: border-color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
  z-index: 1;
}

.has-3d .vision-step .step-card {
  opacity: 0.45;
  transform: translateY(10px) scale(0.985);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.has-3d .vision-step.is-active .step-card {
  opacity: 1;
  transform: none;
  border-color: rgba(var(--violet-rgb), 0.45);
  box-shadow: 0 24px 60px -30px rgba(var(--violet-rgb), 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.has-3d .vision-step.is-active .step-icon {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
}

.has-3d .vision-step.is-active::before {
  background: var(--violet);
  border-color: var(--lilac);
  box-shadow: 0 0 0 5px rgba(var(--violet-rgb), 0.2);
}

.has-3d .vision-stage-wrap {
  display: block;
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  /* compact, and vertically centred in the space under the navbar */
  --stage-h: min(calc(100vh - var(--nav-h, 85px) - 6rem), 34rem);
  top: calc(var(--nav-h, 85px) + (100vh - var(--nav-h, 85px) - var(--stage-h)) / 2);
  height: var(--stage-h);
}

.vision-stage {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 1.5rem;
  border: 1px solid var(--panel-border);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 240, 220, 0.08), transparent 60%),
    radial-gradient(ellipse at 50% 110%, rgba(var(--violet-rgb), 0.18), transparent 60%),
    linear-gradient(180deg, #1b1c22 0%, #111216 100%);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.vision-stage canvas {
  display: block;
  opacity: 0;
  transition: opacity 1s ease;
}

.vision-stage.is-ready canvas { opacity: 1; }

/* caption + progress dots inside the stage */
.vision-hud {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.8rem;
  border-radius: 0.85rem;
  background: rgba(15, 16, 19, 0.72);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: "IBM Plex Mono", monospace;
  pointer-events: none;
}

.hud-step {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brass);
}

.hud-caption {
  flex: 1;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-dots { display: inline-flex; gap: 0.35rem; }

.hud-dots i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--panel-border-hover);
  transition: background-color 0.3s ease, width 0.3s ease;
}

.hud-dots i.is-on {
  width: 1.2rem;
  border-radius: 999px;
  background: var(--violet);
}

.scene-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.vision-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 16, 19, 0.78);
  border: 1px solid var(--panel-border);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  color: var(--paper);
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.vision-label em {
  font-style: normal;
  color: var(--ash);
}

.vision-label-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--lilac);
  opacity: 0.6;
}

.vision-label-dot.is-live {
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
  opacity: 1;
}

@media (max-width: 991.98px) {
  .vision-section { padding: 4rem 0 3rem; }

  .has-3d .vision-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .has-3d .vision-stage-wrap {
    grid-column: 1;
    grid-row: 1;
    --stage-h: 40vh;
    top: var(--nav-h, 85px);
    z-index: 2;
    padding: 0.5rem 0 0.75rem;
    background: var(--ink);
  }

  .has-3d .vision-steps {
    grid-row: 2;
    padding-left: 2rem;
  }

  .has-3d .vision-steps::before,
  .has-3d .vision-steps::after { left: 0.5rem; }

  .has-3d .vision-step { min-height: 62vh; }

  .has-3d .vision-step::before { left: calc(-2rem + 0.5rem - 6px); }

  .step-card { padding: 1.25rem; }
}

@media (max-width: 575.98px) {
  .vision-label { font-size: 0.6rem; padding: 0.2rem 0.45rem; }
  .vision-label em { display: none; }
}

/* ---------------------------------------------------------------- */
/* Products — one row per product with its own 3D showcase           */
/* ---------------------------------------------------------------- */

/* Shared click-through canvas; js/scene3d.js draws each showcase into
   its .product-view rectangle. Sits under the fixed navbar and modals. */
.product-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.product-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.products-head {
  max-width: 46rem;
  margin: 0 auto 3.5rem;
}

.products-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.15;
}

.product-rows {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.product-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid var(--panel-border);
  background: rgba(27, 28, 34, 0.45);
  scroll-margin-top: 90px;
}

.product-row:nth-child(even) { grid-template-columns: 1.15fr 0.85fr; }
.product-row:nth-child(even) .product-visual { order: 2; }

.product-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 27rem;
  width: 100%;
  border-radius: 1.1rem;
  border: 1px solid var(--panel-border);
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 240, 220, 0.08), transparent 60%),
    linear-gradient(180deg, #1d1e24 0%, #121318 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-view {
  position: absolute;
  inset: 0;
}

.product-fallback-icon {
  font-size: 4.5rem;
  color: var(--brass);
}

.has-3d .product-fallback-icon { display: none; }

.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--panel-border);
}

.status-pill::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.is-live {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}

.status-pill.is-live::before { box-shadow: 0 0 6px #34d399; }

.status-pill.is-soon {
  color: var(--lilac);
  border-style: dashed;
}

.product-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
}

.product-copy h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin-bottom: 0.6rem;
  color: var(--paper);
}

.product-objective {
  color: var(--paper);
  font-size: 1.08rem;
  line-height: 1.6;
  margin-bottom: 0;
}


.product-pitch {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--brass);
  border-radius: 0 0.75rem 0.75rem 0;
  background: linear-gradient(90deg, rgba(var(--brass-rgb), 0.12), transparent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  line-height: 1.45;
  color: var(--paper);
}

.product-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.product-foot .card-stats {
  margin: 0;
  justify-content: flex-start;
}

.product-foot .btn { margin-left: auto; }

@media (max-width: 991.98px) {
  .product-row,
  .product-row:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.25rem;
  }

  .product-row:nth-child(even) .product-visual { order: 0; }

  .product-visual {
    aspect-ratio: 4 / 3;
    max-height: none;
  }
}

@media (max-width: 575.98px) {
  .product-foot .btn { margin-left: 0; width: 100%; }
}

/* KuneBooks family: a parent card wrapping its module rows */
.product-family {
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 1.75rem;
  border: 1px solid rgba(var(--brass-rgb), 0.28);
  background: linear-gradient(180deg, rgba(var(--brass-rgb), 0.06), transparent 40%);
  scroll-margin-top: 90px;
}

.family-head {
  max-width: 46rem;
  margin-bottom: 1.75rem;
}

.family-head h3 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin-bottom: 0.5rem;
  color: var(--paper);
}

.module-tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  color: var(--brass);
  border: 1px solid rgba(var(--brass-rgb), 0.4);
}

.product-family .product-row { background: rgba(15, 16, 19, 0.55); }

@media (max-width: 991.98px) {
  .product-family { padding: 1rem; }
  .family-head { padding: 0.5rem 0.25rem 0; }
}

/* Vivian — the AI agent panel inside each suite */
.vivian-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
  padding: 1.75rem 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(var(--violet-rgb), 0.35);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(var(--violet-rgb), 0.16), transparent 60%),
    rgba(15, 16, 19, 0.6);
}

.vivian-intro {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.vivian-avatar {
  flex: none;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 2px solid rgba(var(--violet-rgb), 0.6);
  box-shadow: 0 0 0 4px rgba(var(--violet-rgb), 0.12);
}

.vivian-intro h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  color: var(--paper);
  margin-bottom: 0.4rem;
}

.vivian-intro p {
  color: var(--ash);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.vivian-intro .card-stats { justify-content: flex-start; }

.vivian-chat {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.chat-msg {
  margin: 0;
  max-width: 92%;
  padding: 0.7rem 0.95rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-msg.is-user {
  align-self: flex-end;
  background: var(--violet);
  color: #fff;
  border-bottom-right-radius: 0.3rem;
}

.chat-msg.is-vivian {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--paper);
  border-bottom-left-radius: 0.3rem;
}

.chat-name {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.2rem;
}

.chat-note {
  align-self: flex-start;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
  opacity: 0.7;
}

@media (max-width: 991.98px) {
  .vivian-panel {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .vivian-intro { flex-direction: column; }
}

/* ---------------------------------------------------------------- */
/* Delivery — standalone vs cloud                                    */
/* ---------------------------------------------------------------- */

.delivery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.delivery-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid var(--panel-border);
  background: rgba(27, 28, 34, 0.45);
}

.delivery-card .product-visual {
  aspect-ratio: 16 / 10;
  max-height: none;
  margin-bottom: 1.5rem;
}

.delivery-card h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  color: var(--paper);
  margin-bottom: 0.6rem;
}

.delivery-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

@media (max-width: 991.98px) {
  .delivery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .delivery-card .btn { align-self: stretch; }
}

/* ---------------------------------------------------------------- */
/* What We Deliver — compact service boxes                           */
/* ---------------------------------------------------------------- */

.services-head {
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.services-head p { color: var(--ash); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.service-box {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.3rem;
  border-radius: 1rem;
  border: 1px solid var(--panel-border);
  background: rgba(27, 28, 34, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.service-box:hover {
  border-color: rgba(var(--violet-rgb), 0.45);
  box-shadow: 0 20px 45px -28px rgba(var(--violet-rgb), 0.6);
}

.service-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.65rem;
  font-size: 1.05rem;
  color: var(--lilac);
  background: rgba(var(--violet-rgb), 0.14);
  border: 1px solid rgba(var(--violet-rgb), 0.35);
}

.service-tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
}

.service-box h3 {
  font-size: 1.12rem;
  line-height: 1.3;
  margin: 0 0 0.35rem;
  color: var(--paper);
}

.service-box p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ash);
  margin: 0 0 0.9rem;
}

.service-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.service-points span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  color: var(--paper);
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
}

@media (max-width: 991.98px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575.98px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* Vivian premium subscription badge + call to action */
.premium-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  color: #1f1a10;
  background: linear-gradient(135deg, #f1d68f, var(--brass) 55%, #a8843f);
  box-shadow: 0 0 0 1px rgba(var(--brass-rgb), 0.4), 0 6px 18px -8px rgba(var(--brass-rgb), 0.8);
}

.btn-premium {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.7rem;
  font-weight: 600;
  color: #1f1a10;
  background: linear-gradient(135deg, #f1d68f, var(--brass) 60%, #a8843f);
  border: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-premium:hover,
.btn-premium:focus-visible {
  color: #1f1a10;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(var(--brass-rgb), 0.9);
}

.vivian-panel {
  border-color: rgba(var(--brass-rgb), 0.4);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(var(--brass-rgb), 0.12), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(var(--violet-rgb), 0.12), transparent 60%),
    rgba(15, 16, 19, 0.6);
}

.vivian-avatar { border-color: rgba(var(--brass-rgb), 0.7); }

/* ---------------------------------------------------------------- */
/* Compact module rows + problem/solution toggle                     */
/* ---------------------------------------------------------------- */

.product-row,
.product-row:nth-child(even) {
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 2rem;
  padding: 1.5rem;
}

.product-row:nth-child(even) { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); }

.product-visual {
  aspect-ratio: 1 / 1;
  max-width: 19rem;
  max-height: none;
  justify-self: center;
}

.product-copy h3 { font-size: clamp(1.4rem, 2.1vw, 1.7rem); margin-bottom: 0.4rem; }
.product-objective { font-size: 0.98rem; line-height: 1.55; }
.product-meta { margin-bottom: 0.55rem; }

.product-pitch {
  font-size: 0.98rem;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
}

/* Problem / fix: two separate drop-downs side by side. Each opens on hover
   over itself (or tap / keyboard), independently of the other. */
.product-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  align-items: start;
  margin: 1rem 0;
}

.points-item {
  border-radius: 0.85rem;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.points-toggle {
  display: flex;
  align-items: center;
  gap: 0.45em;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 0;
  background: transparent;
  color: var(--ash);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.points-item.is-pain .points-toggle > .bi:first-child { color: #fda4af; }
.points-item.is-fix .points-toggle > .bi:first-child { color: #34d399; }

.pt-chevron {
  margin-left: auto;
  transition: transform 0.35s ease;
}

.points-drop {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}

.points-drop > .points-list {
  min-height: 0;
  overflow: hidden;
  padding: 0 0.85rem;
  opacity: 0;
  transition: opacity 0.3s ease, padding 0.4s ease;
}

.points-list {
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.points-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--paper);
}

.points-list .bi { flex: none; margin-top: 0.12rem; }
.points-list.is-pain .bi { color: #fda4af; }
.points-list.is-fix .bi { color: #34d399; }

/* open state */
.points-item.is-open,
.points-item:has(.points-toggle:focus-visible) { background: rgba(255, 255, 255, 0.04); }
.points-item.is-pain.is-open,
.points-item.is-pain:has(.points-toggle:focus-visible) { border-color: rgba(253, 164, 175, 0.45); }
.points-item.is-fix.is-open,
.points-item.is-fix:has(.points-toggle:focus-visible) { border-color: rgba(52, 211, 153, 0.45); }
.points-item.is-open .points-drop,
.points-item:has(.points-toggle:focus-visible) .points-drop { grid-template-rows: 1fr; }
.points-item.is-open .points-drop > .points-list,
.points-item:has(.points-toggle:focus-visible) .points-drop > .points-list { opacity: 1; padding: 0.1rem 0.85rem 0.8rem; }
.points-item.is-open .pt-chevron,
.points-item:has(.points-toggle:focus-visible) .pt-chevron { transform: rotate(180deg); }

@media (hover: hover) {
  .points-item:hover { background: rgba(255, 255, 255, 0.04); }
  .points-item.is-pain:hover { border-color: rgba(253, 164, 175, 0.45); }
  .points-item.is-fix:hover { border-color: rgba(52, 211, 153, 0.45); }
  .points-item:hover .points-drop { grid-template-rows: 1fr; }
  .points-item:hover .points-drop > .points-list { opacity: 1; padding: 0.1rem 0.85rem 0.8rem; }
  .points-item:hover .pt-chevron { transform: rotate(180deg); }
}

@media (prefers-reduced-motion: reduce) {
  .points-drop, .points-drop > .points-list, .pt-chevron { transition: none; }
}

@media (max-width: 991.98px) {
  .product-row,
  .product-row:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.1rem;
  }
  .product-visual { aspect-ratio: 4 / 3; max-width: none; justify-self: stretch; }
}

@media (max-width: 575.98px) {
  .product-points { grid-template-columns: 1fr; }
}

/* Standalone Vivian box after both suites */
.vivian-standalone {
  margin-top: 0;
  padding: 2rem 2.25rem;
  border-radius: 1.75rem;
}

.vivian-standalone .vivian-avatar { width: 4.5rem; height: 4.5rem; }

.vivian-standalone h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  color: var(--paper);
  margin-bottom: 0.4rem;
}

.chat-suite {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 0.25rem;
}

.chat-suite:first-child { margin-top: 0; }

@media (max-width: 991.98px) {
  .vivian-standalone { padding: 1.25rem; }
}

/* ---------------------------------------------------------------- */
/* Suites: switcher, at-a-glance strip, side-by-side module cards    */
/* ---------------------------------------------------------------- */

.suite-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 52rem;
  margin: 0 auto 1.75rem;
  padding: 0.4rem;
  border-radius: 1.25rem;
  border: 1px solid var(--panel-border);
  background: rgba(27, 28, 34, 0.55);
}

.suite-switch button {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.95rem;
  background: transparent;
  color: var(--ash);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.suite-switch button:hover { color: var(--paper); background: rgba(255, 255, 255, 0.03); }

.suite-switch button.is-active {
  color: var(--paper);
  background: linear-gradient(135deg, rgba(var(--violet-rgb), 0.22), rgba(var(--brass-rgb), 0.08));
  border-color: rgba(var(--violet-rgb), 0.45);
}

.suite-switch-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  font-size: 1.15rem;
  color: var(--lilac);
  background: rgba(var(--violet-rgb), 0.14);
  border: 1px solid rgba(var(--violet-rgb), 0.3);
}

.suite-switch button.is-active .suite-switch-icon { color: #fff; background: var(--violet); border-color: var(--violet); }

.suite-switch-text { display: flex; flex-direction: column; min-width: 0; }
.suite-switch-text strong { font-family: "Space Grotesk", sans-serif; font-size: 1.05rem; font-weight: 600; }
.suite-switch-text small { font-size: 0.78rem; color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suite-switch .status-pill { margin-left: auto; flex: none; }

/* without JS both suites show and the switcher hides */
.products-section:not(.suites-ready) .suite-switch { display: none; }
.products-section.suites-ready .suite-panel:not(.is-active) { display: none; }
.products-section.suites-ready .suite-panel.is-active { animation: suite-in 0.45s ease both; }

@keyframes suite-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* suite header: intro on the left, at-a-glance facts on the right */
.family-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.5rem 2rem;
  align-items: center;
  max-width: none;
}

.family-head h3 { margin-bottom: 0.4rem; }

.suite-glance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin: 0;
}

.suite-glance > div {
  padding: 0.65rem 0.8rem;
  border-radius: 0.8rem;
  background: rgba(15, 16, 19, 0.5);
  border: 1px solid var(--panel-border);
}

.suite-glance dt {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.2rem;
}

.suite-glance dd {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--paper);
}

/* modules side by side: 3D on top, details below */
.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.module-grid .product-row,
.module-grid .product-row:nth-child(even) {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.1rem;
  align-items: stretch;
}

.module-grid .product-row .product-visual,
.module-grid .product-row:nth-child(even) .product-visual {
  order: 0;
  aspect-ratio: 16 / 9;
  max-width: none;
  width: 100%;
  justify-self: stretch;
}

.module-grid .product-copy { display: flex; flex-direction: column; flex: 1; }
.module-grid .product-copy h3 { font-size: 1.45rem; }
.module-grid .product-objective { font-size: 0.92rem; }
.module-grid .product-points { grid-template-columns: 1fr; gap: 0.5rem; margin: 0.85rem 0; }
.module-grid .product-pitch { font-size: 0.92rem; }
.module-grid .product-foot { margin-top: auto; }
.module-grid .product-foot .card-stats { flex: 1 1 100%; }
.module-grid .product-foot .btn { margin-left: 0; }

@media (max-width: 991.98px) {
  .family-head { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .suite-switch { grid-template-columns: 1fr; }
  .suite-glance { grid-template-columns: 1fr 1fr; }
  .suite-glance dd { font-size: 0.8rem; }
}

/* Delivery: compact cards with fact tiles and hover drop-downs */
.delivery-card { padding: 1.25rem; gap: 0; }
.delivery-card .product-visual { aspect-ratio: 16 / 8; margin-bottom: 1.1rem; }
.delivery-card h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); margin-bottom: 0.35rem; }
.delivery-card .product-objective { font-size: 0.95rem; }
.delivery-facts { margin: 1rem 0 0.75rem; }
.delivery-points { grid-template-columns: 1fr 1fr; margin: 0 0 1.1rem; }
.points-item.is-fit .points-toggle > .bi:first-child,
.points-list.is-fit .bi { color: var(--brass); }
.points-item.is-fit.is-open,
.points-item.is-fit:has(.points-toggle:focus-visible) { border-color: rgba(var(--brass-rgb), 0.5); }
@media (hover: hover) {
  .points-item.is-fit:hover { border-color: rgba(var(--brass-rgb), 0.5); }
}
@media (max-width: 575.98px) {
  .delivery-points { grid-template-columns: 1fr; }
}
.delivery-grid { align-items: start; }
.delivery-card .product-visual { max-width: none; width: 100%; justify-self: stretch; }
.delivery-card .btn { margin-top: 0; }

/* Vivian box stays still: no entrance animation or hover motion */
.vivian-standalone,
.vivian-standalone * {
  animation: none !important;
}
.vivian-standalone { transform: none !important; }
.vivian-standalone .btn-premium:hover,
.vivian-standalone .btn-premium:focus-visible { transform: none; }
