/* Helvetica: use the real face when the visitor has it installed (macOS,
   iOS), otherwise TeX Gyre Heros — a free, metric-compatible Helvetica
   clone (GUST Font License) bundled with the site. Helvetica itself is
   commercial and can't be self-hosted. */
@font-face {
  font-family: 'Helvetica Site';
  src: local('Helvetica Neue'), local('HelveticaNeue'), local('Helvetica'),
    url('../fonts/TeXGyreHeros-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Helvetica Site';
  src: local('Helvetica Neue Bold'), local('HelveticaNeue-Bold'), local('Helvetica Bold'), local('Helvetica-Bold'),
    url('../fonts/TeXGyreHeros-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Helvetica Site';
  src: local('Helvetica Neue Bold Italic'), local('HelveticaNeue-BoldItalic'),
    local('Helvetica Bold Oblique'), local('Helvetica-BoldOblique'),
    url('../fonts/TeXGyreHeros-bolditalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@property --ry {
  syntax: '<percentage>';
  initial-value: 100%;
  inherits: false;
}
@property --ly {
  syntax: '<percentage>';
  initial-value: 100%;
  inherits: false;
}

:root {
  --bg: #0a0807;
  /* Same text colour as mesh3d.gallery; with mix-blend-mode: difference it
     reads as a cool lavender/ice tone that inverts the scene behind it. */
  --fg: #cfdee5;
  --brand: #ff7a1a;
  --brand-glow: rgba(255, 122, 26, 0.45);
  --pad-x: 40px;
  --title-size: 12vw;
  --vh: 100vh;
  --font: 'Helvetica Site', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

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

/* Single-screen page: no scrolling anywhere. */
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

#scene,
.fallback-dots {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.fallback-dots {
  display: none;
}
.no-webgl #scene {
  display: none;
}
.no-webgl .fallback-dots {
  display: block;
}

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

/* ------------------------------------------------------------ stage */
/* No stacking context here (no fixed/transform/z-index/opacity) so the
   text's mix-blend-mode: difference composites against the WebGL canvas
   instead of an empty isolated layer. */
.stage {
  position: absolute;
  inset: 0;
  height: var(--vh);
  pointer-events: none;
}
.stage a,
.stage button {
  pointer-events: auto;
}

/* Character mask: each glyph slides up out of an overflow-hidden box. */
.w {
  display: inline-block;
  white-space: nowrap;
  vertical-align: bottom;
}
.m {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1;
  padding-bottom: 0.22em;
  margin-bottom: -0.22em;
}
.c {
  display: inline-block;
  white-space: pre;
}
.c[data-state='below'],
.title-logo[data-state='below'] {
  transform: translateY(110%);
  opacity: 0;
}
.c[data-state='in'],
.title-logo[data-state='in'] {
  transform: translateY(0);
  opacity: 1;
}
.c[data-state='above'] {
  transform: translateY(-110%);
  opacity: 0;
}
.sp {
  display: inline-block;
  width: 0.3em;
}

/* ------------------------------------------------------------ chrome */
.chrome {
  opacity: 0;
  transition: opacity 900ms ease;
}
.chrome.in {
  opacity: 1;
}

.corner {
  position: absolute;
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
  mix-blend-mode: difference;
}
.tl {
  top: calc(24px + env(safe-area-inset-top, 0px));
  left: calc(var(--pad-x) + env(safe-area-inset-left, 0px));
}
.tr {
  top: calc(24px + env(safe-area-inset-top, 0px));
  right: calc(var(--pad-x) + env(safe-area-inset-right, 0px));
}
.bl {
  bottom: calc(var(--pad-x) + env(safe-area-inset-bottom, 0px));
  left: calc(var(--pad-x) + env(safe-area-inset-left, 0px));
}
.br {
  bottom: calc(var(--pad-x) + env(safe-area-inset-bottom, 0px));
  right: calc(var(--pad-x) + env(safe-area-inset-right, 0px));
}


.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}
.eq i {
  display: block;
  width: 2px;
  height: 100%;
  background: var(--brand);
  transform-origin: bottom;
  animation: eq 1.1s ease-in-out infinite;
}
.eq i:nth-child(2) {
  animation-delay: -0.35s;
}
.eq i:nth-child(3) {
  animation-delay: -0.7s;
}
@keyframes eq {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}

.share {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.social,
.cta {
  color: inherit;
  text-decoration: none;
}
/* Primary action: outlined orange pill. */
.cta {
  padding: 8px 14px 7px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  color: var(--brand);
  transition: background-color 200ms ease, color 200ms ease;
}
.cta:hover,
.cta:focus-visible {
  background: var(--brand);
  color: var(--bg);
}
.share:hover .share-label,
.share:focus-visible .share-label,
.social:hover,
.social:focus-visible {
  color: var(--brand);
}
.share:focus-visible,
.social:focus-visible,
.cta:focus-visible {
  outline: 1px solid var(--brand);
  outline-offset: 4px;
}

/* ------------------------------------------------------------ title */
.title {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: calc(var(--pad-x) + env(safe-area-inset-top, 0px)) var(--pad-x) 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-weight: 400;
  font-size: var(--title-size);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--fg);
  mix-blend-mode: difference;
}
/* Centred logo: the vector logo is used as a mask over a block filled
   with the text colour, so it inherits --fg and the title's difference
   blend exactly like the lettering. Centred with flex (not transform) so
   nothing isolates it from the canvas. */
.logo-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--pad-x);
}
.logo-mask {
  display: block;
  overflow: hidden;
  width: min(100%, 64vw, calc(22vh * 6.04));
}
.title-logo {
  display: block;
  width: 100%;
  aspect-ratio: 5436 / 900;
  background: currentColor;
  -webkit-mask: url('../logo.svg') no-repeat center / contain;
  mask: url('../logo.svg') no-repeat center / contain;
}
.title-line {
  display: block;
  width: 100%;
}
.title-line.bottom {
  text-align: right;
}
.title-inner {
  display: inline-block;
  white-space: nowrap;
}
.row {
  display: inline-block;
}
.row + .row {
  margin-left: 0.3em;
}

/* ------------------------------------------------------------ loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 100% var(--ry), 0 var(--ly));
  transition: --ry 700ms linear, --ly 700ms linear 200ms;
  will-change: clip-path;
}
.loader.revealed {
  --ry: 0%;
  --ly: 0%;
}
.loader .dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 85%, transparent 100%);
}
.loader-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.loader-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand);
  box-shadow: 0 0 12px var(--brand-glow);
  transition: width 180ms cubic-bezier(0.33, 1, 0.68, 1);
}
.loader-pct {
  position: absolute;
  left: 40px;
  bottom: 40px;
  margin: 0;
  font-size: 200px;
  line-height: 1;
  color: var(--fg);
}

/* ------------------------------------------------------------ mobile */
@media (max-width: 768px) {
  :root {
    --pad-x: 16px;
  }
  .corner {
    font-size: 12px;
  }
  .tl {
    display: none;
  }
  .links {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .logo-mask {
    width: 100%;
  }
  /* Let the copyright wrap instead of colliding with the links. */
  .br {
    max-width: 42%;
    text-align: right;
  }
  .title {
    padding-top: calc(32px + env(safe-area-inset-top, 0px));
    /* Clear the stacked footer links. */
    padding-bottom: 132px;
  }
  .row {
    display: block;
  }
  .row + .row {
    margin-left: 0;
  }
  .loader-pct {
    font-size: 22vw;
    left: 24px;
    bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c,
  .chrome,
  .loader {
    transition: none !important;
  }
  .eq i {
    animation: none;
  }
}
