/* 1. Scalable Hero Product Directory (01 .. 0N quick-access studio index) */

.hero-directory {
  max-width: 660px;
}

.directory-header {
  display: flex;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.directory-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.directory-list li {
  border-bottom: 1px solid var(--line);
}

.directory-row {
  display: grid;
  grid-template-columns: 32px minmax(130px, auto) 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding: 18px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  transition: background-color 150ms ease;
}

.dir-num {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-dim);
}

.dir-name {
  font-size: clamp(19px, 1.6vw, 23px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.domain-tld {
  color: var(--text-muted);
  font-weight: 450;
}

.dir-summary {
  font-size: clamp(14px, 1.1vw, 15.5px);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dir-arrow {
  font-size: 15px;
  color: var(--text-muted);
  transition: color 150ms ease;
}

/* 2. Scalable Products Grid:
   - Single product: expansive 2-column horizontal showcase.
   - Multiple products (:has(> :nth-child(2))): automatic 2-column editorial card grid. */

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3vw, 36px);
}

.products-grid:has(> :nth-child(2)) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 540px), 1fr));
}

.product-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(28px, 3.8vw, 56px);
  padding: clamp(26px, 3.4vw, 48px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(180deg, rgba(18, 20, 26, 0.84) 0%, rgba(9, 10, 13, 0.92) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 24px 64px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 180ms ease, background-color 180ms ease;
}

/* When 2+ products exist in .products-grid, each card stacks vertically inside its grid column */
.products-grid:has(> :nth-child(2)) .product-card {
  grid-template-columns: 1fr;
  align-items: flex-start;
  gap: 28px;
}

.product-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(20px, 2.8vh, 30px);
}

.product-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-index {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-tag {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.product-body h3 {
  margin: 0 0 14px;
  font-size: clamp(34px, 3.4vw, 52px);
  font-weight: 650;
  letter-spacing: -0.042em;
  line-height: 1;
  color: #ffffff;
}

.product-body p {
  margin: 0;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.55;
  color: #b4bac5;
  max-width: 440px;
  text-wrap: pretty;
}

.product-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #f5f7fa;
  color: #040405;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 150ms ease;
}

.arrow-up-right {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
}

.product-shot {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: #08090c;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
}

.product-shot img {
  width: 100%;
  height: auto;
  display: block;
}

@media (hover: hover) {
  .directory-row:hover {
    background: rgba(255, 255, 255, 0.04);
  }

  .directory-row:hover .dir-arrow {
    color: #ffffff;
  }

  .product-card:hover {
    border-color: rgba(255, 255, 255, 0.26);
  }

  .product-card:hover .product-pill {
    background: #ffffff;
  }
}

@media (max-width: 960px) {
  .product-card {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .directory-row {
    grid-template-columns: 28px 1fr auto;
    gap: 12px;
  }

  .dir-summary {
    grid-column: 2 / 4;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .directory-row,
  .product-pill,
  .dir-arrow {
    transition: none;
  }
}
