.fc-aif {
  --aif-card-w: clamp(156px, 18vw, 224px);
  --aif-step: clamp(112px, 15vw, 196px);
  --aif-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  z-index: 1;
  max-width: var(--lp-container);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 1.5rem;
  overflow: hidden;
}

.fc-aif-aura {
  position: absolute;
  top: 18%;
  left: 50%;
  width: min(110%, 52rem);
  aspect-ratio: 1;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(circle at center, var(--fc-purple-glow) 0%, transparent 60%);
  opacity: 0.45;
  filter: blur(16px);
}

.fc-aif-inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.fc-aif-head {
  margin-bottom: clamp(1.75rem, 4.5vw, 2.5rem);
}

.fc-aif-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--fc-purple) 28%, transparent);
  background: var(--fc-purple-soft);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fc-purple);
  margin-bottom: 1rem;
}

.fc-aif-title {
  margin: 0 0 0.875rem;
  font-size: clamp(1.85rem, 4.6vw, 2.65rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text);
}

.fc-aif-title em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fc-purple);
}

.fc-aif-sub {
  margin: 0 auto;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.fc-aif-tabs {
  display: inline-flex;
  gap: 0.25rem;
  max-width: 100%;
  margin: 0 auto clamp(1.5rem, 4vw, 2rem);
  padding: 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--fc-border);
  background: color-mix(in srgb, var(--fc-card) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-x: auto;
  scrollbar-width: none;
}

.fc-aif-tabs::-webkit-scrollbar {
  display: none;
}

.fc-aif-tab {
  flex: none;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.fc-aif-tab:hover {
  color: var(--text);
}

.fc-aif-tab.is-active {
  background: var(--fc-purple);
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--fc-purple) 35%, transparent);
}

.fc-aif-tab:focus-visible {
  outline: 2px solid var(--fc-purple);
  outline-offset: 2px;
}

.fc-aif-panel[hidden] {
  display: none;
}

.fc-aif-panel.is-entering .fc-aif-stage,
.fc-aif-panel.is-entering .fc-aif-chips {
  animation: fcAifPanel 0.5s var(--aif-ease);
}

@keyframes fcAifPanel {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Palco: o tipo escolhido fica no centro, os vizinhos recuam dos lados */
.fc-aif-stage {
  position: relative;
  height: calc(var(--aif-card-w) * 4 / 3 + 1.5rem);
  margin: 0 auto;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.fc-aif-floor {
  position: absolute;
  left: 50%;
  bottom: 0.25rem;
  width: calc(var(--aif-card-w) * 1.6);
  height: 1.4rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--fc-purple) 30%, transparent) 0%, transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}

.fc-aif-card {
  --off: 0;
  --scale: 1;
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--aif-card-w);
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 10px 30px rgba(15, 10, 40, 0.1);
  cursor: pointer;
  transform: translateX(calc(-50% + var(--off) * var(--aif-step))) scale(var(--scale));
  transform-origin: 50% 100%;
  transition:
    transform 0.6s var(--aif-ease),
    opacity 0.45s ease,
    filter 0.45s ease,
    box-shadow 0.45s ease,
    border-color 0.45s ease;
  will-change: transform;
}

.fc-aif-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 58%;
  transform: scale(1.12);
  pointer-events: none;
}

.fc-aif-panel[data-kind="portrait"] .fc-aif-card img {
  object-position: 50% 30%;
  transform: none;
}

.fc-aif-panel[data-kind="object"] .fc-aif-card img {
  object-fit: contain;
  transform: scale(0.82);
}

.fc-aif-card[data-dist="1"] {
  opacity: 0.78;
  filter: saturate(0.75);
}

.fc-aif-card[data-dist="2"] {
  opacity: 0.4;
  filter: saturate(0.5);
}

.fc-aif-card[data-dist="3"] {
  opacity: 0;
  pointer-events: none;
}

.fc-aif-card:not(.is-active):hover {
  opacity: 1;
  filter: none;
}

.fc-aif-card.is-active {
  cursor: default;
  border-color: color-mix(in srgb, var(--fc-purple) 70%, transparent);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--fc-purple) 22%, transparent),
    0 22px 50px color-mix(in srgb, var(--fc-purple) 22%, rgba(15, 10, 40, 0.14));
}

.fc-aif-card-check {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--fc-purple);
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.4s var(--aif-ease);
}

.fc-aif-card-check svg {
  width: 0.85rem;
  height: 0.85rem;
}

.fc-aif-card.is-active .fc-aif-card-check {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.2s;
}

.fc-aif-current-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 1.25rem 0 1.1rem;
}

.fc-aif-nav {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--fc-border);
  background: color-mix(in srgb, var(--fc-card) 88%, transparent);
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.fc-aif-nav svg {
  width: 1.1rem;
  height: 1.1rem;
}

.fc-aif-nav:hover {
  border-color: color-mix(in srgb, var(--fc-purple) 50%, transparent);
  color: var(--fc-purple);
}

.fc-aif-nav:active {
  transform: scale(0.94);
}

.fc-aif-nav:focus-visible,
.fc-aif-chip:focus-visible {
  outline: 2px solid var(--fc-purple);
  outline-offset: 2px;
}

.fc-aif-current {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 10rem;
  margin: 0;
}

.fc-aif-current-kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.fc-aif-current-name {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.fc-aif-current-name.is-swap {
  animation: fcAifName 0.45s var(--aif-ease);
}

@keyframes fcAifName {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.fc-aif-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto;
}

.fc-aif-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem 0.3rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--fc-border);
  background: var(--fc-card);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, transform 0.2s ease;
}

.fc-aif-chip:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--fc-purple) 35%, var(--fc-border));
}

.fc-aif-chip:active {
  transform: scale(0.97);
}

.fc-aif-chip.is-active {
  color: var(--fc-purple);
  border-color: color-mix(in srgb, var(--fc-purple) 55%, transparent);
  background: var(--fc-purple-soft);
}

.fc-aif-chip-thumb {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}

.fc-aif-chip-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  transform: scale(2.4);
  transform-origin: 50% 22%;
}

.fc-aif-panel[data-kind="portrait"] .fc-aif-chip-thumb img {
  transform: scale(1.35);
  transform-origin: 50% 30%;
}

.fc-aif-panel[data-kind="object"] .fc-aif-chip-thumb img {
  object-fit: contain;
  transform: scale(0.9);
  transform-origin: 50% 50%;
}

.fc-aif-hint {
  margin: 0.9rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Vitrine de vídeos: trilho horizontal com altura fixa, largura segue o formato */
.fc-aif-show {
  --aif-clip-h: clamp(300px, 36vw, 400px);
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  text-align: left;
}

.fc-aif-show-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.fc-aif-show-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}

.fc-aif-show-sub {
  margin: 0;
  max-width: 34rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.fc-aif-show-nav {
  flex: none;
  display: flex;
  gap: 0.5rem;
}

.fc-aif-rail {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  margin: 0 -1.5rem;
  padding: 0.25rem 1.5rem 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1.5rem;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1.5rem, #000 calc(100% - 1.5rem), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 1.5rem, #000 calc(100% - 1.5rem), transparent 100%);
}

.fc-aif-rail::-webkit-scrollbar {
  display: none;
}

.fc-aif-clip {
  position: relative;
  flex: none;
  height: var(--aif-clip-h);
  border-radius: 18px;
  overflow: hidden;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 10px 28px rgba(15, 10, 40, 0.1);
  scroll-snap-align: start;
}

.fc-aif-clip video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.fc-aif-clip-mode {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 12, 29, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.fc-aif-clip-source {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem 0.2rem 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f0c1d;
  font-size: 0.6875rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.fc-aif-clip-source img {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  object-fit: cover;
}

[data-theme="dark"] .fc-aif-clip {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.fc-aif-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(1.5rem, 4vw, 2rem);
}

.fc-aif-reveal {
  opacity: 0;
  transform: translateY(14px);
}

.fc-aif.is-visible .fc-aif-reveal {
  animation: fcAutoReveal 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: var(--reveal-delay, 0ms);
}

html:not(.js) .fc-aif-reveal {
  opacity: 1;
  transform: none;
}

[data-theme="dark"] .fc-aif-card {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .fc-aif-card.is-active {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--fc-purple) 30%, transparent),
    0 24px 60px color-mix(in srgb, var(--fc-purple) 26%, rgba(0, 0, 0, 0.5));
}

@media (max-width: 760px) {
  .fc-aif {
    --aif-card-w: min(52vw, 210px);
    --aif-step: min(36vw, 150px);
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .fc-aif-card[data-dist="2"] {
    opacity: 0;
    pointer-events: none;
  }
  .fc-aif-chip {
    font-size: 0.78rem;
  }
  .fc-aif-show {
    --aif-clip-h: min(110vw, 380px);
  }
  .fc-aif-show-nav {
    display: none;
  }
  .fc-aif-rail {
    margin: 0 -1rem;
    padding-inline: 1rem;
    scroll-padding-inline: 1rem;
  }
  .fc-aif-clip[data-wide] {
    --aif-clip-h: min(56vw, 230px);
    align-self: center;
  }
}

@media (max-width: 560px) {
  .fc-aif-tabs {
    display: flex;
    width: fit-content;
  }
  .fc-aif-tab {
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
  }
  .fc-aif-chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin: 0 -1rem;
    padding: 0.2rem 1rem 0.4rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 1rem), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 1rem), transparent 100%);
  }
  .fc-aif-chips::-webkit-scrollbar {
    display: none;
  }
  .fc-aif-chip {
    flex: none;
    scroll-snap-align: center;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fc-aif-reveal {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
  .fc-aif-card,
  .fc-aif-card-check {
    transition-duration: 0.01ms;
  }
  .fc-aif-current-name.is-swap,
  .fc-aif-panel.is-entering .fc-aif-stage,
  .fc-aif-panel.is-entering .fc-aif-chips {
    animation: none;
  }
}
