
/* Armillary experiment, /experiment/armillary/. Full-screen canvas under the site menu. */
.armillary-page {
  color-scheme: dark;
  --bg: #080808;
  --ink: #fafafa;
  --ink-2: rgba(250, 250, 250, 0.68);
  --ink-3: rgba(250, 250, 250, 0.42);
  --rule: rgba(250, 250, 250, 0.14);
  --amber: #F2C27B;
  --serif: "STIX Two Text", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html:has(body.armillary-page), body.armillary-page { height: 100%; }
body.armillary-page { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); overflow: hidden; -webkit-font-smoothing: antialiased; }


#armillary { position: fixed; inset: 0; z-index: 0; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; }
#gl:active { cursor: grabbing; }
#gl.pointing { cursor: pointer; }
#leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
#leaders line { stroke: rgba(250, 250, 250, 0.38); stroke-width: 1; vector-effect: non-scaling-stroke; }
#leaders line.on { stroke: rgba(250, 250, 250, 0.85); }
#leaders circle { fill: var(--ink); }
#labels { position: absolute; inset: 0; pointer-events: none; }

.callout { position: absolute; left: 0; top: 0; pointer-events: auto; white-space: nowrap; font: 500 0.7rem/1.25 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: rgba(250, 250, 250, 0.82); will-change: transform; transition: color 0.2s, opacity 0.3s; }
.callout .n { display: block; margin-top: 0.3rem; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: none; color: var(--ink-3); }
.callout i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 0.55rem; vertical-align: 0.08em; }
.callout.on { color: var(--ink); }
.callout.left { text-align: right; }
.callout.left i { display: none; }
.callout.left .name::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-left: 0.55rem; vertical-align: 0.08em; background: var(--dot); }
.deg { position: absolute; left: 0; top: 0; font: 0.64rem/1 var(--mono); color: var(--ink-3); will-change: transform; }

#tip { position: absolute; left: 0; top: 0; max-width: 300px; padding: 0.6rem 0.75rem 0.65rem; background: rgba(10, 10, 12, 0.84); border: 1px solid var(--rule); backdrop-filter: blur(8px); pointer-events: none; will-change: transform; }
#tip .t { font: 1rem/1.2 var(--serif); }
#tip .m { margin-top: 0.3rem; font-size: 0.72rem; color: var(--ink-2); letter-spacing: 0.04em; }

#card:focus { outline: none; }
.card-link:focus-visible, .card-pager button:focus-visible, .card-close:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
#card { position: absolute; left: 0; top: 0; transform-origin: 0 0; width: 820px; height: 300px; display: grid; grid-template-columns: 340px 480px; grid-template-areas: "text image"; --fade: 1; background: rgba(12, 12, 14, calc(0.95 * var(--fade))); border: 1px solid rgba(242, 194, 123, calc(0.6 * var(--fade))); will-change: transform; backface-visibility: hidden; z-index: 15; }
.card-image { grid-area: image; margin: 0; width: 480px; height: 300px; overflow: hidden; background: #0b0b0c; }
.card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-text { grid-area: text; display: flex; flex-direction: column; padding: 1.6rem 1.7rem 1.4rem; min-width: 0; }
.card-eyebrow { margin: 0 0 0.9rem; font: 500 0.66rem/1.3 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.card-eyebrow b { color: var(--accent); font-weight: 500; }
#card h2 { margin: 0 0 0.75rem; font: 500 1.75rem/1.08 var(--serif); }
.card-summary { margin: 0; font-size: 0.84rem; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-link { font: 500 0.68rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); text-decoration: none; padding: 0.5rem 0; }
.card-link::after { content: " →"; }
.card-link:hover, .card-link:focus-visible { color: #ef6a76; }
.card-pager { display: flex; align-items: center; gap: 0.35rem; font: 0.68rem/1 var(--mono); color: var(--ink-3); }
.card-pager button, .card-close { background: none; border: 1px solid var(--rule); color: var(--ink-2); width: 28px; height: 28px; border-radius: 2px; font: 1rem/1 var(--sans); cursor: pointer; }
.card-pager button:hover, .card-close:hover { color: var(--ink); border-color: var(--ink-3); }
.card-close { position: absolute; top: 10px; right: 10px; background: rgba(8, 8, 8, 0.6); }

.corner { position: absolute; margin: 0; font: 500 0.62rem/1.6 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); pointer-events: none; }
.corner span { letter-spacing: 0.06em; text-transform: none; }
/* The description sits in a narrow column under the logo, clear of the instrument. */
.corner-tl { top: calc(92px + env(safe-area-inset-top, 0px)); left: max(16px, 3vw); width: min(13.5rem, 22vw); color: var(--ink-2); }
.corner-tl span { display: block; margin-top: 0.55rem; font-size: 0.74rem; line-height: 1.55; letter-spacing: 0.02em; color: var(--ink-3); }
.corner-bl { bottom: calc(22px + env(safe-area-inset-bottom, 0px)); left: max(16px, 3vw); }
.corner-br { bottom: calc(22px + env(safe-area-inset-bottom, 0px)); right: max(16px, 3vw); text-align: right; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#index.fallback { position: fixed; inset: 80px 0 0; overflow: auto; padding: 1rem max(16px, 4vw) 4rem; width: auto; height: auto; clip-path: none; white-space: normal; display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
#index h2 { font: 500 0.72rem/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
#index ul { list-style: none; margin: 0; padding: 0; }
#index a { color: var(--ink); text-decoration: none; font: 1rem/1.7 var(--serif); }

#debug { position: fixed; right: 12px; top: 70px; z-index: 30; font: 11px/1.5 var(--mono); color: #9f9; background: rgba(0, 0, 0, 0.7); padding: 6px 8px; white-space: pre; }

@media (max-width: 760px) {
  .corner-tl, .corner-br { display: none; }
  #card { width: 340px; height: auto; grid-template-columns: 340px; grid-template-rows: 212.5px auto; grid-template-areas: "image" "text"; }
  .card-image { width: 340px; height: 212.5px; }
  .card-text { padding: 1.1rem 1.2rem 1rem; min-height: 210px; }
  #card h2 { font-size: 1.45rem; }
  .callout { font-size: 0.62rem; letter-spacing: 0.18em; }
  .callout .n { display: none; }
}

/* The glow fades in with the card, so only the image leaves the ring at first. */
#card::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--fade); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 46px rgba(242, 194, 123, 0.2), 0 30px 80px rgba(0, 0, 0, 0.7); }

/* Inner layers: technique hubs, the world shell and the time axis. */
.callout.hub { font-size: 0.6rem; letter-spacing: 0.2em; color: rgba(250, 250, 250, 0.72); }
.callout.hub.on { color: var(--ink); }
.callout.shell .name i { background: var(--amber); }
#leaders line.hub-line { stroke: rgba(250, 250, 250, 0.28); }
.year { position: absolute; left: 0; top: 0; font: 0.6rem/1 var(--mono); color: rgba(250, 250, 250, 0.5); will-change: transform; pointer-events: none; }
#tip .l { margin-top: 0.45rem; padding-top: 0.45rem; border-top: 1px solid var(--rule); font: 0.8rem/1.45 var(--serif); color: var(--ink-2); }
@media (max-width: 760px) {
  .callout.hub:not(.on), #leaders line.hub-line { display: none; }
  .year { display: none; }
}

/* The title is read by screen readers over the 3D scene and shown with the still on phones. */
.armillary-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Phones: a still image and the page list instead of the 3D scene. */
.still { display: none; }
html.armillary-still, html.armillary-still body.armillary-page { height: auto; overflow: auto; }
.armillary-still #armillary { position: static; padding: calc(96px + env(safe-area-inset-top, 0px)) max(16px, 5vw) calc(3rem + env(safe-area-inset-bottom, 0px)); }
.armillary-still #gl, .armillary-still #leaders, .armillary-still #labels, .armillary-still #tip, .armillary-still #card, .armillary-still .corner { display: none !important; }
.armillary-still .armillary-title { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; margin: 0 0 0.4rem; font: 500 2.4rem/1.05 var(--serif); }
.armillary-still .still { display: block; }
.still-line { margin: 0 0 1.4rem; color: var(--ink-2); font-size: 1rem; line-height: 1.5; max-width: 32rem; }
.still img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.still-note { margin: 1rem 0 0; color: var(--ink-3); font-size: 0.85rem; }
.armillary-still #index { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; display: grid; gap: 1.6rem; margin-top: 2rem; }
.armillary-still #index h2 { margin: 0 0 0.5rem; }
.armillary-still #index ul { margin: 0; padding: 0; list-style: none; }
.armillary-still #index a { color: var(--ink); text-decoration: none; font: 1.02rem/1.75 var(--serif); }

/* Menu: on this page it folds into the burger at every size, so the scene never covers it.
   It opens as a small panel under the burger, on a dark backdrop. */
.armillary-page .nav .container { position: relative; grid-template-columns: auto 1fr auto; }
.armillary-page .nav-links, .armillary-page .nav-contact, .armillary-page .nav-more-toggle { display: none; }
.armillary-page .nav-toggle { display: inline-flex; grid-column: 3; grid-row: 1; background: rgba(8, 8, 8, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.armillary-page .nav-brand { padding: 0.35rem; margin: -0.35rem; border-radius: 0.25rem; background: rgba(8, 8, 8, 0.45); }
.armillary-page .nav.is-open { background: transparent; }
.armillary-page .nav.is-open .nav-links { display: flex; flex-direction: column; gap: 0.95rem; position: absolute; top: calc(100% + 0.6rem); right: 0; min-width: 13rem; margin: 0; padding: 1.15rem 1.35rem 1.2rem; background: rgba(8, 8, 8, 0.94); border: 1px solid rgba(250, 250, 250, 0.12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.armillary-page .nav.is-open .nav-links a { font-size: 1rem; color: rgba(250, 250, 250, 0.78); }
.armillary-page .nav.is-open .nav-links a:hover, .armillary-page .nav.is-open .nav-links a.active { color: var(--ink); }
.armillary-page .nav.is-open .nav-more, .armillary-page .nav.is-open .nav-more-list { display: contents; }
.armillary-page .nav.is-open .nav-more-list { opacity: 1; pointer-events: auto; transform: none; }
.armillary-page .nav.is-open .nav-more-list::before { display: none; }
.armillary-page .nav.is-open .nav-more-list a { padding: 0; }
.armillary-page .nav.is-open .nav-links-contact { display: block; padding-top: 0.6rem; border-top: 1px solid rgba(250, 250, 250, 0.12); }
.armillary-page .nav.is-open .nav-links a.active::after { display: none; }

/* The card plays a work's loop over its first image. */
.card-image { position: relative; }
.card-image video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
