/* Scoped transfer of the approved interactive references prototype. */
.references {
  --active-accent: #f79d63;
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 54% 45%, color-mix(in srgb, var(--active-accent) 16%, transparent), transparent 31%),
    radial-gradient(circle at 10% 92%, #ffffff0a, transparent 30%),
    #070708;
  color: #f6f4ef;
  font-family: Arial, Helvetica, sans-serif;
  color-scheme: dark;
  transition: background .7s ease;
}
.references::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
.references-showcase {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(220px,.78fr) minmax(420px,1.45fr) minmax(330px,1fr);
  align-items: center;
  gap: clamp(12px,2vw,36px);
  min-height: 100svh;
  max-width: 1440px;
  margin-inline: auto;
  padding: clamp(110px,12vh,148px) clamp(24px,4vw,64px) 72px;
}
.references-intro { position: relative; z-index: 8; align-self: start; padding-top: clamp(20px,5vh,62px); }
.references-eyebrow { margin: 0 0 22px; color: #9a9892; font-size: 10px; letter-spacing: .24em; }
.references-intro h2 { margin: 0; font-size: clamp(48px,5.2vw,82px); line-height: .92; letter-spacing: -.055em; font-weight: 600; }
.references-intro h2 em { color: var(--active-accent); font-family: Georgia,serif; font-weight: 400; transition: color .5s ease; }
.references-intro-copy { max-width: 320px; margin: 28px 0 0; color: #a8a6a0; font-size: 15px; line-height: 1.7; }
.references-stage { position: relative; height: min(72vh,690px); min-height: 540px; perspective: 1100px; outline: none; touch-action: pan-y; user-select: none; }
.references-stage:focus-visible { outline: 1px solid #ffffff88; outline-offset: -4px; }
.references-glow { position: absolute; left: 50%; top: 46%; width: 420px; height: 420px; transform: translate(-50%,-50%); border-radius: 50%; background: var(--active-accent); filter: blur(130px); opacity: .11; transition: background .5s; }
.references-floor { position: absolute; left: 50%; bottom: 7%; width: 110%; height: 30%; transform: translateX(-50%) rotateX(68deg); background: radial-gradient(ellipse,color-mix(in srgb,var(--active-accent) 16%,transparent),#ffffff06 36%,transparent 70%); border-top: 1px solid #ffffff14; }
.references-ring { position: absolute; inset: 0; transform-style: preserve-3d; }
.references-card {
  --card-w: clamp(180px,15vw,230px);
  position: absolute;
  left: 50%;
  top: 44%;
  width: var(--card-w);
  height: calc(var(--card-w)*1.42);
  padding: 0;
  overflow: hidden;
  border: 1px solid #ffffff2e;
  border-radius: 4px;
  background: #151517;
  color: #f6f4ef;
  cursor: pointer;
  transform: translate3d(calc(-50% + (var(--offset)*clamp(90px,8vw,125px))),calc(-50% + (var(--distance)*24px)),calc(var(--distance)*-140px)) rotateY(calc(var(--offset)*-17deg)) scale(calc(1 - (var(--distance)*.115)));
  filter: saturate(calc(1 - var(--distance)*.25)) brightness(calc(1 - var(--distance)*.14));
  opacity: calc(1 - var(--distance)*.14);
  transition: transform .75s cubic-bezier(.2,.8,.2,1),filter .65s,opacity .65s,border-color .4s,box-shadow .4s;
  -webkit-box-reflect: below 14px linear-gradient(transparent 50%,#000b);
}
.references-card:hover { border-color: #ffffff75; }
.references-card:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
.references-card.is-active { border-color: color-mix(in srgb,var(--card-accent) 72%,white); box-shadow: 0 0 60px color-mix(in srgb,var(--card-accent) 24%,transparent); }
.references-card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.references-shade { position: absolute; inset: 0; background: linear-gradient(180deg,#0000000a 45%,#000000e0); }
.references-card-index { position: absolute; left: 18px; top: 17px; font-size: 10px; letter-spacing: .16em; }
.references-card-label { position: absolute; left: 18px; right: 18px; bottom: 18px; text-align: left; font-size: 12px; letter-spacing: .16em; font-weight: 700; }
.references-controls { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); display: flex; align-items: center; gap: 15px; z-index: 12; }
.references-controls button { width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid #ffffff33; background: #080809ad; color: #f6f4ef; cursor: pointer; font-size: 20px; }
.references-controls button:hover { background: #fff; color: #080809; }
.references-controls span { min-width: 54px; text-align: center; color: #77756f; font-size: 11px; letter-spacing: .12em; }
.references-controls strong { color: #fff; }
.references-copy { position: relative; z-index: 10; max-width: 440px; padding-left: clamp(12px,2vw,34px); }
.references-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; color: #85837e; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; }
.references-meta-line { width: 32px; height: 1px; background: #4d4c49; }
.references-client { margin: 0 0 12px; color: var(--active-accent); font-size: 12px; letter-spacing: .25em; font-weight: 700; }
.references-copy h3 { margin: 0; font-size: clamp(34px,3.2vw,55px); line-height: 1.03; letter-spacing: -.04em; font-weight: 560; }
.references-description { max-width: 410px; margin: 26px 0 30px; color: #aaa8a2; font-size: 15px; line-height: 1.75; }
.references-result { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 24px; border-top: 1px solid #ffffff21; }
.references-metric { display: flex; align-items: flex-end; gap: 12px; }
.references-metric strong { color: var(--active-accent); font-family: Georgia,serif; font-size: 45px; line-height: .9; font-weight: 500; }
.references-metric span { max-width: 108px; color: #8f8d87; font-size: 10px; line-height: 1.35; text-transform: uppercase; letter-spacing: .1em; }
.references-case-label { display: flex; gap: 7px; padding: 10px 0; border-bottom: 1px solid #777; font-size: 12px; white-space: nowrap; }
.references-fallback { position: relative; z-index: 2; max-width: 960px; margin: auto; padding: 0 24px 72px; display: grid; gap: 26px; }
.references-fallback article { border-top: 1px solid #ffffff33; padding-top: 20px; }
.references-fallback h3 { font-size: 22px; margin-bottom: 10px; }
.references-fallback p { color: #aaa8a2; font-size: 15px; }
.references + .services { margin-top: 0; }
@media (max-width:1100px) {
  .references-showcase { display: block; }
  .references-intro { max-width: 600px; padding-top: 0; }
  .references-stage { min-height: 510px; height: 58vh; }
  .references-copy { display: grid; grid-template-columns: .8fr 1.1fr; gap: 20px 50px; max-width: none; padding: 8px 0 30px; }
  .references-meta,.references-client,.references-copy h3 { grid-column: 1; }
  .references-client { margin-top: -30px; }
  .references-description,.references-result { grid-column: 2; }
  .references-description { grid-row: 1/span 2; margin: 0; }
}
@media (max-width:720px) {
  .references { overflow: clip; }
  .references-showcase { min-height: auto; display: block; padding: 110px 20px 56px; }
  .references-intro { padding: 0; }
  .references-intro h2 { font-size: 58px; }
  .references-intro-copy { margin-top: 20px; }
  .references-stage { height: 470px; min-height: 0; margin: 10px -20px 0; }
  .references-card { --card-w: 178px; transform: translate3d(calc(-50% + (var(--offset)*112px)),calc(-50% + (var(--distance)*22px)),calc(var(--distance)*-100px)) rotateY(calc(var(--offset)*-18deg)) scale(calc(1 - (var(--distance)*.14))); }
  .references-card[data-distance='2'] { opacity: 0; visibility: hidden; pointer-events: none; }
  .references-controls { bottom: 2%; }
  .references-copy { display: block; padding: 32px 0 0; }
  .references-meta { margin-bottom: 18px; }
  .references-client { margin: 0 0 10px; }
  .references-copy h3 { font-size: 38px; }
  .references-description { margin: 20px 0 26px; }
  .references-result { align-items: center; }
  .references-metric strong { font-size: 38px; }
}
@media (max-width:359px) {
  .references-intro h2 { font-size: 48px; }
  .references-copy h3 { font-size: 33px; }
}
@media (prefers-reduced-motion:reduce) {
  .references,.references * { animation: none!important; transition: none!important; }
  .references-card { -webkit-box-reflect: none; }
}
