:root {
  --page-bg: #f2f2f2;
  --text: #777;
  --header-height: 72px;
  --gallery-height: 130px;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
  background: var(--page-bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}
.site-header {
  position: absolute; z-index: 5; top: 0; left: 0;
  width: 100%; height: var(--header-height);
  padding: 0 2.25vw;
  display: flex; align-items: center; justify-content: space-between;
}
.brand, .main-nav a {
  color: var(--text); text-decoration: none;
  font-size: 13px; font-weight: 400; letter-spacing: -.35px;
}
.brand { text-transform: uppercase; }
.main-nav { display: flex; gap: 36px; }
.main-nav a { transition: opacity .2s ease; }
.main-nav a:hover { opacity: .45; }

.main-stage {
  position: absolute; inset: var(--header-height) 0 var(--gallery-height);
  display: flex; align-items: center; justify-content: center;
  padding: 20px 4vw 0;
}
.hero-wrap {
  width: min(52vw, 920px); height: min(64vh, 610px);
  display: flex; align-items: center; justify-content: center;
}
#hero {
  display: block; max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
  box-shadow: 0 0 0 1px rgba(0,0,0,.012);
  opacity: 1; transition: opacity .22s ease;
}
#hero.is-changing { opacity: .18; }

.gallery {
  position: absolute; bottom: 0; left: 0;
  width: 100%; height: var(--gallery-height);
  display: flex; align-items: center; overflow: hidden;
}
.gallery-viewport {
  width: 100%; overflow: hidden; padding: 0 2.25vw;
  cursor: default; touch-action: pan-y;
}
.gallery-track {
  display: flex; align-items: center; gap: 18px;
  width: max-content; will-change: transform;
  transform: translate3d(0,0,0);
}
.gallery-thumb {
  display: block; flex: 0 0 96px;
  width: 96px; height: 96px; padding: 0;
  overflow: hidden; border: 0; background: #fff;
  cursor: pointer; opacity: .92;
  transition: opacity .2s ease, transform .2s ease;
}
.gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover, .gallery-thumb.is-active {
  opacity: 1; transform: translateY(-3px);
}
.gallery-thumb.is-active { outline: 1px solid rgba(80,80,80,.55); outline-offset: 2px; }
.gallery::before, .gallery::after {
  content: ""; position: absolute; z-index: 2; top: 0; bottom: 0;
  width: 8vw; pointer-events: none;
}
.gallery::before { left: 0; background: linear-gradient(90deg, var(--page-bg), transparent); }
.gallery::after { right: 0; background: linear-gradient(270deg, var(--page-bg), transparent); }
.gallery-hint {
  position: absolute; right: 2.25vw; bottom: 10px;
  font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.gallery:hover .gallery-hint { opacity: .55; }

@media (max-width: 700px) {
  :root { --header-height: 62px; --gallery-height: 112px; }
  .site-header { padding: 0 18px; }
  .brand, .main-nav a { font-size: 10px; }
  .main-nav { gap: 15px; }
  .main-stage { padding: 0 16px; }
  .hero-wrap { width: 92vw; height: 58vh; }
  .gallery-viewport { padding: 0 16px; }
  .gallery-track { gap: 10px; }
  .gallery-thumb { flex-basis: 76px; width: 76px; height: 76px; }
  .gallery-hint { display: none; }
}
@media (max-width: 390px) {
  .main-nav { gap: 10px; }
  .brand, .main-nav a { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
