/* ── Hub shell skeletons — instant first paint for all Confidence tabs ── */

@keyframes hub-skel-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.hub-skel-shimmer {
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.05) 25%,
    rgba(0,0,0,0.1) 50%,
    rgba(0,0,0,0.05) 75%
  );
  background-size: 200% 100%;
  animation: hub-skel-shimmer 1.4s ease infinite;
  border-radius: 6px;
}

@media (prefers-color-scheme: dark) {
  .hub-skel-shimmer {
    background: linear-gradient(
      90deg,
      rgba(255,255,255,0.06) 25%,
      rgba(255,255,255,0.14) 50%,
      rgba(255,255,255,0.06) 75%
    );
    background-size: 200% 100%;
  }
}

html.confidence-theme-dark .hub-skel-shimmer,
body[data-today-theme="dark"] .hub-skel-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.06) 25%,
    rgba(255,255,255,0.14) 50%,
    rgba(255,255,255,0.06) 75%
  );
  background-size: 200% 100%;
}

/* Hero band — matches um-hub-hero / om-header height */
.hub-skel-hero {
  position: relative;
  width: 100%;
  min-height: clamp(11.5rem, 26vh, 16rem);
  margin: 0 0 1rem;
  overflow: hidden;
  background: linear-gradient(145deg, #2c3e50 0%, #3d5166 55%, #f68b1e33 100%);
}
.hub-skel-hero__band {
  position: absolute;
  inset: 0;
  opacity: 0.35;
}
.hub-skel-hero__copy {
  position: relative;
  z-index: 1;
  width: min(40rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.75rem 0 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
}
.hub-skel-hero__line {
  border-radius: 6px;
  height: 0.7rem;
}
.hub-skel-hero__line--eyebrow { width: 7rem; height: 0.55rem; opacity: 0.85; }
.hub-skel-hero__line--title { width: min(18rem, 72%); height: 1.15rem; }
.hub-skel-hero__line--sub { width: min(22rem, 85%); height: 0.65rem; opacity: 0.9; }
.hub-skel-hero__ctas {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.hub-skel-hero__cta {
  width: 6.5rem;
  height: 2.15rem;
  border-radius: 999px;
}

.hub-skel-grid {
  display: grid;
  gap: 0.75rem;
  padding: 0 var(--hub-pad, 0.75rem) 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}
.hub-skel-grid--business,
.hub-skel-grid--opportunity {
  grid-template-columns: 1fr;
}
.hub-skel-grid--service {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
  .hub-skel-grid { grid-template-columns: repeat(3, 1fr); }
  .hub-skel-grid--business,
  .hub-skel-grid--opportunity { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .hub-skel-grid { grid-template-columns: repeat(4, 1fr); }
  .hub-skel-grid--business,
  .hub-skel-grid--opportunity { grid-template-columns: repeat(3, 1fr); }
}

.hub-skel-card {
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg, #fff);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
html.confidence-theme-dark .hub-skel-card {
  background: #1e2430;
  box-shadow: none;
  border: 1px solid rgba(255,255,255,0.06);
}
.hub-skel-card__media {
  width: 100%;
  aspect-ratio: 1 / 1;
}
.hub-skel-card--product .hub-skel-card__media {
  aspect-ratio: 4 / 5;
}
.hub-skel-card--biz .hub-skel-card__media {
  aspect-ratio: 16 / 9;
}
.hub-skel-card--opp .hub-skel-card__media {
  aspect-ratio: 3 / 4;
  max-height: 14rem;
}
.hub-skel-card--service .hub-skel-card__media {
  aspect-ratio: 4 / 5;
}
.hub-skel-card__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.7rem 0;
}
.hub-skel-card__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.hub-skel-card__head-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.hub-skel-card__body {
  padding: 0.5rem 0.6rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.hub-skel-card__line {
  height: 0.7rem;
  border-radius: 4px;
}
.hub-skel-card__line--title { width: 80%; }
.hub-skel-card__line--sub   { width: 55%; }
.hub-skel-card__line--price { width: 35%; height: 0.85rem; }

/* Moments strip skel (services) */
.hub-skel-moments {
  display: flex;
  gap: 0.65rem;
  padding: 0 var(--hub-pad, 0.75rem) 1rem;
  overflow: hidden;
}
.hub-skel-moments__item {
  flex: 0 0 min(42vw, 9.5rem);
  aspect-ratio: 3 / 4;
  border-radius: 12px;
}

/* ── Virtualized list — only paint visible cells ───────────────── */
.um-virtual-list {
  contain: layout style;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.um-virtual-list__spacer {
  width: 100%;
  pointer-events: none;
}
.um-virtual-list__visible {
  contain: layout;
}

/* ── Blurhash / LQIP fade-in ───────────────────────────────────── */
.um-img-wrap {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.um-img-wrap > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.um-img-wrap > img.is-loaded {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hub-skel-shimmer { animation: none; }
  .um-img-wrap > img { transition: none; opacity: 1; }
}

/* Grid-friendly virtualization (Meta-style) — skip offscreen paint work */
.um-cv-auto,
.product-card.um-cv-auto,
.biz-moment.um-cv-auto {
  content-visibility: auto;
  contain-intrinsic-size: 280px;
}

.product-image .um-img-wrap {
  width: 100%;
  height: 100%;
  aspect-ratio: inherit;
  display: block;
}

.product-image .um-img-wrap > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-skel-pending {
  padding: 0 0 2rem;
  min-height: 60vh;
}
