/* WHS — WORKS */

/* If you hold a web licence for Century Gothic, place the font file in
   /fonts and uncomment this block; it will then be used everywhere.
@font-face {
  font-family: 'Century Gothic';
  src: url('fonts/CenturyGothic.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
*/

/* Questrial (SIL Open Font License, self-hosted) — a close geometric
   stand-in, used only for visitors who don't have Century Gothic. */
@font-face {
  font-family: 'Questrial';
  src: url('fonts/questrial-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000;
  --paper: #fff;
  --font: 'Century Gothic', CenturyGothic, 'Questrial', 'Avenir Next', Avenir, 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(18px, 3vw, 36px);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

#stage {
  position: fixed;
  inset: 0;
  background: var(--paper);
  touch-action: none;
}

#stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ---- Selection caption --------------------------------------------- */

/* Top-left: always inside the visible part of the embed, directly under the
   Squarespace navigation, even when the iframe extends below the fold. */
#info {
  position: fixed;
  left: var(--gutter);
  top: calc(var(--gutter) + env(safe-area-inset-top, 0px));
  max-width: calc(100% - 2 * var(--gutter));
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.6s;
  visibility: hidden;
  pointer-events: none;
}

#info.visible {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition-delay: 0.35s, 0.35s, 0s;
  pointer-events: auto;
}

#info-title {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.2em;
  line-height: 1.3;
  text-transform: uppercase;
}

#info-link {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

#info-link span { display: inline-block; transition: transform 0.3s ease; }
#info-link:hover { border-bottom-color: var(--ink); }
#info-link:hover span { transform: translateX(3px); }
#info-link:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
#info-link[hidden] { display: none; }

/* ---- Loader (temporary) -------------------------------------------- */

#loader {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 1px;
  margin-left: -48px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

#loader-bar {
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}

#loader.done { opacity: 0; }

/* ---- Fallbacks ------------------------------------------------------ */

#fallback {
  display: none;
  position: fixed;
  inset: auto var(--gutter) var(--gutter) var(--gutter);
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #777;
}

.no-webgl #fallback { display: block; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  #info-title { font-size: 13px; }
  #info-link { margin-top: 10px; }
}
