@font-face {
  font-family: "IBM Plex Serif";
  src: url("/fonts/ibm-plex-serif-regular-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-light-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

:root {
  color-scheme: dark;
  background: #090909;
  color: #eeeeee;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }

main {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding: 80px 24px;
}

/* Keep single-finger drawing continuous while retaining browser pinch zoom. */
.has-field main { touch-action: pinch-zoom; }

.field {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 68% 62%, #191919 0%, #090909 72%);
}

.field::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 35% 17% at 50% 50%, #0909099c 0%, #09090944 50%, transparent 100%),
    radial-gradient(ellipse at center, transparent 22%, #09090933 60%, #090909b3 100%);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  animation: field-arrive 2s ease-out both;
}

.identity {
  text-align: center;
  pointer-events: none;
  animation: name-arrive 1.3s ease-out both;
}

h1 {
  margin: 0;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: clamp(2.05rem, 6.7vw, 5.75rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 2px 36px #090909;
}

.identity p {
  max-width: 32em;
  margin: 24px auto 0;
  color: #a6a6a6;
  font-size: clamp(0.8125rem, 1vw, 0.9375rem);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.065em;
}

.company-footer {
  position: absolute;
  bottom: max(31px, env(safe-area-inset-bottom));
  left: 50%;
  margin: 0;
  color: #888888;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.025em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.motion-toggle {
  position: absolute;
  bottom: max(16px, env(safe-area-inset-bottom));
  right: max(20px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: #888888;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 180ms, border-color 180ms, background 180ms;
}

.motion-toggle svg { width: 16px; height: 16px; }
.motion-toggle:hover { color: #e8e8e8; border-color: #88888844; background: #09090955; }
.motion-toggle:focus-visible { outline: 1px solid #cccccc; outline-offset: 2px; }
.play-icon, .motion-paused .pause-icon { display: none; }
.motion-paused .play-icon { display: block; }

::selection { background: #88888855; color: #fff; }

@keyframes field-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes name-arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .identity p { max-width: 25em; margin-top: 20px; }
  .field::after {
    background:
      radial-gradient(ellipse 80% 18% at 50% 50%, #090909aa, #09090944 55%, transparent 100%),
      radial-gradient(ellipse at center, transparent 12%, #09090933 65%, #090909a6 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  canvas, .identity { animation: none; }
  .motion-toggle { display: none; }
  .has-field main { touch-action: auto; }
}
