:root {
  color-scheme: dark;
  --page-bg: #050505;
  --panel-bg: rgba(10, 10, 10, 0.92);
  --line: rgba(245, 245, 245, 0.28);
  --text: #f5f5f5;
  --muted: #b7b7b7;
  --fixed-nav-bg: rgba(5, 5, 5, 0.92);
  --fixed-nav-text: #f5f5f5;
  --fixed-nav-height: 78px;
  --dino-bg: #141414;
  --dino-filter: grayscale(1) invert(1) contrast(2.45);
  --hero-hand-duration: 6400ms;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--page-bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--page-bg);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.site-frame {
  position: relative;
  width: min(100%, 1446px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--page-bg);
}

.layout-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.hero-hands {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  perspective: 1200px;
}

.hero-hand {
  position: absolute;
  top: 7.1587%;
  width: 34.3252%;
  height: auto;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: transform, opacity;
  animation-duration: var(--hero-hand-duration);
  animation-timing-function: cubic-bezier(0.36, 0, 0.12, 1);
  animation-fill-mode: both;
}

.hero-hand-left {
  left: -0.0692%;
  animation-name: handEnterDepth;
  transform-origin: 20% 55%;
}

.hero-hand-right {
  right: 0;
  animation-name: handEnterDepth;
  transform-origin: 80% 55%;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.fixed-top-nav {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 18;
  width: min(100%, 1446px);
  height: calc(min(100vw, 1446px) * 78 / 1446);
  max-height: 78px;
  overflow: hidden;
  background: var(--page-bg);
  transform: translateX(-50%);
}

.fixed-top-nav[hidden] {
  display: none;
}

.fixed-top-nav__image {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.fixed-top-nav__hotspots {
  position: absolute;
  inset: 0;
}

.fixed-top-nav__hit {
  position: absolute;
  display: block;
  border: 0;
  padding: 0;
  color: transparent;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.fixed-top-nav__hit:focus-visible {
  outline: 2px solid rgba(245, 245, 245, 0.85);
  outline-offset: -2px;
}

.dino-stage {
  position: absolute;
  left: 17.704%;
  top: 38.038%;
  z-index: 2;
  width: 64.661%;
  height: 7.213%;
  overflow: hidden;
  background: var(--dino-bg);
  isolation: isolate;
}

.chromium-dino {
  position: absolute;
  left: 0;
  top: 0;
  outline: none;
  transform-origin: 0 0;
  will-change: transform;
}

.chromium-dino .runner-container {
  position: relative;
  overflow: hidden;
  background: var(--dino-bg);
}

.chromium-dino .runner-canvas {
  display: block;
  outline: none;
  cursor: pointer;
  touch-action: manipulation;
  filter: var(--dino-filter);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.chromium-dino:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(5, 5, 5, 0.42);
}

.icon-offline,
.chromium-dino-resources {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  border: 0;
  padding: 0;
  color: transparent;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.hotspot::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  border: 1px solid rgba(245, 245, 245, 0.35);
  background: rgba(245, 245, 245, 0.04);
  transition: opacity 160ms ease;
}

.hotspot:hover::after,
.hotspot:focus-visible::after {
  opacity: 1;
}

.hotspot:focus-visible {
  outline: 2px solid rgba(245, 245, 245, 0.85);
  outline-offset: 3px;
}

.hotspot-hints-disabled .hotspot::after {
  display: none;
}

.contact-modal[hidden] {
  display: none;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.78);
}

.modal-panel {
  position: relative;
  width: min(100%, 520px);
  padding: 34px;
  border: 1px solid var(--line);
  background: var(--panel-bg);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(18px);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.modal-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.modal-panel h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
}

.modal-copy {
  max-width: 42ch;
  margin: 18px 0 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form span {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 13px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(245, 245, 245, 0.78);
}

.contact-form small {
  color: var(--muted);
  font-size: 12px;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: #f0c7c7;
  font-size: 13px;
}

.submit-button {
  min-height: 48px;
  border: 1px solid rgba(245, 245, 245, 0.85);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: rgba(245, 245, 245, 0.1);
}

.submit-button:active,
.modal-close:active {
  transform: translateY(1px);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 48px));
  padding: 13px 16px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(10, 10, 10, 0.9);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .contact-modal {
    align-items: end;
    padding: 14px;
  }

  .modal-panel {
    padding: 24px;
  }

  .hotspot:hover::after {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-hand {
    opacity: 1;
    filter: none;
    animation: none;
  }
}

@keyframes handEnterDepth {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, -230px) scale(0.66);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}
