@font-face { font-family: 'MuseoModerno'; src: url(../assets/museomoderno-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
:root {
  --ink: #2b2a26;
  --grey: #b6b6b3;
  --soft: #f3f2ef;
  --line: #d6d5d1;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #fff; overflow: hidden; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); }
.hidden { display: none !important; }

#stage { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#portal { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#fallback { position: fixed; left: 0; right: 0; top: 28vh; margin: 0; text-align: center; font: 700 clamp(48px, 12vw, 120px) 'Sora', sans-serif; color: var(--grey); letter-spacing: -.03em; }

/* the three options, under the portal in the wordmark's own grey + face; they fade in one after another */
#menu { position: absolute; left: 50%; top: 70vh; transform: translateX(-50%); z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0; }
#menu .opt {
  appearance: none; border: 0; background: transparent; cursor: pointer; font: 700 clamp(28px, 2.7vw, 36px)/1 'MuseoModerno', 'Sora', sans-serif; letter-spacing: .005em;
  color: var(--grey); padding: 7px 24px; white-space: nowrap; pointer-events: auto; opacity: 0; transform: translateY(12px);
  transition: color .25s, opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1);
}
#menu .opt:hover, #menu .opt:focus-visible, #menu .opt.on { color: #8f8f8b; outline: none; }
#menu.show .opt { opacity: 1; transform: none; }
#menu.show .opt:nth-child(2) { transition-delay: 0s, .4s, .4s; }
#menu.show .opt:nth-child(3) { transition-delay: 0s, .8s, .8s; }
#menu.leave .opt { opacity: 0 !important; transform: translateY(-8px) !important; transition-delay: 0s !important; transition-duration: .3s; }
#menu.busy .opt { pointer-events: none; }

/* the trailer: full-bleed on phones; inside a minimal grey phone outline on wider screens */
#trailer { position: fixed; z-index: 4; opacity: 0; pointer-events: none; background: transparent; object-fit: cover; }
#trailer.on { opacity: 1; }
#phone { position: fixed; z-index: 2; border: 1.5px solid var(--line); opacity: 0; transition: opacity .6s; pointer-events: none; }
#phone.on { opacity: 1; }
#skip { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 16px; z-index: 6; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(243,242,239,.86); color: #8a8984; font: 400 22px/38px 'Sora', sans-serif; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* the demo */
#demoHost { position: fixed; inset: 0; z-index: 1; }
#demoHost iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; pointer-events: none; background: #11162e; }
#demoHost iframe.on { opacity: 1; pointer-events: auto; }
#demoHost iframe.fadein { transition: opacity .35s ease; }        /* (a demo whose picture could not be read: it fades in over the doorway) */
/* (10-03) the site's one status note — "Opening the demo…", "…didn't load — please try again" */
#note { position: fixed; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); z-index: 9; translate: -50% 12px; opacity: 0; pointer-events: none;
  padding: 10px 18px 11px; border-radius: 999px; background: #fff; border: 2px solid #141612; box-shadow: 0 12px 30px rgba(20,22,18,.18);
  font: 600 14px 'Sora', sans-serif; color: #141612; white-space: nowrap; transition: opacity .3s, translate .3s; }
#note.on { opacity: 1; translate: -50% 0; }
#demoHost.top { z-index: 6; background-color: var(--demo-background, #11162e); } /* opaque edge color for Safari's toolbar sampling */

/* the end-of-demo popup: minimal, one button; clicking outside dismisses it */
#popup { position: fixed; inset: 0; z-index: 8; display: flex; align-items: flex-end; justify-content: center; padding: 0 16px calc(48px + env(safe-area-inset-bottom)); }
#popup .card { background: rgba(255,255,255,.96); border-radius: 22px; padding: 22px 22px 18px; width: min(360px, 100%); text-align: center;
  box-shadow: 0 24px 60px rgba(10,12,30,.35); animation: popIn .5s cubic-bezier(.2,.8,.2,1) both; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#popup.out .card { animation: popOut .3s ease both; }
#popup p { margin: 0 0 14px; font: 500 15px/1.4 'Sora', sans-serif; color: #6f6e69; }
#popup .cta { display: block; text-decoration: none; background: var(--ink); color: #fff; font: 600 16px/1 'Sora', sans-serif; padding: 16px 20px; border-radius: 999px; }
#popup .cta:hover { background: #000; }
@keyframes popIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes popOut { to { opacity: 0; transform: translateY(16px) scale(.98); } }

video.src { position: fixed; width: 2px; height: 2px; opacity: 0; pointer-events: none; left: -10px; top: -10px; }
