/* Open X-Embodiment Simulation (OXS)
   Static, no external requests (no web fonts or CDNs). */

:root {
  --bg: #03050b;
  --bg-2: #080c16;
  --ink: #eef2fb;
  --muted: #98a3b8;
  --line: rgba(150, 180, 255, .16);
  --card: rgba(140, 170, 255, .055);
  --blue: #9cc0ff;   /* the code colour; keep in step with TINT in assets/globe.js */
  --gold: #ffc861;

  --sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
[id] { scroll-margin-top: 72px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ── Nav ── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: 60px; padding: 0 clamp(18px, 4vw, 44px);
  display: flex; align-items: center; gap: 28px;
  transition: background .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: rgba(3, 5, 11, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.brand { font-weight: 800; font-size: 18px; letter-spacing: .14em; text-decoration: none; }
.nav-links { margin-left: auto; display: flex; gap: 26px; font-size: 14.5px; }
.nav-links a { color: var(--muted); text-decoration: none; transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links { align-items: center; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links .nav-cta { padding: 6px 16px; border: 1px solid rgba(156, 192, 255, .38); border-radius: 999px; color: var(--ink); transition: border-color .15s ease, color .15s ease; }
.nav-links .nav-cta:hover { border-color: var(--gold); color: var(--gold); }

/* ── Hero scene ──
   .scene is taller than the viewport and .stage is sticky; while the extra height scrolls past,
   assets/globe.js shrinks the globe from an arc into a sphere.
   --e: 0 = arc at rest, 1 = complete sphere.  --o: how far the rings have faded in. */
.scene { position: relative; height: 250vh; }
.stage {
  --e: 0; --o: 0; --s: 0;
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 108%, rgba(40, 90, 210, .16), transparent 62%),
    var(--bg);
}
/* The stage fades into the page below instead of ending on a hard line. */
.stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12vh; pointer-events: none; background: linear-gradient(180deg, rgba(3, 5, 11, 0), var(--bg)); }
#particles, #bloom { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
/* #particles: the glyph buffer.  #bloom: a small blurred copy of it, added on top so bright glyphs glow. */
#bloom { mix-blend-mode: screen; filter: blur(6px) saturate(1.3) brightness(1.35); }

/* The fan of clips: separate video cards standing on the globe's horizon, a constant gap above it.
   Each card's inner edge runs from an arc concentric with the globe up to a mirror image of the horizon,
   and the card is only slightly taller at its outer edge, so the cards step up towards both sides:
   an X made by the globe and the clips together. assets/main.js computes every card's four corners
   from the globe's resting centre and radius and maps the card onto them.
   On scroll the globe drops away, the cards run out to both sides and the fan dissolves from the
   middle outwards (.is-parting: --fi / --fo are where that fade starts and ends, from the centre). */
.fan {
  --gx: 50%; --gy: 200%; --gr: 100px; --fi: 0px; --fo: 0px;
  position: absolute; inset: 0; pointer-events: none;
  /* panels reach a few pixels past the arc; this disc trims them, so the lower edge is the true curve */
  -webkit-mask-image: radial-gradient(circle at var(--gx) var(--gy), transparent calc(var(--gr) - 1px), #000 calc(var(--gr) + 1px));
  mask-image: radial-gradient(circle at var(--gx) var(--gy), transparent calc(var(--gr) - 1px), #000 calc(var(--gr) + 1px));
}
.fan.is-parting {
  -webkit-mask-image:
    radial-gradient(circle at var(--gx) var(--gy), transparent calc(var(--gr) - 1px), #000 calc(var(--gr) + 1px)),
    linear-gradient(90deg, #000 calc(var(--gx) - var(--fo)), transparent calc(var(--gx) - var(--fi)), transparent calc(var(--gx) + var(--fi)), #000 calc(var(--gx) + var(--fo)));
  mask-image:
    radial-gradient(circle at var(--gx) var(--gy), transparent calc(var(--gr) - 1px), #000 calc(var(--gr) + 1px)),
    linear-gradient(90deg, #000 calc(var(--gx) - var(--fo)), transparent calc(var(--gx) - var(--fi)), transparent calc(var(--gx) + var(--fi)), #000 calc(var(--gx) + var(--fo)));
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.fan-w { position: absolute; inset: 0; }
.fan-wl { clip-path: inset(0 50% 0 0); }      /* each wing ends at the seam in the middle; new cards slide out from behind it */
.fan-wr { clip-path: inset(0 0 0 50%); }
.fan-c { position: absolute; left: 0; top: 0; width: 360px; height: 960px; margin: 0; overflow: hidden; transform-origin: 0 0; will-change: transform; backface-visibility: hidden; background: #0a0e18; }
/* the clip: a centred square crop, narrowed by main.js to fit */
.fan-c video { position: absolute; left: -300px; top: 0; width: 960px; height: 960px; object-fit: cover; display: block; }
/* Both ends of the fan dissolve into pixels: each .fan-s canvas holds the cards of that end redrawn as a fine
   mosaic that coarsens gently and thins out towards the side of the screen (main.js draws it every frame).
   The clean cards (.fan-k) lie on top and fade out between --c0 and --c1, so the picture softens gradually.
   New cards fade in as they leave the centre (--b0 / --b1). All four are set by main.js. */
.fan-s { position: absolute; top: 0; }
.fan-sl { left: 0; -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .55), #000 70%); mask-image: linear-gradient(90deg, rgba(0, 0, 0, .55), #000 70%); }
.fan-sr { right: 0; -webkit-mask-image: linear-gradient(270deg, rgba(0, 0, 0, .55), #000 70%); mask-image: linear-gradient(270deg, rgba(0, 0, 0, .55), #000 70%); }
.fan-k {
  position: absolute; inset: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent calc(50% - var(--c1, 100vw)), #000 calc(50% - var(--c0, 100vw)), #000 calc(50% - var(--b1, 0px)), transparent calc(50% - var(--b0, 0px)), transparent calc(50% + var(--b0, 0px)), #000 calc(50% + var(--b1, 0px)), #000 calc(50% + var(--c0, 100vw)), transparent calc(50% + var(--c1, 100vw)));
  mask-image: linear-gradient(90deg, transparent calc(50% - var(--c1, 100vw)), #000 calc(50% - var(--c0, 100vw)), #000 calc(50% - var(--b1, 0px)), transparent calc(50% - var(--b0, 0px)), transparent calc(50% + var(--b0, 0px)), #000 calc(50% + var(--b1, 0px)), #000 calc(50% + var(--c0, 100vw)), transparent calc(50% + var(--c1, 100vw)));
}

/* A dark halo behind the title keeps it readable over the rain. */
.title::before { content: ""; position: absolute; inset: -70px 6% -60px; z-index: -1; background: radial-gradient(closest-side, rgba(3, 5, 11, .86), rgba(3, 5, 11, 0)); }
.title {
  position: absolute; left: 0; right: 0; top: clamp(84px, 13.5vh, 150px); padding: 0 22px;
  text-align: center; pointer-events: none;
  transform: translateY(calc(var(--e) * -5vh)) scale(calc(1 - var(--e) * .2));
  transform-origin: 50% 0;
}
h1 { font-weight: 800; }
.t1, .t2 { display: block; animation: float-in 1.1s cubic-bezier(.2, .7, .2, 1) backwards; }
.t1 {
  font-size: clamp(2.15rem, 5.6vw, 4.6rem); line-height: 1.08; letter-spacing: -.025em;
  background: linear-gradient(180deg, #fff 30%, #a9c6ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation-delay: .25s;
}
.t2 {
  margin: 16px auto 0; max-width: 30em;
  font-size: clamp(1.02rem, 2vw, 1.55rem); font-weight: 500; line-height: 1.4; letter-spacing: .01em; color: #c9d7f2;
  animation-delay: .5s;
}
/* Participating institutions under the title, two rows; they leave with the call line as the globe turns into a sphere. */
.insts {
  margin: 20px auto 0; font-size: clamp(13px, 1.02vw, 15.5px); font-weight: 500; line-height: 1.9; letter-spacing: .01em; color: #dfe7f7;
  opacity: calc(1 - var(--e) * 2.4);
  animation: float-in 1.1s cubic-bezier(.2, .7, .2, 1) .65s backwards;
}
.insts span { display: block; }
.insts i { font-style: normal; white-space: nowrap; }
.insts i + i::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 .95em; border-radius: 50%; background: var(--blue); opacity: .75; vertical-align: .28em; }
.collab {
  margin: 22px auto 0; max-width: 60em; font-size: 14px; line-height: 1.7; color: var(--muted);
  opacity: calc(1 - var(--e) * 2.4);
  animation: float-in 1.1s cubic-bezier(.2, .7, .2, 1) .85s backwards;
}
.collab b { display: block; color: var(--gold); font: 600 12.5px/1.8 var(--mono); letter-spacing: .14em; text-transform: uppercase; }

.cue {
  z-index: 1;
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font: 600 11px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: rgba(220, 232, 255, .8);
  opacity: calc(1 - var(--s) * 2); pointer-events: none;
}
.cue i { width: 1px; height: 30px; background: linear-gradient(180deg, rgba(220, 232, 255, .9), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: 50% 0; }

/* "from" only: the end state is the element's own style, so .collab's scroll-driven opacity is not overridden. */
@keyframes float-in { from { opacity: 0; transform: translateY(22px); filter: blur(8px); } }
@keyframes cue { 0%, 100% { transform: scaleY(.35); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ── Sections ── */
.sec { padding: clamp(64px, 11vh, 120px) 0; border-top: 1px solid var(--line); }
.col { width: min(820px, 100% - 44px); margin-inline: auto; }
.wide { width: min(1120px, 100% - 44px); margin-inline: auto; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; text-align: center; }
h2::after { content: ""; display: block; width: 44px; height: 2px; margin: 18px auto 0; background: var(--gold); border-radius: 2px; }
.sec-note { margin-top: 18px; text-align: center; color: var(--muted); }
.collab, .cfc-lead, .sec-note, .t2 { text-wrap: balance; }

/* Abstract */
#abstract { border-top: 0; }
.abstract { margin-top: 34px; font-size: clamp(1rem, 1.25vw, 1.09rem); line-height: 1.95; color: #cfd8ea; text-align: justify; }
.abstract strong { color: #fff; font-weight: 700; }

/* Call for contributors */
.cfc { background: radial-gradient(90% 60% at 50% 100%, rgba(40, 90, 210, .16), transparent 70%); }
.cfc-lead { margin: 26px auto 0; max-width: 34em; text-align: center; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.7; color: #dbe4f5; }
.points { margin-top: 46px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.points article { padding: 24px 24px 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.4; }
.points h3::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); vertical-align: 2px; }
.points p { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.75; }

.pill {
  padding: 7px 15px; border: 1px solid rgba(255, 200, 97, .55); border-radius: 999px;
  background: transparent; color: var(--gold); font: 600 13px/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.pill:hover { background: var(--gold); color: #1a1205; }
/* Buttons (also used by the pages in assets/pages.css) */
.btn {
  display: inline-block; padding: 12px 24px; border: 1px solid transparent; border-radius: 999px;
  font: 600 15px/1.3 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn-gold { background: var(--gold); color: #1a1205; box-shadow: 0 0 0 rgba(255, 200, 97, 0); }
.btn-gold:hover { background: #ffd684; box-shadow: 0 0 26px rgba(255, 200, 97, .35); }
.btn-line { border-color: rgba(156, 192, 255, .4); background: rgba(156, 192, 255, .04); color: var(--ink); }
.btn-line:hover { border-color: var(--blue); background: rgba(156, 192, 255, .12); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.cfc-more { margin-top: 34px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 16px; }
/* The contact address closes the call: label, address, and a button that opens a ready-made email. */
.cfc-contact { margin: clamp(44px, 7vh, 68px) auto 0; padding-top: clamp(30px, 5vh, 44px); max-width: 620px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; }
.cfc-contact .k { flex-basis: 100%; text-align: center; font: 600 11.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.cfc-contact b { font: 600 clamp(1.1rem, 1.7vw, 1.4rem)/1.3 var(--mono); letter-spacing: -.01em; color: var(--ink); overflow-wrap: anywhere; user-select: all; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .points { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav { gap: 16px; }
  .nav-links { gap: 16px; font-size: 13.5px; }
  .title { top: 86px; }
  .collab { font-size: 13px; }
  .abstract { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .t1, .t2, .collab, .cue i { animation: none; }
}
