* { margin: 0; }

body { background: #0b0a10; overflow: hidden; }

main {
  position: fixed;
  left: 50%;
  top: 50%;
  width: max(100vw, 177.78vh);
  aspect-ratio: 16 / 9;
  translate: -50% -50%;
  container-type: inline-size;
  color: #f1eff5;
  scale: var(--s, 1);
  transition: scale 0.5s;
}

img, .arms, canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  translate: calc(var(--tx, 0) * -2.3cqw) calc(var(--ty, 0) * -1.3cqw);
}

.arms { background: url(media/home/bg.jpg) 0 / 100% 100%; mask: url(media/home/fg.png) 0 / 100% 100%; }

h1 {
  position: absolute;
  inset: 7% 0 auto;
  text-align: center;
  font: 400 6.2cqw/1 "Marcellus", Georgia, serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

p {
  position: absolute;
  inset: 78% 0 auto;
  text-align: center;
  font: 400 max(1.5cqw, 13px)/1.35 "Marcellus", Georgia, serif;
  letter-spacing: 0.02em;
  color: #c9c4d6;
}

nav {
  position: absolute;
  inset: 85% 0 auto;
  display: flex;
  justify-content: center;
  gap: max(3cqw, 26px);
  font: 500 max(1.05cqw, 14px) "Hanken Grotesk", system-ui, sans-serif;
}

nav a {
  color: #f1eff5;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(241, 239, 245, 0.25);
  transition: border-color 0.3s, color 0.3s;
}

nav a:hover { border-color: #e9b949; color: #e9b949; }

@media (max-aspect-ratio: 8/5) {
  main { width: 100vw; mask: linear-gradient(#0000, #000 9%, #000 88%, #0000); }
}

@media (max-aspect-ratio: 3/4) {
  main {
    width: min(100vw, 56.25vh);
    aspect-ratio: 9 / 16;
    mask: linear-gradient(90deg, #0000, #000 5%, #000 95%, #0000), linear-gradient(#0000, #000 5%, #000 95%, #0000);
    mask-composite: intersect;
  }
  .arms { display: none; }
  h1 { top: 62.5%; font-size: 14cqw; }
  p { top: 74.5%; font-size: 3.6cqw; padding: 0 8%; }
  nav { top: 84%; font-size: 3.8cqw; gap: 8cqw; }
}

@media (prefers-reduced-motion: reduce) {
  main { transition: none; }
}
