/* Alyssa footer. The look of the WPCode footer snippet, carried over as it was.
   Changes: dropped "line-height: 1,4" (a comma, so browsers ignored it); the font is now 'DM Mono' like the rest of
   the site (the snippet said 'DMMono', which is not a real font, so it showed the browser's own monospace).
   Settings can change the wiggle and the photo fade through --af-wiggle, --af-wiggle-s and --af-fade (today's values are the fallbacks). */

#af-footer *,
#af-footer *::before,
#af-footer *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#af-footer {
  display: block !important;
  width: 100%;
  background: transparent;
  color: #E2F5E7;
  font-family: 'DM Mono', monospace;
  padding: 100px 20px 20px;
  position: relative;
}

#af-footer .af-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* "Match the site's width" (on by default): the same width and side margins as Kadence's header and page rows
   (--global-content-width includes --global-content-edge-padding on each side), so the footer lines up with the logo,
   the menu and the content at every width. Off: the old 1300px box with 20px sides. */
#af-footer.af-site-width {
  padding-left: 0;
  padding-right: 0;
}

#af-footer.af-site-width .af-inner {
  max-width: var(--global-content-width, 1290px);
  padding-left: var(--global-content-edge-padding, 1.5rem);
  padding-right: var(--global-content-edge-padding, 1.5rem);
}

/* The header moves out of the footer's way (footer.js). It uses `translate`, not `transform`, so it never fights the
   theme's own transform (Kadence's "reveal on scroll up"). Scroll-driven where the browser can (smooth, off the main
   thread), by script elsewhere. A link in the header that gets keyboard focus brings it straight back. */
@keyframes af-bump {
  from { translate: 0 0; opacity: 1; }
  to   { translate: 0 var(--af-bump-to, -100px); opacity: var(--af-bump-op, 1); }
}

.af-bump-css {
  animation-name: af-bump;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-timeline: scroll(root block);
  animation-range: var(--af-bump-a, 0px) var(--af-bump-b, 1px);
}

.af-bump-css:focus-within,
.af-bump-js:focus-within {
  animation: none !important;
  translate: none !important;
  opacity: 1 !important;
}

/* Curtain (step 9): as people scroll to the end, the page lifts off the footer, which waits underneath. The footer's
   box scrolls in as usual (so nothing on the page moves or reflows); its contents are held back by --af-lift (set by
   footer.js: how still x the footer's height, at most a screen) and let go as the footer comes fully in, and anything
   held above the footer's top edge is clipped there. A soft shadow from the page lies along that edge and fades as
   it opens. Scroll-driven where the browser can (.af-curtain-css), by script elsewhere (.af-curtain-js). */
#af-footer.af-curtain {
  overflow: hidden;
  overflow: clip;
  view-timeline: --af-foot block;
}

#af-footer.af-curtain::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 0;
  height: 90px;
  pointer-events: none;
  background: linear-gradient(rgba(10, 9, 8, var(--af-shade, .55)), rgba(10, 9, 8, 0));
  opacity: var(--af-shade-o, .15);
}

#af-footer.af-curtain:not(.af-curtain-on)::before {
  display: none;
}

#af-footer.af-curtain > .af-inner {
  position: relative;
  z-index: 1;
}

#af-footer.af-curtain-css > .af-inner {
  animation: af-curtain linear both;
  animation-timeline: --af-foot;
  animation-range: entry 0% entry 100%;
}

#af-footer.af-curtain-css::before {
  animation: af-shade linear both;
  animation-timeline: --af-foot;
  animation-range: entry 0% entry 100%;
}

@keyframes af-curtain {
  from { translate: 0 calc(-1 * var(--af-lift, 0px)); }
  to   { translate: 0 0; }
}

@keyframes af-shade {
  from { opacity: 1; }
  to   { opacity: .15; }
}

@media (prefers-reduced-motion: reduce) {
  #af-footer.af-curtain > .af-inner,
  #af-footer.af-curtain::before {
    animation: none !important;
    translate: none !important;
  }

  #af-footer.af-curtain::before {
    display: none;
  }
}

#af-footer .af-grid {
  display: grid;
  grid-template-columns: 44% 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

#af-footer .af-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#af-footer .af-nav a {
  display: inline-block;
  text-decoration: none;
  color: #E2F5E7;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-family: 'DM Mono', monospace;
  font-weight: 400;
  font-size: 0.86em;
  line-height: 1.3;
  margin-bottom: 14px;
  transition: color 0.25s ease;
}

#af-footer .af-nav a:last-child {
  margin-bottom: 0;
}

@media (hover: hover) and (pointer: fine) {
  #af-footer .af-nav a:hover {
    color: #E58F9C;
  }
}

#af-footer .af-nav a:active {
  color: #A38FBF;
}

#af-footer .af-nav-gap {
  height: 20px;
  display: block;
}

#af-footer .af-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Globe, clock and place: a two-column grid. The clock and the place sit in column 2 (their wrapper steps aside with
   display: contents), so the globe is centred on the clock's line, whatever the font (Uncut Sans now). The globe's
   -1px top and bottom keep its row no taller than the line, so the block does not move down. Space between the clock
   and the place: step 3 (--af-place-gap). */
#af-footer .af-location {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  row-gap: var(--af-place-gap, 8px);
  margin-bottom: 28px;
}

#af-footer .af-globe {
  grid-column: 1;
  grid-row: 1;
  width: 17px;
  height: 17px;
  margin: -1px 10px -1px 0;
}

#af-footer .af-location-text {
  display: contents;
  text-transform: uppercase;
  line-height: 1.3;
  color: #E2F5E7;
}

#af-footer .af-location-text > * {
  grid-column: 2;
}

#af-footer .af-clock {
  font-variant-numeric: tabular-nums;
}

#af-footer .af-tagline {
  text-transform: uppercase;
  line-height: 1.4;
  margin-bottom: 24px;
  color: #E2F5E7;
}

#af-footer .af-email-btn {
  display: inline-block;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  border: none;
  background: none;
  padding: 0;
}

#af-footer .af-email-chars {
  display: inline-flex;
  gap: 0;
  color: #E2F5E7;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

#af-footer .af-nav a,
#af-footer .af-location-text,
#af-footer .af-tagline,
#af-footer .af-email-chars,
#af-footer .af-copied {
    font-family: inherit;
    font-size: 0.86em;
    font-weight: 400;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
  #af-footer .af-email-btn:hover .af-email-chars {
    color: #E58F9C;
  }
}

#af-footer .af-email-btn:active .af-email-chars {
  color: #A38FBF;
}

#af-footer .af-char {
  display: inline-block;
}


@keyframes af-bounce {
  0%, 100% { transform: translateY(0); }
  35%       { transform: translateY(calc(var(--af-wiggle, 3px) * -1)); }
  70%       { transform: translateY(calc(var(--af-wiggle, 3px) / 3)); }
}

@media (hover: hover) and (pointer: fine) {
  #af-footer .af-email-btn:hover .af-char {
    animation: af-bounce var(--af-wiggle-s, 0.4s) ease-in-out infinite;
  }

  #af-footer .af-email-btn.af-animating:hover .af-char {
    animation: none;
  }
}


@media (prefers-reduced-motion: reduce) {
  #af-footer .af-char {
    animation: none !important;
  }
}

#af-footer .af-copied {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  color: #E2F5E7;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

#af-footer .af-copied.af-show {
  opacity: 1;
}

#af-footer .af-photo-wrap {
  margin-top: 24px;
  width: 100%;
}

#af-footer .af-photo {
  display: block;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: 3px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--af-fade, 0.35s) ease, transform var(--af-fade, 0.35s) ease;
  pointer-events: none;
}

#af-footer .af-photo.af-photo-show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (hover: none), (pointer: coarse) {
  #af-footer .af-photo {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto;
    max-width: 140px;
    margin-top: 16px;
  }
}

#af-footer .af-copy {
  font-size: 0.7em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #E2F5E7;
  opacity: 0.66;
  text-align: center;
  padding-top: clamp(32px, 5vw, 56px);
}

@media (max-width: 700px) {
  #af-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  #af-footer .af-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  #af-footer .af-copy {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  #af-footer .af-photo {
    transition: none !important;
  }
}
