/* Guided demo overlay. Uses the app tokens (--brand, --navy, --ink). Everything lives under #apRoot. */
#apRoot { --ap-z: 2147483000; font-family: var(--font); }
#apRoot * { box-sizing: border-box; }
.ap-launch { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 999px; color: #fff; font-weight: 600; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--navy-2)); box-shadow: var(--shadow-pop); min-height: 44px; }
.ap-launch:hover { filter: brightness(1.08); }
.ap-launch[hidden] { display: none; }

.ap-spot { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: var(--ap-z); pointer-events: none; opacity: 0; border-radius: 12px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 7px rgba(0, 127, 134, .28), 0 0 0 200vmax rgba(18, 43, 69, .46); transition: opacity .25s; }
.ap-spot.on { opacity: 1; }

.ap-cursor { position: fixed; left: 0; top: 0; z-index: calc(var(--ap-z) + 2); pointer-events: none; opacity: 0; transition: opacity .2s; will-change: transform; }
.ap-cursor.on { opacity: 1; }
.ap-cursor svg { display: block; filter: drop-shadow(0 3px 6px rgba(18, 43, 69, .35)); transition: transform .11s; transform-origin: 3px 3px; }
.ap-cursor.press svg { transform: scale(.86); }
.ap-halo { position: absolute; left: -14px; top: -14px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 127, 134, .22); animation: apBreath 2.2s ease-in-out infinite; }
@keyframes apBreath { 50% { transform: scale(1.16); } }
.ap-ripple { position: fixed; z-index: calc(var(--ap-z) + 1); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid var(--brand); pointer-events: none; animation: apRip .7s ease-out forwards; }
.ap-ripple.b { animation-delay: .12s; }
@keyframes apRip { to { transform: scale(5); opacity: 0; } }

.ap-dock { position: fixed; left: 50%; transform: translateX(-50%); width: min(720px, calc(100vw - 24px)); z-index: calc(var(--ap-z) + 5); border-radius: 16px; color: #fff; padding: 12px 16px 10px;
  background: rgba(18, 43, 69, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 12px 36px rgba(18, 43, 69, .35); transition: top .35s, bottom .35s; }
.ap-dock[data-edge="bottom"] { bottom: 14px; top: auto; }
.ap-dock[data-edge="top"] { top: 14px; bottom: auto; }
.ap-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; opacity: .75; margin-bottom: 4px; }
.ap-line { font-size: 16px; line-height: 1.45; min-height: 2.9em; max-height: 4.4em; overflow: hidden; }
.ap-line span { opacity: .25; transition: opacity .2s; }
.ap-line span.on { opacity: 1; }
.ap-bar { height: 2px; margin: 8px 0 8px; background: rgba(255, 255, 255, .18); border-radius: 2px; overflow: hidden; }
.ap-bar i { display: block; height: 100%; width: 0; background: #5fd0d6; }
.ap-ctl { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ap-ctl button, .ap-ctl select { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; padding: 0 12px; color: #fff; background: rgba(255, 255, 255, .12); cursor: pointer; font-size: 14px; }
.ap-ctl select { background: rgba(255, 255, 255, .12); max-width: 150px; }
.ap-ctl select option { color: #172b4d; }
.ap-ctl button:hover { background: rgba(255, 255, 255, .22); }
.ap-ctl .grow { flex: 1; }
.ap-ctl .go { background: var(--brand); font-weight: 700; }
.ap-pill { background: #f2b230 !important; color: #172b4d !important; font-weight: 700; animation: apPulse 1.4s infinite; }
@keyframes apPulse { 50% { transform: scale(1.06); } }
.ap-pill[hidden] { display: none; }

.ap-full { position: fixed; inset: 0; z-index: calc(var(--ap-z) + 4); display: none; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #fff; }
.ap-full.on { display: flex; animation: apFade .35s; }
@keyframes apFade { from { opacity: 0; } }
.ap-slide { background: linear-gradient(135deg, var(--navy), var(--brand)); }
.ap-slide h2, .ap-seat h2, .ap-end h2 { font-size: clamp(26px, 5vw, 44px); line-height: 1.15; max-width: 760px; margin: 0 auto 12px; }
.ap-slide p, .ap-seat p, .ap-end p { font-size: clamp(15px, 2.4vw, 20px); opacity: .9; max-width: 640px; margin: 0 auto; }
.ap-tag { margin-top: 28px; display: inline-block; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .5); font-size: 12.5px; }
.ap-seat { background: var(--navy); }
.ap-seat[data-seat="hr"] { background: linear-gradient(135deg, #0b5d63, var(--brand)); }
.ap-seat[data-seat="ct"] { background: linear-gradient(135deg, #3b3a82, #1b3d5f); }
.ap-party { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.ap-party span { padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 13px; opacity: .6; }
.ap-party span.cur { background: #fff; color: var(--navy); opacity: 1; font-weight: 700; }
.ap-end { background: linear-gradient(135deg, var(--navy), var(--brand)); flex-direction: column; }
.ap-end .row { display: flex; gap: 10px; justify-content: center; margin-top: 28px; }
.ap-end button, .ap-splash button.play { min-height: 46px; padding: 0 22px; border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; background: #fff; color: var(--navy); font-size: 15px; }

.ap-splash { background: rgba(18, 43, 69, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ap-card { background: #fff; color: var(--ink); border-radius: 16px; padding: 28px; width: min(480px, 100%); text-align: left; box-shadow: var(--shadow-pop); }
.ap-card h2 { font-size: 22px; margin-bottom: 6px; }
.ap-card p { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.ap-card label { display: block; font-size: 12.5px; color: var(--ink-2); margin: 10px 0 4px; }
.ap-card select { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
.ap-splash button.play { width: 100%; margin-top: 18px; background: var(--brand); color: #fff; }
.ap-splash .x { background: none; color: var(--ink-2); width: auto; min-height: 36px; margin-top: 8px; font-weight: 500; }

.ap-chap { background: rgba(18, 43, 69, .92); flex-direction: column; overflow: auto; }
.ap-chap h2 { margin-bottom: 18px; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; width: min(900px, 100%); }
.ap-grid button { text-align: left; padding: 16px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; min-height: 70px; font-size: 15px; font-weight: 600; }
.ap-grid button small { display: block; opacity: .7; font-weight: 400; margin-top: 4px; }
.ap-grid button:hover, .ap-grid button.cur { background: rgba(255, 255, 255, .2); border-color: #5fd0d6; }
.ap-chap .close { margin-top: 18px; min-height: 44px; padding: 0 20px; border-radius: 10px; border: 0; cursor: pointer; }

@media (max-width: 600px) { .ap-line { font-size: 14.5px; max-height: 6.2em; } .ap-ctl button, .ap-ctl select { padding: 0 8px; } }
@media (prefers-reduced-motion: reduce) { .ap-halo, .ap-pill { animation: none; } .ap-dock { transition: none; } }
@media (pointer: fine) { html.ap-running, html.ap-running * { cursor: none !important; } html.ap-running #apRoot .ap-dock, html.ap-running #apRoot .ap-dock *, html.ap-running #apRoot .ap-full button, html.ap-running #apRoot .ap-full select { cursor: pointer !important; } }

.ap-slide.ap-photo { background-size: cover; background-position: center; }
.ap-slide.ap-photo:not(.ap-brand) { justify-content: flex-start; text-align: left; padding: 24px clamp(24px, 7vw, 110px) 180px; }
.ap-slide.ap-photo:not(.ap-brand)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 30, 56, .62) 0%, rgba(10, 30, 56, .3) 55%, rgba(10, 30, 56, .08) 100%); }
.ap-slide.ap-photo:not(.ap-brand) > * { position: relative; max-width: 620px; }
.ap-slide.ap-photo:not(.ap-brand) h2, .ap-slide.ap-photo:not(.ap-brand) p { margin-left: 0; text-shadow: 0 2px 16px rgba(0, 0, 0, .45); }
.ap-slide.ap-photo:not(.ap-brand) .ap-tag { margin-top: 20px; padding: 7px 16px; font-size: 13.5px; background: rgba(18, 43, 69, .55); }
.ap-slide.ap-photo h2:empty, .ap-slide.ap-photo p:empty { display: none; }
.ap-tag:empty { display: none; }

/* Welcome slide with brand footer */
.ap-slide .ap-top, .ap-slide .ap-foot { display: none; }
.ap-slide.ap-brand { flex-direction: column; justify-content: space-between; padding: 26px 24px 190px; }
.ap-slide.ap-brand::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 30, 56, .55) 0%, rgba(10, 30, 56, .38) 45%, rgba(10, 30, 56, .6) 100%); }
.ap-slide.ap-brand > * { position: relative; }
.ap-slide.ap-brand .ap-top, .ap-slide.ap-brand .ap-foot { display: block; }
.ap-slide.ap-brand .ap-mid h2 { text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.ap-slide.ap-brand .ap-mid p { text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
.ap-slide.ap-brand .ap-tag { margin-top: 20px; position: static; transform: none; bottom: auto; background: rgba(18, 43, 69, .55); font-size: 14px; padding: 8px 18px; }
.ap-by { display: inline-flex; align-items: center; gap: 16px; color: #fff; font-size: 12.5px; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.ap-by img { height: 28px; width: auto; display: block; filter: brightness(0) invert(1) drop-shadow(0 1px 6px rgba(0, 0, 0, .4)); }
.ap-by img + img { height: 18px; }
.ap-foot small { display: block; margin-top: 10px; font-size: 12px; letter-spacing: .04em; opacity: .9; }
@media (max-width: 600px) { .ap-slide.ap-brand { padding-bottom: 230px; } .ap-top img { height: 48px; } }

.ap-chap, .ap-splash, .ap-end { z-index: calc(var(--ap-z) + 6); }

/* Persona title cards: photo background */
.ap-seat { background-size: cover; background-position: center; }
.ap-seat::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 30, 56, .6) 0%, rgba(10, 30, 56, .42) 50%, rgba(10, 30, 56, .66) 100%); }
.ap-seat > * { position: relative; }
.ap-seat h2, .ap-seat p { text-shadow: 0 2px 16px rgba(0, 0, 0, .5); }

/* First-visit micro animation */
.ap-intro { position: fixed; inset: 0; z-index: calc(var(--ap-z) + 7); display: grid; place-items: center; background: rgba(18, 43, 69, .62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: apFade .3s; cursor: pointer; transition: opacity .45s; }
.ap-intro.out { opacity: 0; }
.ap-intro__card { text-align: center; color: #fff; padding: 0 16px; }
.ap-intro__row { position: relative; display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: nowrap; }
.ap-node { padding: 10px 18px; border-radius: 999px; background: #fff; color: var(--navy); font-weight: 700; font-size: 15px; white-space: nowrap; opacity: 0; transform: scale(.7); animation: apPop .45s cubic-bezier(.2, 1.4, .4, 1) forwards; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.ap-node.n1 { animation-delay: .15s; } .ap-node.n2 { animation-delay: .95s; } .ap-node.n3 { animation-delay: 1.75s; }
.ap-link { display: block; width: clamp(28px, 8vw, 90px); height: 3px; background: #5fd0d6; transform: scaleX(0); transform-origin: left; border-radius: 3px; animation: apGrow .5s ease-out forwards; }
.ap-link.l1 { animation-delay: .5s; } .ap-link.l2 { animation-delay: 1.3s; }
.ap-token { position: absolute; left: 0; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #f2b230; box-shadow: 0 0 0 6px rgba(242, 178, 48, .3); opacity: 0; animation: apTravel 1.3s 1.2s ease-in-out forwards; }
.ap-intro__card p { margin-top: 22px; font-size: 18px; opacity: 0; animation: apRise .5s 2.1s forwards; }
@keyframes apPop { to { opacity: 1; transform: none; } }
@keyframes apGrow { to { transform: scaleX(1); } }
@keyframes apRise { from { transform: translateY(8px); } to { opacity: .95; transform: none; } }
@keyframes apTravel { 0% { opacity: 1; left: 6%; } 100% { opacity: 1; left: 94%; } }
@media (max-width: 600px) { .ap-node { padding: 8px 11px; font-size: 12.5px; } .ap-link { width: 18px; } }

/* End of the animation: highlight the Guided demo button */
.ap-launch.ap-hl { animation: apHl 1.1s ease-in-out 4; z-index: 100; }
@keyframes apHl { 0%, 100% { box-shadow: var(--shadow-pop), 0 0 0 0 rgba(0, 127, 134, .55); transform: scale(1); } 50% { box-shadow: var(--shadow-pop), 0 0 0 14px rgba(0, 127, 134, 0); transform: scale(1.08); } }
.ap-tip { position: fixed; right: 16px; bottom: 74px; z-index: 101; padding: 10px 16px; border-radius: 12px; background: #fff; color: var(--navy); font-weight: 700; font-size: 14px; box-shadow: var(--shadow-pop); animation: apTip .5s .1s both, apBob 1.1s .6s ease-in-out 4; }
.ap-tip::after { content: ""; position: absolute; right: 30px; bottom: -7px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); }
.ap-tip b { color: var(--brand); margin-left: 4px; }
@keyframes apTip { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes apBob { 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .ap-launch.ap-hl { animation: none; outline: 3px solid var(--brand); outline-offset: 3px; } .ap-tip { animation: none; } }

/* Final thank-you screen */
.ap-end { background: linear-gradient(rgba(10, 30, 56, .6), rgba(10, 30, 56, .72)), url(../img/welcome-bg.jpg) center / cover; }
.ap-end h2 { font-size: clamp(34px, 6vw, 56px); text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.ap-end .ap-tag { margin-top: 18px; background: rgba(18, 43, 69, .5); }
.ap-end button { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
.ap-end button.primary { background: #fff; color: var(--navy); border-color: #fff; }
.ap-end button:hover { filter: brightness(1.1); }

/* Demo-only lock: nothing but the tour is reachable; the only control is Rewatch (and the tap-for-sound pill) */
.ap-shield { position: fixed; inset: 0; z-index: calc(var(--ap-z) - 1); touch-action: none; background: transparent; }
html.ap-locked, html.ap-locked body { overflow: hidden; }
html.ap-locked .ap-launch, html.ap-locked .ap-tip, html.ap-locked .ap-intro { display: none !important; }
html.ap-locked .ap-ctl > :not(.ap-pill) { display: none !important; }
html.ap-locked .ap-ctl { justify-content: center; min-height: 0; }
html.ap-locked #apClose { display: none; }
html.ap-locked .ap-dock { pointer-events: none; }
html.ap-locked .ap-dock .ap-pill { pointer-events: auto; }
html.ap-locked .ap-bar { margin-bottom: 4px; }

/* Final screen: the last app screen blurs and the thank-you message fades in over it */
.ap-end { background: rgba(10, 30, 56, .52); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.ap-end.on { animation: apBlurIn 1.4s ease forwards; }
@keyframes apBlurIn { from { background: rgba(10, 30, 56, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); } to { background: rgba(10, 30, 56, .52); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); } }
.ap-end.on > * { opacity: 0; animation: apEndIn .9s .8s ease forwards; }
.ap-end.on > :nth-child(2) { animation-delay: 1s; } .ap-end.on > :nth-child(3) { animation-delay: 1.2s; } .ap-end.on > :nth-child(4) { animation-delay: 1.5s; }
@keyframes apEndIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ap-dock.ap-fadeout { opacity: 0; transition: opacity .6s ease; }
@media (prefers-reduced-motion: reduce) { .ap-end.on, .ap-end.on > * { animation: none; opacity: 1; } }
