@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    :where(
      .public main > section:not(.ibf-home-hero) > .ibf-wrap,
      .public main article,
      .public .ibf-gallery > *,
      .public footer > .ibf-wrap,
      .main > .content .page-title,
      .main > .content .bank-account,
      .main > .content :is(.card, .panel, .detail-panel, .registration-detail-panel),
      .main > .content .client-summary-grid > article,
      .main > .content .client-detail-hero,
      .login-form,
      .ibf-register-card form
    ):not(:focus-within, dialog *, [role="dialog"] *) {
      animation: ibf-scroll-reveal linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }

    :where(
      .public .ibf-showcase-image,
      .public .ibf-advisory-image,
      .public .ibf-security-photo
    ) {
      animation: ibf-scroll-tilt linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
  }
}

@keyframes ibf-scroll-reveal {
  from { translate: 0 24px; }
  75% { translate: 0 -3px; }
  to { translate: none; }
}

@keyframes ibf-scroll-tilt {
  from {
    translate: 0 22px;
    rotate: y 8deg;
  }
  to {
    translate: none;
    rotate: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ibf-public-turn {
    overflow: clip;
    background: #0b2447;
  }

  .ibf-public-turn > .public > main {
    transform-origin: left center;
    animation: ibf-page-unfold 650ms cubic-bezier(.2, .7, .3, 1) both;
  }

  .ibf-home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(112deg, transparent 30%, #81d9ff33 48%, #edfaff66 50%, transparent 68%);
    transform: translateX(-110%);
    animation: ibf-hero-reflection 1.25s .28s ease-in-out both;
  }

  .ibf-home-hero .ibf-hero-panel {
    animation: ibf-hero-panel-enter 800ms .25s cubic-bezier(.2, .7, .3, 1) both;
  }
}

@keyframes ibf-page-unfold {
  from { transform: perspective(1400px) rotateY(-17deg) translateX(-18px); opacity: .65; }
  to { transform: none; opacity: 1; }
}

@keyframes ibf-hero-reflection {
  to { transform: translateX(110%); }
}

@keyframes ibf-hero-panel-enter {
  from { transform: perspective(800px) translateY(32px) rotateY(-13deg); opacity: .55; }
  to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  :root:active-view-transition .ibf-public-turn > .public > main {
    animation: none;
  }

  ::view-transition-old(root) {
    transform-origin: right center;
    animation: ibf-page-fold 320ms ease-in both;
  }

  ::view-transition-new(root) {
    transform-origin: left center;
    animation: ibf-page-unfold 420ms 160ms ease-out both;
  }
}

@keyframes ibf-page-fold {
  to { transform: perspective(1100px) rotateY(28deg) translateX(-8%); opacity: 0; }
}

.ibf-public-turn > .public > main {
  position: relative;
  transform-origin: left top;
}

.ibf-coin-field,
.ibf-header-coins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ibf-coin-field {
  z-index: 2;
  overflow: clip;
}

.ibf-gold-coin {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(50px, 7.2vw, 96px);
  aspect-ratio: 1;
  border: 3px solid #e9b94d;
  border-radius: 50%;
  background: radial-gradient(circle at 29% 24%, #fff5c6, #f6cf6c 46%, #bd7c1e 85%);
  box-shadow: inset 0 0 0 2px #a76b26a0, 0 6px 16px #321c2955;
  color: #673d12;
  font-size: clamp(24px, 3.6vw, 44px);
  font-weight: 800;
  line-height: 1;
}

.ibf-coin-field > .ibf-gold-coin {
  top: var(--coin-top);
  right: clamp(4px, 1.7vw, 28px);
}

.ibf-coin-field > .ibf-gold-coin:nth-child(even) {
  right: auto;
  left: clamp(4px, 1.7vw, 28px);
}

.ibf-header-coins .ibf-gold-coin {
  width: clamp(38px, 5vw, 60px);
  border-width: 2px;
  font-size: clamp(20px, 2.6vw, 30px);
  top: calc(100% - 14px);
  left: 40%;
}

.ibf-header-coins .ibf-gold-coin + .ibf-gold-coin {
  top: calc(100% - 22px);
  left: 53%;
  --coin-delay: -2.1s;
}

@media (prefers-reduced-motion: no-preference) {
  .ibf-gold-coin {
    animation: ibf-coin-float 3.7s var(--coin-delay, 0s) ease-in-out infinite;
  }
}

@keyframes ibf-coin-float {
  0%, 100% { transform: perspective(240px) translate(0, 0) rotateY(-18deg) rotate(-9deg); }
  50% { transform: perspective(240px) translate(var(--coin-drift, -14px), -19px) rotateY(30deg) rotate(10deg); }
}

/* Keep the viewport as the scroll container for the public view timelines. */
.ibf-public-turn > .landing-v2 {
  overflow: clip;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .ibf-public-turn .landing-v2 main > section:not(.ibf-home-hero) > .ibf-wrap {
      animation: ibf-public-scroll-rise linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 85%;
    }

    .ibf-public-turn .landing-v2 :is(.ibf-showcase-image, .ibf-advisory-image, .ibf-security-photo) {
      animation: ibf-public-scroll-pivot linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 95%;
    }
  }
}

@keyframes ibf-public-scroll-rise {
  from { transform: perspective(1100px) translateY(64px) rotateX(-13deg); opacity: .76; }
  72% { transform: translateY(-8px); opacity: 1; }
  to { transform: none; opacity: 1; }
}

@keyframes ibf-public-scroll-pivot {
  from { transform: perspective(750px) translateY(40px) rotateY(-22deg); }
  to { transform: none; }
}

.ibf-currency-preview {
  position: relative;
  z-index: 3;
  width: 100%;
  min-width: 0;
  padding: clamp(16px, 3vw, 30px);
  border: 1px solid #d6e2f0;
  border-radius: 22px;
  background: #f7faff;
  color: #0b2447;
  box-shadow: 0 24px 62px #05182d55;
}

.ibf-currency-preview h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  font-size: 1.2rem;
}

.ibf-converter-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ibf-converter-fields > label { font-weight: 700; }
.ibf-converter-fields > label:first-child { grid-column: 1 / -1; }
.ibf-converter-fields :is(input, select) {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #b8cbdf;
  border-radius: 9px;
  background: #fff;
  color: #0b2447;
}

.ibf-currency-preview output {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.ibf-currency-preview > p { margin: 3px 0 14px; color: #486582; }

.ibf-preview-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: min(100%, 240px);
  margin-left: auto;
  padding: 15px;
  border-radius: 14px;
  background: linear-gradient(130deg, #081a31, #13598c);
  color: #fff;
  box-shadow: 0 12px 28px #0b244745;
}

.ibf-preview-card span { font-size: .7rem; text-align: right; }
.ibf-preview-card i {
  grid-column: 1 / -1;
  width: 30px;
  height: 21px;
  border-radius: 5px;
  background: linear-gradient(145deg, #ffe59c, #c28b32);
}
.ibf-preview-card b { grid-column: 1 / -1; letter-spacing: .08em; }

@media (prefers-reduced-motion: no-preference) {
  .ibf-preview-card { animation: ibf-card-hover 4.5s ease-in-out infinite; }
}

@keyframes ibf-card-hover {
  0%, 100% { transform: perspective(600px) translateY(3px) rotate(-4deg) rotateY(-8deg); }
  50% { transform: perspective(600px) translateY(-12px) rotate(4deg) rotateY(9deg); }
}

.ibf-coin-field > .ibf-gold-coin:nth-child(even) { --coin-drift: 14px; }
.ibf-header-coins > .ibf-gold-coin { --coin-drift: clamp(-37px, -4vw, -16px); }
.ibf-header-coins > .ibf-gold-coin + .ibf-gold-coin { --coin-drift: clamp(16px, 4vw, 37px); }

@media (prefers-reduced-motion: no-preference) {
  .ibf-header-coins > .ibf-gold-coin { animation-duration: 4.8s; }
}

.ibf-home-sections {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px clamp(12px, 5vw, 52px);
  border-bottom: 1px solid #37516d;
  background: #102b49;
  scrollbar-width: thin;
  scrollbar-color: #6988a7 #102b49;
}

.ibf-home-sections a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: #e0ecf8;
  background: #1b3b5e;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}

.ibf-home-sections a:is(:hover, :focus-visible) {
  color: #102b49;
  background: #dbeeff;
}

.ibf-public-turn .landing-v2 :is(main > section[id], footer[id]) {
  scroll-margin-top: 14px;
}
