/* The app's own chrome: the top bar that runs across every page, and the home page. The home page keeps the
   landing page's look (brand navy, "X. Subtitled." headlines, periwinkle buttons, dark gradient tiles), scoped to
   #home so it never meets the demo interface's styles. */
:root { --nav-h: 52px; }
body.home-open { overflow-y: auto; background: #191969; }
body.demo-open { overflow: hidden; }

/* ---------- the top bar ---------- */
.appnav { position: fixed; z-index: 10; top: 0; left: 0; right: 0; height: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 16px 0; box-sizing: border-box; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; background: rgba(15, 15, 52, 0.94); border-bottom: 1px solid #34348c; backdrop-filter: blur(10px); font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif; }
.appnav .home { display: flex; align-items: center; gap: 10px; color: #fcf7e6; text-decoration: none; border-radius: 10px; justify-self: start; }
.appnav .mark { width: 22px; height: 24px; fill: #3a6ff7; flex: none; }
.appnav .word { font: 800 18px/1 "Plus Jakarta Sans", sans-serif; letter-spacing: 0.06em; }
.appnav .badge { font: 600 10px/1 "Plus Jakarta Sans", sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: #c9ccff; background: rgba(71, 71, 225, 0.35); padding: 4px 7px; border-radius: 6px; }
/* the venues: every tab as wide as the widest, so they sit evenly; a lit tab slides under the open one, along the bar's
   bottom edge, with a soft glow rising from it (--x, the open tab's place, and --s, its width in hundreds of pixels, set
   by app.js). It moves and sizes by transform alone, which runs off the main thread: a demo opening keeps that busy for a
   second, and a width transition would wait for it. */
.appnav .venues { position: relative; align-self: stretch; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; min-width: 0; }
.appnav .venues a { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 0 18px; color: #a6aee5; font: 600 14px/1 "Plus Jakarta Sans", sans-serif; text-decoration: none; white-space: nowrap; transition: color 0.2s; }
.appnav .venues a::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: -1px; height: 2px; border-radius: 2px; background: #a6aee5; opacity: 0; transform: scaleX(0.3); transition: opacity 0.2s, transform 0.2s; }
.appnav .venues a:hover { color: #fcf7e6; }
.appnav .venues a:hover::after { opacity: 0.35; transform: none; }
.appnav .venues a[aria-current="page"] { color: #fcf7e6; }
.appnav .venues a[aria-current="page"]::after { display: none; }
.appnav .venues::before, .appnav .venues::after { content: ""; position: absolute; left: 0; width: 100px; transform-origin: 0 0; transform: translateX(var(--x, 0)) scaleX(var(--s, 0)); opacity: 0; transition: transform 0.38s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.2s; will-change: transform, opacity; pointer-events: none; }
/* lighting up from nothing (from home): straight to its place, then it fades in */
.appnav .venues.jump::before, .appnav .venues.jump::after { transition: opacity 0.2s; }
.appnav .venues::before { top: 0; bottom: -1px; background: linear-gradient(to top, rgba(129, 140, 218, 0.22), rgba(129, 140, 218, 0)); }
.appnav .venues::after { bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: #818cda; box-shadow: 0 0 12px rgba(129, 140, 218, 0.8); }
.appnav .venues.lit::before, .appnav .venues.lit::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .appnav .venues::before, .appnav .venues::after, .appnav .venues a, .appnav .venues a::after { transition: none; } }
.appnav .end { justify-self: end; display: flex; align-items: center; gap: 16px; }
/* autoplay: every demo in turn, for a screen on a stand (app.js) */
.appnav .auto { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 10px; border-radius: 15px; border: 1px solid #34348c; background: rgba(71, 71, 225, 0.18); color: #c9ccff; font: 600 12px/1 "Plus Jakarta Sans", sans-serif; white-space: nowrap; cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.appnav .auto svg { width: 11px; height: 11px; fill: currentColor; flex: none; }
.appnav .auto:hover { color: #fcf7e6; border-color: #818cda; }
.appnav .auto[aria-pressed="true"] { background: #818cda; border-color: #818cda; color: #0f0f3d; }
.appnav .auto:focus-visible { outline: 2px solid #818cda; outline-offset: 2px; }
.appnav .ext { justify-self: end; color: #a6aee5; font: 600 13px/1 "Plus Jakarta Sans", sans-serif; text-decoration: none; white-space: nowrap; }
.appnav .ext::after { content: " ↗"; }
.appnav .ext:hover { color: #fcf7e6; }
.appnav a:focus-visible { outline: 2px solid #818cda; outline-offset: 2px; }
/* narrower screens: tighter tabs, so all six keep one width */
@media (max-width: 1000px) { .appnav .venues a { padding: 0 12px; } }
@media (max-width: 860px) { .appnav .badge { display: none; } }
@media (max-width: 1100px) { .appnav .auto span { display: none; } .appnav .auto { padding: 0 9px; } }
/* the open venue's name and the menu button: phones only */
.appnav .here, .appnav .menu { display: none; }
.menu-scrim { position: fixed; inset: 0; z-index: 9; background: rgba(5, 5, 25, 0.55); }
/* phones: the bar holds the mark, the open venue and a menu button; the venues drop down from it as a list */
@media (max-width: 760px) {
  .appnav { grid-template-columns: auto 1fr auto; gap: 12px; padding-inline: 12px 6px; }
  .appnav .badge, .appnav .end { display: none; }
  .appnav .here { display: block; min-width: 0; padding-left: 12px; border-left: 1px solid #34348c; color: #fcf7e6; font: 600 15px/1.2 "Plus Jakarta Sans", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .appnav .menu { display: block; position: relative; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: none; color: #c9ccff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .appnav .menu:focus-visible { outline: 2px solid #818cda; outline-offset: -2px; }
  .appnav .menu i, .appnav .menu::before, .appnav .menu::after { content: ""; position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 1px; background: currentColor; transition: transform 0.2s, opacity 0.2s; }
  .appnav .menu::before { top: 15px; }
  .appnav .menu i { top: 21px; }
  .appnav .menu::after { top: 27px; }
  .appnav.open .menu { color: #fcf7e6; }
  .appnav.open .menu::before { transform: translateY(6px) rotate(45deg); }
  .appnav.open .menu i { opacity: 0; }
  .appnav.open .menu::after { transform: translateY(-6px) rotate(-45deg); }
  .appnav .venues { position: absolute; top: 100%; left: 0; right: 0; align-self: auto; grid-auto-flow: row; grid-auto-columns: auto; gap: 2px; padding: 8px 10px 14px; background: rgba(15, 15, 52, 0.98); border-bottom: 1px solid #34348c; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    max-height: calc(100vh - var(--nav-h) - env(safe-area-inset-top, 0px)); max-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px)); overflow-y: auto; overscroll-behavior: contain;
    visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity 0.18s, transform 0.18s, visibility 0s 0.18s; }
  .appnav.open .venues { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .appnav .venues::before, .appnav .venues::after, .appnav .venues a::after { display: none; }
  .appnav .venues a { justify-content: flex-start; height: 46px; padding: 0 14px; border-radius: 10px; font-size: 16px; }
  .appnav .venues a[aria-current="page"] { background: rgba(129, 140, 218, 0.16); box-shadow: inset 3px 0 0 #818cda; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .appnav .venues, .appnav .menu i, .appnav .menu::before, .appnav .menu::after { transition: none; } }
.app-loading { position: fixed; inset: var(--nav-h) 0 0; z-index: 4; display: grid; place-items: center; color: #a6aee5; font: 500 12px/1 "JetBrains Mono", monospace; letter-spacing: 0.14em; text-transform: uppercase; pointer-events: none; }

/* stills for parity checks: no bar, no interface, the scene filling the window */
body.clean .appnav, body.clean .app-loading { display: none; }
body.clean #app { top: 0; bottom: 0; }
body.clean #app .top, body.clean #app .path, body.clean #app .info, body.clean #app .bottom, body.clean #app .guide-btn, body.clean #app .loading,
body.clean #app .pov, body.clean #labels, body.clean #app .seat-map, body.clean #app .hint, body.clean #app .hud { display: none !important; }

/* ---------- the home page ---------- */
#home { padding-top: var(--nav-h); }

/* XRAI's site look: brand navy, white bold headlines in the "X. Subtitled" voice, periwinkle buttons, dark gradient tiles */
#home {
  color-scheme: dark;
  --navy: #191969;
  --ink: #0f0f34;
  --deep: #07071c;
  --cream: #fcf7e6;
  --muted: #b8bdea;
  --soft: #a6aee5;
  --peri: #818cda;
  --peri-hi: #9aa3e6;
  --blue: #3a6ff7;
  --orange: #ff955a;
  --line: rgba(166, 174, 229, 0.18);
  --display: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
}
#home * { box-sizing: border-box; }
html:has(body.home-open) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
#home { background: var(--navy); color: var(--cream); font: 400 16px/1.6 var(--display); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
#home a { color: inherit; }
#home :focus-visible { outline: 2px solid var(--peri-hi); outline-offset: 3px; border-radius: 6px; }
#home .wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
#home .eyebrow { margin: 0; font: 600 12px/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange); }

/* ---------- hero ---------- */
#home .hero { position: relative; min-height: min(100svh, 940px); display: grid; align-items: center; isolation: isolate; overflow: hidden; background: var(--deep); }
#home .hero-img { position: absolute; inset: 0; z-index: -2; background: url("../assets/hero.webp") right 38% / cover no-repeat; transform: scale(1.02); }
#home .hero::before { /* the navy wash the headline sits on, fading into the arena */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: /* the first layer is on top: the fade into the navy below must cover the side wash */
    linear-gradient(180deg, rgba(25,25,105,0) 70%, var(--navy) 100%),
    linear-gradient(180deg, rgba(15,15,52,0.55) 0%, rgba(15,15,52,0) 22%),
    linear-gradient(90deg, rgba(15,15,52,0.97) 0%, rgba(15,15,52,0.9) 30%, rgba(15,15,52,0.35) 58%, rgba(15,15,52,0) 78%);
}
#home .hero .wrap { padding-block: 150px 120px; }
#home .hero h1 { margin: 18px 0 0; font: 800 clamp(48px, 8.4vw, 104px)/0.98 var(--display); letter-spacing: -0.035em; color: #fff; }
#home .hero h1 span { color: var(--peri-hi); }
#home .hero .lede { max-width: 33rem; margin: 26px 0 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: rgba(255,255,255,0.88); font-weight: 500; }
#home .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
#home .btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 8px; font: 600 16px/1 var(--display); text-decoration: none; transition: background .2s, transform .2s, border-color .2s; }
#home .btn.primary { background: var(--peri); color: #fff; }
#home .btn.primary:hover { background: var(--peri-hi); transform: translateY(-1px); }
#home .btn.ghost { color: #fff; border: 1px solid rgba(255,255,255,0.28); }
#home .btn.ghost:hover { border-color: rgba(255,255,255,0.6); }
#home .btn .arr { transition: transform .2s; }
#home .btn:hover .arr { transform: translateX(3px); }
#home .facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 54px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
#home .facts li { display: flex; align-items: center; gap: 10px; }
#home .facts b { font: 700 20px/1 var(--display); color: #fff; letter-spacing: -0.01em; }
#home .facts li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--peri); margin-right: 18px; }

/* ---------- the demos ---------- */
#home .demos { padding: clamp(72px, 10vw, 128px) 0 clamp(56px, 8vw, 96px); }
#home .section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; margin-bottom: 40px; }
#home .section-head h2 { margin: 10px 0 0; font: 800 clamp(32px, 4.4vw, 52px)/1.05 var(--display); letter-spacing: -0.025em; color: #fff; }
#home .section-head p { max-width: 30rem; margin: 0; color: var(--muted); }
#home .grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
#home .tile { --accent: var(--peri); position: relative; grid-column: span 6; display: flex; flex-direction: column; justify-content: flex-end; min-height: 480px; border-radius: 16px; overflow: hidden; isolation: isolate; text-decoration: none; color: #fff; background: var(--deep); box-shadow: 0 24px 60px -24px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.06); transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
#home .tile.wide { grid-column: span 7; }
#home .tile.narrow { grid-column: span 5; }
#home .tile.full { grid-column: span 12; min-height: 540px; }
#home .tile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
#home .tile::before { /* the dark gradient the site's tiles use, deep enough at the foot for the copy */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7,7,28,0) 18%, rgba(7,7,28,0.62) 44%, rgba(7,7,28,0.93) 64%, rgba(7,7,28,0.98) 100%);
}
#home .tile:hover, #home .tile:focus-visible { transform: translateY(-4px); box-shadow: 0 34px 70px -24px rgba(0,0,0,0.7), inset 0 0 0 1px rgba(154,163,230,0.35); }
#home .tile:hover img, #home .tile:focus-visible img { transform: scale(1.045); }
#home .tile-body { padding: clamp(22px, 3vw, 34px); }
#home .tile .kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 600 11.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); }
#home .tile .kicker i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(129,140,218,0.22); color: #fff; font-style: normal; letter-spacing: 0; }
#home .tile h3 { margin: 0; font: 800 clamp(28px, 3vw, 38px)/1.05 var(--display); letter-spacing: -0.02em; }
#home .tile h3 span { color: var(--peri-hi); }
#home .tile p { max-width: 34rem; margin: 12px 0 0; color: rgba(255,255,255,0.84); font-size: 15.5px; line-height: 1.55; }
#home .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
#home .chips li { padding: 6px 11px; border-radius: 999px; font: 500 12px/1 var(--mono); color: #e6e8ff; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); backdrop-filter: blur(6px); }
#home .open { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-weight: 700; font-size: 15px; color: #fff; }
#home .open .arr { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--peri); transition: transform .25s, background .25s; }
#home .tile:hover .open .arr { transform: translateX(4px); background: var(--peri-hi); }

/* ---------- inside every demo ---------- */
#home .inside { padding: clamp(56px, 8vw, 104px) 0; background: linear-gradient(180deg, var(--navy), var(--ink)); }
#home .inside h2 { margin: 10px 0 0; font: 800 clamp(30px, 3.8vw, 44px)/1.08 var(--display); letter-spacing: -0.02em; color: #fff; max-width: 18ch; }
#home .features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 44px; }
#home .feature { padding: 26px 24px 28px; border-radius: 14px; background: rgba(255,255,255,0.035); border: 1px solid var(--line); }
#home .feature svg { width: 30px; height: 30px; stroke: var(--peri-hi); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#home .feature h3 { margin: 18px 0 8px; font: 700 18px/1.3 var(--display); color: #fff; }
#home .feature p { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- closing ---------- */
#home .cta { padding: clamp(64px, 9vw, 120px) 0; background: var(--ink); text-align: center; }
#home .cta h2 { margin: 0 auto; max-width: 20ch; font: 800 clamp(34px, 5vw, 60px)/1.04 var(--display); letter-spacing: -0.03em; color: #fff; }
#home .cta h2 span { color: var(--peri-hi); }
#home .cta p { max-width: 36rem; margin: 20px auto 0; color: var(--muted); font-size: 17px; }
#home .cta .actions { justify-content: center; }
#home .site-foot { padding: 30px 0 calc(30px + env(safe-area-inset-bottom, 0px)); background: var(--deep); font-size: 13.5px; color: var(--soft); }
#home .site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
#home .site-foot .logo { width: 96px; opacity: 0.9; }
#home .site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
#home .site-foot a { text-decoration: none; }
#home .site-foot a:hover { color: #fff; }

/* ---------- entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  #home .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
  #home .reveal.in { opacity: 1; transform: none; }
  #home .hero .rise { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  #home .hero .rise:nth-child(2) { animation-delay: .08s; } .hero .rise:nth-child(3) { animation-delay: .16s; } .hero .rise:nth-child(4) { animation-delay: .24s; } .hero .rise:nth-child(5) { animation-delay: .32s; }
  #home .hero-img { animation: settle 2.4s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.09); opacity: 0.4; } to { transform: scale(1.02); opacity: 1; } }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  #home .tile, #home .tile.wide, #home .tile.narrow, #home .tile.full { grid-column: span 12; min-height: 440px; }
  #home .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  #home .head-links .hide-sm { display: none; }
  #home .logo { width: 108px; }
  #home .hero { min-height: auto; }
  #home .hero-img { background-position: 72% 30%; }
  #home .hero::before { background: linear-gradient(180deg, rgba(15,15,52,0.78) 0%, rgba(15,15,52,0.6) 40%, rgba(15,15,52,0.92) 75%, var(--navy) 100%); }
  #home .hero .wrap { padding-block: 120px 64px; }
  #home .facts li + li::before { display: none; }
  #home .facts { gap: 12px 22px; }
  #home .btn { flex: 1 1 auto; justify-content: center; }
  /* a narrow tile would bury its picture under the copy, so the picture sits on top and fades into the card */
  #home .tile, #home .tile.wide, #home .tile.narrow, #home .tile.full { min-height: 0; justify-content: flex-start; border-radius: 14px; }
  #home .tile img { position: relative; z-index: 0; height: auto; aspect-ratio: 16 / 10; -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent); mask-image: linear-gradient(180deg, #000 62%, transparent); }
  #home .tile::before { display: none; }
  #home .tile-body { margin-top: -38px; position: relative; padding: 0 20px 24px; }
  #home .tile:hover img, #home .tile:focus-visible img { transform: none; }
  #home .eyebrow { letter-spacing: 0.12em; }
  #home .features { grid-template-columns: 1fr; }
}
