/* Layout only: existing ui-pill typography, colours and hover styles remain inherited. */
.site-footer { --footer-top-h:0px; padding:48px var(--homepage-grid-gutter, var(--grid-pad)) 24px; min-height:0; height:auto; position:relative; top:auto; }
.site-footer .site-footer__links { display:grid; grid-template-columns:minmax(300px,2fr) repeat(3,minmax(0,1fr)); gap:32px; align-items:start; padding:0; margin:0; min-height:0; height:auto; }
.site-footer .site-footer__intro { grid-column:1; grid-row:1; min-width:0; }
.site-footer .site-footer__prompt { position:static; width:auto; margin:0 0 24px; padding:0; align-items:flex-start; justify-self:start; width:100%; }
.site-footer .site-footer__prompt-copy { text-align:left; }
.site-footer .site-footer__contact { display:flex; flex-wrap:wrap; align-items:center; gap:8px; max-width:480px; position:relative; }
.site-footer .site-footer__column { display:flex; flex-direction:column; align-items:flex-start; gap:8px; grid-row:1; margin:0; padding:0; min-width:0; }
.site-footer .site-footer__column--nav { grid-column:2; order:0; }
.site-footer .site-footer__column--work { grid-column:3; order:0; }
.site-footer .site-footer__column--socials { grid-column:4; order:0; }
.site-footer .site-footer__column-label { margin-bottom:4px; }
.site-footer .site-footer__year-row { grid-column:1/-1; grid-row:2; display:flex; align-items:center; gap:8px; margin:0; padding:0; width:100%; justify-content:flex-start; }
.site-footer .site-footer__sticker-slot { margin-left:auto; }
.site-footer .site-footer__clock { font-variant-numeric:tabular-nums; white-space:nowrap; width:156px; min-width:156px; max-width:156px; justify-content:center; }
.site-footer .site-footer__availability::before { content:''; width:7px; height:7px; border-radius:50%; background:var(--green-dot); margin-right:8px; flex:none; }
.site-footer .site-footer__toast { position:absolute; top:100%; left:0; min-height:1.5em; pointer-events:none; }
.site-footer button { cursor:pointer; }
.site-footer :is(a,button):focus-visible { outline:2px solid currentColor; outline-offset:3px; }
@media (min-width:768px) and (max-width:1180px) {
 .site-footer .site-footer__links { grid-template-columns:repeat(2,minmax(0,1fr)); gap:32px; }
 .site-footer .site-footer__intro { grid-column:1; grid-row:1; }
 .site-footer .site-footer__column--nav { grid-column:2; grid-row:1; }
 .site-footer .site-footer__column--work { grid-column:1; grid-row:2; }
 .site-footer .site-footer__column--socials { grid-column:2; grid-row:2; }
 .site-footer .site-footer__year-row { grid-row:3; }
}
@media (max-width:767px) {
 .site-footer { padding:32px var(--homepage-grid-gutter, var(--grid-pad)) 20px; }
 .site-footer .site-footer__links { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 12px; }
 .site-footer .site-footer__intro { grid-column:1/-1; grid-row:1; }
 .site-footer .site-footer__prompt { margin-bottom:16px; }
 .site-footer .site-footer__column--nav { grid-column:1; grid-row:2; }
 .site-footer .site-footer__column--work { grid-column:2; grid-row:2; }
 .site-footer .site-footer__column--socials { grid-column:1/-1; grid-row:3; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .site-footer .site-footer__column--socials .site-footer__column-label { grid-column:1/-1; }
 .site-footer .site-footer__year-row { grid-row:4; }
}
.site-footer .site-footer__question { white-space:normal; }

/* Task P: one opaque footer under the page, with one measured reveal spacer.
   preserve-3d would make #main the fixed footer's containing block. Keep the
   original 3D context only while its lab exit transition actually needs it. */
body:not(.exiting-to-lab) #main.footer-reveal-page { transform-style: flat; }
#main.footer-reveal-page > :not(#contact) {
  background-color: var(--color-bg);
}
#main.footer-reveal-page > #about,
#main.footer-reveal-page > .project-detail {
  position: relative;
  z-index: 1;
}
#contact.footer-scroll-anchor {
  position: relative;
  z-index: 0;
  height: var(--footer-reveal-height, 100svh) !important;
  min-height: var(--footer-reveal-height, 100svh) !important;
  block-size: var(--footer-reveal-height, 100svh) !important;
  margin: 0;
  pointer-events: none;
}
#contact.footer-scroll-anchor::after {
  display: none;
  content: none;
}
.site-footer[data-footer-reveal] {
  box-sizing: border-box;
  position: fixed;
  inset: 0 0 auto;
  z-index: 0;
  display: flex;
  pointer-events: auto;
  height: auto !important;
  block-size: auto !important;
  min-height: 100svh !important;
  padding-top: calc(var(--footer-header-height, 72px) + var(--section-gap));
  /* Oversized footers scroll upward. Keep their painted content below the
     fixed header as well as starting it below the header at rest. */
  clip-path: inset(max(0px, calc(var(--footer-header-height, 72px) - var(--footer-reveal-offset, 0px))) 0 0);
  background: var(--color-bg);
  border: 0;
  overflow: visible;
  transform: translateY(var(--footer-reveal-offset, 0px));
}
.site-footer[data-footer-reveal] .site-footer__links {
  border: 0;
  padding-bottom: 0 !important;
}
.site-footer__stage {
  flex: 1 0 40svh;
  min-height: 40svh;
  width: 100%;
  pointer-events: none;
}

/* S9: the Privacy arrow occupies its own layer, never the year-row flex track. */
.site-footer__year-row .site-footer__link { position: relative; flex: none; }
.site-footer__year-row .site-footer__link-go { position: absolute; left: 100%; top: 0; }

/* S10: column arrow reveals must not resize their text or grid tracks. */
.site-footer__column .site-footer__link { position: relative; flex: none; }
.site-footer__column .site-footer__link-go { position: absolute; left: 100%; top: 0; }

.site-footer__email-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .site-footer__email-actions .site-footer__link-go-dot {
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
    transition: opacity 100ms ease, transform 180ms ease-out;
  }

  .site-footer__email-actions:is(:hover, :focus-within) .site-footer__link-go-dot {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__email-actions .site-footer__link-go-dot { transition: none; }
}
