/* Cupola "Watch your agents": the 3D courtyard is the page. */
:root { --dusk: #0f1726; --cream: #f3ead8; --muted: #b9b3a6; --gold: #f4c95d; color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--dusk); color: var(--cream); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; }
a { color: inherit; }

.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; isolation: isolate; }
.poster, .stage { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage { opacity: 0; transition: opacity .9s; }
.page[data-ready] .stage { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(to top, rgba(10,14,24,.88) 0%, rgba(10,14,24,.45) 26%, transparent 46%), linear-gradient(to bottom, rgba(10,14,24,.55), transparent 16%); }

.top { position: absolute; z-index: 4; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(16px, 3vw, 32px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: .01em; }
.brand img { border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.tools { display: flex; gap: 10px; align-items: center; }
.gh, .mute { color: var(--cream); text-decoration: none; font-size: 14px; padding: 7px 12px; border-radius: 999px; background: rgba(15,23,38,.55); border: 0; backdrop-filter: blur(8px); cursor: pointer; font-family: inherit; }
.gh { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; }
.gh svg { width: 20px; height: 20px; fill: currentColor; }
.gh:hover { background: rgba(15,23,38,.8); }

.copy { position: absolute; z-index: 4; transition: opacity .8s ease, transform .8s ease; left: clamp(16px, 4vw, 56px); bottom: clamp(20px, 6vh, 64px); max-width: 520px; }
.copy h1 { margin: 0 0 18px; font: 600 clamp(36px, 5.6vw, 66px)/1.02 "New York", "Iowan Old Style", Georgia, serif; letter-spacing: -.015em; text-shadow: 0 4px 30px rgba(0,0,0,.45); }
.copy p { margin: 0 0 20px; color: #d9d2c4; font-size: clamp(15px, 1.4vw, 18px); max-width: 44ch; }
.cta { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.store { padding: 11px 18px; border-radius: 12px; background: var(--cream); color: #1b2335; font-weight: 650; text-decoration: none; opacity: .8; }
.store small { font-weight: 400; margin-left: 4px; }
.link { font-weight: 500; }

/* The start control lives on the phone in the scene; this transparent button tracks its screen. */
.watch { position: absolute; z-index: 5; border: 0; padding: 0; background: transparent; border-radius: 10px; cursor: pointer; }
.watch span { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); white-space: nowrap; padding: 7px 14px; border-radius: 999px; background: rgba(243,234,216,.95); color: #1b2335; font: 650 14px/1 -apple-system, system-ui, sans-serif; box-shadow: 0 8px 30px rgba(0,0,0,.4); animation: bob 2.4s ease-in-out infinite; }
.watch span::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: rgba(243,234,216,.95); }
.watch:hover span, .watch:focus-visible span { background: #fff; }
.watch:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.page:not([data-phase="idle"]) .watch { display: none; }
@keyframes bob { 50% { transform: translate(-50%, -4px); } }

/* Viewfinder corners while the lens is zoomed in. */
.vf { position: absolute; inset: 9% 12%; z-index: 2; opacity: 0; transition: opacity .25s; pointer-events: none; }
.vf.on { opacity: 1; }
.vf i { position: absolute; width: 34px; height: 34px; border: 2px solid rgba(255,255,255,.85); }
.vf i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.vf i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.vf i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.vf i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.vf span { position: absolute; left: 50%; bottom: -6px; transform: translate(-50%, 100%); padding: 4px 9px; border-radius: 999px; background: rgba(0,0,0,.45); color: var(--gold); font: 700 12px/1 -apple-system, system-ui, sans-serif; }

/* Cupola notifications on the page. */
.cards { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.note { position: absolute; left: 0; top: 0; width: 310px; display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border-radius: 22px; background: rgba(32,32,36,.8); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 14px 40px rgba(0,0,0,.4), inset 0 0 0 .5px rgba(255,255,255,.12); transition: transform .5s cubic-bezier(.2,1.3,.4,1), opacity .35s; font: 13.5px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; letter-spacing: -.005em; }
.note img { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.note p { margin: 0; }
.note__top { display: flex; justify-content: space-between; gap: 8px; }
.note__top b { font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note__top span { color: rgba(255,255,255,.5); font-size: 12.5px; flex: none; }
.note__body { color: rgba(255,255,255,.92); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note > div { min-width: 0; flex: 1; }
.note--urgent { box-shadow: 0 0 0 1px rgba(244,201,93,.45), 0 14px 40px rgba(0,0,0,.45); }

.below { padding: 28px clamp(16px, 4vw, 56px) 48px; }
.fine { margin: 0; color: var(--muted); font-size: 13px; max-width: 70ch; }

@media (max-width: 640px) {
  .note { width: 250px; font-size: 12px; }
  .copy { right: 16px; }
}
@media (prefers-reduced-motion: reduce) { .watch span { animation: none; } .note { transition: opacity .2s; } }

/* While the show runs the copy steps aside; moving, tapping or scrolling brings it back. */
.page[data-phase="started"]:not(.awake) .copy { opacity: 0; transform: translateY(8px); pointer-events: none; }
.hero::after { transition: opacity .8s ease; }
.page[data-phase="started"]:not(.awake) .hero::after { opacity: .35; }

.get { display: inline-block; padding: 12px 20px; border-radius: 12px; background: var(--cream); color: #1b2335; font-weight: 650; text-decoration: none; }
.get:hover { background: #fff; }
.get[aria-disabled="true"] { opacity: .75; cursor: default; }
