/* Dalfin AI Solutions catalogue: scoped visual refresh, 30 October 2026.
   Load AFTER site.css and solutions.css; do not load on blueprint detail pages. */

/* Solutions hero with gradient background like events "Official sources" */
.sol-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #000;
}

.sol-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 40% at 30% 100%, rgb(230 90 150 / 0.75), transparent 70%),
    radial-gradient(35% 45% at 55% 95%, rgb(210 30 140 / 0.55), transparent 70%),
    radial-gradient(30% 40% at 75% 100%, rgb(49 65 241 / 0.7), transparent 70%),
    radial-gradient(35% 60% at 0% 55%, rgb(120 60 200 / 0.55), transparent 70%),
    radial-gradient(30% 60% at 40% 40%, rgb(210 40 60 / 0.35), transparent 70%);
  filter: blur(20px);
}

/* Hide catalogue until JS refresh completes, then fade in */
html.js #catalogue.dl-catalogue {
  opacity: 0;
}

html.js #catalogue.dl-catalogue[data-design-refresh="v1"] {
  opacity: 1;
  transition: opacity 0.15s ease;
}

#catalogue.dl-catalogue {
  padding-block: clamp(52px, 5.6vw, 84px) clamp(72px, 8vw, 120px);
  background: #fff;
}

#catalogue.dl-catalogue .sh--solo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr);
  align-items: end;
  gap: 30px clamp(24px, 5vw, 76px);
  margin-bottom: 32px;
}

#catalogue.dl-catalogue .sh--solo .sh-main {
  max-width: 760px;
}

#catalogue.dl-catalogue .sh .label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3449ce;
}

#catalogue.dl-catalogue .dl-solutions-title {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.2rem, 2.1vw + 1.25rem, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.046em;
  font-weight: 580;
  color: #141820;
  text-wrap: balance;
}

#catalogue.dl-catalogue .dl-solutions-intro {
  margin-top: 18px;
  max-width: 65ch;
  font-size: clamp(1rem, 0.92rem + 0.16vw, 1.075rem);
  line-height: 1.58;
  color: #4b5563;
}

#catalogue.dl-catalogue .dl-solutions-metrics {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 16px;
  min-width: 0;
  padding-bottom: 5px;
}

#catalogue.dl-catalogue .dl-solutions-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 28px;
  background: #f8f9fb;
  border: 1px solid #e5e8ee;
  border-radius: 12px;
  min-width: 120px;
}

#catalogue.dl-catalogue .dl-solutions-metric strong {
  font-size: clamp(1.8rem, 1.6vw + 0.9rem, 2.4rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #121826;
  font-variant-numeric: tabular-nums;
}

#catalogue.dl-catalogue .dl-solutions-metric span {
  color: #4b5563;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Existing search/filter controls and catalogue JS remain unchanged. */
#catalogue.dl-catalogue .dl-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(210px, 1fr) minmax(165px, 0.65fr);
  gap: 18px;
  align-items: end;
  margin: 0;
  padding: 22px 24px;
  border: 1px solid #e1e5ec;
  border-radius: 16px;
  box-shadow: 0 12px 28px -24px rgb(16 24 40 / 0.24);
  background: #fff;
}

#catalogue.dl-catalogue .dl-filters label {
  font-size: 0.8rem;
  font-weight: 620;
  color: #394355;
}

#catalogue.dl-catalogue .dl-filters :is(input, select),
#catalogue.dl-catalogue .dl-select-trigger {
  min-height: 52px;
  margin-top: 9px;
  padding: 12px 15px;
  border-radius: 9px;
  border-color: #cdd4df;
  background: #fff;
  color: #222935;
  font-size: 0.93rem;
}

#catalogue.dl-catalogue .dl-filters input[type='search'] {
  padding-left: 17px;
}

#catalogue.dl-catalogue .dl-filters input::placeholder {
  color: #818b9a;
}

#catalogue.dl-catalogue .dl-filters :is(input, select):focus-visible,
#catalogue.dl-catalogue .dl-select-trigger:focus-visible {
  outline: 3px solid rgb(49 65 241 / 0.15);
  outline-offset: 1px;
  border-color: #3141f1;
}

/* Keep the source select visually hidden after the existing JS wraps it. */
#catalogue.dl-catalogue .dl-filters .dl-select-wrap select {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
}

#catalogue.dl-catalogue .dl-filter-shortcuts {
  display: flex;
  flex-wrap: nowrap;
  gap: 9px;
  margin: 18px 0 22px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 5px;
}

#catalogue.dl-catalogue .dl-chip-btn {
  flex: none;
  border: 1px solid #e1e5ec;
  min-height: 36px;
  padding: 7px 15px;
  font-size: 0.8rem;
  white-space: nowrap;
  color: #586270;
}

#catalogue.dl-catalogue .dl-chip-btn[aria-pressed='true'] {
  color: #283ddb;
  background: #eef1ff;
  border-color: #dfe5ff;
}

#catalogue.dl-catalogue .dl-results {
  min-height: 28px;
  margin-bottom: 15px;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 530;
  color: #6b7585;
}

#catalogue.dl-catalogue .dl-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

#catalogue.dl-catalogue .dl-card {
  padding: 0 0 16px;
  border: 1px solid #e5e8ee;
  border-radius: 14px;
  box-shadow: 0 5px 23px -19px rgb(16 24 40 / 0.22);
  background: #fff;
  transform: none;
}

#catalogue.dl-catalogue .dl-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px -28px rgb(16 24 40 / 0.32);
  border-color: #cbd4e4;
}

#catalogue.dl-catalogue .dl-card-media {
  margin: 0 0 12px;
  padding: 10px;
  border-bottom: 1px solid #e6eaf1;
  background: #f3f5f9;
}

#catalogue.dl-catalogue .dl-card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: contain;
  object-position: top center;
  background: #fff;
  border: 1px solid #e4e8f0;
  border-radius: 7px;
}

#catalogue.dl-catalogue .dl-card-media > span {
  left: 21px;
  bottom: 20px;
  border-radius: 5px;
  background: rgb(255 255 255 / 0.95);
  color: #4b5563;
  font-size: 0.68rem;
  letter-spacing: 0.01em;
}

#catalogue.dl-catalogue .dl-card-category,
#catalogue.dl-catalogue .dl-card h3,
#catalogue.dl-catalogue .dl-card-summary,
#catalogue.dl-catalogue .dl-card-link {
  padding-inline: 22px;
  margin-inline: 0;
}

#catalogue.dl-catalogue .dl-card-category {
  margin-bottom: 9px;
  color: #4d60b7;
  font-size: 0.77rem;
  font-weight: 620;
}

#catalogue.dl-catalogue .dl-card h3 {
  font-size: clamp(1.05rem, 0.2vw + 1rem, 1.2rem);
  font-weight: 620;
  line-height: 1.32;
  letter-spacing: -0.022em;
  min-height: 0;
}

#catalogue.dl-catalogue .dl-card-summary {
  margin-top: 6px !important;
  margin-bottom: 0 !important;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #606b7a;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: 4.1em;
}

/* Repetitive implementation counts are hidden in the listing only. */
#catalogue.dl-catalogue .dl-card-meta {
  display: none;
}

#catalogue.dl-catalogue .dl-card-link {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.85rem;
  font-weight: 620;
  color: #3141f1 !important;
  text-decoration: none !important;
  border-bottom: none !important;
  background: none !important;
}

#catalogue.dl-catalogue .dl-card-link:hover {
  text-decoration: underline !important;
}

#catalogue.dl-catalogue .dl-card-link:focus-visible,
#catalogue.dl-catalogue .dl-card h3 a:focus-visible {
  outline: 2px solid #3141f1;
  outline-offset: 4px;
}

/* Static explainer card */
.dl-solutions-explainer-card {
  margin-top: 48px;
  padding: 28px 32px;
  border: 1px solid #e5e8ee;
  border-radius: 14px;
  background: #f8f9fb;
  color: #4b5563;
}

.dl-solutions-explainer-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink, #141820);
  line-height: 1.4;
}

.dl-solutions-explainer-card > p {
  margin: 0;
  max-width: 80ch;
  line-height: 1.65;
  font-size: 0.9rem;
}

.dl-solutions-explainer-card ol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0 0;
  padding-left: 22px;
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 80ch;
}

.dl-solutions-explainer-card .dl-solutions-disclosure {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e1e5ec;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #697485;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.dl-solutions-explainer-card .dl-solutions-disclosure .ph-info {
  color: var(--accent, #3141f1);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

@media (max-width: 980px) {
  #catalogue.dl-catalogue .sh--solo { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  #catalogue.dl-catalogue .dl-solutions-metrics { justify-content: flex-start; }
  #catalogue.dl-catalogue .dl-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #catalogue.dl-catalogue .dl-filters label:first-child { grid-column: 1 / -1; }
  #catalogue.dl-catalogue .dl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  #catalogue.dl-catalogue { padding-block: 36px 78px; }
  #catalogue.dl-catalogue .sh--solo { margin-bottom: 24px; }
  #catalogue.dl-catalogue .dl-solutions-title { font-size: clamp(2rem, 8vw, 2.45rem); }
  #catalogue.dl-catalogue .dl-solutions-metrics { gap: 12px; }
  #catalogue.dl-catalogue .dl-solutions-metric { padding: 16px 20px; min-width: 0; flex: 1; }
  #catalogue.dl-catalogue .dl-solutions-metric strong { font-size: 1.6rem; }
  #catalogue.dl-catalogue .dl-filters { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 15px; }
  #catalogue.dl-catalogue .dl-filters label:first-child { grid-column: auto; }
  #catalogue.dl-catalogue .dl-cards { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  #catalogue.dl-catalogue .dl-card h3 { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #catalogue.dl-catalogue .dl-card,
  #catalogue.dl-catalogue .dl-card-media img { transition: none; }
}
