/* PARIUM gated demo — gate + shell chrome (PP-3, #580).
 *
 * The site's light Airbnb-school --p-* system (site/assets/site.css, PP-2 #579): warm
 * off-white ground, warm near-black ink, one amber-clay accent, soft elevated cards,
 * pill CTAs, system-ui humanist stack, zero remote assets. The GAME stays the dark
 * stage moment (handoff §4) — it lives inside the iframe and carries its own canvas.css;
 * this file styles only the studio chrome around it. Mobile-first: 390px composed first,
 * wider viewports centre the same column. Single deliberate LIGHT commit (like the site).
 */

:root {
  --p-ground: #faf6ef;
  --p-card: #fffdf8;
  --p-ink: #292319;
  --p-muted: #6e6558;
  --p-faint: #a89d8c;
  --p-line: rgba(58, 48, 32, 0.14);
  --p-accent: #b45309;
  --p-accent-deep: #8a3e06;
  --p-accent-tint: #f7ead9;
  --p-stage: #0d0b12;
  --p-radius: 22px;
  --p-radius-sm: 14px;
  --p-shadow:
    0 1px 2px rgba(41, 32, 16, 0.05),
    0 12px 32px rgba(41, 32, 16, 0.08);
  --p-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--p-ground);
  color: var(--p-ink);
  font-family: var(--p-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--p-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--p-accent-deep);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--p-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.wordmark {
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 15px;
  color: var(--p-ink);
}

.notice {
  color: var(--p-muted);
  font-size: 13px;
}

.muted {
  color: var(--p-faint);
}

/* ---- gate ---- */

.gate-body {
  display: flex;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gate {
  width: 100%;
  max-width: 400px;
  background: var(--p-card);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow);
  padding: 30px 24px;
  text-align: center;
}

.gate h1 {
  font-size: 26px;
  line-height: 1.2;
  margin: 14px 0 8px;
}

.gate .framing {
  color: var(--p-muted);
  margin: 0 0 20px;
}

.gate form {
  display: grid;
  gap: 10px;
  text-align: left;
  margin-bottom: 18px;
}

.gate label {
  font-size: 13px;
  font-weight: 650;
  color: var(--p-muted);
}

.gate input[type="password"] {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius-sm);
  background: #fff;
  color: var(--p-ink);
  width: 100%;
}

.gate button {
  font: inherit;
  font-weight: 700;
  padding: 12px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--p-accent);
  color: #fff;
  cursor: pointer;
}

.gate button:hover {
  background: var(--p-accent-deep);
}

.gate-error {
  margin: 0;
  color: #a4262c;
  font-size: 14px;
}

/* ---- shell ---- */

.shell-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 16px 6px;
  max-width: 560px;
  margin: 0 auto;
}

.demo-tag {
  font-size: 12px;
  font-weight: 650;
  color: var(--p-accent-deep);
  background: var(--p-accent-tint);
  border-radius: 999px;
  padding: 2px 10px;
}

/* "Switch code" — quiet chrome, not a CTA: end the session, back to the gate. */
.switch-code {
  margin-left: auto;
  align-self: center;
}

.switch-code button {
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  color: var(--p-muted);
  background: var(--p-card);
  border: 1px solid var(--p-line);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
}

.switch-code button:hover {
  color: var(--p-accent-deep);
  border-color: var(--p-accent);
}

.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 12px 8px;
}

.context-line {
  color: var(--p-muted);
  font-size: 13px;
  margin: 4px 4px 10px;
}

/* The dark stage moment: the real canvas, framed. Phone-first height — tall enough for
   stage + both slips without shell scroll fighting the slip scroll. */
.stage-frame {
  background: var(--p-stage);
  border-radius: var(--p-radius-sm);
  overflow: hidden;
  box-shadow: var(--p-shadow);
}

#demo-stage {
  display: block;
  width: 100%;
  height: min(78dvh, 760px);
  min-height: 540px;
  border: 0;
  background: var(--p-stage);
}

.switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 4px 0;
}

.switcher h2 {
  font-size: 13px;
  font-weight: 650;
  color: var(--p-muted);
  margin: 0;
}

.switch {
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  color: var(--p-ink);
  border: 1px solid var(--p-line);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--p-card);
}

.switch.active {
  background: var(--p-accent-tint);
  border-color: var(--p-accent);
  color: var(--p-accent-deep);
}

.panel {
  background: var(--p-card);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow);
  padding: 20px 18px;
  margin: 16px 0 0;
}

.panel h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.panel p,
.panel li {
  color: var(--p-muted);
  font-size: 14px;
}

.panel ul {
  padding-left: 18px;
  margin: 8px 0;
}

.panel li {
  margin-bottom: 8px;
}

.panel strong {
  color: var(--p-ink);
}

.cta {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: var(--p-accent);
  border-radius: 999px;
  padding: 9px 18px;
  margin-top: 4px;
}

.cta:hover {
  background: var(--p-accent-deep);
  color: #fff;
}

.shell-foot {
  max-width: 560px;
  margin: 0 auto;
  padding: 6px 16px 20px;
  text-align: center;
}
