/* Lobby doors and the 3D figure. Scoped to the stage home.
   A door's signifier is always the same: gold handle on the right,
   the word Open on the plaque. Hover swings the slab on its hinge. */

.overture.lobby {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 8px 28px;
  align-items: center;
  text-align: left;
  padding: clamp(18px, 3vh, 36px) 0 clamp(12px, 2vh, 24px);
}
.overture.lobby .ring { left: 22%; top: 46%; width: min(78vw, 560px); }
.overture.lobby .stagefront { width: 100%; height: clamp(280px, 42vh, 420px); margin: 0; }
.overture.lobby .intro .cue { margin-bottom: 8px; }
.overture.lobby .marquee { font-size: clamp(2.6rem, 6.4vw, 5rem); letter-spacing: .04em; }
.overture.lobby .billing { margin: 12px 0 0; max-width: 36em; }
.overture.lobby .status { margin: 16px 0 0; }
.door-cue { margin: 18px 0 10px; color: var(--st-muted); font-size: .92rem; }
.door-cue .cue { margin-right: 8px; }

/* ---------- Norman doors ---------- */
.lobby-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lobby-rest { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ndoor {
  display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 12px; align-items: center;
  text-decoration: none; color: var(--st-ink);
  padding: 10px; border-radius: 16px;
  border: 1px solid rgb(232 193 112 / .28);
  background: rgb(13 17 48 / .62);
  transition: border-color .25s, transform .35s var(--ease);
}
.ndoor.feature { grid-template-columns: 132px minmax(0, 1fr); }
.ndoor.compact { grid-template-columns: 1fr; align-items: stretch; padding: 10px 10px 12px; }
.ndoor:hover, .ndoor:focus-visible {
  border-color: rgb(232 193 112 / .7);
  transform: translateY(-3px);
  outline: none; color: #fff;
}
.ndoor:focus-visible { outline: 2px solid var(--st-gold); outline-offset: 3px; }
.door3d { position: relative; height: 158px; perspective: 640px; }
.ndoor.compact .door3d { height: 126px; }
.jamb {
  position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(90deg, #5a3e22, #1a120c 14%, #1a120c 86%, #5a3e22);
  box-shadow: inset 0 0 0 5px #2c1e12, 0 10px 18px rgb(0 0 0 / .35);
}
.slab {
  position: absolute; inset: 7px 8px 7px 9px;
  border-radius: 3px 7px 7px 3px;
  transform-origin: left center;
  transition: transform .55s var(--ease);
  background: #12383c;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / .08), 6px 0 14px rgb(0 0 0 / .28);
}
.slab.civic { background: linear-gradient(180deg, #145e66, #0c3e46); }
.slab.cook { background: linear-gradient(180deg, #3a2a18, #24180e 60%, #1a120c); }
.slab.wiki { background: linear-gradient(180deg, #2a2458, #1a1640); }
.slab.fraud { background: linear-gradient(180deg, #5a2348, #3a1430); }
.slab.frame { background: linear-gradient(180deg, #3a3420, #242014); }
.slab.palmdoor { background: linear-gradient(180deg, #145c38, #0c3020); }
.ndoor:hover .slab, .ndoor:focus-visible .slab { transform: rotateY(-36deg); }
.plaque {
  position: absolute; left: 10px; right: 28px; top: 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.kicker {
  font: 700 .58rem/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--st-gold-2);
}
.dname {
  font-family: var(--st-serif); font-size: .95rem; line-height: 1.15; color: #fff;
}
.ndoor.compact .dname { font-size: .84rem; }
.handle {
  position: absolute; right: 9px; top: 46%; width: 8px; height: 32px; border-radius: 5px;
  background: linear-gradient(#fff6d8, #e8c170 42%, #a8742e);
  box-shadow: 1px 2px 0 #5a3d14;
}
.handle::before {
  content: ""; position: absolute; left: -5px; top: 11px; width: 18px; height: 8px; border-radius: 2px;
  background: linear-gradient(#f6e3a8, #b8893a);
}
.blurb { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.blurb .tag { font: 600 .6rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--st-teal); }
.blurb strong { font-family: var(--st-serif); font-weight: 500; font-size: 1.15rem; color: #fff; }
.ndoor.compact .blurb strong { font-size: 1rem; }
.blurb span:not(.tag):not(.go) { color: var(--st-muted); font-size: .86rem; line-height: 1.4; }
.blurb .go { margin-top: 4px; font: 700 .68rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--st-gold-2); }
.ndoor:hover .go { color: #fff; }

.palm { position: absolute; right: -6px; top: -22px; width: 64px; height: 86px; pointer-events: none; }
.palm svg { width: 100%; height: 72px; overflow: visible; }
.palm .trunk { fill: none; stroke: #6b4424; stroke-width: 4; stroke-linecap: round; }
.palm .crown path { fill: none; stroke: #3ddc7a; stroke-width: 2.6; stroke-linecap: round; transform-origin: 40px 50px; }
.nut {
  position: absolute; left: 16px; top: 34px; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f6e3a8, #8a5a24 72%);
}
.nut.b { left: 36px; }

.doors-more { padding-top: 10px; }
.record { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 18px 0 0; font: 600 .78rem/1 var(--mono); }
.record a { color: var(--st-gold-2); text-decoration: none; border-bottom: 1px solid rgb(232 193 112 / .35); }
.record a:hover { color: #fff; }

/* ---------- a room behind a door ---------- */
.room-show { max-width: 760px; padding-top: 28px; }
.back {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font: 600 .74rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--st-gold-2); text-decoration: none;
}
.room-show h1 {
  margin: 8px 0 0; font-family: var(--st-serif); font-weight: 500; letter-spacing: .03em;
  font-size: clamp(2rem, 5vw, 3.2rem); color: #fff;
}
.lede { margin: 14px 0 0; max-width: 42em; color: var(--st-muted); font-size: 1.05rem; line-height: 1.65; }
.lede b { color: var(--st-ink); font-weight: 600; }
.pathnote { margin: 10px 0 0; font: 500 .82rem/1.5 var(--mono); color: var(--st-teal); }
/* suit pages: suit switcher, proof list, rule lines, one ask */
.room-show .viewbar { margin: 0 0 26px; }
@media (max-width: 480px) { .room-show .vb-seg { flex-wrap: nowrap; } .room-show .vb-seg a { padding: 7px 6px; font-size: .66rem; white-space: nowrap; } }
.proof { list-style: none; margin: 22px 0 0; padding: 0; max-width: 42em; display: grid; gap: 12px; }
.proof li { padding-left: 16px; border-left: 2px solid rgb(232 193 112 / .4); color: var(--st-muted); line-height: 1.6; }
.proof li b { color: var(--st-ink); font-weight: 600; }
.proof a, .rule a, .all-link a { color: var(--st-gold-2); text-decoration: none; border-bottom: 1px solid rgb(232 193 112 / .35); }
.proof a:hover, .rule a:hover, .all-link a:hover { color: #fff; }
.rule { margin: 16px 0 0; max-width: 42em; font: 500 .8rem/1.6 var(--mono); color: var(--st-muted); }
.ask { margin: 28px 0 0; font-family: var(--st-serif); font-size: 1.3rem; color: #fff; }
.room-show .ask + .room-actions .cta { margin-left: 0; margin-top: 12px; }
.all-link { margin: 22px 0 0; font: 600 .8rem/1 var(--mono); }
.room-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.next-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.next-doors a {
  display: block; text-decoration: none; color: var(--st-ink);
  padding: 14px 14px 12px; border-radius: 12px;
  border: 1px solid rgb(232 193 112 / .24); background: rgb(13 17 48 / .55);
}
.next-doors a:hover, .next-doors a:focus-visible { border-color: rgb(232 193 112 / .65); color: #fff; outline: none; }
.next-doors .kicker { display: block; margin-bottom: 6px; }
.next-doors strong { display: block; font-family: var(--st-serif); font-weight: 500; font-size: 1.05rem; }

@media (max-width: 860px) {
  body.stage-home { --house-h: 48px; }
  .overture.lobby { grid-template-columns: 1fr; text-align: center; padding-top: 8px; }
  .overture.lobby .ring { left: 50%; top: 18%; width: min(92vw, 420px); }
  .overture.lobby .stagefront { height: 188px; margin-top: 4px; }
  .overture.lobby .marquee { font-size: clamp(2.2rem, 12vw, 3.2rem); }
  .overture.lobby .billing { font-size: 1.05rem; }
  .overture.lobby .billing, .overture.lobby .status { margin-left: auto; margin-right: auto; }
  .lobby-feature, .lobby-rest, .next-doors { grid-template-columns: 1fr 1fr; }
  .actor { left: 58%; transform: translateX(-50%) scale(.56); transform-origin: 50% 100%; }
  body.stage-home .console .meta { display: none; }
  .stagefront .freq { display: none; }
}
@media (max-width: 560px) {
  .lobby-feature, .lobby-rest, .next-doors { grid-template-columns: 1fr; }
  .ndoor.compact { grid-template-columns: 96px minmax(0, 1fr); align-items: center; }
  .ndoor.compact .door3d { height: 112px; }
}

@media (prefers-reduced-motion: no-preference) {
  .turn { animation: yaw 12s ease-in-out infinite alternate; }
  .hero-palm .crown path { animation: frond 3.2s ease-in-out infinite alternate; }
  .hero-palm .crown path:nth-child(even) { animation-delay: -1.2s; animation-direction: alternate-reverse; }
  .hero-palm .coco.c1 { animation: dropcoco 3.4s ease-in infinite; }
  .hero-palm .coco.c2 { animation: dropcoco 3.4s ease-in 1.4s infinite; }
  .palm .crown path { animation: frond 2.8s ease-in-out infinite alternate; }
  .palm .crown path:nth-child(even) { animation-direction: alternate-reverse; }
  .nut { animation: nutdrop 2.7s ease-in infinite; }
  .nut.b { animation-delay: 1.15s; }
}
@keyframes yaw { from { transform: rotateY(-30deg) rotateX(4deg); } to { transform: rotateY(24deg) rotateX(2deg); } }
@keyframes frond { from { transform: rotate(-5deg); } to { transform: rotate(6deg); } }
@keyframes dropcoco {
  0% { transform: translateY(0); opacity: 0; }
  14% { opacity: 1; }
  80% { transform: translateY(96px); opacity: 1; }
  100% { transform: translateY(110px); opacity: 0; }
}
@keyframes nutdrop {
  0% { transform: translateY(0) scale(.7); opacity: 0; }
  16% { opacity: 1; }
  76% { transform: translateY(64px) scale(1); opacity: 1; }
  100% { transform: translateY(76px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .turn { transform: rotateY(-18deg) rotateX(4deg); }
  .ndoor:hover .slab, .ndoor:focus-visible .slab { transform: none; }
  .ndoor:hover { transform: none; }
}
