/* Shared footer (every page): one felt night scene. Nila awake in the sky (a slow bob, her phone glowing), felt stars that
   twinkle, a shooting star now and then, the sign-off in our own font, the four link groups as paper luggage tags hanging
   on a string with pins (the hero's bunting), a town that goes to sleep (the windows switch off one by one when it is
   seen, Suri and Kuru asleep with floating z's), and the legal lines on a sewn felt label at the very bottom.
   Motion is transform and opacity only, runs only while the footer is on screen (.is-seen), and under reduced motion the
   finished scene (lights off, everything still) is shown. See footer.js. */

.ft { --pk-c: var(--night); --pk-tex: var(--pk-tex-night); --pk-tex-size: 512px 512px; --pk-blend: normal;
  --pk-fg: #FFFFFF; --pk-fg-2: #D3DBF7; --pk-rim: #4A5A96; --ft-night: brightness(.5) saturate(.8) hue-rotate(14deg);
  --rope: #C89A62;
  position: relative; padding-top: clamp(96px, 11vw, 168px); color: #FFFFFF; }
.ft :focus-visible { outline-color: var(--lemon); }

/* ---------- The sky */
.ft__sky { position: absolute; left: 0; right: 0; top: 0; height: min(760px, 100%); overflow: clip; pointer-events: none; }
.ft__stars { position: absolute; right: 3%; top: 8px; width: min(640px, 72%); max-width: none; opacity: .6;
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent 100%); mask-image: radial-gradient(closest-side, #000 35%, transparent 100%); }
.ft__star { position: absolute; display: block; }
.ft__star img { width: 100%; height: auto; display: block; }
.ft__star--1 { left: 58%; top: 118px; width: 40px; }
.ft__star--2 { left: 7%; top: 64px; width: 26px; }
.ft__star--3 { left: 47%; top: 300px; width: 22px; }
.ft__star--4 { left: 91%; top: 420px; width: 34px; }
.ft__star--5 { left: 23%; top: 150px; width: 20px; }
.ft__star--6 { left: 74%; top: 250px; width: 24px; }
.ft__star--7 { left: 3%; top: 340px; width: 32px; }
.ft__nila { position: absolute; right: max(4vw, calc((100% - 1240px) / 2)); top: 54px; width: clamp(120px, 13vw, 190px); }
.ft__nila-bob { position: relative; display: block; }
.ft__nila-bob > img { width: 100%; height: auto; display: block; }
/* the glow of her phone: a soft green light over the screen */
.ft__glow { position: absolute; left: 62%; top: 44%; width: 30%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(150, 255, 180, .75), rgba(120, 240, 160, .25) 55%, transparent 75%); opacity: .6; }
.ft__shoot { position: absolute; left: 36%; top: 30px; width: 120px; height: 3px; border-radius: 3px; rotate: 24deg; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 240, 190, .85) 70%, #FFFFFF); }

/* ---------- Sign-off, about, back to morning */
.ft__top { position: relative; z-index: 1; }
.ft__bye { font-size: clamp(40px, 7.6vw, 112px); line-height: .98; color: #FFFFFF; }
.ft__bye .brandword { display: inline; font-weight: 700; letter-spacing: -.005em; }
.ft__l { display: block; }
.ft__about { margin-top: 22px; max-width: 34em; font-size: var(--t-lead); line-height: 1.55; color: #E3E9FF; }
.ft__about span[lang] { font-weight: 700; color: #FFFFFF; }
.ft__back { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; margin-top: 30px; padding: 0 24px 0 12px; border-radius: 999px;
  background: var(--sun); color: var(--ink); font: 800 17px/1 var(--font-body); text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 1px 1px rgba(0, 0, 0, .35), 0 12px 20px -10px rgba(0, 0, 0, .55);
  transition: transform var(--m-press, 100ms) var(--m-settle, ease); }
.ft__back img { width: 34px; height: 34px; transition: transform var(--m-small, 400ms) var(--m-spring, ease); }
@media (hover: hover) and (pointer: fine) { .ft__back:hover img { transform: translateY(-3px) rotate(-12deg); } }
.ft__back:active { transform: scale(.97); }

/* ---------- Link groups: luggage tags on a string (each a nav landmark; the visible label is plain text) */
.ft__nav { --g: clamp(24px, 3.4vw, 56px); position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px var(--g); align-items: start;
  margin-top: clamp(48px, 5vw, 76px); }
.ft__tag { --tc: #FF8A80; position: relative; padding-top: 22px; }
.ft__tag--sun { --tc: #FFCB3D; } .ft__tag--mint { --tc: #7FD59A; } .ft__tag--sky { --tc: #8FB4FF; }
/* the string: one sagging piece per tag, so the pieces join into a run across a row; a pin at each end */
.ft__tag::before { content: ""; position: absolute; z-index: 0; left: calc(var(--g) / -2); right: calc(var(--g) / -2); top: 0; height: 34px;
  border-bottom: 3px solid var(--rope); border-radius: 0 0 50% 50% / 0 0 100% 100%; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); pointer-events: none; }
.ft__peg { position: absolute; z-index: 3; top: -7px; width: 15px; height: 15px; border-radius: 50%; background: var(--tc);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), inset 0 2px 0 rgba(255, 255, 255, .35), 0 2px 2px rgba(0, 0, 0, .4); }
.ft__peg--l { left: calc(var(--g) / -2 - 7px); }
.ft__peg--r { right: calc(var(--g) / -2 - 7px); display: none; }
.ft__tag:nth-child(4) .ft__peg--r { display: block; }
.ft__card { position: relative; z-index: 1; margin-top: 16px; transform-origin: 50% 0; border-radius: 6px 6px 14px 14px; padding: 0 0 12px;
  background: #FFF8EA var(--pk-tex-paper) 0 0 / 512px 512px; color: var(--ink);
  clip-path: polygon(20px 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%, 0 20px);
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .35)); }
/* the string loop from the hole up to the sag */
.ft__card::before { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 12px; translate: -1px 0; background: var(--rope); z-index: 3; }
.ft__label { position: relative; margin: 0; padding: 30px 14px 12px; text-align: center; font: 800 17px/1.2 var(--font-display); letter-spacing: .01em; color: var(--ink);
  background: var(--tc) var(--pk-tex-grain) 0 0 / 256px 256px; background-blend-mode: multiply, normal; }
.ft__label::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; border-bottom: 2px dashed rgba(30, 42, 90, .35); }
.ft__hole { position: absolute; z-index: 4; left: 50%; top: 8px; width: 15px; height: 15px; translate: -50% 0; border-radius: 50%;
  background: var(--night); box-shadow: inset 0 2px 2px rgba(0, 0, 0, .6), 0 0 0 3px rgba(255, 255, 255, .6); }
.ft__group ul { display: grid; margin: 8px 0 0; padding: 0 18px; list-style: none; }
.ft__group a { display: flex; align-items: center; gap: 8px; min-height: 40px; color: var(--ink); font: 700 16.5px/1.25 var(--font-body);
  text-decoration: none; text-underline-offset: .2em; }
.ft__group li + li a { border-top: 1px dashed rgba(30, 42, 90, .18); }
.ft__group a:hover { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; }
.ft__group a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 3px; text-underline-offset: .3em; }
.ft__group a:focus-visible { outline-color: var(--blue); outline-offset: 2px; }

/* ---------- The town (a 1440 x 420 design box, cropped in the middle on narrow screens) */
.ft__town { position: relative; height: max(29.17vw, 262px); margin-top: clamp(0px, 1vw, 12px); overflow: clip; pointer-events: none; }
.ft__land { position: absolute; left: 50%; bottom: 0; width: max(100%, 900px); aspect-ratio: 1440 / 420; translate: -50% 0; }
.ft__land > * { position: absolute; display: block; max-width: none; height: auto; }
.ft__hill { left: -.556%; width: 101.111%; filter: var(--ft-night); }
.ft__hill--back { top: 26.9%; }
.ft__hill--mid { top: 44.05%; }
.ft__hill--front { top: 66.43%; }
.ft__thing { filter: var(--ft-night); }
.ft__tree--1 { left: 3.4%; top: 31%; width: 8.6%; }
.ft__tree--2 { left: 37.5%; top: 35%; width: 6.4%; }
.ft__school { left: 13.5%; top: 9%; width: 21.5%; aspect-ratio: 588 / 435; }
.ft__school > .ft__thing { position: absolute; left: 0; top: 0; width: 100%; height: auto; }
/* warm windows drawn over the school (percent of its 588 x 435 picture) */
.ft__win { position: absolute; width: 5.2%; height: 6.9%; border-radius: 18%; background: #FFD98A; box-shadow: 0 0 10px 2px rgba(255, 200, 100, .6); }
.ft__win--1 { left: 20.4%; top: 67.8%; } .ft__win--2 { left: 26.4%; top: 67.8%; } .ft__win--3 { left: 20.4%; top: 77.5%; } .ft__win--4 { left: 26.4%; top: 77.5%; }
.ft__win--5 { left: 57%; top: 74.7%; } .ft__win--6 { left: 63%; top: 74.7%; } .ft__win--7 { left: 57%; top: 84%; } .ft__win--8 { left: 63%; top: 84%; }
.ft__house { display: block; }
.ft__house img { position: absolute; display: block; max-width: none; height: auto; }
.ft__house .ft__thing { left: 0; top: 0; width: 100%; }
.ft__light { left: 43.67%; top: 36.77%; width: 40.82%; }
.ft__house--1 { left: 47.5%; top: 26.5%; width: 12%; aspect-ratio: 316 / 291; }
.ft__house--2 { left: 63.5%; top: 31.5%; width: 9%; aspect-ratio: 316 / 291; transform: scaleX(-1); }
/* the town goes to sleep: the lights go off one by one (--off-at) once it is seen */
.ft__town.is-sleep .ft__light, .ft__town.is-sleep .ft__win { opacity: 0; transition: opacity 700ms ease var(--off-at, 0ms); }
/* sleepers */
.ft__sun { left: 80%; top: 16%; width: 14.5%; aspect-ratio: 1; }
.ft__breathe { position: absolute; inset: 0; display: block; transform-origin: 50% 100%; }
.ft__suri { width: 100%; height: auto; display: block; filter: brightness(.9) saturate(.9); }
.ft__lid { position: absolute; top: 31%; width: 19%; height: 9%; border-radius: 0 0 50% 50% / 0 0 100% 100%; background: #6FB3E8; box-shadow: inset 0 -2px 0 rgba(20, 40, 90, .55); z-index: 2; }
.ft__lid--l { left: 27%; } .ft__lid--r { left: 51%; }
  background: linear-gradient(#FFE6B0 0 13%, #F0766B 13%); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .3), inset 0 -4px 0 rgba(0, 0, 0, .18), 0 2px 3px rgba(0, 0, 0, .35);
  outline: 1.5px dashed rgba(255, 255, 255, .55); outline-offset: -3px; filter: brightness(.85); }
.ft__z { position: absolute; z-index: 5; font: 800 clamp(14px, 1.9vw, 26px)/1 var(--font-display); color: var(--lemon); text-shadow: 0 1px 0 rgba(0, 0, 0, .25); opacity: 0; }
.ft__z--1 { left: 78%; top: 6%; } .ft__z--2 { left: 88%; top: 0; } .ft__z--3 { left: 98%; top: -6%; font-size: clamp(18px, 2.4vw, 32px); }
.ft__z--4 { left: 70%; top: -4%; } .ft__z--5 { left: 98%; top: -14%; }

/* ---------- The legal lines on a sewn felt label at the very bottom (the ground continues the front hill) */
.ft__fine { position: relative; z-index: 0; padding: 6px 0 30px; color: #F1F4FF; }
.ft__fine::before { content: ""; position: absolute; inset: -2px 0 0; z-index: -1; background: #62AA68; filter: var(--ft-night); }
.ft__patch { position: relative; padding: 22px clamp(18px, 3vw, 36px); border-radius: 10px 12px 11px 13px; color: #FFFFFF;
  background: #274A55 var(--pk-tex-grain) 0 0 / 256px 256px; background-blend-mode: soft-light;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .4), 0 12px 18px -10px rgba(0, 0, 0, .6); }
.ft__patch::before { content: ""; position: absolute; inset: 7px; border: 2px dashed rgba(255, 233, 180, .55); border-radius: 8px; pointer-events: none; }
.ft__fine p { font-size: 15px; line-height: 1.6; }
.ft__fine p + p { margin-top: 4px; }
.ft__fine a { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: .18em; }
.ft__legal { font-weight: 700; }
/* Suri sits in the bottom right corner of the screen (about 86 px square on a phone): the label stops above it */
@media (max-width: 760px) { .ft__fine { padding-bottom: 108px; } }

@media (max-width: 899.98px) {
  .ft__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft__tag:nth-child(4) .ft__peg--r { display: none; }
  .ft__tag:nth-child(even) .ft__peg--r { display: block; }
}
@media (max-width: 539.98px) {
  .ft__nav { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ft__tag .ft__peg--r { display: block; }
  .ft { padding-top: 150px; }
  .ft__nila { top: 22px; width: 98px; right: 14px; }
  .ft__star--1 { left: 34%; top: 46px; width: 30px; }
  .ft__star--4, .ft__star--3, .ft__star--6 { display: none; }
  .ft__shoot { width: 80px; }
  .ft__nav { --g: 12px; }
  .ft__land { translate: -72% 0; }
}

/* ---------- Motion (only while the footer is on screen: .is-seen) */
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.rm) .ft [data-b].b-wait:not(.b-in) { opacity: 0; }
  .ft [data-b].b-in { animation: var(--b-anim) var(--b-dur, 500ms) steps(1, end) var(--b-at, 0ms) both; }
  .ft [data-b="rise"] { --b-anim: ft-rise; --b-dur: 830ms; }
  .ft [data-b="sink"] { --b-anim: ft-sink; --b-dur: 1330ms; }
  .ft.is-seen .ft__nila-bob > img { animation: ft-bob 6s ease-in-out infinite alternate; }
  .ft.is-seen .ft__glow { animation: ft-glow 3.2s ease-in-out infinite alternate; }
  .ft.is-seen .ft__star { animation: ft-twinkle 3.4s ease-in-out infinite alternate; }
  .ft.is-seen .ft__star--2 { animation-duration: 2.6s; animation-delay: -.8s; } .ft.is-seen .ft__star--3 { animation-duration: 4.1s; animation-delay: -2s; }
  .ft.is-seen .ft__star--4 { animation-duration: 3s; animation-delay: -1.2s; } .ft.is-seen .ft__star--5 { animation-duration: 3.8s; animation-delay: -.3s; }
  .ft.is-seen .ft__star--6 { animation-duration: 2.9s; animation-delay: -1.7s; } .ft.is-seen .ft__star--7 { animation-duration: 4.4s; animation-delay: -2.6s; }
  .ft__shoot.is-shoot { animation: ft-shoot 1500ms cubic-bezier(.3, .1, .6, 1) both; }
  .ft.is-seen .ft__tag .ft__card { animation: ft-sway 5s ease-in-out infinite alternate; }
  .ft.is-seen .ft__tag:nth-child(2) .ft__card { animation-delay: -1.1s; } .ft.is-seen .ft__tag:nth-child(3) .ft__card { animation-delay: -2.3s; } .ft.is-seen .ft__tag:nth-child(4) .ft__card { animation-delay: -3.4s; }
  .ft__tag:hover .ft__card { animation-play-state: paused; }
  .ft__town.is-awake .ft__breathe { animation: ft-breathe 4.2s ease-in-out infinite alternate; }
  .ft__town.is-awake .ft__z { animation: ft-z 2000ms steps(1, end) infinite; }
  .ft__town.is-awake .ft__z--2 { animation-delay: 667ms; } .ft__town.is-awake .ft__z--3 { animation-delay: 1333ms; }
  .ft__town.is-awake .ft__z--5 { animation-delay: 1000ms; }
}
@keyframes ft-rise { 0% { opacity: 0; transform: translateY(24%); } 20% { opacity: 1; transform: translateY(14%); } 40% { transform: translateY(6%); } 60% { transform: translateY(2%); } 80%, 100% { opacity: 1; transform: none; } }
@keyframes ft-sink { 0% { opacity: 0; transform: translateY(-16%); } 12.5% { opacity: 1; transform: translateY(-12%); } 25% { transform: translateY(-8.5%); } 37.5% { transform: translateY(-5.5%); } 50% { transform: translateY(-3.2%); } 62.5% { transform: translateY(-1.5%); } 75% { transform: translateY(-.5%); } 87.5%, 100% { opacity: 1; transform: none; } }
@keyframes ft-bob { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-12px) rotate(1deg); } }
@keyframes ft-glow { from { opacity: .35; } to { opacity: .85; } }
@keyframes ft-twinkle { from { opacity: .35; } to { opacity: 1; } }
@keyframes ft-shoot { 0% { opacity: 0; translate: 0 0; } 12% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; translate: 36vw 16vw; } }
@keyframes ft-sway { from { transform: rotate(-1.3deg); } to { transform: rotate(1.3deg); } }
@keyframes ft-breathe { from { transform: scale(1); } to { transform: scale(1.025); } }
@keyframes ft-z {
  0% { opacity: 0; transform: translate(0, 10px) scale(.8); } 8.33% { opacity: 1; transform: translate(-2px, 4px) scale(.9); }
  16.67% { transform: translate(-4px, -2px) scale(1); } 25% { transform: translate(-5px, -8px); } 33.33% { transform: translate(-7px, -14px); }
  41.67% { opacity: .9; transform: translate(-8px, -20px); } 50% { opacity: .6; transform: translate(-10px, -26px); } 58.33% { opacity: .3; transform: translate(-11px, -31px); }
  66.67%, 100% { opacity: 0; transform: translate(-12px, -36px); }
}

@media (prefers-reduced-motion: reduce) {
  .ft [data-b], .ft__star, .ft__glow { animation: none !important; opacity: 1 !important; transform: none !important; }
  .ft__glow { opacity: .6 !important; }
  .ft__light, .ft__win { opacity: 0; transition: none !important; }
  .ft__z { opacity: .85; } .ft__z--2 { opacity: .6; } .ft__z--3, .ft__z--5 { opacity: .35; }
  .ft__back, .ft__back img { transition: none; }
}
@media (prefers-contrast: more) {
  .ft__about, .ft__fine { color: #FFFFFF; }
}
@media (forced-colors: active) {
  .ft__town, .ft__sky { display: none; }
  .ft__fine::before, .ft__tag::before { display: none; }
  .ft__card { clip-path: none; border: 1px solid CanvasText; }
}

/* WhatsApp: an icon-only round felt button, bottom-left on desktop (the Suri helper is bottom-right); on phones it sits above the helper */
.wa { display: none; }
.pg .wa { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border-radius: 50%;
  background: #25D366 var(--pk-tex-grain) 0 0 / 256px 256px; background-blend-mode: soft-light; text-decoration: none;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 60, 20, .25), 0 2px 2px rgba(0, 0, 0, .15), 0 14px 26px -12px rgba(0, 0, 0, .5); transition: transform .15s var(--ease-settle, ease); }
.pg .wa::before { content: ""; position: absolute; inset: 4px; border: 2px dashed rgba(255, 255, 255, .55); border-radius: 50%; pointer-events: none; }
.pg .wa svg { width: 32px; height: 32px; position: relative; }
.pg .wa:hover { transform: scale(1.06); } .pg .wa:active { transform: scale(.96); }
.pg .wa:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.wa__tip { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  .pg .wa__tip { display: block; position: absolute; left: calc(100% + 12px); top: 50%; translate: 0 -50%; padding: 9px 14px; border-radius: 8px; white-space: nowrap; pointer-events: none;
    background: #FFF8EA; color: var(--ink); font: 800 14px/1 var(--font-body); box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 10px 18px -8px rgba(0, 0, 0, .5);
    opacity: 0; transform: translateX(-6px); transition: opacity .18s ease, transform .18s var(--ease-settle, ease); }
  .pg .wa__tip::before { content: ""; position: absolute; left: -5px; top: 50%; width: 10px; height: 10px; translate: 0 -50%; rotate: 45deg; background: #FFF8EA; }
  .pg .wa:hover .wa__tip, .pg .wa:focus-visible .wa__tip { opacity: 1; transform: none; }
}
@media (max-width: 760px) { .pg .wa { left: auto; right: max(16px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 76px); } }
@media print { .wa { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .pg .wa, .pg .wa__tip { transition: none; } }

/* Kuru's blanket reads as patchwork felt, stitched, not a flat block */

/* Kuru flies across the night sky (owner 9 Nov: "make it fly in the air"): a slow glide right to left, a gentle bob and tilt */
.ft__fly { position: absolute; z-index: 3; top: 24%; left: 0; width: clamp(64px, 6.5vw, 104px); pointer-events: none; transform: translateX(104vw); }
.ft__fly img { display: block; width: 100%; height: auto; transform: scaleX(-1) rotate(6deg); filter: brightness(.9) drop-shadow(0 10px 14px rgba(0, 0, 0, .35)); }
@media (prefers-reduced-motion: no-preference) {
  .ft__sky.is-awake .ft__fly, .ft__fly { animation: ft-fly 34s linear infinite; }
  .ft__fly img { animation: ft-bob 1.6s ease-in-out infinite alternate; }
}
@keyframes ft-fly { from { transform: translateX(104vw) translateY(0); } 50% { transform: translateX(46vw) translateY(-6vh); } to { transform: translateX(-14vw) translateY(2vh); } }
@keyframes ft-bob { from { transform: scaleX(-1) rotate(3deg) translateY(0); } to { transform: scaleX(-1) rotate(9deg) translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .ft__fly { transform: translateX(62vw) translateY(-3vh); } }

/* the legal strip: three calm columns on a felt label, one column on phones */
.ft__patch { display: grid; grid-template-columns: 1fr 1.5fr 1.1fr; gap: 10px 28px; align-items: start; }
.ft__fine p { margin: 0; font-size: 13.5px; line-height: 1.55; }
.ft__fine p + p { margin-top: 0; }
.ft__legal { font-weight: 700; }
.ft__fine p:nth-child(2) { font-weight: 600; }
.ft__fine p:nth-child(3) { font-weight: 600; opacity: .9; }
@media (max-width: 900px) { .ft__patch { grid-template-columns: 1fr; gap: 8px; } }

/* the Instagram line */
.ft__ig { display: inline-flex; align-items: center; gap: 7px; }
.ft__ig svg { flex: none; }
