:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #000;
  color: #e9e9e9;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  min-width: 240px;
  min-height: 100%;
  margin: 0;
  background: #000;
}

body {
  min-height: 100svh;
  overflow: hidden;
}

#experience {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(28px, env(safe-area-inset-top)) 20px max(64px, env(safe-area-inset-bottom));
}

.logo-stage {
  position: relative;
  width: min(86vw, 860px);
  height: min(67svh, 600px);
  min-height: 180px;
  isolation: isolate;
}

#fallback {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  inset: 0;
}

#logo-canvas {
  position: fixed;
  display: block;
  inset: 0;
  width: 100vw;
  height: 100svh;
  opacity: 0;
  outline: none;
  touch-action: none;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 700ms ease;
}

#logo-canvas:active { cursor: grabbing; }

#logo-canvas:focus-visible {
  outline: 1px solid #6d6d6d;
  outline-offset: -12px;
  border-radius: 4px;
}

#fallback {
  object-fit: contain;
  padding: 10%;
  user-select: none;
  pointer-events: none;
  transition: opacity 500ms ease;
}

.is-ready #logo-canvas { opacity: 1; }
.is-ready #fallback { opacity: 0; }
.no-webgl #logo-canvas { display: none; }
.no-webgl #fallback { opacity: 1; }
.no-webgl #hint { display: none; }

h1 {
  position: relative;
  margin: clamp(18px, 3.3svh, 36px) 0 0;
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .16em;
  text-align: center;
}

#hint {
  position: fixed;
  inset: auto 20px max(27px, env(safe-area-inset-bottom));
  color: #777;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .12em;
  text-align: center;
  pointer-events: none;
  opacity: 0;
}

.is-ready #hint { animation: hint-appear 7s ease 1.2s both; }
.has-interacted #hint { animation: none; opacity: 0; }

@keyframes hint-appear {
  0%, 100% { opacity: 0; }
  15%, 70% { opacity: 1; }
}

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

@media (max-width: 600px) {
  #experience { padding-inline: 10px; padding-bottom: 70px; }
  .logo-stage { width: 98vw; height: min(55svh, 460px); }
  h1 { margin-top: 18px; font-size: 12px; letter-spacing: .14em; }
}

@media (max-height: 500px) and (orientation: landscape) {
  #experience { padding-block: 14px 36px; }
  .logo-stage { width: min(68vw, 580px); height: 70svh; min-height: 120px; }
  h1 { margin-top: 5px; font-size: 11px; }
  #hint { bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  #logo-canvas, #fallback { transition: none; }
  .is-ready #hint { animation: none; opacity: 0; }
}
