/* ============================================================
   LAUREL & LANTERN INN — innkeepers.css (v21f, 2026-10-19)
   Sunny and Pearl on the home page:
   - "Welcome from the innkeepers", right under the painting:
     Sunny on the left, Pearl on the right side-eyeing him,
     their short exchange between them.
   - Sunny's front-door card: a small card in the bottom corner
     after the lanterns, one greeting a day.
   Motion: Pearl blinks now and then, Sunny wags. Both are soft
   crossfades between Erica's matching poses, never a flash, and
   both hold still when "Still the house" is on or the device asks
   for reduced motion.
   ============================================================ */

/* ---------- the welcome ---------- */
.innkeepers { margin-top: 56px; text-align: center; }
.innkeepers h2 { margin-bottom: 26px; }
.ik-row {
  display: grid; grid-template-columns: minmax(120px, 230px) minmax(0, 520px) minmax(120px, 230px);
  justify-content: center; align-items: end; gap: 10px 28px;
}
.ik-figure { position: relative; margin: 0; }
.ik-figure .ik-stack { position: relative; aspect-ratio: var(--ar); width: 100%; }
.ik-figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ik-figure img + img { opacity: 0; }
.ik-figure::after { /* a soft pool of lamplight under each innkeeper */
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -6px; height: 18px; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(255, 153, 51, 0.28), rgba(255, 153, 51, 0) 70%);
}
.ik-pearl { --ar: 397 / 560; }
.ik-sunny { --ar: 433 / 560; }
.ik-talk { list-style: none; margin: 0; padding: 0; text-align: left; align-self: center; }
.ik-talk li { display: grid; grid-template-columns: 4.6em 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(204, 153, 102, 0.16); }
.ik-talk li:last-child { border-bottom: 0; }
.ik-who { font-family: var(--serif-caps); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; padding-top: 0.35em; }
.ik-who.is-sunny { color: var(--amber); }
.ik-who.is-pearl { color: #8FC9C4; }
.ik-line { font-family: var(--serif-display); font-size: 1.22rem; line-height: 1.42; color: var(--parchment); }
.ik-line.is-pearl { font-style: italic; color: var(--parchment-dim); }

/* motion, only once the extra poses have loaded (html.ik-ready, set by js/innkeepers.js).
   Exactly one pose shows at a time, so no outline of another pose ever peeks out.
   Pearl (22.5 s): three slow blinks (open, half, closed, half, open, about half a second each)
   and one unimpressed look. Sunny (6 s): two soft wags. Generated timings; nothing flashes. */
@media (prefers-reduced-motion: no-preference) {
  html.ik-ready:not(.is-still) .ik-pearl .f-base { animation: pearl-base 22.5s linear infinite; }
  html.ik-ready:not(.is-still) .ik-pearl .f-half { animation: pearl-half 22.5s linear infinite; }
  html.ik-ready:not(.is-still) .ik-pearl .f-closed { animation: pearl-closed 22.5s linear infinite; }
  html.ik-ready:not(.is-still) .ik-pearl .f-unimpressed { animation: pearl-look 22.5s linear infinite; }
  html.ik-ready:not(.is-still) .ik-sunny .f-base { animation: sunny-base 6s linear infinite; }
  html.ik-ready:not(.is-still) .ik-sunny .f-wag { animation: sunny-wag 6s linear infinite; }
}

@keyframes pearl-base {
  0.0000% { opacity: 1; }
  28.5778% { opacity: 1; }
  28.6667% { opacity: 0; }
  30.7111% { opacity: 0; }
  30.8000% { opacity: 1; }
  37.2444% { opacity: 1; }
  37.3333% { opacity: 0; }
  48.8889% { opacity: 0; }
  48.9778% { opacity: 1; }
  61.9111% { opacity: 1; }
  62.0000% { opacity: 0; }
  64.0444% { opacity: 0; }
  64.1333% { opacity: 1; }
  95.2444% { opacity: 1; }
  95.3333% { opacity: 0; }
  97.3778% { opacity: 0; }
  97.4667% { opacity: 1; }
  100.0000% { opacity: 1; }
}
@keyframes pearl-half {
  0.0000% { opacity: 0; }
  28.5778% { opacity: 0; }
  28.6667% { opacity: 1; }
  29.1556% { opacity: 1; }
  29.2444% { opacity: 0; }
  30.1333% { opacity: 0; }
  30.2222% { opacity: 1; }
  30.7111% { opacity: 1; }
  30.8000% { opacity: 0; }
  61.9111% { opacity: 0; }
  62.0000% { opacity: 1; }
  62.4889% { opacity: 1; }
  62.5778% { opacity: 0; }
  63.4667% { opacity: 0; }
  63.5556% { opacity: 1; }
  64.0444% { opacity: 1; }
  64.1333% { opacity: 0; }
  95.2444% { opacity: 0; }
  95.3333% { opacity: 1; }
  95.8222% { opacity: 1; }
  95.9111% { opacity: 0; }
  96.8000% { opacity: 0; }
  96.8889% { opacity: 1; }
  97.3778% { opacity: 1; }
  97.4667% { opacity: 0; }
  100.0000% { opacity: 0; }
}
@keyframes pearl-closed {
  0.0000% { opacity: 0; }
  29.1556% { opacity: 0; }
  29.2444% { opacity: 1; }
  30.1333% { opacity: 1; }
  30.2222% { opacity: 0; }
  62.4889% { opacity: 0; }
  62.5778% { opacity: 1; }
  63.4667% { opacity: 1; }
  63.5556% { opacity: 0; }
  95.8222% { opacity: 0; }
  95.9111% { opacity: 1; }
  96.8000% { opacity: 1; }
  96.8889% { opacity: 0; }
  100.0000% { opacity: 0; }
}
@keyframes pearl-look {
  0.0000% { opacity: 0; }
  35.7778% { opacity: 0; }
  37.3333% { opacity: 1; }
  48.8889% { opacity: 1; }
  50.4444% { opacity: 0; }
  100.0000% { opacity: 0; }
}
@keyframes sunny-base {
  0.0000% { opacity: 1; }
  73.0000% { opacity: 1; }
  73.3333% { opacity: 0; }
  79.1667% { opacity: 0; }
  79.5000% { opacity: 1; }
  84.6667% { opacity: 1; }
  85.0000% { opacity: 0; }
  90.8333% { opacity: 0; }
  91.1667% { opacity: 1; }
  100.0000% { opacity: 1; }
}
@keyframes sunny-wag {
  0.0000% { opacity: 0; }
  73.0000% { opacity: 0; }
  73.3333% { opacity: 1; }
  79.1667% { opacity: 1; }
  79.5000% { opacity: 0; }
  84.6667% { opacity: 0; }
  85.0000% { opacity: 1; }
  90.8333% { opacity: 1; }
  91.1667% { opacity: 0; }
  100.0000% { opacity: 0; }
}

@media (max-width: 760px) {
  .ik-row { grid-template-columns: 1fr 1fr; gap: 6px 18px; max-width: 420px; margin: 0 auto; }
  .ik-talk { grid-column: 1 / -1; grid-row: 2; margin-top: 14px; }
  .ik-line { font-size: 1.12rem; }
}

/* ---------- Sunny's front-door card ---------- */
.greet {
  position: fixed; left: 18px; bottom: 18px; z-index: 70;
  width: min(380px, calc(100vw - 36px));
  padding: 16px 44px 16px 118px;
  background: linear-gradient(180deg, #2D0B2C, #160016);
  border: 1px solid rgba(204, 153, 102, 0.55); border-radius: 18px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55), 0 0 30px rgba(255, 153, 51, 0.12);
  color: var(--parchment);
}
.greet[hidden] { display: none; }
html:not(.is-still) .greet.is-in { animation: greet-in 0.6s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes greet-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
/* Sunny peeks up over the top edge of his card */
.greet-peek {
  position: absolute; left: 6px; top: -52px; width: 112px; height: auto;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 96%); mask-image: linear-gradient(180deg, #000 62%, transparent 96%);
}
.greet-label { font-family: var(--serif-caps); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--copper); margin: 0 0 4px; }
.greet-text { font-family: var(--serif-display); font-size: 1.12rem; line-height: 1.38; margin: 0; }
.greet-sign { margin: 6px 0 0; font-style: italic; color: var(--parchment-dim); }
.greet-sign::before { content: "\2014\00a0"; }
.greet-go {
  margin-top: 10px; font-family: var(--serif-caps); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--amber); background: none; border: 1px solid rgba(255, 153, 51, 0.45); border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
.greet-x {
  position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: none; color: var(--parchment-dim); font-size: 1.35rem; line-height: 1; cursor: pointer;
}
.greet-go:hover, .greet-go:focus-visible, .greet-x:hover, .greet-x:focus-visible { color: var(--parchment); }
.greet-go:hover, .greet-go:focus-visible { border-color: var(--amber); }
@media (max-width: 520px) {
  .greet { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 14px 40px 14px 96px; }
  .greet-peek { width: 92px; top: -38px; left: 4px; }
  .greet-text { font-size: 1.04rem; }
}

/* ---------- v21g: the innkeepers' tip jars (bottom of the home page) ---------- */
.tips { margin-top: 64px; margin-bottom: 24px; }
.tips > .orn { text-align: center; }
.tips-row { display: grid; grid-template-columns: minmax(180px, 320px) minmax(0, 520px); justify-content: center; align-items: center; gap: 18px 40px; }
.tips-pic { width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, #000 78%, transparent 100%); }
.tips-copy h2 { margin: 0 0 10px; text-align: left; }
.tips-copy p { margin: 0 0 12px; color: var(--parchment-dim); font-size: 1.12rem; line-height: 1.5; }
.tips-jars { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px !important; }
.tips-note { font-size: 0.92rem !important; font-style: italic; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .tips-row { grid-template-columns: 1fr; text-align: center; max-width: 440px; margin: 0 auto; }
  .tips-pic { max-width: 260px; margin: 0 auto; }
  .tips-copy h2 { text-align: center; }
  .tips-jars { justify-content: center; }
}
