/* Fullpage Section Scroll v1.1
   Everything is scoped to html.fp-on, which the script only sets on desktop
   (and never for visitors with "reduce motion" on), so mobile stays untouched. */

:root {
  --fp-ui: #ffffff;
  --fp-off: 0px;
  --fp-backdrop: #0c0c0c;
  --fp-ease: cubic-bezier(.22, .8, .2, 1);
}

/* ---------- Sections ---------- */
html.fp-on .fp-s {
  position: relative;
  box-sizing: border-box;
  z-index: calc(var(--fp-i, 0) + 1);
  min-height: calc(100vh - var(--fp-off));
  min-height: calc(100svh - var(--fp-off));
}

/* Vertically centre content in Enfold colour sections and .fp-section blocks */
html.fp-on.fp-center .avia-section.fp-s,
html.fp-on.fp-center .fp-section.fp-s {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
html.fp-on.fp-center .avia-section.fp-s > .container,
html.fp-on.fp-center .avia-section.fp-s > .av-section-color-overlay-wrap {
  width: 100%;
}

html.fp-on.fp-fx-stack .fp-stage { background-color: var(--fp-backdrop, #0c0c0c); }

/* Darkening veil on the section that is leaving */
.fp-shade { display: none; }
html.fp-on .fp-shade {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 60;
  background: #000;
  opacity: calc(var(--fp-p, 0) * .65);
  pointer-events: none;
}

/* Effect: stack — next section slides over the previous one like a card */
html.fp-on.fp-fx-stack .fp-s.fp-leaving:not(.fp-fixed-bg) {
  transform: translate3d(0, calc(var(--fp-p, 0) * 45vh), 0) scale(calc(1 - var(--fp-p, 0) * .06));
  transform-origin: 50% 0;
}

/* Effect: parallax — content drifts and fades while the background stays */
html.fp-on.fp-fx-parallax .fp-s { overflow: clip; }
html.fp-on.fp-fx-parallax .fp-s.fp-leaving > :not(.fp-shade) {
  transform: translate3d(0, calc(var(--fp-p, 0) * 30vh), 0);
  opacity: calc(1 - var(--fp-p, 0) * 1.15);
}

html.fp-on.fp-moving .fp-s { will-change: transform; }

/* ---------- Content reveal ---------- */
html.fp-on .fp-reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  filter: blur(6px);
  transition:
    opacity .9s var(--fp-ease),
    transform 1.1s var(--fp-ease),
    filter .9s var(--fp-ease);
  transition-delay: var(--d, .15s);
}
html.fp-on .fp-seen .fp-reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ---------- Side navigation ---------- */
.fp-nav { display: none; }

html.fp-on .fp-nav {
  position: fixed;
  top: 50%;
  right: clamp(16px, 2.4vw, 40px);
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  color: var(--fp-ui);
  font-family: inherit;
  transform: translateY(-50%);
  opacity: 0;
  animation: fpIn .9s var(--fp-ease) .4s forwards;
}
html.fp-on .fp-blend { mix-blend-mode: difference; }

.fp-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.fp-nav__item { margin: 0; padding: 0; list-style: none; }
.fp-nav__item::before,
.fp-nav__item::marker { content: none; }

.fp-nav__btn {
  all: unset;
  box-sizing: border-box;
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 24px;
  padding: 4px 0 4px 12px;
  color: inherit;
  cursor: pointer;
}
.fp-nav__btn:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.fp-nav__label {
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity .45s var(--fp-ease), transform .45s var(--fp-ease);
  pointer-events: none;
}
.fp-nav__btn:hover .fp-nav__label,
.fp-nav__btn:focus-visible .fp-nav__label { opacity: .85; transform: none; }
.fp-nav__btn.is-active .fp-nav__label { opacity: 1; transform: none; }

/* lines */
.fp-nav--lines .fp-nav__mark {
  display: block;
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: .4;
  transition: width .6s var(--fp-ease), opacity .3s ease;
}
.fp-nav--lines .fp-nav__btn:hover .fp-nav__mark { width: 26px; opacity: .85; }
.fp-nav--lines .fp-nav__btn.is-active .fp-nav__mark { width: 48px; opacity: 1; }

/* dots */
.fp-nav--dots .fp-nav__mark {
  display: block;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: transform .45s var(--fp-ease), background-color .3s ease;
}
.fp-nav--dots .fp-nav__btn:hover .fp-nav__mark,
.fp-nav--dots .fp-nav__btn.is-active .fp-nav__mark { background: currentColor; }
.fp-nav--dots .fp-nav__btn.is-active .fp-nav__mark { transform: scale(1.45); }

/* counter */
.fp-counter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .14em;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
.fp-counter__cur { display: inline-block; font-weight: 600; }
.fp-counter__cur.is-tick { animation: fpTick .6s var(--fp-ease); }
.fp-counter__sep { width: 26px; height: 1px; background: currentColor; opacity: .5; }
.fp-counter__total { opacity: .55; }

/* ---------- Scroll hint ---------- */
.fp-hint { display: none; }

html.fp-on .fp-hint {
  all: unset;
  position: fixed;
  left: 50%;
  bottom: clamp(18px, 3.5vh, 36px);
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--fp-ui);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  cursor: pointer;
  transform: translateX(-50%);
  opacity: 0;
  animation: fpIn .9s var(--fp-ease) .8s forwards;
  transition: opacity .5s ease, transform .6s var(--fp-ease);
}
html.fp-on .fp-hint.fp-blend { mix-blend-mode: difference; }
html.fp-on .fp-hint:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; }
.fp-hint__text { padding-left: .32em; }

.fp-hint__line {
  position: relative;
  display: block;
  width: 1px;
  height: 46px;
  overflow: hidden;
}
.fp-hint__line::before,
.fp-hint__line::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1px;
  background: currentColor;
}
.fp-hint__line::before { top: 0; height: 100%; opacity: .25; }
.fp-hint__line::after { top: 0; height: 45%; animation: fpDrip 1.9s var(--fp-ease) infinite; }

html.fp-on.fp-past-first .fp-hint {
  animation: none;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
}

/* ---------- Debug (?fpdebug=1) ---------- */
[data-fp-debug]::before {
  content: "FP " attr(data-fp-debug);
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 99999;
  padding: 3px 8px;
  font: 600 11px/1.4 monospace;
  color: #fff;
  background: #ff2d75;
}

/* ---------- Keyframes ---------- */
@keyframes fpIn { to { opacity: 1; } }
@keyframes fpTick { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes fpDrip {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(240%); }
}
