/* Lobby landing page: page chrome, the framed painting, room cards. Tokens in tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 15px; line-height: 1.5; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 20px; padding-block: 0 56px; }

/* ---------- header */
.site-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-block: 34px 8px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { margin: 0; font-size: 30px; font-weight: 650; letter-spacing: -0.02em; font-family: Georgia, "Times New Roman", serif; }
.mark { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none; }
.tagline { margin: 8px 0 0; color: var(--ink-2); max-width: 64ch; }
.btn-ghost { font: inherit; font-size: 12px; color: var(--ink-2); background: transparent; border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 10px; cursor: pointer; flex: none; }
.btn-ghost:hover { border-color: var(--axis); color: var(--ink); }

/* ---------- the painting */
.painting { margin-top: 22px; }
.frame { padding: 16px; border-radius: 4px;
  background: linear-gradient(135deg, #c79a3f 0%, #f0d58a 22%, #b7852e 48%, #e9c96f 74%, #a9761f 100%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(80, 50, 0, 0.35), inset 0 0 0 6px rgba(255, 235, 170, 0.35); }
.mat { padding: 10px; background: #efe6d2; box-shadow: inset 0 0 0 1px rgba(60, 40, 10, 0.35); }
.plate-caption { margin: 16px auto 0; max-width: 100%; width: max-content; text-align: center;
  background: linear-gradient(180deg, #e9c96f, #b7852e); color: #2b2416; font-family: Georgia, "Times New Roman", serif;
  font-size: 13px; letter-spacing: 0.04em; padding: 6px 18px; border-radius: 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }

/* the stage: drawn painting underneath, optional photo on top, hotspot overlay above both */
.stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #1c1a16; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4); }
.stage > img, .stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage > img { object-fit: cover; }
#hotspot-layer { pointer-events: none; }
#hotspot-layer .hotspot { pointer-events: all; cursor: pointer; outline: none; }
.hotspot .hit { fill: transparent; }
.hotspot .area { fill: #ffd98a; opacity: 0; transition: opacity 0.25s; filter: url(#bloomO); }
.hotspot .edge { fill: none; stroke: #ffe9b0; stroke-width: 1.5; opacity: 0; transition: opacity 0.25s; }
.hotspot:hover .area, .hotspot:focus-visible .area { opacity: 0.32; }
.hotspot:hover .edge, .hotspot:focus-visible .edge { opacity: 0.8; }
.hotspot .plate { opacity: 0.86; transition: opacity 0.25s; }
.hotspot:hover .plate, .hotspot:focus-visible .plate { opacity: 1; }
.hotspot .plate rect { fill: #2b2416; fill-opacity: 0.82; stroke: #d9b45c; stroke-opacity: 0.75; }
.hotspot .plate text { fill: #f3e6c8; font-size: 13px; font-weight: 600; font-family: Georgia, "Times New Roman", serif; letter-spacing: 0.02em; }
.hotspot .plate use { color: #e8c877; }
.hotspot.unlocked .plate rect { stroke: #9ed17f; }
.hotspot:focus-visible .hit { stroke: #ffe9a8; stroke-width: 3; }
/* open the page with #calibrate to see every hotspot box while aligning a new castle.jpg */
#hotspot-layer.calibrate .edge { opacity: 0.9; stroke: #ff5a5a; }
#hotspot-layer.calibrate .area { opacity: 0.18; }

/* ---------- room cards */
.rooms { margin-top: 30px; }
.rooms h2 { font-size: 18px; margin: 0 0 4px; }
.rooms .lead { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }
.r-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; }
.r-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.r-card.gate-card { border-color: var(--accent); }
.r-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.r-card h3 { margin: 0; font-size: 16px; font-family: Georgia, "Times New Roman", serif; }
.r-place { margin: 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.r-card p { margin: 0; font-size: 14px; color: var(--ink-2); }
.r-card .why { font-size: 13px; color: var(--muted); font-style: italic; flex: 1; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge.open { background: var(--accent-soft); color: var(--ink); }
.badge.locked { border: 1px solid var(--axis); color: var(--muted); }
.badge.unlocked { border: 1px solid var(--good); color: var(--good); }
.r-card .enter { align-self: flex-start; margin-top: 6px; font: inherit; font-weight: 600; font-size: 14px; color: var(--accent);
  background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.r-card .enter:hover { text-decoration: underline; }

/* ---------- how it fits together */
.how { margin-top: 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.how .step { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--ink-2); }
.how .step b { display: block; color: var(--ink); margin-bottom: 4px; }
footer { margin-top: 34px; color: var(--muted); font-size: 12px; }
footer p { margin: 6px 0; }
@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .brand h1 { font-size: 26px; }
  .frame { padding: 8px; }
  .mat { padding: 5px; }
}
