:root {
  --sand: #e5d6c3;
  --coal: #11100f;
  --plus: rgba(245, 238, 229, 0.82);
  --plus-glow: rgba(245, 238, 229, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-height: -webkit-fill-available;
  background: var(--coal);
}

body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-height: -webkit-fill-available;
  margin: 0;
  overflow: hidden;
  background: var(--coal);
  color: var(--sand);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

@supports (height: 100dvh) {
  html,
  body {
    height: 100dvh;
    min-height: 100dvh;
  }
}

@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }
}

.app-shell {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  min-height: 100svh;
  height: 100dvh;
  overflow: hidden;
  background: var(--coal);
}

@supports (-webkit-touch-callout: none) {
  .app-shell {
    min-height: -webkit-fill-available;
  }
}

.background-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--coal);
  z-index: 0;
}

.overlay-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 18;
  isolation: isolate;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transform: scale(1.018);
  transition: opacity 2.4s ease-in-out;
  filter: saturate(0.82) contrast(1.08) brightness(0.66);
}

.bg-video.is-active {
  opacity: 1;
}

.vignette-layer,
.shadow-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.vignette-layer {
  background:
    radial-gradient(circle at center, rgba(0, 0, 0, 0) 31%, rgba(0, 0, 0, 0.2) 58%, rgba(0, 0, 0, 0.76) 100%);
}

.shadow-layer {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.04) 24%, rgba(0, 0, 0, 0.2) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.03) 15%, rgba(0, 0, 0, 0.03) 85%, rgba(0, 0, 0, 0.15) 100%);
  mix-blend-mode: multiply;
}

.system-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.system-layer {
  z-index: 2;
}

.cursor-cloud {
  --cloud-size: 300px;
  --cloud-opacity: 0;
  --cloud-scale-x: 1;
  --cloud-scale-y: 1;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--cloud-size);
  height: var(--cloud-size);
  border-radius: 46% 54% 61% 39% / 52% 44% 56% 48%;
  opacity: var(--cloud-opacity);
  pointer-events: none;
  z-index: 1;
  transform:
    translate3d(-50%, -50%, 0)
    scale(var(--cloud-scale-x), var(--cloud-scale-y))
    rotate(0deg);
  transform-origin: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.72) 32%, rgba(0, 0, 0, 0.34) 54%, rgba(0, 0, 0, 0) 72%),
    repeating-radial-gradient(circle at 50% 50%, rgba(245, 243, 238, 0.085) 0 1px, rgba(245, 243, 238, 0) 1px 5px);
  -webkit-backdrop-filter: grayscale(1) saturate(0) contrast(1.72) brightness(0.18);
  backdrop-filter: grayscale(1) saturate(0) contrast(1.72) brightness(0.18);
  mix-blend-mode: multiply;
  filter: blur(0.25px);
  -webkit-mask-image:
    radial-gradient(ellipse at 50% 50%, #000 0%, #000 46%, transparent 74%);
  mask-image:
    radial-gradient(ellipse at 50% 50%, #000 0%, #000 46%, transparent 74%);
  will-change: transform, opacity;
}

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

.cursor-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

.plus-mark {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  color: var(--plus);
  text-shadow: 0 0 18px var(--plus-glow);
  opacity: 1;
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1;
  letter-spacing: 0;
  transition:
    color 180ms ease,
    text-shadow 180ms ease,
    transform 180ms ease;
  will-change: transform;
  user-select: none;
  z-index: 2;
}

.plus-mark.is-hot {
  color: rgba(255, 250, 242, 0.96);
}

.hero {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 22;
  pointer-events: none;
}

.hero-logo {
  width: min(30vw, 560px);
  max-width: 560px;
  min-width: 230px;
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.16));
  transition:
    opacity 900ms ease,
    transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: 1500ms;
}

.hero-logo.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 720px) {
  html,
  body {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
  }

  .app-shell,
  .background-stage,
  .overlay-stage,
  .cursor-layer {
    width: 100vw;
    min-height: 100svh;
    height: 100dvh;
  }

  .background-stage,
  .overlay-stage,
  .cursor-layer {
    inset:
      calc(-1 * env(safe-area-inset-top))
      0
      calc(-1 * env(safe-area-inset-bottom))
      0;
    height: calc(100dvh + env(safe-area-inset-top) + env(safe-area-inset-bottom));
  }

  .bg-video {
    height: calc(100% + env(safe-area-inset-top) + env(safe-area-inset-bottom));
    transform: scale(1.04);
  }

  .cursor-cloud {
    --cloud-size: 82px;
    border-radius: 50%;
    inset: auto;
  }

  .hero {
    padding:
      env(safe-area-inset-top)
      env(safe-area-inset-right)
      env(safe-area-inset-bottom)
      env(safe-area-inset-left);
  }

  .hero-logo {
    width: min(50vw, 390px);
  }

  .plus-mark {
    font-size: clamp(16px, 3.4vw, 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-video,
  .hero-logo,
  .plus-mark,
  .cursor-cloud {
    transition-duration: 1ms;
    transition-delay: 0ms;
  }
}
