@font-face {
  font-family: "ABC Diatype";
  src: url("./fonts/ABCDiatype-Medium-Trial.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #050505;
  --page-x: 20px;
  --page-top: 24px;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body {
  overflow: hidden;
  background: var(--background);
  color: var(--foreground);
  font-family: "ABC Diatype", Arial, Helvetica, sans-serif;
  font-weight: 400;
  letter-spacing: -0.04em;
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }

.page-shell {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 100vh;
  background: transparent;
}

.site-header {
  position: absolute;
  top: max(var(--page-top), env(safe-area-inset-top));
  left: max(var(--page-x), env(safe-area-inset-left));
  right: max(var(--page-x), env(safe-area-inset-right));
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  font-size: 20px;
  line-height: 1.2;
  background: transparent;
  pointer-events: none;
}

.site-header a { pointer-events: auto; }

.brand {
  grid-column: 1 / span 2;
  display: inline-flex;
  align-items: flex-start;
  width: max-content;
  line-height: 0;
}

.brand-logo {
  display: block;
  width: 128px;
  height: auto;
}

.positioning {
  grid-column: 3 / span 3;
  margin: 0;
}

.contact {
  grid-column: 12;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: opacity 320ms ease, transform 320ms cubic-bezier(.22,.61,.36,1);
}

.contact span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
  transition: transform 320ms cubic-bezier(.22,.61,.36,1);
}

.contact:hover {
  opacity: 0.58;
  transform: translateX(-2px);
}
.contact:hover span { transform: scale(0.72); }

#interactive-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #fff;
}

#canvas-wrap,
#canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#canvas-wrap canvas { touch-action: none; }

.site-header a:focus-visible {
  outline: 1px solid #000;
  outline-offset: 4px;
}

#status,
.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;
}

noscript {
  position: absolute;
  left: 20px;
  bottom: 20px;
  max-width: 36rem;
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 760px) {
  :root { --page-x: 14px; --page-top: 16px; }

  .site-header {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    row-gap: 8px;
    font-size: clamp(14px, 4vw, 17px);
  }

  .brand { grid-column: 1 / span 2; }
  .brand-logo { width: clamp(94px, 25vw, 116px); }
  .positioning { grid-column: 3 / span 3; }
  .contact { grid-column: 6; }
}

@media (max-width: 430px) {
  .site-header {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    font-size: 15px;
  }

  .brand { grid-column: 1 / span 2; }
  .brand-logo { width: clamp(94px, 25vw, 116px); }
  .positioning {
    grid-column: 1 / span 3;
    grid-row: 2;
  }
  .contact {
    grid-column: 4;
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact,
  .contact span { transition-duration: 0.01ms; }
}
