@font-face {
  font-family: "Rye";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/rye-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #0a1624;
  color: #f4f0e9;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #0a1624;
}

button {
  font: inherit;
}

.site-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  height: 100svh;
  overflow: hidden;
  background: #0a1624;
}

.landscape,
.landscape__image,
.atmosphere {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.landscape {
  z-index: -3;
  overflow: hidden;
}

.landscape__image {
  max-width: none;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.015) translate3d(0, 0, 0);
  transform-origin: 58% 55%;
  animation: horizon-drift 44s linear infinite alternate;
  will-change: transform;
}

.atmosphere {
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 12, 21, 0.36) 0%, rgba(4, 12, 21, 0.09) 38%, rgba(4, 12, 21, 0.02) 70%),
    linear-gradient(180deg, rgba(2, 8, 15, 0.08) 0%, transparent 40%, rgba(3, 9, 16, 0.2) 100%);
}

.brand {
  position: absolute;
  top: clamp(1.75rem, 5.2vw, 5rem);
  left: clamp(1.5rem, 5.3vw, 5.25rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  color: #f5f0e7;
  text-transform: uppercase;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.18);
  animation: brand-arrival 1.5s 0.15s ease-out both;
}

.brand__name {
  font-family: "Rye", Rockwell, Georgia, serif;
  font-size: clamp(2.55rem, 4.85vw, 5.25rem);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: 0.035em;
}

.brand__descriptor {
  margin-left: 0.2em;
  font-size: clamp(0.68rem, 0.83vw, 0.88rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.45em;
  opacity: 0.82;
}

.motion-toggle {
  position: absolute;
  right: clamp(1rem, 2.5vw, 2rem);
  bottom: clamp(1rem, 2.5vw, 2rem);
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(245, 240, 231, 0.42);
  border-radius: 999px;
  background: rgba(4, 12, 20, 0.14);
  color: #f5f0e7;
  cursor: pointer;
  opacity: 0.64;
  transition: opacity 180ms ease, background-color 180ms ease, border-color 180ms ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.motion-toggle:hover,
.motion-toggle:focus-visible {
  border-color: rgba(245, 240, 231, 0.8);
  background: rgba(4, 12, 20, 0.34);
  opacity: 1;
}

.motion-toggle:focus-visible {
  outline: 2px solid #f5f0e7;
  outline-offset: 3px;
}

.motion-toggle svg {
  grid-area: 1 / 1;
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.motion-toggle__play {
  display: none;
}

.site-shell[data-motion="paused"] .landscape__image {
  animation-play-state: paused;
}

.site-shell[data-motion="paused"] .motion-toggle__pause {
  display: none;
}

.site-shell[data-motion="paused"] .motion-toggle__play {
  display: block;
}

@keyframes horizon-drift {
  from {
    transform: scale(1.015) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.155) translate3d(-2.2%, -1%, 0);
  }
}

@keyframes brand-arrival {
  from {
    opacity: 0;
    transform: translateY(0.65rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .landscape__image {
    object-position: 78% center;
    transform-origin: 76% 55%;
  }

  .atmosphere {
    background:
      linear-gradient(90deg, rgba(4, 12, 21, 0.33) 0%, rgba(4, 12, 21, 0.05) 80%),
      linear-gradient(180deg, rgba(2, 8, 15, 0.12) 0%, transparent 46%, rgba(3, 9, 16, 0.23) 100%);
  }

  .brand {
    top: max(1.75rem, env(safe-area-inset-top));
    left: max(1.5rem, env(safe-area-inset-left));
  }

  .brand__name {
    letter-spacing: 0.02em;
  }

  .motion-toggle {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .landscape__image,
  .brand {
    animation: none;
  }

  .motion-toggle {
    display: none;
  }
}
