:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #061e19;
  color: #f2f0e6;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

:focus-visible,
.motion-pause:focus-visible ~ main .motion-control {
  outline: 2px solid #e2c78c;
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  padding: 10px 14px;
  background: #061e19;
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.motion-pause {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.home-scene {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  height: clamp(220px, 34svh, 340px);
  overflow: hidden;
  background: #092a22;
}

.scene-picture {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.scene-picture img {
  width: 100%;
  height: 100vh;
  height: 100svh;
  display: block;
  object-fit: cover;
  object-position: 84% center;
  transform-origin: 72% 38%;
  animation: mountain-drift 20s ease-in-out infinite alternate;
}

.scene-picture::before,
.scene-picture::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-picture::before {
  z-index: 1;
  background: linear-gradient(112deg, transparent 42%, #54c49819 48%, #c7ffe033 49.75%, #d9ffea75 50%, #79eac624 50.4%, transparent 56%);
  mix-blend-mode: screen;
  animation: mountain-light-pass 12s ease-in-out infinite;
}

.scene-picture::after {
  z-index: 2;
  background:
    linear-gradient(90deg, #061e1999, #061e1933 28%, transparent 54%),
    linear-gradient(0deg, #061e197a, transparent 26%);
}

.home-logo {
  position: relative;
  z-index: 3;
  width: clamp(210px, 23vw, 340px);
  margin: 0 0 0 clamp(28px, 5vw, 84px);
  filter: drop-shadow(0 10px 22px #02100b7d);
}

.home-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.home-summary {
  width: min(100% - 80px, 1280px);
  margin: 16px auto 24px;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--panel-edge);
  background: var(--panel);
}

.home-summary p {
  max-width: 69ch;
  margin: 0;
  color: #f5f7f0;
  font-size: clamp(.96rem, 1.35vw, 1.12rem);
  line-height: 1.65;
}

.home-footer {
  display: flex;
  flex: 1;
  align-items: flex-end;
}

.home-footer-inner {
  width: min(100% - 80px, 1280px);
  margin-inline: auto;
  padding-block: 16px;
  border-top: 1px solid #8db39932;
  color: #e0ebe1;
  font-size: .75rem;
}

.home-nav {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  width: min(100% - 80px, 1280px);
  margin: clamp(20px, 4svh, 40px) auto 0;
  border: 1px solid var(--panel-edge);
  background: var(--panel);
}

.home-nav a {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 10px 6px;
  border-inline-start: 1px solid #8db39932;
  box-shadow: inset 0 2px transparent;
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.home-nav a:first-child { border-inline-start: 0; }

.home-nav a:hover,
.home-nav a:focus-visible,
.home-nav a[aria-current] {
  background: #12382cb0;
  box-shadow: inset 0 2px #9acaa9;
}

.motion-control {
  position: absolute;
  right: clamp(14px, 3vw, 44px);
  top: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  border: 1px solid var(--panel-edge);
  background: var(--panel-strong);
  cursor: pointer;
  font-size: .75rem;
}

.motion-control:hover { color: #fff8e8; background: #12382c; }
.motion-resume { display: none; }
.motion-pause:checked ~ main .scene-picture img,
.motion-pause:checked ~ main .scene-picture::before { animation-play-state: paused; }
.motion-pause:checked ~ main .motion-playing { display: none; }
.motion-pause:checked ~ main .motion-resume { display: inline; }

@keyframes mountain-drift {
  from { transform: scale(1); }
  to { transform: scale(1.055); }
}

@keyframes mountain-light-pass {
  0%, 100% { transform: translateX(-70%); opacity: 0; }
  8% { opacity: 0; }
  17% { opacity: .85; }
  43% { opacity: .7; }
  56%, 99% { transform: translateX(72%); opacity: 0; }
}

@media (max-width: 760px) {
  .home-scene {
    height: clamp(170px, 28svh, 235px);
  }

  .home-logo {
    width: clamp(154px, 38vw, 235px);
    margin-left: 16px;
  }

  .scene-picture img {
    height: 100%;
    object-position: 78% 12%;
  }

  .scene-picture::after {
    background: linear-gradient(90deg, #061e19d9, #061e1973 40%, transparent 80%);
  }

  .home-summary,
  .home-nav,
  .home-footer-inner { width: calc(100% - 30px); }
  .home-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .home-nav a {
    min-height: 47px;
    border-inline-start: 0;
    font-size: .82rem;
  }

  .home-nav a:nth-child(n + 5) {
    border-top: 1px solid #8db39932;
  }
}

@media (max-width: 365px) {
  .home-nav a { font-size: .75rem; padding-inline: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene-picture img, .scene-picture::before { animation: none; }
  .scene-picture::before, .motion-pause, .motion-control { display: none; }
  .home-nav a { transition: none; }
}
