.references-page {
  --ref-ink: var(--ink, #08141e);
  --ref-ink-soft: var(--ink-soft, #555e6a);
  --ref-surface: var(--surface, #f6f7f9);
  --ref-border: var(--border, #e8eaed);
  --ref-dark: var(--surface-dark, #1e2832);
  --ref-lime: var(--brand-lime, #adf44d);
  --ref-brand: var(--green, #8662f6);
  background: var(--ref-surface);
  color: var(--ref-ink);
}

/* ── Hero ── */
.references-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0a1219 0%, var(--ref-dark) 52%, #24313d 100%);
  color: #fff;
  padding: 96px 24px 128px;
  text-align: center;
}

.references-hero__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
}

.references-hero__glow--left {
  top: -20%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: rgba(134, 98, 246, .22);
}

.references-hero__glow--right {
  bottom: -10%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: rgba(173, 244, 77, .08);
}

.references-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
}

.references-hero__badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(173, 244, 77, .22);
  background: rgba(173, 244, 77, .08);
  color: var(--ref-lime);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.references-hero__title {
  margin: 0 0 24px;
  font-size: clamp(2.35rem, 5vw, 3.75rem);
  font-family: var(--font-heading, 'TT Hoves Medium', sans-serif);
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1.05;
  background: linear-gradient(90deg, #fff 0%, #eef1f4 55%, rgba(173, 244, 77, .82) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.references-hero__lead {
  margin: 0 auto;
  max-width: 760px;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, .78);
}

/* ── Spotlight card ── */
.references-spotlight {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: -64px auto 0;
  padding: 0 24px;
}

.references-spotlight__shell {
  display: flex;
  align-items: center;
  gap: 16px;
}

.references-spotlight__card {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--ref-border);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(8, 20, 30, .08);
  padding: clamp(28px, 4vw, 48px);
}

/* ── Video carousel ── */
.references-videos-carousel {
  position: relative;
}

.references-videos-carousel__viewport {
  min-width: 0;
  overflow: hidden;
}

.references-videos-carousel__track {
  display: flex;
  gap: 16px;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}

.references-videos-carousel__slide {
  flex: 0 0 calc((100% - 64px) / 5);
  min-width: 0;
}

.references-videos-carousel__nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ref-border);
  border-radius: 50%;
  background: #fff;
  color: var(--ref-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(8, 20, 30, .08);
  transition: background .25s ease, border-color .25s ease, color .25s ease, opacity .25s ease;
}

.references-videos-carousel__nav:hover:not(:disabled) {
  background: var(--ref-brand);
  border-color: var(--ref-brand);
  color: #fff;
}

.references-videos-carousel__nav:disabled {
  opacity: .35;
  cursor: default;
}

.references-videos-carousel__nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.references-videos-carousel__dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.references-videos-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 20, 30, .18);
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}

.references-videos-carousel__dot.is-active {
  background: var(--ref-brand);
  transform: scale(1.15);
}

/* ── Video cards ── */
.references-video-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--ref-ink);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.references-video-card:not(.references-video-card--cover) {
  transition: transform .45s cubic-bezier(.4, 0, .2, 1), box-shadow .45s cubic-bezier(.4, 0, .2, 1);
}

.references-video-card:not(.references-video-card--cover):hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(8, 20, 30, .18);
}

.references-video-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.references-video-card:not(.references-video-card--cover) .references-video-card__photo {
  transition: transform .7s cubic-bezier(.4, 0, .2, 1);
}

.references-video-card:not(.references-video-card--cover):hover .references-video-card__photo {
  transform: scale(1.08);
}

.references-video-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 20, 30, .08) 0%, rgba(8, 20, 30, .92) 100%);
  pointer-events: none;
}

.references-video-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ref-brand);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px rgba(134, 98, 246, .35);
  transition: transform .3s ease, background .3s ease;
  animation: referencesPlayPulse 3s infinite;
}

.references-video-card:not(.references-video-card--cover):hover .references-video-card__play {
  transform: translate(-50%, -50%) scale(1.08);
  background: #7555eb;
}

.references-video-card__play svg {
  width: 20px;
  height: 20px;
  margin-left: 3px;
  fill: #fff;
}

@keyframes referencesPlayPulse {
  0%, 100% {
    box-shadow: 0 12px 32px rgba(134, 98, 246, .35);
  }

  50% {
    box-shadow: 0 12px 36px rgba(134, 98, 246, .55);
  }
}

.references-video-card__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 10px;
  text-align: center;
  background: rgba(8, 20, 30, .68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.references-video-card__brand {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
}

.references-video-card__story {
  display: block;
  margin-top: 3px;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ref-lime);
}

/* ── Brands ── */
.references-brands {
  padding: 96px 24px 104px;
}

.references-brands__inner {
  max-width: 1280px;
  margin: 0 auto;
}

.references-brands__head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.references-brands__title {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  font-family: var(--font-heading, 'TT Hoves Medium', sans-serif);
  font-weight: 500;
  letter-spacing: -.03em;
  color: var(--ref-ink);
}

.references-brands__lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ref-ink-soft);
}

.references-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.references-filter {
  appearance: none;
  border: 1px solid var(--ref-border);
  border-radius: 999px;
  padding: 10px 18px;
  background: #fff;
  color: var(--ref-ink-soft);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.references-filter:hover {
  border-color: #d5dbe5;
  background: var(--ref-surface);
  color: var(--ref-ink);
}

.references-filter.is-active {
  border-color: transparent;
  background: var(--ref-ink);
  color: #fff;
  box-shadow: 0 10px 24px rgba(8, 20, 30, .12);
}

.references-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.references-grid__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 28px 20px;
  border: 1px solid rgba(232, 234, 237, .9);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(8, 20, 30, .03);
  transition: transform .4s cubic-bezier(.4, 0, .2, 1), box-shadow .4s cubic-bezier(.4, 0, .2, 1), border-color .3s ease, opacity .3s ease;
}

.references-grid__item.is-hidden {
  display: none;
}

.references-grid__item:hover {
  border-color: rgba(134, 98, 246, .18);
  box-shadow: 0 16px 40px rgba(8, 20, 30, .08);
  transform: translateY(-2px);
}

.references-grid__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--ref-surface);
  color: var(--ref-ink-soft);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.references-grid__item img {
  max-width: 100%;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .82;
  transition: filter .35s ease, opacity .35s ease, transform .35s ease;
}

.references-grid__item:hover img {
  filter: grayscale(0);
  opacity: 1;
}

/* ── CTA ── */
.references-cta {
  margin-top: 72px;
  padding: 40px 32px;
  border-radius: 24px;
  border: 1px solid rgba(134, 98, 246, .12);
  background: linear-gradient(135deg, rgba(134, 98, 246, .06) 0%, rgba(173, 244, 77, .08) 100%);
  text-align: center;
}

.references-cta__title {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-family: var(--font-heading, 'TT Hoves Medium', sans-serif);
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--ref-ink);
}

.references-cta__text {
  margin: 0 auto 24px;
  max-width: 640px;
  font-size: .96rem;
  line-height: 1.7;
  color: var(--ref-ink-soft);
}

.references-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
}

/* ── Success story modal ── */
.references-story-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.references-story-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.references-story-modal[hidden] {
  display: none;
}

.references-story-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 30, .78);
  backdrop-filter: blur(8px);
}

.references-story-modal__dialog {
  position: relative;
  width: min(100%, 680px);
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 32px 80px rgba(8, 20, 30, .24);
  transform: scale(.95);
  transition: transform .3s ease;
}

.references-story-modal.is-open .references-story-modal__dialog {
  transform: scale(1);
}

.references-story-modal__banner {
  position: relative;
  min-height: 192px;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.references-story-modal__banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .45;
}

.references-story-modal__banner-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 20, 30, .2) 0%, rgba(8, 20, 30, .95) 100%);
}

.references-story-modal__banner-copy {
  position: relative;
  z-index: 1;
}

.references-story-modal__badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(173, 244, 77, .24);
  background: rgba(173, 244, 77, .12);
  color: var(--ref-lime);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.references-story-modal__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-family: var(--font-heading, 'TT Hoves Medium', sans-serif);
  font-weight: 500;
  letter-spacing: -.03em;
  color: #fff;
}

.references-story-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s ease;
}

.references-story-modal__close:hover {
  background: rgba(255, 255, 255, .28);
}

.references-story-modal__close svg {
  width: 18px;
  height: 18px;
}

.references-story-modal__body {
  padding: 28px 28px 32px;
}

.references-story-modal__kicker {
  margin: 0 0 8px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ref-ink-soft);
}

.references-story-modal__desc {
  margin: 0;
  font-size: .98rem;
  line-height: 1.75;
  color: var(--ref-ink-soft);
}

.references-story-modal__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--ref-border);
}

.references-story-modal__stat {
  padding: 18px 16px;
  border-radius: 16px;
  text-align: center;
}

.references-story-modal__stat--growth {
  background: rgba(134, 98, 246, .08);
  border: 1px solid rgba(134, 98, 246, .12);
}

.references-story-modal__stat--efficiency {
  background: rgba(173, 244, 77, .12);
  border: 1px solid rgba(173, 244, 77, .22);
}

.references-story-modal__stat-label {
  display: block;
  margin-bottom: 6px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ref-ink-soft);
}

.references-story-modal__stat--growth .references-story-modal__stat-value {
  color: var(--ref-brand);
}

.references-story-modal__stat--efficiency .references-story-modal__stat-value {
  color: #4f7f12;
}

.references-story-modal__stat-value {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -.03em;
}

.references-story-modal__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.references-story-modal__btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  min-height: 44px;
  padding: 0 18px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.references-story-modal__btn--ghost {
  background: var(--ref-surface);
  color: var(--ref-ink);
}

.references-story-modal__btn--ghost:hover {
  background: #eceef1;
}

.references-story-modal__btn--primary {
  border: 0;
}

/* ── Video modal ── */
.references-video-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 24px;
}

.references-video-modal[hidden] {
  display: none;
}

.references-video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 30, .82);
  backdrop-filter: blur(6px);
}

.references-video-modal__dialog {
  position: relative;
  width: min(100%, 420px);
  max-height: min(92vh, 820px);
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
}

.references-video-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.references-video-modal__iframe,
.references-video-modal__native {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: contain;
  background: #000;
}

.references-video-modal__iframe[hidden],
.references-video-modal__native[hidden] {
  display: none;
}

@media (max-width: 1100px) {
  .references-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .references-spotlight__shell {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .references-videos-carousel__nav {
    display: none;
  }

  .references-videos-carousel__slide {
    flex: 0 0 calc((100% - 32px) / 3);
  }

  .references-videos-carousel__dots {
    display: flex;
    width: 100%;
  }
}

@media (max-width: 1024px) {
  .references-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .references-hero {
    padding: 80px 20px 104px;
  }

  .references-spotlight {
    margin-top: -48px;
    padding: 0 20px;
  }

  .references-brands {
    padding: 72px 20px 88px;
  }

  .references-videos-carousel__slide {
    flex: 0 0 calc((100% - 16px) / 1.35);
  }

  .references-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .references-grid__item {
    min-height: 96px;
    padding: 22px 16px;
  }

  .references-cta {
    padding: 28px 22px;
  }

  .references-story-modal__stats {
    grid-template-columns: 1fr;
  }

  .references-story-modal__actions {
    flex-direction: column;
  }

  .references-story-modal__btn {
    width: 100%;
  }
}
