/* Shared hubeiqiao.com footer. Ported verbatim from joe-hu/src/index.css (STORY FOOTER block). Do not edit here; re-port from the source. */
/* =========================================================================
   STORY FOOTER — reusable Joe Hu cinematic footer
   Source package: /Users/joehu/Cursor/OINP/docs/components/joe-footer
   ========================================================================= */
.story-footer {
  --bg: #050505;
  --ink: #fbf7ee;
  --muted: rgba(251, 247, 238, 0.76);
  --quiet: rgba(251, 247, 238, 0.58);
  --line: rgba(251, 247, 238, 0.14);
  --amber-bright: #f0a838;
  --display: 'Oswald', 'Avenir Next Condensed', 'Arial Narrow', sans-serif;
  --footer-serif: 'Cormorant Garamond', 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.17, 1, 0.32, 1);
  --ease-spring: cubic-bezier(0.35, 1.55, 0.65, 1);
  --ease-in-out: cubic-bezier(0.66, 0, 0.34, 1);
  --dur-fast: 150ms;
  --dur: 220ms;
  --dur-slow: 320ms;
  --footer-enter-duration: 420ms;
  position: relative;
  min-height: min(980px, 100svh);
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--line);
  background: #080604;
  color: var(--ink);
  font-family: var(--sans);
}

.story-footer *,
.story-footer *::before,
.story-footer *::after {
  box-sizing: border-box;
}

.story-footer a {
  color: inherit;
  text-decoration: none;
}

.story-footer button {
  color: inherit;
  font: inherit;
}

.story-footer img,
.story-footer svg {
  display: block;
  max-width: 100%;
}

.story-footer h2,
.story-footer h3,
.story-footer p {
  margin: 0;
}

.footer-photo,
.footer-grade {
  position: absolute;
  inset: 0;
}

.footer-photo {
  z-index: 0;
  background: #0b0704;
}

.footer-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  filter: saturate(1.05) contrast(1.03) brightness(0.94);
}

.footer-grade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(4, 3, 2, 0.88) 0%, rgba(5, 3, 2, 0.72) 25%, rgba(24, 16, 9, 0.30) 42%, rgba(24, 16, 9, 0.30) 55%, rgba(24, 16, 9, 0.22) 70%, rgba(20, 18, 15, 0.28) 100%),
    linear-gradient(0deg, rgba(6, 4, 3, 0.95) 0%, rgba(64, 29, 10, 0.34) 16%, rgba(6, 4, 3, 0.08) 33%, rgba(6, 4, 3, 0) 58%);
}

.footer-canvas {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  min-height: inherit;
  margin: 0 auto;
  padding: clamp(42px, 5.4vh, 54px) clamp(52px, 5vw, 84px) clamp(58px, 7vh, 72px);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.footer-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(44px, 8vw, 120px);
  transform: translateY(clamp(0px, 0.6vh, 6px));
}

.footer-brand-panel {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
  min-width: 252px;
}

.footer-identity {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
}

.footer-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.story-footer .footer-brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  border-radius: 12px;
}

.footer-avatar-button {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  perspective: 800px;
}

.footer-avatar-shell {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  transform-style: preserve-3d;
  transform: perspective(800px) rotateX(var(--avatar-rx, 0deg)) rotateY(var(--avatar-ry, 0deg)) scale(var(--avatar-scale, 1));
  transition: transform var(--dur-fast) var(--ease-out), filter var(--dur-slow) var(--ease-smooth);
}

.footer-avatar-shell::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: conic-gradient(from 20deg, #f0c56f, rgba(255, 250, 232, 0.28), #d67b30, #f0c56f);
  filter: blur(7px);
  opacity: 0.46;
  transition: opacity 420ms var(--ease-smooth), filter 420ms var(--ease-smooth);
}

.footer-avatar-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 244, 210, 0.58);
  border-radius: inherit;
  background: rgba(233, 185, 104, 0.12);
  box-shadow: 0 11px 28px rgba(0,0,0,0.34), inset 0 0 0 1px rgba(255,255,255,0.22);
}

.footer-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.15);
  transform-origin: center;
}

.footer-avatar-button:hover .footer-avatar-shell,
.footer-avatar-button:focus-visible .footer-avatar-shell,
.footer-avatar-button.is-pop-open .footer-avatar-shell {
  animation: none;
  --avatar-rx: 4deg;
  --avatar-ry: -7deg;
  --avatar-scale: 1.08;
  transform: perspective(800px) rotateX(var(--avatar-rx, 4deg)) rotateY(var(--avatar-ry, -7deg)) scale(var(--avatar-scale, 1.08));
  filter: saturate(1.08);
}

.footer-avatar-button:hover .footer-avatar-shell::before,
.footer-avatar-button:focus-visible .footer-avatar-shell::before,
.footer-avatar-button.is-pop-open .footer-avatar-shell::before {
  opacity: 0.68;
  filter: blur(9px);
}

.footer-avatar-button:focus-visible {
  outline: 1px solid rgba(233, 185, 104, 0.64);
  outline-offset: 5px;
}

@keyframes footer-avatar-idle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.018) rotate(0.8deg); }
  75% { transform: scale(0.99) rotate(-0.8deg); }
}

.footer-avatar-idle {
  animation: footer-avatar-idle 6s var(--ease-in-out) infinite;
}

.footer-avatar-popover {
  position: absolute;
  top: 4px;
  left: calc(100% + 16px);
  z-index: 10;
  width: min(310px, calc(100vw - 48px));
  padding: 16px 16px 15px;
  border: 1px solid rgba(233, 185, 104, 0.28);
  border-radius: 16px;
  background: rgba(11, 8, 5, 0.76);
  color: rgba(251, 247, 238, 0.88);
  box-shadow: 0 22px 54px rgba(0,0,0,0.34), inset 0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transform: translate3d(0, -6px, 0) scale(0.98);
  transform-origin: 0 28px;
  pointer-events: none;
  transition: opacity 220ms var(--ease-smooth), transform 220ms var(--ease-smooth);
}

.footer-avatar-popover.is-open {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.footer-avatar-popover[hidden] {
  display: none;
}

.footer-avatar-popover-title {
  margin: 0 30px 7px 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #ffd88a;
}

.footer-avatar-popover-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(251, 247, 238, 0.76);
}

.footer-avatar-popover-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(233, 185, 104, 0.38);
  border-radius: 999px;
  background: rgba(233, 185, 104, 0.12);
  color: #fff7e8;
  font-size: 13px;
  font-weight: 600;
  transition: border-color var(--dur) var(--ease-smooth), background var(--dur) var(--ease-smooth), transform var(--dur) var(--ease-smooth);
}

.footer-avatar-popover-link:hover,
.footer-avatar-popover-link:focus-visible {
  border-color: rgba(233, 185, 104, 0.72);
  background: rgba(233, 185, 104, 0.18);
  transform: translateY(-1px);
}

.footer-avatar-popover-link svg,
.footer-avatar-popover-close svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-avatar-popover-link svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.footer-avatar-popover-close {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(251, 247, 238, 0.12);
  border-radius: 50%;
  background: rgba(251, 247, 238, 0.06);
  color: rgba(251, 247, 238, 0.74);
  cursor: pointer;
}

.footer-avatar-popover-close:hover,
.footer-avatar-popover-close:focus-visible {
  color: #fff7e8;
  border-color: rgba(233, 185, 104, 0.45);
}

.footer-avatar-popover-close svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.story-footer .footer-name {
  font-family: var(--footer-serif);
  font-size: clamp(31px, 2.4vw, 43px);
  font-weight: 500;
  line-height: 1;
  color: #e9b968;
  text-shadow: 0 2px 18px rgba(0,0,0,0.38);
  transition: color 320ms var(--ease-smooth), text-shadow 320ms var(--ease-smooth);
}

.story-footer .footer-brand:hover .footer-name,
.story-footer .footer-brand:focus-visible .footer-name {
  color: #ffd88a;
  text-shadow: 0 2px 18px rgba(0,0,0,0.46), 0 0 20px rgba(233, 185, 104, 0.20);
}

.footer-mode {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #e9b968;
}

.footer-canada-emoji {
  display: inline-flex;
  margin-left: 2px;
  font-size: clamp(18px, 1.6vw, 22px);
  letter-spacing: 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.32));
  transform: translateY(-1px);
}

.footer-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(233, 185, 104, 0.18);
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-left: 2px;
}

.footer-social a {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(233, 185, 104, 0.25);
  border-radius: 50%;
  background: rgba(10, 8, 6, 0.26);
  color: rgba(251, 247, 238, 0.84);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 10px 24px rgba(0,0,0,0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: color var(--dur) var(--ease-smooth), border-color var(--dur) var(--ease-smooth), background var(--dur) var(--ease-smooth), transform var(--dur) var(--ease-smooth), box-shadow var(--dur) var(--ease-smooth);
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: #fff7e8;
  border-color: rgba(233, 185, 104, 0.68);
  background: rgba(233, 185, 104, 0.13);
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 13px 28px rgba(0,0,0,0.24), 0 0 20px rgba(233, 185, 104, 0.12);
}

.footer-social a:focus-visible {
  outline: 1px solid rgba(233, 185, 104, 0.66);
  outline-offset: 4px;
}

.footer-social svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: currentColor;
}

.footer-social-site svg {
  width: 17px;
  height: 17px;
}

.footer-social-mail svg {
  width: 18px;
  height: 18px;
}

.footer-social svg circle,
.footer-social svg path:not(:only-child) {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.95;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-social-mail svg path:not(:only-child) {
  stroke-width: 2.1;
}

.footer-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: clamp(34px, 2.4vw, 40px);
  align-items: start;
  max-width: 640px;
  width: min(48vw, 640px);
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-col h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(251, 247, 238, 0.96);
  text-shadow: 0 2px 16px rgba(0,0,0,0.36);
}

.footer-col h3::after {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  margin-top: 14px;
  background: rgba(251, 247, 238, 0.58);
}

.footer-col a {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 15.5px;
  line-height: 1.35;
  margin: -12px -14px;
  padding: 12px 14px;
  border-radius: 8px;
  color: rgba(251, 247, 238, 0.84);
  text-shadow: 0 2px 14px rgba(0,0,0,0.34);
  white-space: nowrap;
  transition: color var(--dur) var(--ease-smooth), background var(--dur) var(--ease-smooth), transform var(--dur) var(--ease-smooth);
}

.footer-col a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(233, 185, 104, 0), rgba(233, 185, 104, 0.86) 36%, rgba(251, 247, 238, 0.74));
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: opacity var(--dur) var(--ease-smooth), transform var(--dur-slow) var(--ease-smooth);
  pointer-events: none;
}

.footer-col a.footer-link-nowrap {
  white-space: nowrap;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  background: rgba(251, 247, 238, 0.07);
  color: #fff9ec;
  transform: translateX(2px);
}

.footer-col a:hover::after,
.footer-col a:focus-visible::after {
  opacity: 0.84;
  transform: scaleX(1);
}

.footer-col a:focus-visible {
  outline: 1px solid rgba(233, 185, 104, 0.64);
  outline-offset: 3px;
}

.footer-statement {
  align-self: end;
  max-width: 900px;
  margin-top: clamp(150px, 23vh, 260px);
}

.footer-statement h2 {
  max-width: 18ch;
  font-family: var(--footer-serif);
  font-size: clamp(50px, 4.25vw, 72px);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.012em;
  color: #fffdfa;
  text-wrap: balance;
  text-shadow: 0 3px 24px rgba(0,0,0,0.48);
}

.footer-title-line {
  display: block;
  white-space: nowrap;
}

.footer-mobile-break {
  display: none;
}

.footer-statement h2 .footer-highlight {
  color: #e9b968;
}

.footer-statement h2 .footer-co-highlight {
  color: #e9b968;
}

.footer-statement h2 .footer-title-line {
  color: inherit;
}

.footer-mobile-highlight {
  color: inherit;
}

.footer-copy-mobile-break {
  display: none;
}

.footer-statement-rule {
  display: block;
  width: 43px;
  height: 2px;
  margin-top: 18px;
  background: #e9b968;
  box-shadow: 0 0 18px rgba(233, 185, 104, 0.22);
}

.footer-statement p {
  width: min(880px, 100%);
  margin-top: clamp(22px, 3vh, 28px);
  padding-top: 0;
  border-top: 0;
  font-size: clamp(18px, 1.55vw, 23px);
  line-height: 1.4;
  color: rgba(251, 247, 238, 0.78);
  text-shadow: 0 2px 18px rgba(0,0,0,0.5);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  margin-top: clamp(22px, 3.4vh, 34px);
  padding-top: 26px;
  border-top: 1px solid rgba(251, 247, 238, 0.18);
}

.footer-bottom p {
  max-width: 760px;
  font-family: var(--display);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.12em;
  color: rgba(251, 247, 238, 0.58);
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 3vw, 44px);
  flex: none;
}

.footer-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0;
  color: rgba(251, 247, 238, 0.72);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1;
  transition: background var(--dur) var(--ease-smooth), border-color var(--dur) var(--ease-smooth), box-shadow var(--dur) var(--ease-smooth), color var(--dur) var(--ease-smooth), transform var(--dur) var(--ease-smooth);
}

.footer-action-icon {
  display: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-action-arrow {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-45deg);
  transition: transform var(--dur) var(--ease-smooth);
}

.footer-action-long {
  display: none;
}

.footer-action:hover {
  color: #e9b968;
  transform: translateY(-2px);
}

.footer-action-build,
.footer-action-talk {
  color: #f0c56f;
}

.footer-action-build {
  min-width: 196px;
  min-height: 44px;
  padding: 0 18px 0 16px;
  border: 1px solid rgba(255, 226, 169, 0.5);
  border-radius: 10px;
  background: linear-gradient(180deg, #e8b75f 0%, #d59a43 100%);
  color: #171007;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 18px 44px -28px rgba(232, 183, 95, 0.72);
}

.footer-action-build .footer-action-icon {
  display: block;
}

.footer-action-build:hover {
  color: #171007;
  background: linear-gradient(180deg, #f0c977 0%, #dca34d 100%);
  border-color: rgba(255, 236, 190, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 22px 52px -30px rgba(232, 183, 95, 0.86);
}

.story-footer .footer-action-build,
.story-footer .footer-action-build:hover,
.story-footer .footer-action-build:focus-visible,
.story-footer .footer-action-build.is-magnetic,
.story-footer .footer-action-build > * {
  color: #171007 !important;
}

.story-footer .footer-action-build svg,
.story-footer .footer-action-build svg path {
  stroke: currentColor !important;
}

.footer-action-build:active {
  transform: translateY(-1px) scale(0.985);
}

.footer-action-talk {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(251, 247, 238, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(251, 247, 238, 0.86);
}

.footer-mini {
  display: none;
}

@media (min-width: 761px) {
  .footer-action {
    min-height: 44px;
    margin: -8px -12px;
    padding: 8px 12px;
    border-radius: 8px;
  }

  .footer-action-build {
    margin: -8px -14px;
    padding: 8px 18px 8px 16px;
  }

  .footer-action-talk {
    margin: -8px -10px;
    padding: 8px 14px;
  }

  .footer-action:hover,
  .footer-action:focus-visible {
    background: rgba(251, 247, 238, 0.06);
  }

  .footer-action-build:hover,
  .footer-action-build:focus-visible {
    background: linear-gradient(180deg, #f0c977 0%, #dca34d 100%);
  }

  .footer-action:focus-visible {
    outline: 1px solid rgba(233, 185, 104, 0.64);
    outline-offset: 3px;
  }
}

.story-footer.footer-motion-ready .footer-brand-panel,
.story-footer.footer-motion-ready .footer-map .footer-col,
.story-footer.footer-motion-ready .footer-statement,
.story-footer.footer-motion-ready .footer-bottom {
  opacity: 0.72;
  filter: blur(1.4px);
  transform: translate3d(0, 6px, 0);
  transition:
    opacity var(--footer-enter-duration) var(--ease-smooth) var(--footer-motion-delay, 0ms),
    filter var(--footer-enter-duration) var(--ease-smooth) var(--footer-motion-delay, 0ms),
    transform var(--footer-enter-duration) var(--ease-smooth) var(--footer-motion-delay, 0ms);
  will-change: opacity, filter, transform;
}

.story-footer.footer-motion-ready .footer-brand-panel { --footer-motion-delay: 0ms; }
.story-footer.footer-motion-ready .footer-map .footer-col:nth-child(1) { --footer-motion-delay: 40ms; }
.story-footer.footer-motion-ready .footer-map .footer-col:nth-child(2) { --footer-motion-delay: 70ms; }
.story-footer.footer-motion-ready .footer-map .footer-col:nth-child(3) { --footer-motion-delay: 100ms; }
.story-footer.footer-motion-ready .footer-map .footer-col:nth-child(4) { --footer-motion-delay: 130ms; }
.story-footer.footer-motion-ready .footer-statement { --footer-motion-delay: 170ms; }
.story-footer.footer-motion-ready .footer-bottom { --footer-motion-delay: 210ms; }

.story-footer.footer-motion-in .footer-brand-panel,
.story-footer.footer-motion-in .footer-map .footer-col,
.story-footer.footer-motion-in .footer-statement,
.story-footer.footer-motion-in .footer-bottom {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0);
}

.footer-action-build {
  --magnet-x: 0px;
  --magnet-y: 0px;
  --press-scale: 1;
  position: relative;
  overflow: hidden;
  transform: translate3d(var(--magnet-x), var(--magnet-y), 0) scale(var(--press-scale));
  transition:
    background var(--dur) var(--ease-smooth),
    border-color var(--dur) var(--ease-smooth),
    box-shadow var(--dur) var(--ease-smooth),
    color var(--dur) var(--ease-smooth),
    transform var(--dur-slow) var(--ease-smooth);
  will-change: transform;
}

.footer-action-build::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(110deg, rgba(255,255,255,0) 0%, rgba(255,250,226,0.44) 44%, rgba(255,255,255,0) 62%);
  opacity: 0;
  transform: translateX(-115%) skewX(-18deg);
  transition: opacity var(--dur) var(--ease-smooth), transform 680ms var(--ease-smooth);
  pointer-events: none;
}

.footer-action-build > * {
  position: relative;
  z-index: 1;
}

.footer-action-build .footer-action-icon {
  transition: transform var(--dur) var(--ease-spring);
}

.footer-action-build:hover,
.footer-action-build:focus-visible {
  transform: translate3d(var(--magnet-x), calc(var(--magnet-y) - 2px), 0) scale(var(--press-scale));
}

.footer-action-build:hover::before,
.footer-action-build:focus-visible::before,
.footer-action-build.is-magnetic::before {
  opacity: 0.56;
  transform: translateX(115%) skewX(-18deg);
}

.footer-action-build:hover .footer-action-icon,
.footer-action-build:focus-visible .footer-action-icon,
.footer-action-build.is-magnetic .footer-action-icon {
  transform: rotate(-7deg) translateY(-1px);
}

.footer-action-build:hover .footer-action-arrow,
.footer-action-build:focus-visible .footer-action-arrow,
.footer-action-build.is-magnetic .footer-action-arrow {
  transform: rotate(-45deg) translate(2px, -2px);
}

.footer-action-build.is-magnetic {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.36), 0 24px 58px -30px rgba(232, 183, 95, 0.92), 0 0 0 0.5px rgba(255, 244, 210, 0.32);
}

.footer-action-build:active {
  --press-scale: 0.985;
  transform: translate3d(var(--magnet-x), calc(var(--magnet-y) - 1px), 0) scale(var(--press-scale));
}

@media (min-width: 1025px) {
  .footer-map {
    transform: translateX(clamp(18px, 1.35vw, 24px));
  }
}

@media (max-width: 1024px) {
  .footer-map {
    width: min(48vw, 520px);
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 30px 46px;
  }

  .footer-statement {
    margin-top: clamp(120px, 19vh, 210px);
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-actions {
    justify-content: flex-start;
    gap: 34px;
  }
}

@media (max-width: 760px) {
  .story-footer {
    min-height: auto !important;
    min-block-size: 0 !important;
    height: auto;
    block-size: auto;
    display: block;
    border-top-color: rgba(251, 247, 238, 0.18);
    /* iOS WebViews can treat mixed-axis overflow as a scroll container,
       preserving a viewport-height blank area after the footer content. */
    overflow: hidden;
  }

  /* Ported from OINP: on real iOS Safari the footer's own box can still
     measure taller than its rendered content (mixed-axis overflow), which
     leaves a big blank/white region below the footer. The HubeiqiaoFooter tail-guard
     effect measures the real content bottom and, if it's short of the
     footer's box by more than a threshold, pins the footer to that
     content-driven height via --footer-trim-height. */
  .story-footer.footer-tail-trimmed {
    min-height: 0 !important;
    min-block-size: 0 !important;
    height: var(--footer-trim-height) !important;
    max-height: var(--footer-trim-height) !important;
    overflow: hidden;
  }

  .footer-photo {
    position: relative;
    inset: auto;
    height: 390px;
    height: clamp(300px, 51svh, 390px);
    min-height: 0;
    min-block-size: 0;
    overflow: hidden;
  }

  .footer-photo img {
    /* A tighter crop needs a bigger box for object-fit:cover to sample from at full
       source resolution — a CSS transform:scale() here would just stretch the already-
       rasterized 100%-size bitmap, which is what was causing the softness on mobile.
       Percentage width/height (not transform) makes object-fit:cover resample directly
       from the source at the enlarged size; translate (not scale) keeps the recenter
       free of any extra raster interpolation. */
    width: 144%;
    height: 144%;
    max-width: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-position: 88% 47%;
    filter: saturate(1.05) contrast(1.03) brightness(0.94);
  }

  .footer-grade {
    inset: 0;
    background:
      linear-gradient(180deg, rgba(8,6,4,0) 0%, rgba(8,6,4,0.10) 24%, rgba(8,6,4,0.70) 41%, rgba(8,6,4,0.96) 54%, #080604 100%),
      linear-gradient(90deg, rgba(5,4,3,0.38) 0%, rgba(5,4,3,0) 48%, rgba(5,4,3,0.16) 100%);
  }

  .footer-canvas {
    min-height: 0 !important;
    min-block-size: 0 !important;
    height: auto;
    block-size: auto;
    display: block;
    grid-template-rows: none;
    margin-top: -40px;
    padding: 0 clamp(24px, 6vw, 34px) max(26px, env(safe-area-inset-bottom));
  }

  .footer-topline {
    display: block;
    transform: none;
  }

  .footer-brand-panel {
    gap: 10px;
    min-width: 0;
    margin-bottom: clamp(22px, 3.4vh, 30px);
  }

  .footer-identity {
    gap: 9px;
  }

  .footer-brand-row {
    gap: 11px;
    transform: translateY(-8px);
  }

  .story-footer .footer-brand {
    gap: 0;
  }

  .footer-avatar-button {
    width: 45px;
    height: 45px;
  }

  .footer-avatar-shell {
    width: 39px;
    height: 39px;
  }

  .footer-avatar-shell::after {
    display: none;
  }

  .footer-brand-panel::after {
    content: "";
    width: 86px;
    height: 2px;
    background: #e9b968;
    box-shadow: 0 0 18px rgba(233, 185, 104, 0.26);
    margin-top: 2px;
  }

  .story-footer .footer-name {
    font-size: clamp(26px, 7vw, 32px);
    text-shadow: 0 2px 18px rgba(0,0,0,0.48);
  }

  .footer-mode {
    gap: 8px;
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .footer-dot {
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 2px rgba(233, 185, 104, 0.18);
  }

  .footer-canada-emoji {
    margin-left: 2px;
    font-size: 18px;
    transform: translateY(-2px);
  }

  .footer-avatar-popover {
    top: 112px;
    left: 0;
    transform-origin: 28px 0;
    width: min(300px, calc(100vw - 48px));
    padding: 15px 15px 14px;
  }

  .footer-social {
    gap: 8px;
    padding-left: 0;
  }

  .footer-social a {
    width: 32px;
    height: 32px;
    background: rgba(10, 8, 6, 0.34);
  }

  .footer-social svg {
    width: 14px;
    height: 14px;
  }

  .footer-social-site svg {
    width: 16px;
    height: 16px;
  }

  .footer-social-mail svg {
    width: 17px;
    height: 17px;
  }

  .footer-map {
    display: grid;
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 24px;
    margin: 22px 0 28px;
    transform: none;
  }

  .footer-col {
    gap: 9px;
  }

  .footer-col h3 {
    margin-bottom: 7px;
    font-size: 10.5px;
    letter-spacing: 0.2em;
  }

  .footer-col h3::after {
    width: 20px;
    margin-top: 10px;
  }

  .footer-col a {
    width: auto;
    max-width: 100%;
    margin: -9px -10px;
    padding: 9px 10px;
    font-size: 14.5px;
    line-height: 1.25;
    white-space: normal;
  }

  .footer-col a::after {
    left: 10px;
    right: 10px;
    bottom: 6px;
  }

  .footer-col a.footer-link-nowrap {
    font-size: clamp(13.6px, 3.55vw, 14.2px);
    white-space: nowrap;
  }

  .footer-statement {
    max-width: 100%;
    margin-top: 0;
  }

  .footer-statement h2 {
    max-width: 100%;
    font-size: clamp(40px, 11.5vw, 48px);
    line-height: 1.04;
    letter-spacing: -0.01em;
  }

  .footer-statement h2 .footer-highlight {
    color: inherit;
  }

  .footer-statement h2 .footer-co-highlight {
    color: #e9b968;
  }

  .footer-mobile-highlight {
    color: #e9b968;
  }

  .footer-title-line {
    white-space: nowrap;
  }

  .footer-mobile-break,
  .footer-copy-mobile-break {
    display: block;
  }

  .footer-statement p {
    margin-top: 16px;
    padding-top: 0;
    border-top: 0;
    font-size: clamp(17px, 4.8vw, 20px);
    line-height: 1.36;
    color: rgba(251, 247, 238, 0.62);
  }

  .footer-statement-rule {
    display: none;
  }

  .footer-bottom {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    padding-top: 22px;
    border-top-color: rgba(251, 247, 238, 0.18);
  }

  .footer-bottom > p {
    display: block;
    order: 2;
    max-width: 100%;
    margin-top: 20px;
    font-size: 10.5px;
    line-height: 1.65;
    letter-spacing: 0.08em;
    text-align: center;
    color: rgba(251, 247, 238, 0.42);
  }

  .footer-copy-location,
  .footer-copy-open {
    display: block;
  }

  .footer-copy-open {
    max-width: 30rem;
    margin-inline: auto;
    white-space: normal;
    font-size: clamp(8.8px, 2.7vw, 10.5px);
    letter-spacing: 0.05em;
  }

  .footer-copy-separator {
    display: none;
  }

  .footer-actions {
    display: grid;
    order: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 14px;
  }

  .footer-action {
    min-height: 48px;
    padding: 0 17px;
    border: 1px solid rgba(233, 185, 104, 0.56);
    border-radius: 10px;
    color: #e9b968;
    font-size: clamp(14.5px, 4.1vw, 16px);
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .footer-action-build,
  .footer-action-talk {
    border-color: rgba(233, 185, 104, 0.62);
    color: #e9b968;
  }

  .footer-action-build {
    min-width: 0;
    padding: 0 13px;
    border-color: rgba(255, 226, 169, 0.54);
    background: linear-gradient(180deg, #e8b75f 0%, #d59a43 100%);
    color: #171007;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 16px 34px -25px rgba(232, 183, 95, 0.78);
  }

  .footer-action-build::before {
    display: none;
  }

  .footer-action-build:hover,
  .footer-action-build:focus-visible {
    color: #171007;
    background: linear-gradient(180deg, #f0c977 0%, #dca34d 100%);
  }

  .footer-action-talk {
    background: rgba(255, 255, 255, 0.035);
    color: rgba(251, 247, 238, 0.82);
  }

  .footer-action-icon {
    display: block;
    width: 18px;
    height: 18px;
  }

  .footer-action-arrow {
    width: 17px;
    height: 17px;
    transform: none;
  }

  .story-footer .footer-action-arrow-desktop {
    display: none;
  }

  .footer-action:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-footer .reveal,
  .story-footer.footer-motion-ready .footer-brand-panel,
  .story-footer.footer-motion-ready .footer-map .footer-col,
  .story-footer.footer-motion-ready .footer-statement,
  .story-footer.footer-motion-ready .footer-bottom {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }

  .story-footer .footer-action-build {
    --magnet-x: 0px !important;
    --magnet-y: 0px !important;
    transform: none !important;
  }

  .story-footer .footer-action-build::before,
  .story-footer .footer-avatar-idle {
    animation: none !important;
  }
}
