@font-face {
  font-family: Roboto;
  src: url("assets/Roboto.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Roboto, Arial, sans-serif;
  color: #f5f5f5;
  background: #000;
  --muted: #a6a6a6;
  --rule: #292929;
  --focus: #83baff;
}

* { box-sizing: border-box; }
body { margin: 0; }
a, button { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; }

.top-bar {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  display: flex;
  justify-content: flex-end;
}
.top-bar button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  background: #000;
  border: 1px solid var(--rule);
  border-radius: 0.25rem;
  cursor: pointer;
  font: 500 0.875rem Roboto, Arial, sans-serif;
}
.top-bar button:hover { border-color: var(--muted); }

.startup {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 4.5rem 0 5.25rem;
  text-align: center;
}
.startup-view { position: relative; }
.model-stage {
  position: relative;
  width: min(90vw, 40rem, 72vh);
  aspect-ratio: 1.08;
  margin-inline: auto;
}
.model-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: grab;
  touch-action: none;
}
.model-stage:has(canvas:focus-visible) { outline: 2px solid var(--focus); outline-offset: 5px; }
.model-stage canvas.dragging { cursor: grabbing; }
.model-stage.model-ready canvas { opacity: 1; }
#rotate-hint {
  position: absolute;
  inset: 100% 0 auto;
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.startup h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.5rem, 7vw, 2.25rem);
  font-weight: 400;
  line-height: 1.15;
}
.browse-link {
  position: absolute;
  inset: auto auto 1.35rem;
  color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
  padding: 0.6rem 0.9rem;
}
.browse-link:hover { color: #fff; }

.downloads {
  width: min(100% - 2.5rem, 46rem);
  margin-inline: auto;
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.75rem, 9vw, 5.5rem) 2rem;
}
.downloads h2 {
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  font-weight: 500;
  margin: 0;
}
.description {
  max-width: 39rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 1rem 0 2rem;
}
.platforms { border-top: 1px solid var(--rule); }
.platforms details { border-bottom: 1px solid var(--rule); }
.platforms summary {
  display: grid;
  grid-template-columns: 1fr auto 1rem;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
  padding: 1rem 0;
  cursor: pointer;
  font-weight: 500;
}
.platforms summary::-webkit-details-marker { display: none; }
.platforms summary::after {
  content: "+";
  color: var(--focus);
  font-size: 1.25rem;
  line-height: 1;
  text-align: center;
}
.platforms details[open] summary::after { content: "−"; }
.platform-type { font-size: 0.875rem; color: var(--muted); font-weight: 400; }
.platforms p { margin: 0 0 1.2rem; color: var(--muted); line-height: 1.5; }
footer { margin-top: 3.5rem; font-size: 0.875rem; color: var(--muted); }

@media (max-width: 600px) and (orientation: portrait) {
  .model-stage { width: min(90vw, 70vh); }
}

@media (max-height: 430px) {
  .startup { padding-top: 3.5rem; padding-bottom: 3.75rem; }
  .model-stage { width: min(86vw, 54vh); }
}
