/* Reference works page and services-dropdown reference entry */

.nav-dropdown__link--references {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.references-page {
  padding: 32px 0 70px;
}

.references-page-hero,
.references-page-shell {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: clamp(28px, 5vw, 46px);
  border-radius: 34px;
}

.references-page-hero::before,
.references-page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 16%, rgba(92, 225, 255, 0.11), transparent 30%),
    radial-gradient(circle at 86% 20%, rgba(255, 79, 216, 0.13), transparent 30%),
    linear-gradient(135deg, rgba(18, 26, 52, 0.84), rgba(8, 10, 22, 0.94));
  pointer-events: none;
}

.references-page-hero > *,
.references-page-shell > * {
  position: relative;
  z-index: 1;
}

.references-page-hero h1 {
  margin: 16px 0 14px;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.references-page-hero p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.8;
}

.reference-work-list {
  display: grid;
  gap: 18px;
}

.reference-work-card {
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 36px rgba(0,0,0,0.18);
  overflow: hidden;
}

.reference-work-card[open] {
  border-color: rgba(92, 225, 255, 0.18);
  box-shadow: 0 20px 46px rgba(0,0,0,0.22), 0 0 0 1px rgba(92, 225, 255, 0.08) inset;
}

/* Keep the collapsed state explicit instead of relying only on the browser's
   built-in details styling. This also prevents stale restored UI state from
   exposing the body before the page-level reset runs. */
.reference-work-card:not([open]) > .reference-work-card__body {
  display: none;
}

.reference-work-card__summary {
  list-style: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  cursor: pointer;
}

.reference-work-card__summary::-webkit-details-marker {
  display: none;
}

.reference-work-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 28% 18%, rgba(225, 121, 255, 0.18), transparent 42%),
    radial-gradient(circle at 82% 86%, rgba(91, 141, 255, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
  border: 1px solid rgba(169, 189, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 16px 34px rgba(0,0,0,0.22);
}

.reference-work-card__icon img {
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
}

.reference-work-card__summary-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.reference-work-card__summary-main strong {
  font-size: clamp(1.18rem, 2vw, 1.44rem);
  line-height: 1.25;
}

.reference-work-card__summary-main small {
  color: var(--muted);
  font-size: 0.99rem;
  line-height: 1.65;
}

.reference-work-card__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}

.reference-work-card__toggle::after {
  content: "+";
  font-size: 1.1rem;
  line-height: 1;
}

.reference-work-card[open] .reference-work-card__toggle::after {
  content: "−";
}

.reference-work-card__body {
  padding: 0 24px 24px 114px;
}

.reference-work-card__body p {
  margin: 0 0 14px;
  color: var(--text);
  line-height: 1.78;
}

.reference-work-card__meta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}

.references-page-cta .contact-cta__button {
  min-width: 240px;
}

.reference-work-card__lead {
  margin: 0 0 18px;
  color: var(--text);
  line-height: 1.78;
}

.reference-work-card__sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.reference-work-card__section,
.reference-work-card__features {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.075);
}

.reference-work-card__section h4,
.reference-work-card__features h4 {
  margin: 0 0 8px;
  color: #f5f8ff;
  font-size: 1rem;
  line-height: 1.35;
}

.reference-work-card__section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.reference-work-card__features {
  margin: 18px 0;
}

.reference-work-card__features ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.72;
}

.reference-work-card__features li + li {
  margin-top: 6px;
}

@media (max-width: 900px) {
  .reference-work-card__summary {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .reference-work-card__icon {
    width: 70px;
    height: 70px;
  }

  .reference-work-card__icon img {
    width: 100%;
    height: 100%;
  }

  .reference-work-card__body {
    padding: 0 20px 20px;
  }

  .reference-work-card__sections {
    grid-template-columns: 1fr;
  }

  .reference-work-card__toggle {
    justify-self: start;
  }
}

.reference-work-card {
  scroll-margin-top: 110px;
}

.reference-work-card--target {
  border-color: rgba(92, 225, 255, 0.46) !important;
  box-shadow: 0 0 0 3px rgba(92, 225, 255, 0.12), 0 22px 70px rgba(92, 225, 255, 0.10);
}
