:root {
  --galex-footer-height: clamp(650px, 76vh, 780px);
  --galex-reveal-progress: 0;
}

html { background: #071b2c; }
body.sticky-reveal-ready { background: #071b2c !important; }

/* SPA route transitions fade the foreground root. Without an opaque buffer,
   that temporary alpha exposes the fixed navy footer underneath and creates a
   dark flash between pages. Keep a white sheet above the footer only while a
   route is entering or leaving; normal footer reveal remains unchanged. */
body.sticky-reveal-ready:has(#spa-root.spa-entering)::after,
body.sticky-reveal-ready:has(#spa-root.spa-leaving)::after {
  content: "";
  position: fixed;
  z-index: 1;
  inset: 0;
  background: #fff;
  pointer-events: none;
}

body.sticky-reveal-ready > #spa-root,
body.sticky-reveal-ready > main,
body.sticky-reveal-ready > .about-page,
body.sticky-reveal-ready > .contact-site,
body.sticky-reveal-ready > .news-article {
  position: relative;
  z-index: 2;
  background: #fff;
}

body.sticky-reveal-ready footer:not(.galex-reveal-footer) {
  display: none !important;
}

.galex-footer-reveal-space {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: var(--galex-footer-height);
  pointer-events: none;
}

/* The foreground page leaves on a restrained diagonal, matching the source
   composition: the footer stays anchored underneath while this white curtain
   is what visually moves out of the way. */
.galex-footer-reveal-space::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -1px;
  right: 0;
  left: 0;
  height: clamp(96px, 9.5vw, 168px);
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 0);
  pointer-events: none;
}

.galex-reveal-footer {
  --p: var(--galex-reveal-progress);
  position: fixed;
  z-index: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--galex-footer-height);
  overflow: hidden;
  color: #f4f7fa;
  background: #071b2c;
  opacity: calc(.7 + var(--p) * .3);
  filter: blur(calc((1 - var(--p)) * 4px));
  transform: translate3d(0, calc((1 - var(--p)) * 30px), 0)
    scale(calc(.96 + var(--p) * .04));
  transform-origin: center bottom;
  will-change: transform, opacity, filter;
  pointer-events: none;
}

.galex-reveal-footer.is-interactive { pointer-events: auto; }
.galex-reveal-footer a { color: inherit; text-decoration: none; }
.galex-reveal-footer a:hover,
.galex-reveal-footer a:focus-visible { color: #8fc9e8; outline: none; }

.galex-reveal-footer__inner {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto auto;
  width: min(100% - 96px, 1440px);
  height: 100%;
  margin: 0 auto;
  padding: clamp(188px, 16vh, 216px) 0 26px;
}

.galex-reveal-footer__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(520px, 1.65fr) minmax(210px, .65fr);
  gap: clamp(44px, 5vw, 82px);
  align-items: start;
}

.galex-reveal-footer__logo {
  display: block;
  width: clamp(190px, 17vw, 270px);
  height: auto;
  margin: 0 0 26px;
  object-fit: contain;
}
.galex-reveal-footer__tagline {
  margin: 0 0 22px;
  color: #dce6ed;
  font: 600 clamp(18px, 1.6vw, 25px)/1.25 Inter, Arial, sans-serif;
}
.galex-reveal-footer__intro {
  max-width: 440px;
  margin: 0;
  color: #9dafbd;
  font: 400 15px/1.7 Inter, Arial, sans-serif;
}
.galex-reveal-footer__nav {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(250px, 1.2fr);
  gap: 22px 54px;
}
.galex-reveal-footer__nav a,
.galex-reveal-footer__contact a {
  display: inline-flex;
  width: fit-content;
  padding: 3px 0;
  color: #eef3f7;
  font: 500 15px/1.5 Inter, Arial, sans-serif;
  transition: color 220ms cubic-bezier(.22,1,.36,1);
}
.galex-reveal-footer__link-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}
.galex-reveal-footer__group-title {
  min-height: 50px;
  margin: 0 0 9px;
  color: #fff;
  font: 650 18px/1.18 Inter, Arial, sans-serif;
}
.galex-reveal-footer__link-group a {
  position: relative;
  display: block;
  width: auto;
  max-width: 270px;
  padding: 2px 0 2px 14px;
  color: #b9c7d1;
  font-size: 14px;
  line-height: 1.42;
}
.galex-reveal-footer__link-group a::before {
  content: "›";
  position: absolute;
  left: 0;
  color: #fff;
}
.galex-reveal-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.galex-reveal-footer__label {
  margin: 0 0 12px;
  color: #73899a;
  font: 600 11px/1.2 Inter, Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.galex-reveal-footer__social {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 17px;
}
.galex-reveal-footer__social a {
  display: grid;
  width: 25px;
  height: 25px;
  padding: 0;
  place-items: center;
  opacity: .78;
  transition: opacity 220ms cubic-bezier(.22,1,.36,1), transform 220ms cubic-bezier(.22,1,.36,1);
}
.galex-reveal-footer__social a:hover,
.galex-reveal-footer__social a:focus-visible { opacity: 1; transform: translateY(-2px); }
.galex-reveal-footer__social img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.galex-reveal-footer__legal {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.14);
  color: #8194a2;
  font: 400 12px/1.5 Inter, Arial, sans-serif;
}
.galex-reveal-footer__legal span { margin-right: auto; }

.galex-reveal-footer__giant img {
  display: block;
  width: min(100%, 1050px);
  height: auto;
  margin: 0 auto;
  opacity: .065;
}

.galex-reveal-footer__giant {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 10px 0 -34px;
  color: rgba(255,255,255,.065);
  font: 800 clamp(92px, 17vw, 250px)/.78 Inter, Arial, sans-serif;
  letter-spacing: calc((1 - var(--p)) * .08em - .055em);
  text-align: center;
  opacity: var(--p);
  transform: translate3d(0, calc((1 - var(--p)) * 40px), 0);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  will-change: transform, opacity;
}

/* Remove the baked-in legacy footer area from fixed-size Figma pages. */
/* The homepage Contact CTA ends at 6622px after the Figma overrides and the
   section's existing 100px visual translation. Preserve it in full before
   the reveal spacer begins. */
body.route-home.sticky-reveal-ready .figma-page { height: 6665px !important; }
body.route-home.sticky-reveal-ready .canvas-wrap { height: calc(6665px * var(--page-scale)) !important; }
body.products-page.sticky-reveal-ready .products-frame { height: 4099px !important; }
body.products-page.sticky-reveal-ready .products-frame-wrap { height: calc(4099px * var(--products-scale)) !important; }
body.sticky-reveal-ready .figma-applications { height: 1042px !important; }
body.sticky-reveal-ready .figma-support { height: 1243px !important; }
body.sticky-reveal-ready .airknives-stage { height: 3885px !important; }
body.sticky-reveal-ready .airknives-frame { height: 5004px !important; }

@media (max-width: 1024px) {
  :root { --galex-footer-height: 650px; }
  .galex-reveal-footer {
    filter: blur(calc((1 - var(--p)) * 2px));
    transform: translate3d(0, calc((1 - var(--p)) * 22px), 0)
      scale(calc(.98 + var(--p) * .02));
  }
  .galex-reveal-footer__inner { width: min(100% - 56px, 900px); padding-top: 148px; }
  .galex-reveal-footer__grid { grid-template-columns: 1.15fr 1fr; gap: 48px; }
  .galex-reveal-footer__nav { grid-template-columns: 1fr; gap: 25px; }
  .galex-reveal-footer__contact { grid-column: 2; margin-top: -80px; }
  .galex-footer-reveal-space::before { height: clamp(78px, 10vw, 112px); }
}

@media (max-width: 700px) {
  :root { --galex-footer-height: auto; }
  body.sticky-reveal-ready { background: #fff !important; }
  .galex-footer-reveal-space { display: none; }
  .galex-footer-reveal-space::before { display: none; }
  .galex-reveal-footer {
    position: relative;
    z-index: 1;
    height: auto;
    min-height: 620px;
    opacity: calc(.72 + var(--p) * .28);
    filter: none;
    transform: translate3d(0, calc((1 - var(--p)) * 22px), 0);
    pointer-events: auto;
  }
  .galex-reveal-footer__inner { width: calc(100% - 40px); padding: 58px 0 22px; }
  .galex-reveal-footer__grid { grid-template-columns: 1fr; gap: 36px; }
  .galex-reveal-footer__contact { grid-column: auto; margin-top: 0; }
  .galex-reveal-footer__nav { gap: 12px 28px; }
  .galex-reveal-footer__nav { grid-template-columns: 1fr; }
  .galex-reveal-footer__group-title { min-height: 0; }
  .galex-reveal-footer__legal { flex-wrap: wrap; gap: 12px 22px; }
  .galex-reveal-footer__legal span { width: 100%; }
  .galex-reveal-footer__giant { margin: 34px 0 -12px; font-size: clamp(72px, 24vw, 128px); }
}

@media (prefers-reduced-motion: reduce) {
  .galex-reveal-footer,
  .galex-reveal-footer__giant {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    letter-spacing: -.055em !important;
  }
}
