/* The plain sections after the story: destination wall, films strip and player, koi ending. */

/* overflow-x: clip, because the stamp-press animation swings wider than the page for a moment */
.plain { padding-top: 64px; padding-bottom: 24px; scroll-margin-top: var(--hdr); overflow-x: clip; }
.plain .lede { color: var(--grey-text); }

/* ---------- destination wall: 5 columns, 3 under 640 px; scenes are whole-number scaled by stamps.js ---------- */
.stamps { display: grid; grid-template-columns: repeat(5, calc(var(--ww, 72px) + 28px)); justify-content: space-between; gap: 26px 12px; padding: 6px 0 10px; }
.stamp { display: block; margin: 0; text-decoration: none; color: var(--ink); filter: drop-shadow(4px 4px 0 var(--ink)); transition: transform 0.12s steps(3); }
.stamp .face {
  display: flex; flex-direction: column; align-items: center; padding: 14px 14px 0; background: var(--white);
  /* perforated edge: a 6 px band of square teeth around a solid middle */
  -webkit-mask: linear-gradient(#000 0 0) center / calc(100% - 12px) calc(100% - 12px) no-repeat,
                conic-gradient(#000 25%, #0000 0 50%, #000 0 75%, #0000 0) 0 0 / 12px 12px;
  mask: linear-gradient(#000 0 0) center / calc(100% - 12px) calc(100% - 12px) no-repeat,
        conic-gradient(#000 25%, #0000 0 50%, #000 0 75%, #0000 0) 0 0 / 12px 12px;
}
.stamp .win { display: flex; align-items: center; justify-content: center; width: var(--ww, 72px); height: var(--wh, 66px); outline: 3px solid var(--ink); background: var(--paper); line-height: 0; overflow: hidden; }
.stamp .win canvas { flex: none; max-width: none; width: var(--ww, 72px); height: var(--wh, 66px); }
/* every caption box is the same height: two lines of text, never a taller stamp for a longer name */
.stamp .cap { display: flex; justify-content: space-between; align-items: center; gap: 6px; width: 100%; height: calc(2 * 1.15em + 22px); padding: 10px 2px 12px; font: 400 0.7rem/1.15 var(--font-pixel); text-transform: uppercase; }
.stamp .cap span { min-width: 0; overflow-wrap: break-word; }
.stamp .cap b { flex: none; font: 400 1rem/1 var(--font-display); text-transform: none; }
.stamp:hover, .stamp:focus-visible { transform: translate(-3px, -4px) rotate(-1.5deg); }
.stamp:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.stamp.arm:not(.in) { opacity: 0; }
.stamp.in { animation: press 0.5s steps(4) backwards; }
@keyframes press {
  0% { opacity: 0; transform: translateY(-40px) scale(1.7) rotate(9deg); }
  60% { opacity: 1; transform: none; }
  70% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
  90% { transform: translateX(-2px); }
  100% { transform: none; }
}
@media (max-width: 639px) {
  .stamps { grid-template-columns: repeat(3, calc(var(--ww, 72px) + 20px)); gap: 18px 6px; }
  .stamp .face { padding: 10px 10px 0; }
  /* phones: the name takes up to two lines, the eSIM tag sits under it */
  .stamp .cap { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; height: calc(2 * 1.15em + 1.4rem + 22px); padding: 8px 0 10px; font-size: 0.55rem; }
  .stamp .cap b { font-size: 0.75rem; }
}
.plain .more { text-align: center; }

/* ---------- films strip ---------- */
.films-wrap { position: relative; display: flex; align-items: center; gap: 10px; }
.films {
  flex: 1; min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 16px; margin: 0; padding: 4px 4px 14px 4px;
  list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 4px;
}
.films li { scroll-snap-align: start; margin: 0; }
.film {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 100%; min-height: 240px; padding: 12px 10px 12px;
  border: var(--border); box-shadow: var(--shadow); background: var(--lavender); color: var(--ink); text-decoration: none;
}
.films li:nth-child(3n+2) .film { background: var(--lime); }
.films li:nth-child(3n) .film { background: var(--orange); }
.film::before { content: ""; position: absolute; top: 14px; left: 14px; width: 0; height: 0; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent var(--ink); }
.film:hover { transform: translate(-2px, -2px); }
.film:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.film-title { font: 400 1.05rem/1.15 var(--font-display); }
.film-line { font-size: 0.82rem; line-height: 1.3; color: var(--ink); }
.strip-btn { display: none; flex: none; width: 44px; height: 44px; border: var(--border); background: var(--lime); box-shadow: 3px 3px 0 var(--ink); font: 400 1.6rem/1 var(--font-display); color: var(--ink); cursor: pointer; }
.strip-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
@media (min-width: 900px) and (hover: hover) { .strip-btn { display: block; } }

/* ---------- film player ---------- */
html.lb-open body { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(17, 17, 17, 0.92); }
.lb-frame { position: relative; width: min(92vw, calc((100dvh - 190px) * 9 / 16), 420px); display: flex; flex-direction: column; gap: 12px; }
.lb-video { aspect-ratio: 9 / 16; border: 3px solid var(--white); box-shadow: 8px 8px 0 var(--lavender); background: var(--ink); }
.lb-video video, .lb-video iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.lb-x { position: absolute; top: -14px; right: -14px; z-index: 2; width: 44px; height: 44px; border: var(--border); background: var(--lime); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); font: 400 1.2rem/1 var(--font-pixel); cursor: pointer; }
.lb-meta { display: grid; grid-template-columns: 44px 1fr 44px; gap: 10px; align-items: center; color: var(--white); text-align: center; }
.lb-title { margin: 0 auto; font: 400 1.2rem/1.2 var(--font-display); }
.lb-line { margin: 4px auto 0; font-size: 0.9rem; color: var(--mute); }
.lb-nav { width: 44px; height: 44px; border: 2px solid var(--white); background: transparent; color: var(--white); font: 400 1.5rem/1 var(--font-display); cursor: pointer; }
.lb button:focus-visible, .lb a:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.lb-yt { align-self: center; padding: 10px 14px; border: var(--border); background: var(--white); color: var(--ink); box-shadow: 3px 3px 0 var(--lime); font: 400 0.75rem/1 var(--font-pixel); text-transform: uppercase; text-decoration: none; }

/* ---------- ending: the koi pond ---------- */
.koi-end { position: relative; display: grid; gap: 14px; justify-items: start; padding-bottom: 64px; }
.koi-end .pond { justify-self: stretch; display: flex; justify-content: center; overflow: hidden; border: var(--border); box-shadow: 6px 6px 0 var(--orange); background: var(--blue); cursor: pointer; touch-action: manipulation; }
.koi-end .pond canvas { display: block; flex: none; }
.koi-end .hint { margin: 0; font: 400 0.7rem/1 var(--font-pixel); text-transform: uppercase; color: var(--grey-text); }
.koi-end h2 { margin: 6px 0 0; }
.koi-end .cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.koi-end .toast { position: fixed; bottom: 28px; }

/* ---------- FAQ cards (home and FAQ page) ---------- */
.faq { display: grid; gap: 12px; }
.faq details { border: var(--border); background: var(--white); box-shadow: var(--shadow-sm); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px 16px; font-weight: 700; line-height: 1.35; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--lime); font: 400 0.9rem/1 var(--font-pixel); }
.faq details[open] summary::after { content: "-"; }
.faq details p { margin: 0; padding: 0 16px 16px; }
.faq-group { margin-bottom: 22px; }
