/* The site footer, "Lantern under the moon" (owner, November 6, 2026: HANDOFF_FOOTER_STORYBOOK, mockup "Footer S2",
   then "all the pages"). One night sky on every public page: a gold moon, twinkling site sparkles, a dark hill with
   Foxy and her books on it, and a centred column of the logo, the Get Foxy's News box, the link chips, the socials
   and the store badges, with the legal line under the hill. tools/build-footer.py writes the markup into each page;
   this file is the only place it is styled. Every rule is scoped to footer.sf so the pages' older footer rules
   (plain `footer { ... }`) lose to it. */

footer.sf {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border-top: 1px solid #2A2340;
  background: radial-gradient(ellipse at 50% 100%, #2A2350 0%, #14102A 45%, #08061A 85%);
  color: #ECE8F7;
  font-family: 'DM Sans', system-ui, sans-serif;
  text-align: left;
}

/* the sky: moon, stars, hill and Foxy are decoration behind the content */
footer.sf .sf-moon {
  position: absolute;
  right: 150px;
  top: 36px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #F6DE97, #D9A94A 70%);
  box-shadow: 0 0 80px rgba(246, 222, 151, 0.45);
  opacity: 0.9;
  pointer-events: none;
  animation: sfMoonGlow 4.5s ease-in-out infinite;
}

/* the moon's glow breathes in and out (owner, November 6, 2026: "make the moon animate pulse glow in the footer") */
@keyframes sfMoonGlow {
  0%, 100% { box-shadow: 0 0 60px 4px rgba(246, 222, 151, 0.35), 0 0 120px 10px rgba(217, 169, 74, 0.12); }
  50% { box-shadow: 0 0 95px 18px rgba(246, 222, 151, 0.6), 0 0 180px 40px rgba(217, 169, 74, 0.25); }
}

footer.sf .sf-star {
  position: absolute;
  line-height: 1;
  color: #F0C866;
  text-shadow: 0 0 6px rgba(240, 200, 102, 0.9), 0 0 14px rgba(212, 168, 67, 0.45);
  pointer-events: none;
  animation: sfTwinkle 3.2s ease-in-out infinite;
}

@keyframes sfTwinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1); }
}

footer.sf .sf-hill {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: 0;
  height: 150px;
  background: #120E24;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  pointer-events: none;
}

footer.sf .sf-foxy {
  position: absolute;
  right: 40px;
  bottom: 60px;
  width: 210px;
  height: auto;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

/* the centred column */
footer.sf .sf-main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 80px 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

footer.sf .sf-logo { display: block; height: 44px; width: auto; }

/* Get Foxy's News */
footer.sf .sf-news {
  width: 560px;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid #5C4E30;
  background: rgba(18, 14, 36, 0.8);
  box-shadow: 0 0 40px rgba(227, 184, 91, 0.12);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

footer.sf .sf-news h2 {
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #E3B85B;
  background: none;
  -webkit-text-fill-color: currentColor;
}

footer.sf .sf-lead { margin: 0; font-size: 13px; line-height: 1.5; color: #B9B1CC; }

/* the homepage still has its older .notify-form / .notify-row rules (flex: 0 1 520px, a column row on phones);
   these put the footer's form back to its own shape on every page */
footer.sf .notify-form { flex: none; display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 0; }
footer.sf .notify-form[hidden] { display: none; }
footer.sf .notify-row { display: flex; flex-direction: row; align-items: center; gap: 8px; } /* the email box keeps its own height beside the taller Notify Me pill */

footer.sf .sf-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

footer.sf .notify-row input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #5C4E30;
  background: #120E24;
  color: #ECE8F7;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

footer.sf .notify-row input::placeholder { color: #8F87A8; }
footer.sf .notify-row input:focus { border-color: #E3B85B; box-shadow: 0 0 0 3px rgba(227, 184, 91, 0.18); }

/* Notify Me wears Vanessa's gold pill plaque (owner, November 11, 2026, HANDOFF_STORYBOOK_BUTTONS.md):
   108 x 51 with 15px Cormorant Garamond 700 ("notify me needs to be smaller", then "notlify smaller"; was
   the handoff's 184 x 87 at 22px, then 130 x 61 at 17px), purple #2A2260, thickened with a hairline stroke */
footer.sf .sf-btn {
  flex: none;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 108px;
  height: 51px;
  padding: 0 0 2px;
  border: 0;
  border-radius: 999px;
  background: image-set(url("/src/resources/buttons/btn-plaque-upload-220.webp") 1x,
                        url("/src/resources/buttons/btn-plaque-upload-440.webp") 2x) center / 100% 100% no-repeat;
  color: #2A2260;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  font-style: normal;
  font-weight: 700;
  -webkit-text-stroke: 0.7px currentColor;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

footer.sf .sf-btn:hover:not([disabled]) { transform: translateY(-2px); filter: brightness(1.06); }
footer.sf .sf-btn:active:not([disabled]) { transform: translateY(0); filter: brightness(0.96); }
footer.sf .sf-btn:focus-visible { outline: 2px solid #F0C866; outline-offset: 3px; }
footer.sf .sf-btn[disabled] { opacity: 0.6; cursor: default; } /* rests disabled until the email is valid, so it stays at its old 0.6, not the pager's 0.45 */

@media (max-width: 768px) {
  footer.sf .sf-btn { width: 104px; height: 49px; font-size: 15px; }
}

footer.sf .notify-status { min-height: 0; font-size: 12.5px; line-height: 1.5; color: #B9B1CC; text-wrap: pretty; }
footer.sf .notify-status:empty { display: none; }
footer.sf .notify-status.ok { color: #F3D58C; }
footer.sf .notify-status.err { color: #F28B82; }

footer.sf .sf-fine { margin: 0; font-size: 11px; line-height: 1.5; color: #8F87A8; }
footer.sf .sf-fine a { color: #E3B85B; text-decoration: underline; }

/* the link chips. The pages style every <nav> as their fixed menu bar, so this one is put back to an ordinary row */
footer.sf nav.sf-chips {
  position: static;
  inset: auto;
  z-index: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: none;
}

footer.sf .sf-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 700px;
}

footer.sf .sf-chips a {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid #5C4E30;
  background: rgba(20, 16, 42, 0.8);
  color: #ECE8F7;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}

footer.sf .sf-chips a:hover, footer.sf .sf-chips a:focus-visible { color: #F3D58C; border-color: #8E7A4C; }

/* socials */
/* bigger since the Follow FoxLeaf section was removed (owner, November 6, 2026: "make the social icons bigger in the
   footer"): 52px circles with 22px icons (were 38px and 16px) */
footer.sf .sf-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

footer.sf .sf-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #5C4E30;
  background: #14102A;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

footer.sf .sf-social a:hover, footer.sf .sf-social a:focus-visible { border-color: #E3B85B; transform: translateY(-1px); }
footer.sf .sf-social svg { display: block; width: 22px; height: 22px; fill: #E3B85B; }

/* the store badge: one component for the hero and the footer (HANDOFF_MOBILE_FIXES, November 9, 2026 item 9): the store's icon, two lines
   ("On the App Store" / "Coming soon"), a dark rounded card with a gold border. Not scoped to the footer, so the homepage
   hero uses it too (this file loads on every page with the footer) */
.fl-store { display: inline-flex; align-items: center; gap: 10px; box-sizing: border-box; padding: 9px 16px; border-radius: 12px;
  border: 1px solid rgba(227, 184, 91, 0.55); background: #11101F; color: #ECE8F7; text-decoration: none; text-align: left;
  box-shadow: 0 0 14px rgba(227, 184, 91, 0.12); font-family: 'DM Sans', sans-serif; transition: border-color 0.2s ease; }
a.fl-store:hover, a.fl-store:focus-visible { border-color: #E3B85B; }
.fl-store svg { flex: none; display: block; width: 20px; height: 20px; color: #E3B85B; fill: currentColor; }
.fl-store-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.fl-store-small { font-size: 11.5px; color: #A9A2C2; white-space: nowrap; }
.fl-store-big { font-size: 15px; font-weight: 600; color: #ECE8F7; white-space: nowrap; }

/* in the footer: side by side, equal widths */
footer.sf .sf-stores { display: flex; flex-wrap: nowrap; justify-content: center; gap: 12px; width: 100%; max-width: 420px; }
footer.sf .sf-stores .fl-store { flex: 1 1 0; min-width: 0; justify-content: center; }

/* the legal line, under the hill */
footer.sf .sf-legal { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 14px 40px 28px; box-sizing: border-box; }
footer.sf .sf-legal p { max-width: 760px; margin: 0; font-size: 12px; line-height: 1.6; color: #8F87A8; }
footer.sf .sf-legal a { color: #E3B85B; text-decoration: none; }

/* phones and tablets: the same stack, a smaller moon, Foxy smaller and below the legal line so she never covers text,
   14 stars standing still, and 44px touch targets */
@media (max-width: 768px) {
  footer.sf .sf-moon { right: 20px; top: 20px; width: 72px; height: 72px; box-shadow: 0 0 50px rgba(246, 222, 151, 0.4); }
  footer.sf .sf-star { animation: none; opacity: 0.8; transform: none; }
  footer.sf .sf-star:nth-of-type(n+15) { display: none; }
  footer.sf .sf-hill { height: 110px; }
  /* Foxy beside the legal line on phones, not under it (owner, November 9, 2026: "move foxy up some in the footer", then
     "foxy needs moved up to be with the text in the footer"): 116px wide, 12px from the right, her bottom level with the
     text's; the text keeps clear of her (its lines end 128px from the right) and the empty room under it is gone */
  footer.sf .sf-foxy { right: 12px; bottom: 20px; width: 116px; }
  footer.sf .sf-main { padding: 56px 16px 16px; gap: 20px; }
  footer.sf .sf-news { width: 100%; padding: 18px; }
  footer.sf .sf-chips a { min-height: 44px; box-sizing: border-box; }
  /* the link chips in an even grid, two equal columns, so the chips line up (owner, November 7, 2026:
     "make the footer pills align better, there is a stray") */
  footer.sf .sf-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 360px; }
  footer.sf .sf-chips a { justify-content: center; }
  /* an odd last chip sits centred under the two columns, the same width as the others (10 chips since DMCA moved to the
     legal line, so none today) */
  footer.sf .sf-chips a:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 4px); }
  footer.sf .sf-social a { width: 48px; height: 48px; }
  footer.sf .sf-social { gap: 10px; }
  footer.sf .sf-legal { padding: 12px 16px 24px; min-height: 120px; box-sizing: border-box; }
  footer.sf .sf-legal p { max-width: calc(100% - 116px); }
}

@media (max-width: 480px) {
  footer.sf .notify-row { flex-direction: column; align-items: stretch; }
  /* the pill keeps its shape on the narrowest phones, centred under the email box */
}

@media (prefers-reduced-motion: reduce) {
  footer.sf .sf-star { animation: none; opacity: 0.8; transform: none; }
  footer.sf .sf-moon { animation: none; }
  footer.sf .sf-social a { transition: none; }
}
