.am-footer {
  --footer-bg: #0b0d10;
  --footer-ink: #f2f3f5;
  --footer-muted: #8b919c;
  --footer-line: #1e222a;
  --footer-frame: #3b82f6;
  background: var(--footer-bg);
  color: var(--footer-ink);
}

.am-footer .footer-wrap {
  container-type: inline-size;
  width: min(1200px, calc(100% - 64px));
  margin-inline: auto;
  padding-block-end: 28px;
}

.footer-cta,
.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding-block: 56px;
  border-top: 1px solid var(--footer-line);
}

.footer-cta { align-items: center; }
.footer-cta__copy { display: grid; gap: 12px; }
.footer-cta__copy h2 {
  font-family: var(--display, "Inter Display", "Inter", system-ui, sans-serif);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.footer-label {
  color: var(--footer-muted);
  font: 500 11px/1.55 var(--mono);
  letter-spacing: .02em;
}

.footer-column .footer-label { text-transform: uppercase; }
.footer-cta__actions { display: flex; flex-wrap: wrap; flex: 0 0 auto; gap: 10px; }

.am-footer .footer-cta__actions .btn {
  padding-inline: 18px;
  min-height: 42px;
  border-radius: 8px;
  letter-spacing: -.01em;
}

.am-footer .footer-cta__actions .btn--ghost {
  background: transparent;
  border-color: #2a2e36;
  color: var(--footer-ink);
}

.am-footer .footer-cta__actions .btn--ghost:hover { background: #15181e; }

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  flex: 1 1 300px;
  max-width: 320px;
}

.footer-brand__link { display: inline-flex; }
.footer-brand__link img { display: block; width: 116px; height: auto; }
.footer-brand__description { color: var(--footer-muted); font-size: 14px; line-height: 1.55; }

.footer-status {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--footer-line);
  border-radius: 10px;
  background: #0f1115;
  color: var(--footer-muted);
  font: 500 11px/1.5 var(--mono);
}

.footer-status__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; }
.footer-status__location { display: inline-flex; align-items: center; gap: 8px; color: var(--footer-ink); }
.footer-status__location::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34d399; }
.footer-status address { font: inherit; }

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 24px clamp(28px, 4.7vw, 72px);
}

.footer-column,
.footer-column ul { display: grid; align-content: start; gap: 12px; }
.footer-column ul { padding: 0; list-style: none; }
.footer-column a,
.footer-bottom a { color: inherit; text-decoration: none; transition: color .2s; }
.footer-column a { font-size: 14px; line-height: 1.4; }
.footer-column a:hover,
.footer-bottom a:hover { color: var(--footer-ink); text-decoration: underline; text-underline-offset: 4px; }
.footer-column a:hover { color: #a3beff; }

.footer-wordmark {
  position: relative;
  display: grid;
  justify-items: center;
  margin-block: 8px 64px;
}

.footer-wordmark__text {
  width: max-content;
  color: var(--footer-ink);
  font-family: var(--display, "Inter Display", "Inter", system-ui, sans-serif);
  font-size: var(--footer-wordmark-size, min(21cqw, 268px));
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.065em;
  white-space: nowrap;
}

.footer-wordmark__selection {
  position: absolute;
  inset: -1px;
  border: 1px solid var(--footer-frame);
  pointer-events: none;
}

.footer-wordmark__selection i {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #fff;
  border: 1px solid var(--footer-frame);
}

.footer-wordmark__selection i:nth-child(odd) { left: -4px; }
.footer-wordmark__selection i:nth-child(even) { right: -4px; }
.footer-wordmark__selection i:nth-child(-n+2) { top: -4px; }
.footer-wordmark__selection i:nth-child(n+3) { bottom: -4px; }

.footer-wordmark__selection span {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  border-radius: 3px;
  padding: 1px 5px;
  background: #2563eb;
  color: #fff;
  font: 600 9px/1.4 var(--mono);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 28px;
  border-top: 1px solid #ef4444;
  padding-block-start: 18px;
  color: var(--footer-muted);
  font: 500 11px/1.55 var(--mono);
}

.footer-bottom .footer-bottom__top { color: #ff6a6a; }
.am-footer :focus-visible { outline: 2px solid #8baeff; outline-offset: 5px; border-radius: 3px; }

@media (max-width: 1199px) {
  .footer-cta__copy h2 { font-size: 30px; }
}

@media (max-width: 809px) {
  .am-footer .footer-wrap { width: calc(100% - 48px); }
  .footer-cta,
  .footer-main,
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-cta,
  .footer-main { padding-block: 46px; }
  .footer-cta__copy h2 { font-size: 22px; }
  .footer-brand { flex: none; width: 100%; max-width: none; }
  .footer-columns { gap: 26px 40px; }
}

.am-mascot.am-mascot--floating {
  --pal-size: clamp(77px, 8vw, 122px);
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 95;
  width: var(--pal-size);
  height: var(--pal-size);
  margin: 0;
  opacity: 0;
  transform: translate3d(var(--pal-x, 0px), var(--pal-y, 0px), 0) translate(-50%, -50%) scale(var(--pal-scale, 1));
  pointer-events: none;
  contain: layout style;
}
.am-mascot.am-mascot--floating[data-pal-active] { opacity: 1; animation: none; }
.cursor-hero__mascot > .am-mascot.am-mascot--floating {
  position: absolute; inset: 0; width: 100%; height: 100%; transform: none;
}
.am-mascot--floating .am-mascot__float {
  position: absolute; inset: 0; animation: pal-float 5.2s ease-in-out infinite paused;
  rotate: var(--pal-tilt, 0deg);
}
.am-mascot--floating[data-pal-active] .am-mascot__float { animation-play-state: running; }
.am-mascot--floating .am-mascot__sprite,
.am-mascot--floating canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.am-mascot--floating .am-mascot__sprite {
  background: url("/assets/img/capsule-pal-faces.png") 16.6667% 0 / 700% 100% no-repeat;
}
.am-mascot--floating canvas,
.am-mascot--floating[data-pal-renderer="live"] .am-mascot__sprite { opacity: 0; }
.am-mascot--floating[data-pal-renderer="live"] canvas { opacity: 1; }
.am-mascot__hearts span {
  --heart-x: 0px;
  --heart-y: -48px;
  --heart-delay: 110ms;
  position: absolute; left: 50%; top: 17%; opacity: 0;
  color: #ffc2cf; font: 600 clamp(16px, 2vw, 25px)/1 var(--sans);
  text-shadow: 0 0 10px #ea527950;
}
.am-mascot__hearts span:first-child { --heart-x: -22px; --heart-y: -41px; --heart-delay: 0ms; color: #ff799a; }
.am-mascot__hearts span:last-child { --heart-x: 23px; --heart-y: -36px; --heart-delay: 210ms; color: #ff9ab0; }
.am-mascot--floating[data-pal-celebrating] .am-mascot__hearts span {
  animation: pal-heart 1.06s cubic-bezier(.15,.55,.32,1) var(--heart-delay) both;
}

@keyframes pal-heart {
  0% { transform: translate(-50%, 0) scale(.35); opacity: 0; }
  23% { opacity: 1; }
  72% { opacity: .85; }
  100% { transform: translate(calc(-50% + var(--heart-x)), var(--heart-y)) scale(.9); opacity: 0; }
}

body:has(.site-header.is-open) .am-mascot.am-mascot--floating,
body:has(main :is(input, textarea, select):focus) .am-mascot.am-mascot--floating { visibility: hidden; }

@keyframes pal-float {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(2px); }
}

@media (max-width: 809px) { .am-mascot.am-mascot--floating { --pal-size: 60px; } }
@media (max-width: 419px) { .am-mascot.am-mascot--floating { --pal-size: 49px; } }
@media (max-width: 570px), (pointer: coarse) and (orientation: landscape) and (max-height: 540px) {
  body > .am-mascot.am-mascot--floating { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .am-mascot--floating .am-mascot__float { animation: none; rotate: none; }
  .am-mascot--floating[data-pal-celebrating] .am-mascot__hearts span { animation: none; }
}
@media print { .am-mascot.am-mascot--floating { display: none; } }
