/* Physical Qreo card mockups; the scene stays white and open. */
.opportunity-cards {
  --card-width: 410px;
  --card-spread: 430px;
  --card-float: 0px;
  --card-rock: 0deg;
  background: #fff;
  color: #013920;
  padding-top: 48px;
}
.opportunity-cards__stage { position: relative; isolation: isolate; overflow: clip; }
.opportunity-cards__shell { position: relative; z-index: 2; padding: 56px 48px 80px; text-align: center; }
/* Transparent, generated metal plaques: scroll moves the outer layer, while
   the inner layer floats independently. Copy and cards stay above the objects. */
.opportunity-cards__plaques {
  --plaque-size: clamp(112px, 8.6vw, 164px);
  display: none; position: absolute; inset: 0; z-index: 1; pointer-events: none;
}
.opportunity-cards--enhanced .opportunity-cards__plaques { display: block; }
.opportunity-plaque {
  position: absolute; width: var(--plaque-size); aspect-ratio: 1;
  left: calc(var(--plaque-x) - var(--plaque-size) * .5);
  top: calc(var(--plaque-y) - var(--plaque-size) * .5);
  transform-origin: center;
}
.opportunity-plaque__float {
  width: 100%; height: 100%;
  animation: qreo-service-plaque-float var(--plaque-period, 6.4s) ease-in-out var(--plaque-delay, 0s) infinite paused;
}
.opportunity-plaque img { display: block; width: 100%; height: 100%; object-fit: contain; }
.opportunity-plaque--agropecuario { --plaque-x: 16%; --plaque-y: 46%; --plaque-angle: -12deg; --plaque-period: 6.4s; --plaque-delay: -1.1s; }
.opportunity-plaque--capital-trabajo { --plaque-x: 27%; --plaque-y: 64%; --plaque-angle: 6deg; --plaque-period: 7.2s; --plaque-delay: -3.6s; }
.opportunity-plaque--activos-fijos { --plaque-x: 15.5%; --plaque-y: 80%; --plaque-angle: -4deg; --plaque-period: 5.8s; --plaque-delay: -2.2s; }
.opportunity-plaque--credito-productivo { --plaque-x: 81%; --plaque-y: 38%; --plaque-angle: 9deg; --plaque-period: 6.8s; --plaque-delay: -4.4s; }
.opportunity-plaque--credito-educativo { --plaque-x: 72%; --plaque-y: 60%; --plaque-angle: -10deg; --plaque-period: 7.5s; --plaque-delay: -1.8s; }
.opportunity-plaque--mejoramiento-vivienda { --plaque-x: 82%; --plaque-y: 86%; --plaque-angle: 5deg; --plaque-period: 6.1s; --plaque-delay: -3.1s; }
.opportunity-cards.is-in-view .opportunity-plaque.is-present .opportunity-plaque__float { animation-play-state: running; }
.opportunity-cards.is-in-view .opportunity-plaque { will-change: transform, opacity, filter; }
@keyframes qreo-service-plaque-float {
  0%, 100% { transform: translate3d(0, 7px, 0) rotate(calc(var(--plaque-angle) - 1.4deg)); }
  50% { transform: translate3d(0, -7px, 0) rotate(calc(var(--plaque-angle) + 1.4deg)); }
}
/* The video owns the metallic turn; the outer wrapper only follows the fan-out.
   White video backgrounds merge into the open white scene. */
.opportunity-cards__coins {
  --coin-size: clamp(270px, 23vw, 390px);
  display: none; position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.opportunity-cards--enhanced .opportunity-cards__coins { display: block; }
.opportunity-coin {
  position: absolute; top: calc(63% - var(--coin-size) * .5); width: var(--coin-size);
  aspect-ratio: 710 / 720; transform-origin: center;
}
.opportunity-coin--left { left: calc(var(--coin-size) * -.27); }
.opportunity-coin--right { right: calc(var(--coin-size) * -.27); aspect-ratio: 704 / 720; }
.opportunity-coin video { display: block; width: 100%; height: 100%; object-fit: contain; }
.opportunity-cards.is-in-view .opportunity-coin { will-change: transform, opacity; }
.opportunity-cards h2 {
  position: relative; z-index: 4; max-width: 1080px; margin: 0 auto;
  font-size: clamp(40px, 3.5vw, 64px); font-weight: 600; line-height: 1.06;
  letter-spacing: -.035em; color: #000; text-wrap: balance;
}
.opportunity-cards h2 span { color: #013920; }
.opportunity-cards__objects { position: relative; height: 460px; margin-top: 32px; perspective: 1400px; }
.qreo-credit-card {
  position: absolute; top: 50%; left: 50%; width: var(--card-width); aspect-ratio: 1.586;
  border-radius: 17px; padding: 29px 32px 26px; text-align: left;
  container-type: inline-size; isolation: isolate; overflow: hidden;
  box-shadow: 12px 26px 34px -20px #01392066, 0 2px 3px #01392030;
  transform: translate(-50%, -50%); backface-visibility: hidden;
  animation: qreo-credit-card-float 6.2s ease-in-out infinite;
  animation-play-state: paused;
}
.qreo-credit-card::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, #ffffff17, #ffffff00 42%, #ffffff12 65%, #00000006);
  box-shadow: inset 0 1px 0 #ffffff70, inset 0 -1px 0 #01392028;
}
.qreo-credit-card--forest { background: #013920; color: #fff; z-index: 1; transform: translate(calc(-50% - var(--card-spread)), calc(-50% + 20px)) rotate(-15deg); }
.qreo-credit-card--lime { background: #70f250; color: #013920; z-index: 2; transform: translate(-50%, calc(-50% - 24px)); }
.qreo-credit-card--white { background: #fff; color: #013920; z-index: 3; transform: translate(calc(-50% + var(--card-spread)), calc(-50% + 20px)) rotate(15deg); }
.qreo-credit-card__top, .qreo-credit-card__bottom { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.qreo-credit-card__top > img { width: 101px; height: auto; }
.qreo-credit-card__top > span { font-size: 18px; font-weight: 600; letter-spacing: -.015em; white-space: nowrap; }
.qreo-credit-card__technology { position: relative; z-index: 2; display: flex; align-items: center; gap: 15px; margin: 25px 0 18px; }
.qreo-credit-card__chip { width: 45px; height: 35px; stroke: currentColor; stroke-opacity: .6; stroke-width: 1; }
.qreo-credit-card__chip > rect { fill: currentColor; fill-opacity: .1; }
.qreo-credit-card__contactless { width: 18px; height: 26px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; opacity: .8; }
.qreo-credit-card__number { position: relative; z-index: 2; font-size: 6.7cqw; font-weight: 500; letter-spacing: .075em; white-space: nowrap; font-variant-numeric: tabular-nums; text-shadow: 0 1px 1px #ffffff40, 0 -1px 1px #01392030; }
.qreo-credit-card__bottom { margin-top: 20px; align-items: flex-end; }
.qreo-credit-card__bottom small { display: block; font-size: 8px; margin-bottom: 5px; }
.qreo-credit-card__bottom strong { display: block; font-size: 10px; font-weight: 500; letter-spacing: .08em; }
.qreo-credit-card__bottom > div:last-child { text-align: right; }
.qreo-credit-card__mark { position: absolute; z-index: 0; width: 67%; height: auto; right: -11%; top: 15%; opacity: .065; transform: rotate(-24deg); }
.qreo-credit-card--forest .qreo-credit-card__mark { filter: brightness(0) invert(1); opacity: .09; }
.opportunity-cards__link { position: relative; z-index: 5; margin-inline: auto; }
.opportunity-cards__link:focus-visible { outline: 2px solid #013920; outline-offset: 6px; }

.opportunity-cards--enhanced { height: 190svh; padding-top: 0; }
.opportunity-cards--enhanced .opportunity-cards__stage { position: sticky; top: var(--sticky-header-height, 76px); height: calc(100svh - var(--sticky-header-height, 76px)); min-height: 650px; }
.opportunity-cards--enhanced .opportunity-cards__shell { height: 100%; padding-top: 24px; padding-bottom: 0; }
.opportunity-cards--enhanced .opportunity-cards__objects { position: absolute; inset: 34% 0 8%; height: auto; margin: 0; }
.opportunity-cards--enhanced .opportunity-cards__link { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.opportunity-cards.is-in-view .qreo-credit-card { will-change: transform; }
.opportunity-cards.is-floating .qreo-credit-card { animation-play-state: running; }
.qreo-credit-card--forest { animation-duration: 6.2s; animation-delay: -1.3s; }
.qreo-credit-card--lime { animation-duration: 7.1s; animation-delay: -3.7s; }
.qreo-credit-card--white { animation-duration: 5.8s; animation-delay: -2.4s; }
@keyframes qreo-credit-card-float {
  0%, 100% { translate: 0 calc(var(--card-float) * -.5); rotate: calc(var(--card-rock) * -.5); }
  50% { translate: 0 var(--card-float); rotate: var(--card-rock); }
}

@media (min-width: 768px) {
  .opportunity-plaque--activos-fijos {
    left: calc(var(--plaque-x) - var(--plaque-size) * .5 + 10px);
  }
}
@media (max-width: 1366px) {
  .opportunity-cards { --card-width: 360px; --card-spread: 375px; }
  .opportunity-cards__shell { padding-inline: 32px; }
  .qreo-credit-card { padding: 24px 27px; border-radius: 15px; }
  .qreo-credit-card__technology { margin: 16px 0 13px; }
  .qreo-credit-card__top > img { width: 90px; }
  .qreo-credit-card__bottom { margin-top: 15px; }
}
@media (max-width: 1000px) {
  .opportunity-cards__plaques { --plaque-size: 108px; }
  .opportunity-plaque--agropecuario, .opportunity-plaque--activos-fijos { --plaque-x: 10%; }
  .opportunity-plaque--capital-trabajo { --plaque-x: 23%; }
  .opportunity-plaque--credito-productivo, .opportunity-plaque--mejoramiento-vivienda { --plaque-x: 90%; }
  .opportunity-plaque--credito-educativo { --plaque-x: 77%; }
  .opportunity-cards__coins { --coin-size: 270px; }
  .opportunity-coin--left { left: calc(var(--coin-size) * -.34); }
  .opportunity-coin--right { right: calc(var(--coin-size) * -.34); }
  .opportunity-cards { --card-width: 320px; --card-spread: 150px; }
  .opportunity-cards h2 { max-width: 900px; }
  .qreo-credit-card { padding: 22px 24px; }
  .qreo-credit-card__top > img { width: 80px; }
  .qreo-credit-card__chip { width: 36px; height: 28px; }
  .qreo-credit-card__technology { margin: 14px 0 12px; }
  .qreo-credit-card__bottom { margin-top: 14px; }
}
@media (max-width: 767px) {
  .opportunity-cards__plaques {
    --plaque-size: clamp(78px, 21.5vw, 96px);
    --plaque-exit-direction: -1;
  }
  /* Two above, two at the edges and two below: keep the card stack central.
     Upper objects leave toward the upper left; lower objects toward the lower right. */
  .opportunity-plaque--agropecuario { --plaque-x: 26%; --plaque-y: 39%; }
  .opportunity-plaque--capital-trabajo { --plaque-x: 2%; --plaque-y: 53%; }
  .opportunity-plaque--activos-fijos { --plaque-x: 51%; --plaque-y: 86%; --plaque-exit-direction: 1; }
  .opportunity-plaque--credito-productivo { --plaque-x: 58%; --plaque-y: 35%; }
  .opportunity-plaque--credito-educativo { --plaque-x: 98%; --plaque-y: 70%; --plaque-exit-direction: 1; }
  .opportunity-plaque--mejoramiento-vivienda { --plaque-x: 84%; --plaque-y: 81%; --plaque-exit-direction: 1; }
  .opportunity-cards__coins { --coin-size: clamp(175px, 46vw, 210px); }
  .opportunity-coin { top: calc(62% - var(--coin-size) * .5); }
  .opportunity-coin--left {
    left: calc(var(--coin-size) * -.4);
    top: calc(62% - var(--coin-size) * .5 + 72px);
  }
  .opportunity-coin--right {
    right: calc(var(--coin-size) * -.4);
    top: max(208px, calc(62% - var(--coin-size) * .5 - 184px));
  }
  .opportunity-cards { --card-width: min(264px, 72vw); --card-spread: 28px; padding-top: 24px; }
  .opportunity-cards__shell { padding: 32px 0 56px; }
  .opportunity-cards h2 {
    width: calc(100% + 16px); max-width: none; margin-inline: -8px;
    font-size: clamp(26px, 7vw, 32px); line-height: 1.08;
  }
  .opportunity-cards__objects { height: 330px; margin-top: 20px; }
  .qreo-credit-card { padding: 18px 20px; border-radius: 12px; }
  .qreo-credit-card__top { gap: 8px; }
  .qreo-credit-card__top > img { width: 67px; }
  .qreo-credit-card__top > span { font-size: 12px; }
  .qreo-credit-card__technology { margin: 12px 0 10px; gap: 11px; }
  .qreo-credit-card__chip { width: 29px; height: 23px; }
  .qreo-credit-card__contactless { width: 13px; height: 21px; }
  .qreo-credit-card__bottom { margin-top: 11px; }
  .qreo-credit-card__bottom small { font-size: 6px; margin-bottom: 3px; }
  .qreo-credit-card__bottom strong { font-size: 7px; }
  .opportunity-cards--enhanced { height: 170svh; padding-top: 0; }
  .opportunity-cards--enhanced .opportunity-cards__stage { top: var(--sticky-header-height, 62px); height: calc(100svh - var(--sticky-header-height, 62px)); min-height: 560px; }
  .opportunity-cards--enhanced .opportunity-cards__shell { padding-top: 32px; }
  .opportunity-cards--enhanced .opportunity-cards__objects { inset: 31% 0 11%; }
  .opportunity-cards--enhanced .opportunity-cards__link { bottom: 30px; font-size: 13px; }
}
/* Low landscape phones keep the scroll fan, with a scene sized for their height. */
@media (max-width: 1366px) and (max-height: 500px) and (orientation: landscape) {
  .opportunity-cards {
    --card-width: clamp(150px, 22vw, 230px);
    --card-spread: clamp(70px, 17vw, 210px);
  }
  .opportunity-cards--enhanced { height: 240svh; padding-top: 0; margin-bottom: 88px; }
  .opportunity-cards--enhanced .opportunity-cards__stage {
    height: calc(100svh - var(--sticky-header-height, 62px)); min-height: 0; overflow: visible;
  }
  .opportunity-cards--enhanced .opportunity-cards__shell { padding: 12px 24px 0; }
  .opportunity-cards h2 {
    max-width: 900px; font-size: clamp(22px, 3vw, 30px); line-height: 1.06;
  }
  .opportunity-cards--enhanced .opportunity-cards__objects { inset: 38% 0 14%; }
  .opportunity-cards--enhanced .opportunity-cards__link {
    top: calc(100% + 24px); bottom: auto; font-size: 13px;
  }
  .opportunity-cards__coins, .opportunity-cards__plaques { overflow: clip; }
  .qreo-credit-card { padding: 8px 10px; border-radius: 9px; }
  .qreo-credit-card__top { gap: 6px; }
  .qreo-credit-card__top > img { width: 25cqw; }
  .qreo-credit-card__top > span { font-size: 4.4cqw; }
  .qreo-credit-card__technology { margin: 5px 0 4px; gap: 7px; }
  .qreo-credit-card__chip { width: 20px; height: 15px; }
  .qreo-credit-card__contactless { width: 10px; height: 15px; }
  .qreo-credit-card__bottom { margin-top: 6px; }
  .qreo-credit-card__bottom small { font-size: 5px; margin-bottom: 3px; }
  .qreo-credit-card__bottom strong { font-size: 2.5cqw; }
  .opportunity-cards__coins { --coin-size: clamp(130px, 18vw, 190px); }
  .opportunity-coin--left, .opportunity-coin--right { top: calc(66% - var(--coin-size) * .5); }
  .opportunity-coin--left { left: calc(var(--coin-size) * -.4); }
  .opportunity-coin--right { right: calc(var(--coin-size) * -.4); }
  .opportunity-cards__plaques { --plaque-size: clamp(44px, 7vw, 72px); }
  .opportunity-plaque--agropecuario { --plaque-x: 12%; --plaque-y: 44%; }
  .opportunity-plaque--capital-trabajo { --plaque-x: 23%; --plaque-y: 62%; }
  .opportunity-plaque--activos-fijos { --plaque-x: 12%; --plaque-y: 82%; }
  .opportunity-plaque--credito-productivo { --plaque-x: 88%; --plaque-y: 44%; }
  .opportunity-plaque--credito-educativo { --plaque-x: 77%; --plaque-y: 62%; }
  .opportunity-plaque--mejoramiento-vivienda { --plaque-x: 88%; --plaque-y: 82%; }
}
@media (prefers-reduced-motion: reduce) {
  .qreo-credit-card { animation: none; }
  .opportunity-cards__coins { display: none; }
  .opportunity-cards__plaques { display: none; }
  .opportunity-plaque__float { animation: none; }
}
