/* Products hub — Rich chooser
   Directory of product worlds: mini-story bands with preview plates.
   Scoped to .products-hub. Requires product-shared.css first. */

.products-hub {
  --ps-deep: #0f2438;
  --ps-deep-2: #163044;
  --ps-ground: #eef3f7;
  --ps-line: #c3d0da;
  --ps-ink: #0f2438;
  --ps-muted: #4a6274;
  --ps-on-deep: #f2f7fa;
  --ps-on-deep-muted: rgba(242, 247, 250, 0.72);

  --hub-blue: #40b4e0;
  --hub-amber: #ffb700;
  --hub-red: #fd192a;
  --hub-green: #1a9b6c;

  color: var(--ps-ink);
}

/* ── Intro ── */

.ph-intro {
  position: relative;
  padding: 1.25rem 0 4.25rem;
  overflow: hidden;
}

.ph-intro__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  align-items: end;
}

@media (min-width: 900px) {
  .ph-intro__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 3rem;
    align-items: center;
  }
}

.ph-intro__copy {
  position: relative;
  z-index: 2;
}

.ph-intro__tag {
  margin: 1.25rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.55;
  max-width: 36rem;
  color: var(--ps-on-deep-muted);
}

/* Soft catalogue rails — not lane ropes. Oversized layer drifts one rail period. */
.ph-rails {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent 0%, #000 40%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%, #000 100%);
  opacity: 0.9;
}

.ph-rails::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(
      105deg,
      transparent 0,
      transparent 5.5rem,
      rgba(64, 180, 224, 0.1) 5.5rem,
      rgba(64, 180, 224, 0.1) calc(5.5rem + 1px)
    );
  animation: ps-drift-rails 10s linear infinite;
}

.ph-intro .ph-intro__copy,
.ph-intro .ps-board {
  animation: ps-enter 320ms var(--ease-out) both;
}

.ph-intro .ps-board {
  animation-delay: 60ms;
}

/* Status pills */
.ph-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2;
}

.ph-status--available {
  background: rgba(26, 155, 108, 0.16);
  color: #0f6b48;
}

.ph-status--preview {
  background: rgba(255, 183, 0, 0.22);
  color: #8a6200;
}

.ph-status--soon {
  background: rgba(18, 35, 51, 0.1);
  color: var(--ps-muted);
}

.ps-band--deep .ph-status--available {
  background: rgba(26, 155, 108, 0.28);
  color: #b8f0d4;
}

.ps-band--deep .ph-status--preview {
  background: rgba(255, 183, 0, 0.28);
  color: #ffe29a;
}

.ps-band--deep .ph-status--soon {
  background: rgba(242, 247, 250, 0.12);
  color: var(--ps-on-deep-muted);
}

/* ── Product chooser bands ── */

.ph-chooser {
  padding: 0 0 0.5rem;
}

.ph-product {
  padding: 3.75rem 0;
  border-top: 1px solid var(--ps-line);
}

.ph-product:first-child {
  border-top: none;
}

.ph-product__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .ph-product__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3.25rem;
  }

  .ph-product--flip .ph-product__copy {
    order: 2;
  }

  .ph-product--flip .ph-product__visual {
    order: 1;
  }
}

.ph-product__status {
  margin: 0 0 1rem;
}

.ph-product__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.35rem, 5vw, 3.75rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--ps-ink);
  max-width: 12ch;
}

.ph-product__lead {
  margin: 0 0 1.5rem;
  font-size: clamp(1.02rem, 1.8vw, 1.15rem);
  line-height: 1.55;
  max-width: 36rem;
  color: var(--ps-muted);
}

.ph-points {
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ps-line);
}

.ph-points li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--ps-line);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ps-muted);
  padding-left: 1.15rem;
  position: relative;
}

.ph-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.15em;
  width: 0.55rem;
  height: 3px;
  border-radius: 1px;
  background: var(--hub-blue);
}

.ph-product--swimdash .ph-points li::before {
  background: var(--hub-green);
}

.ph-product--custom .ph-points li::before {
  background: var(--hub-amber);
}

.ph-product--disabled {
  opacity: 0.72;
}

.ph-product--disabled .ph-product__title {
  color: var(--ps-muted);
}

/* ── Close ── */

.ph-close {
  padding: 4.25rem 0 5rem;
  text-align: left;
}

.ph-close .ps-h2 {
  max-width: 16ch;
}

.ph-close .ps-lead {
  margin-top: 1rem;
  max-width: 36rem;
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  .ph-intro .ph-intro__copy,
  .ph-intro .ps-board {
    animation: ps-fade-in 200ms ease both;
    animation-delay: 0ms;
  }
}

@media (max-width: 640px) {
  .ph-intro {
    padding: 1rem 0 3.25rem;
  }

  .ph-product {
    padding: 2.75rem 0;
  }

  .ph-close {
    padding: 3.25rem 0 3.75rem;
  }
}
