/* ============================================================
   Ventorify: bundles & kits page styles (loads after css/site.css)
   ============================================================ */

/* ---------- Hero ---------- */

.bundles-hero {
  overflow: hidden;
}
.bundles-hero h1 {
  max-width: 18ch;
}
.bundles-hero .lead {
  max-width: 30rem;
}

/* Floating bundle-tree mockup */
.bundle-mock {
  margin: 0;
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  transform: perspective(1500px) rotateX(2.5deg) rotate(0.5deg);
}
@media (prefers-reduced-motion: no-preference) {
  html.js .bundle-mock {
    transition: transform 0.8s var(--ease-out), box-shadow 0.8s var(--ease-out);
  }
  html.js .bundle-mock:hover {
    transform: perspective(1500px) rotateX(0deg) rotate(0deg);
  }
}

.bundle-build {
  padding: 1rem 1.1rem 0.9rem;
}
.build-count {
  background: var(--indigo-tint);
  border-radius: var(--r-chip);
  padding: 0.75rem 0.95rem 0.8rem;
}
.build-label {
  display: block;
  font-size: var(--text-micro);
  font-weight: 640;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo-hover);
}
.build-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 0.2rem;
}
.build-value {
  font-size: 2rem;
  font-weight: 720;
  line-height: 1.1;
  color: var(--indigo-hover);
  border-radius: 6px;
  padding-inline: 0.15rem;
  margin-left: -0.15rem;
}
.build-note {
  font-size: var(--text-micro);
  color: var(--slate);
}

/* Component tree (elbow connectors, same idiom as the home teaser) */
.bundle-tree {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0 0 0 1.2rem;
}
.bundle-tree li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
}
.bundle-tree li::before {
  content: "";
  position: absolute;
  left: -0.85rem;
  top: 0;
  height: 50%;
  width: 0.6rem;
  border-left: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
  border-radius: 0 0 0 6px;
}
.tree-prod {
  flex: 1;
  min-width: 0;
}
.bundle-tree .mock-product {
  font-size: 0.88rem;
}
.tree-qty {
  flex: none;
  min-width: 2.1em;
  text-align: right;
  font-weight: 640;
  color: var(--ink);
  border-radius: 6px;
  padding: 0.1rem 0.3rem;
  margin-right: -0.3rem;
}

/* Channel write-back row */
.bundle-chans {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.3rem;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(180deg, #fcfcff, #f8f9fe);
}
.bundle-chans .chan {
  gap: 0.45rem;
  font-size: 0.84rem;
}
.bundle-chans .chan-dot {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-size: 0.66rem;
}
.chan-qty {
  font-weight: 640;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.1rem;
}

/* Event feed (fixed min-height so the loop reset never shifts layout) */
.bundle-feed {
  padding: 0.45rem 1.1rem 0.6rem;
  border-top: 1px solid var(--border-soft);
  min-height: 74px;
}

/* Bottleneck pill pop-in (loop only; static state shows the pill as-is) */
@media (prefers-reduced-motion: no-preference) {
  html.js .bundle-mock .pill.pop-in {
    animation: bundle-pop 0.45s var(--ease-out) both;
  }
}
@keyframes bundle-pop {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Per-location mockup ---------- */

.loc-mock,
.btl-mock {
  margin: 0;
  max-width: 26rem;
  margin-inline: auto;
}
.loc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.loc-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
}
.loc-row + .loc-row {
  border-top: 1px solid var(--border-soft);
}
.loc-info {
  flex: 1;
  min-width: 0;
}
.loc-name {
  display: block;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9rem;
}
.loc-math {
  display: block;
  font-size: var(--text-micro);
  color: var(--slate-light);
}
.loc-build {
  flex: none;
  font-size: 0.82rem;
  font-weight: 640;
  color: var(--indigo-hover);
  background: var(--indigo-tint);
  border-radius: var(--r-pill);
  padding: 0.35rem 0.8rem;
  white-space: nowrap;
}
.loc-note {
  margin: 0;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--border-soft);
  font-size: var(--text-micro);
  color: var(--slate-light);
  background: #fcfcff;
  border-radius: 0 0 var(--r-card) var(--r-card);
}

/* ---------- Bottleneck mockup ---------- */

.btl-build {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 1rem 1.1rem 0.7rem;
}
.btl-value {
  font-size: 2.2rem;
  font-weight: 720;
  line-height: 1;
  color: var(--critical);
}
.btl-label {
  font-size: var(--text-small);
  color: var(--slate-light);
}
.btl-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.btl-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  border-top: 1px solid var(--border-soft);
}
.btl-list .mock-product {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
}
.btl-list .pill {
  flex: none;
}
.btl-qty {
  flex: none;
  min-width: 2.1em;
  text-align: right;
  font-weight: 640;
  color: var(--ink);
}
.btl-qty.is-zero {
  color: var(--critical);
}
.btl-list .is-limit {
  background: var(--warning-tint);
}
.btl-note {
  margin: 0;
  padding: 0.8rem 1.1rem;
  border-top: 1px solid var(--border-soft);
  font-size: var(--text-small);
  color: var(--slate);
  background: #fcfcff;
  border-radius: 0 0 var(--r-card) var(--r-card);
}
.btl-note b {
  color: var(--ink);
  font-weight: 640;
}

/* ---------- Demand / PO / Free bento ---------- */

.bb-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  grid-template-rows: auto auto;
  gap: 1.2rem;
}
.bb-cell {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition:
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out),
    border-color var(--dur-med) var(--ease-out);
}
@media (hover: hover) {
  .bb-cell:hover {
    transform: translateY(-3px);
    border-color: var(--indigo-soft);
    box-shadow: var(--shadow-card);
  }
}
.bb-cell h3 {
  font-size: 1.25rem;
  font-weight: 660;
  letter-spacing: -0.015em;
}
.bb-cell p {
  margin-top: 0.6rem;
  color: var(--slate);
  font-size: var(--text-small);
  line-height: 1.6;
  max-width: 52ch;
}
.bb-cell .link-arrow {
  margin-top: auto;
  padding-top: 1.2rem;
}
.bb-demand {
  grid-row: 1 / 3;
  background:
    radial-gradient(70% 50% at 80% 110%, rgb(43 74 203 / 0.07), transparent 70%),
    var(--surface);
}
.bb-free {
  background: linear-gradient(160deg, var(--indigo-tint), #f6f8fe 65%);
  border-color: var(--indigo-soft);
}

/* Demand split bars */
.demand-mini {
  width: 100%;
  margin-top: 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.demand-title {
  display: block;
  font-size: var(--text-micro);
  font-weight: 640;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-light);
}
.demand-row {
  margin-top: 1.1rem;
}
.demand-name {
  display: block;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.demand-bar {
  display: flex;
  gap: 3px;
  height: 40px;
  border-radius: var(--r-chip);
  overflow: hidden;
}
.demand-bar-short {
  width: 47%;
  min-width: 11.5em;
}
.demand-solo,
.demand-bundled {
  display: flex;
  align-items: center;
  padding-inline: 0.7rem;
  font-size: var(--text-micro);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}
.demand-solo {
  flex: 12;
  background: var(--indigo-soft);
  color: var(--indigo-hover);
  border-radius: var(--r-chip) 3px 3px var(--r-chip);
}
.demand-bundled {
  flex: 26;
  background: var(--indigo);
  color: #fff;
  border-radius: 3px var(--r-chip) var(--r-chip) 3px;
}
.demand-only {
  flex: 1;
  border-radius: var(--r-chip);
}
.demand-note {
  margin-top: 1.1rem;
  font-size: var(--text-small);
  color: var(--slate);
  max-width: 44ch;
}
.demand-note b {
  color: var(--ink);
  font-weight: 640;
}

/* PO parts-list chip */
.po-mini {
  width: 100%;
  margin-top: 1.2rem;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-chip);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-small);
}
.po-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border-soft);
  font-weight: 600;
  color: var(--ink);
}
.po-lines {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0.8rem 0.5rem;
}
.po-lines li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.22rem 0;
  color: var(--slate);
}
.po-lines b {
  color: var(--ink);
  font-weight: 640;
}

/* ---------- Responsive ---------- */

@media (max-width: 899px) {
  .bundle-mock {
    transform: none;
    max-width: 32rem;
    margin-inline: 0;
  }
  .loc-mock,
  .btl-mock {
    margin-inline: 0;
  }
  .bb-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .bb-demand {
    grid-row: auto;
  }
}

@media (max-width: 479px) {
  .bundle-chans {
    gap: 0.45rem 0.9rem;
    padding-inline: 0.9rem;
  }
  .bundle-build,
  .bundle-feed {
    padding-inline: 0.9rem;
  }
  .loc-row {
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
  }
}
