/* ---------- Peel Back the Map (her pick 16B "Moonlit", Dec 1), switched off for now ----------
   Her iCivics research project, a separate site with a peeling orange. Her note: "this is super important and i
   really want to call this out". Her answer on going public: "Build it, keep it hidden".
   THE SWITCH: the class pbtm-on on <html> (index.html, top). Without it every .pbtm is display: none, so nothing shows,
   nothing downloads (the orange is a background image, and hidden elements never fetch theirs) and no layout changes
   (the Carnegie card only spans the row while it's on).
   What it shows when on:
   - after About (Dec 1, her pick): a small capsule of night with her project's own orange glowing in it, between About
     and Entrepreneurship. The opening stays clean.
   - the bar: the orange and the name ("Peel Back the Map" in serif), the orange alone on narrower screens. It shows
     only once About is behind you (html.past-intro, features/pbtm.js).
   - Civics: the Carnegie Youth Fellowship card spans the row and its right half is the project's "museum after dark",
     the orange under a spotlight. The card's left half is exactly a normal card, and every row stays one height.
   Orange is that project's color, so it lives only here. The orange is cut from the project's own render
   (Orange Site, tools/qa/out/peel-1440-1-lit.jpg, 2880px) into images/pbtm-orange.webp (640px, transparent). */
html:not(.pbtm-on) .pbtm { display: none !important; }

.pbtm { text-decoration: none; }
.pbtm-orange { display: block; background: url("../images/pbtm-orange.webp") center / contain no-repeat; }
.pbtm-go > span { display: inline-block; transition: translate 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pbtm:hover .pbtm-go > span { translate: 4px 0; }
.pbtm:focus-visible { outline: 2px solid #F0A050; outline-offset: 3px; }

/* ---- the dancing orange (Dec 1, night) ----
   Bottom right, once About is behind you. Every few seconds it hops, squashes and wiggles. Pointing at it (or focus)
   slides out a small cream label, "Peel Back the Map". Reduced motion: it stays still. */
.pbtm-float { position: fixed; right: clamp(14px, 2vw, 26px); bottom: clamp(60px, 7vh, 84px); z-index: 60; display: flex; align-items: center; gap: 10px; text-decoration: none; opacity: 0; translate: 0 20px; pointer-events: none; transition: opacity 0.5s ease, translate 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
html.past-intro .pbtm-float { opacity: 1; translate: 0 0; pointer-events: auto; }
.pbtm-float .pbtm-orange { flex: none; width: clamp(50px, 4.4vw, 64px); aspect-ratio: 640 / 535; height: auto; transform-origin: 50% 100%; filter: drop-shadow(0 10px 12px rgba(200, 110, 40, 0.35)); }
.pbtm-float .pbtm-tip { padding: 8px 14px 9px; border-radius: 999px; background: rgba(252, 250, 246, 0.96); box-shadow: 0 10px 26px -14px rgba(26, 24, 22, 0.55); color: #1A1816; font: 400 18px/1 var(--serif); white-space: nowrap; opacity: 0; translate: 10px 0; transition: opacity 0.3s ease, translate 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pbtm-float:hover .pbtm-tip, .pbtm-float:focus-visible .pbtm-tip { opacity: 1; translate: 0 0; }
.pbtm-float:focus-visible { outline: none; }
.pbtm-float:focus-visible .pbtm-orange { filter: drop-shadow(0 0 0 #F0A050) drop-shadow(0 10px 12px rgba(200, 110, 40, 0.35)); }
@keyframes pbtm-dance {
  0%, 58%, 100% { transform: translateY(0) rotate(0) scale(1, 1); }
  62% { transform: translateY(0) rotate(0) scale(1.12, 0.86); }
  70% { transform: translateY(-26px) rotate(-14deg) scale(0.94, 1.08); }
  77% { transform: translateY(-30px) rotate(12deg) scale(0.96, 1.05); }
  84% { transform: translateY(0) rotate(-6deg) scale(1.1, 0.9); }
  90% { transform: translateY(-6px) rotate(4deg) scale(1, 1); }
  95% { transform: translateY(0) rotate(0) scale(1.03, 0.97); }
}
html.motion .pbtm-float .pbtm-orange { animation: pbtm-dance 3.6s cubic-bezier(0.3, 0, 0.3, 1) 0.8s infinite; }
html.motion .pbtm-float:hover .pbtm-orange { animation-duration: 1.4s; }
@media (max-width: 760px) { .pbtm-float .pbtm-tip { display: none; } }

/* ---- the bar ---- */
.pbtm-pill { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px; border-radius: 999px; color: var(--ink); white-space: nowrap; transition: background-color 0.25s ease; }
.pbtm-pill:hover { background: none; }   /* her note: no highlight */
html:not(.past-intro) .pbtm-pill { display: none; }
html.motion.past-intro .pbtm-pill { animation: pbtm-pill-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes pbtm-pill-in { from { opacity: 0; scale: 0.6; } }
.pbtm-pill .pbtm-orange { width: 24px; height: 20px; filter: drop-shadow(0 0 5px rgba(240, 160, 80, 0.5)); }
.pbtm-pill .pbtm-txt { font: 400 19px/1 var(--serif); letter-spacing: 0; }
@media (max-width: 1320px) { .pbtm-pill { width: 38px; padding: 0; justify-content: center; } .pbtm-pill .pbtm-txt { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .pbtm-go > span, .pbtm-float, .pbtm-float .pbtm-tip { transition: none; }
  .pbtm-float .pbtm-orange { animation: none !important; }
}

/* ---------- Dec 1, late (her note: "make peel back the map look more appealing") ----------
   A little sticker in the corner: the orange sits on the end of a cream card that always shows its name, with
   "my side project" above it in the serif. The orange still hops now and then, and pointing at it lifts the card and
   tips the orange. Phones show the orange alone. Still off on the live site until pbtm-on. */
.pbtm-float { gap: 0; align-items: center; filter: drop-shadow(0 16px 26px rgba(26, 24, 22, 0.28)); }
.pbtm-float .pbtm-tip { display: grid; gap: 4px; margin-right: -16px; padding: 11px 30px 12px 18px; border-radius: 16px; background: #FFF8EC; box-shadow: inset 0 0 0 1px rgba(232, 140, 60, 0.22); color: #2A2017; opacity: 1; translate: 0 0; transition: translate 0.4s var(--e-out, ease); }
.pbtm-float .pbtm-k { font: italic 400 14px/1 var(--serif); color: #B8662A; }
.pbtm-float .pbtm-n { font: 400 21px/1 var(--serif); white-space: nowrap; }
.pbtm-float .pbtm-n span { font-family: var(--sans); font-size: 0.72em; color: #B8662A; transition: translate 0.4s var(--e-out, ease); display: inline-block; }
.pbtm-float .pbtm-orange { position: relative; z-index: 1; width: clamp(56px, 4.8vw, 70px); transition: rotate 0.45s var(--e-out, ease); }
@media (hover: hover) {
  .pbtm-float:hover .pbtm-tip { translate: 0 -3px; }
  .pbtm-float:hover .pbtm-n span { translate: 4px 0; }
  .pbtm-float:hover .pbtm-orange { rotate: -12deg; }
}
[data-theme="dark"] .pbtm-float .pbtm-tip { background: #2A221B; color: #F4EDE1; box-shadow: inset 0 0 0 1px rgba(240, 160, 80, 0.3); }
[data-theme="dark"] .pbtm-float .pbtm-k, [data-theme="dark"] .pbtm-float .pbtm-n span { color: #F0A860; }
@media (max-width: 760px) { .pbtm-float .pbtm-tip { display: none; } }

/* Dec 2 (her note: "in the top bar the peel back the map looks bad because the icon is ugly"): the photo of the orange is
   replaced by a small drawn one, flat and crisp at bar size: an orange with a quarter peeled back and the peel curling
   off, and a leaf. */
.pbtm-pill .pbtm-ico { flex: none; width: 22px; height: 22px; overflow: visible; }

/* Dec 3 (her note: "whenever the menu bar is down the peel the map logo and thing should be there too"): the pill shows
   whenever the bar does, not only once About is behind you. */
html:not(.past-intro) .pbtm-pill { display: inline-flex; }
