/* Hidden Gems page (/gems). Reuses landing.css for the page frame, header, buttons, CTA and footer.
   This file adds the gems-specific bits: a left-aligned page hero, the five locked-road cards, and the
   neighbor picker (a row of standing sprites that swap a single quest-chain panel). */

/* ---------- Page head: a plain, left-aligned title block (deliberately not a sec-head) ---------- */
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: clamp(24px, 5vw, 72px); padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(28px, 4vw, 48px); }
.pagehead-copy { flex: 1 1 0; min-width: 0; }
.pagehead h1 { font-size: clamp(44px, 6.5vw, 76px); line-height: 1; }
.page-anim { flex: none; width: clamp(220px, 26vw, 340px); aspect-ratio: 8 / 5; image-rendering: pixelated; }
.spoiler { margin: 24px 0 0; display: inline-block; padding: 8px 14px 9px; font: 12px/1.5 var(--label); color: var(--muted); background: var(--parch); box-shadow: var(--o2); }
.spoiler::before { content: "🔎 "; }
@media (max-width: 820px) { .page-anim { display: none; } }

/* Second-page tightening: less air than the marketing sections. */
.block.slim { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 64px); }

/* ---------- World quests: five locked roads ---------- */
.worlds { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 2px solid var(--line-dk); border-left: 2px solid var(--line-dk); background: #fffaf080; }
.world { position: relative; padding: 22px 20px; border-right: 2px solid var(--line-dk); border-bottom: 2px solid var(--line-dk); transition: background .2s; }
.world:hover { background: var(--paper); }
.world::before, .world::after { /* pixel corner brackets on hover, like .grid > article */
  content: ""; position: absolute; width: 14px; height: 14px; opacity: 0; transition: opacity .15s steps(2); }
.world::before { left: -2px; top: -2px; border-left: 4px solid var(--wood); border-top: 4px solid var(--wood); }
.world::after { right: -2px; bottom: -2px; border-right: 4px solid var(--wood); border-bottom: 4px solid var(--wood); }
.world:hover::before, .world:hover::after { opacity: 1; }
.w-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.w-icon { font-size: 30px; line-height: 1; filter: saturate(.85); }
.w-badge { flex: none; font: 10px/1 var(--label); color: var(--gold); background: var(--ink); padding: 6px 7px 7px; box-shadow: var(--o2); white-space: nowrap; }
.world h3 { font-size: 19px; margin-bottom: 8px; }
.w-msg { margin: 0; font-size: 13.5px; color: var(--muted); }
@media (max-width: 1080px) { .worlds { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .worlds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .worlds { grid-template-columns: 1fr; } }

/* ---------- Hidden quests: a neighbor picker ---------- */
.gems { max-width: 880px; margin: 0 auto; }

/* The neighbor lineup: a row of standing sprites, like the home page's closing crowd but bigger. */
.cast { overflow-x: auto; margin: 0 auto; padding: 34px 14px 0;
  background:
    linear-gradient(#72bd4a, #72bd4a) bottom 16px left 0 / 100% 4px no-repeat,
    linear-gradient(#4f9632, #4f9632) bottom 0 left 0 / 100% 16px no-repeat,
    linear-gradient(#a8d8f0, #d8efc8);
  box-shadow: var(--o2); }
.cast-in { display: flex; align-items: flex-end; gap: 10px; width: max-content; margin: 0 auto; padding-bottom: 20px; }
.cast-item { position: relative; flex: none; padding: 0; border: 0; background: none; cursor: pointer; }
.cast-item canvas { display: block; image-rendering: pixelated; transition: transform .15s steps(2); }
.cast-item:focus-visible { outline: 2px dashed var(--wood); outline-offset: 3px; }
.cast-name { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -6px); opacity: 0; pointer-events: none;
  padding: 5px 10px 6px; font: 11px/1 var(--label); color: #fff4d6; background: var(--wood); text-shadow: 1px 1px 0 var(--wood-dk);
  box-shadow: var(--o2), inset 0 -2px 0 var(--wood-lo), inset 0 2px 0 var(--wood-hi); white-space: nowrap; transition: opacity .12s steps(2); }
.cast-item:hover canvas { transform: translateY(-6px); }
.cast-item:hover .cast-name, .cast-item:focus-visible .cast-name { opacity: 1; }
.cast-item[aria-selected="true"] canvas { transform: translateY(-6px); }
.cast-item[aria-selected="true"] .cast-name { opacity: 1; }
.cast-item[hidden] { display: none; }

.gems-panel { margin-top: 26px; padding: 22px 22px 24px; background: var(--paper); border: 2px solid var(--line-dk); box-shadow: var(--o2); }
.gems-panel[hidden] { display: none; }
.panel-head { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 2px dashed var(--line); }
.panel-who { flex: 1; min-width: 0; }
.panel-who h3 { font-size: 22px; }
.panel-who .learn { margin: 6px 0 0; font: 12px/1.5 var(--label); color: var(--wood); }
.panel-who .role { margin: 4px 0 0; }
.panel-who .place { border-top: 0; padding-top: 0; margin-top: 2px; }
.panel-count { flex: none; font: 11px/1.4 var(--label); color: var(--gold); background: var(--ink); padding: 7px 9px 8px; box-shadow: var(--o2); white-space: nowrap; }

/* ---------- The quest chain ---------- */
.chain { list-style: none; margin: 0; padding: 0; }
.chain li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding-bottom: 22px; }
.chain li:last-child { padding-bottom: 0; }
.chain li:not(:last-child)::before { /* dashed connector running from badge to badge */
  content: ""; position: absolute; left: 16px; top: 40px; bottom: 2px; border-left: 2px dashed var(--line-dk); }
.chain .num { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; margin: 0; }
.q-title { margin: 0 0 8px; font: 700 18px/1.15 var(--px); }
.unlock { margin: 0 0 10px; font: 11px/1.7 var(--label); color: var(--muted); text-transform: none; letter-spacing: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.chip { font: 11px/1 var(--label); padding: 5px 8px 6px; background: var(--parch); color: var(--ink); box-shadow: var(--o2); }
.reveal { margin: 0; font-size: 14px; font-style: italic; color: var(--muted); }

@media (max-width: 560px) {
  .gems-panel { padding: 18px 16px 20px; }
  .panel-head { gap: 10px; }
}

/* ---------- Gentle reveal as sections scroll in ---------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }
