.agf-portfolio {
  position: relative;
  width: 100%;
  padding: clamp(2rem, 5vw, 4rem) 0 1rem;
  color: #050a11;
  font-family: "AGF Inter", Inter, system-ui, sans-serif;
  overflow: visible;
  -webkit-font-smoothing: antialiased;
}

.proof-handoff {
  position: relative;
  isolation: isolate;
  background: #fff;
}

.agf-freeze-frame {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 100svh;
  min-height: 44rem;
  overflow: hidden;
  background: #fff;
}

.agf-freeze-frame .agf-portfolio {
  position: relative;
  top: auto;
  min-height: 100svh;
}

.proof-handoff > .seo-story {
  position: relative;
  z-index: 2;
  margin-top: 50svh;
}

.agf-portfolio *,
.agf-portfolio *::before,
.agf-portfolio *::after { box-sizing: border-box; }

.agf-inner { position: relative; z-index: 1; width: 100%; margin: 0 auto; padding: 0; }

.agf-stage {
  position: relative;
  width: 100%;
  height: clamp(620px, 88vh, 1100px);
  margin: 0 auto;
  perspective: 2600px;
  perspective-origin: 50% 50%;
  overflow: visible;
}

.agf-track { position: absolute; inset: 0; transform-style: preserve-3d; }

.agf-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(320px, 85vw, 1320px);
  height: clamp(420px, 80vh, 820px);
  margin-top: calc(clamp(420px, 80vh, 820px) / -2);
  margin-left: calc(clamp(320px, 85vw, 1320px) / -2);
  overflow: hidden;
  border: 1px solid rgba(5, 10, 17, .12);
  border-radius: 22px;
  background: transparent;
  box-shadow: 0 60px 140px rgba(5, 10, 17, .28);
  cursor: pointer;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1), opacity .7s ease, filter .7s ease, box-shadow .5s ease;
  will-change: transform, opacity, filter;
}

.agf-thumb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #0a0e22; }
.agf-thumb img,
.agf-thumb video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.agf-thumb .agf-poster { position: absolute; inset: 0; opacity: 1; }
.agf-thumb video { position: relative; opacity: 0; }
.agf-thumb.is-playing .agf-poster { opacity: 0; }
.agf-thumb.is-playing video { opacity: 1; }
@media (min-width: 768px) {
  .agf-portfolio[data-agf-desktop-video-previews] .agf-card { height: auto; aspect-ratio: 16 / 9; margin-top: clamp(-371.25px, -23.90625vw, -90px); }
  .agf-portfolio[data-agf-desktop-video-previews] .agf-thumb img,
  .agf-portfolio[data-agf-desktop-video-previews] .agf-thumb video { object-fit: contain; object-position: center; }
  .agf-portfolio[data-agf-desktop-video-previews] .agf-thumb .agf-poster { position: absolute; inset: 0; z-index: 0; opacity: 1; transition: opacity .25s ease; }
  .agf-portfolio[data-agf-desktop-video-previews] .agf-thumb video { position: relative; z-index: 1; opacity: 0; transition: opacity .25s ease; }
  .agf-portfolio[data-agf-desktop-video-previews] .agf-thumb.is-playing .agf-poster { opacity: 0; }
  .agf-portfolio[data-agf-desktop-video-previews] .agf-thumb.is-playing video { opacity: 1; }
}
.agf-card[data-index="0"] .agf-thumb img,
.agf-card[data-index="0"] .agf-thumb video { object-fit: contain; object-position: center; }
.agf-thumb::after { position: absolute; inset: 0; z-index: 1; background: linear-gradient(110deg, rgba(255,255,255,.04), rgba(255,255,255,.12), rgba(255,255,255,.04)); background-size: 200% 100%; content: ""; opacity: 0; transition: opacity .3s; animation: agf-shimmer 1.8s linear infinite; }
.agf-thumb.loading::after { opacity: 1; }

.agf-fallback { position: absolute; inset: 0; z-index: 2; display: none; align-items: center; justify-content: center; padding: 2rem; color: #fff; background: var(--agf-bg); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; text-align: center; }

.agf-cap { position: absolute; right: 0; bottom: 0; left: 0; z-index: 3; display: flex; align-items: flex-end; padding: 32px 44px; color: #fff; background: linear-gradient(to top, rgba(6,8,20,.95), rgba(6,8,20,.65) 55%, transparent); opacity: 0; transition: opacity .5s ease .15s; }
.agf-card.is-active .agf-cap { opacity: 1; }
.agf-type { margin-bottom: 8px; color: #5fa8ff; font-size: .78rem; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.agf-name { font-size: clamp(1.4rem, 2.5vw, 2.2rem); font-weight: 800; letter-spacing: -.01em; }
.agf-card.is-active { border-color: rgba(95,168,255,.55); box-shadow: 0 70px 160px rgba(95,168,255,.24), inset 0 0 0 1px rgba(95,168,255,.55); }

.agf-arrow { position: absolute; top: 50%; z-index: 30; display: grid; width: 64px; height: 64px; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; color: #fff; background: rgba(10,14,34,.62); font: inherit; font-size: 1.6rem; cursor: pointer; transform: translateY(-50%); transition: transform .2s, background-color .2s, border-color .2s; }
.agf-arrow:hover { border-color: rgba(95,168,255,.7); background: rgba(95,168,255,.3); transform: translateY(-50%) scale(1.08); }
.agf-arrow:focus-visible { outline: 3px solid #0a5cff; outline-offset: 4px; }
.agf-arrow svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.agf-arrow.prev { left: 24px; }
.agf-arrow.next { right: 24px; }

.agf-dots { display: flex; justify-content: center; gap: 9px; margin-top: 36px; }
.agf-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(5,10,17,.2); cursor: pointer; transition: background-color .25s; }
.agf-dot.is-on { width: 30px; border-radius: 999px; background: #0a5cff; }
.agf-dot:focus-visible { outline: 2px solid #0a5cff; outline-offset: 3px; }

/* Keep the carousel indicators compact even when the site's button defaults set a touch-target height. */
.agf-portfolio .agf-dot {
  flex: 0 0 .55rem;
  width: .55rem !important;
  height: .55rem !important;
  min-width: .55rem !important;
  min-height: .55rem !important;
  max-width: .55rem;
  max-height: .55rem;
  aspect-ratio: 1;
}

.agf-portfolio .agf-dot.is-on {
  flex-basis: 1.8rem;
  width: 1.8rem !important;
  min-width: 1.8rem !important;
  max-width: 1.8rem;
  aspect-ratio: auto;
}

.agf-anim { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.agf-anim.agf-in { opacity: 1; transform: translateY(0); }
.agf-stage-anim { opacity: 1; transform: scale(1); transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.agf-stage-anim.agf-in { opacity: 1; transform: scale(1); }

@keyframes agf-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (max-width: 720px) {
  .agf-freeze-frame { position: relative; top: auto; height: auto; min-height: auto; overflow: visible; }
  .agf-freeze-frame .agf-portfolio { position: relative; top: auto; min-height: 0; }
  .proof-handoff > .seo-story { margin-top: 0; }
  .agf-stage { height: clamp(440px, 72vh, 680px); }
  .agf-card { width: min(86vw, 38rem); height: clamp(380px, 66vh, 590px); margin-left: calc(min(86vw, 38rem) / -2); margin-top: calc(clamp(380px, 66vh, 590px) / -2); }
  .agf-arrow { width: 48px; height: 48px; font-size: 1.3rem; }
  .agf-arrow.prev { left: 8px; }
  .agf-arrow.next { right: 8px; }
  .agf-cap { padding: 20px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .agf-freeze-frame { position: relative; top: auto; height: auto; min-height: auto; overflow: visible; }
  .agf-freeze-frame .agf-portfolio { position: relative; top: auto; min-height: 0; }
  .proof-handoff > .seo-story { margin-top: 0; }
  .agf-card, .agf-anim, .agf-stage-anim { transition: none; }
  .agf-thumb::after { animation: none; }
}
