:root {
  --bg: #f7f7f3;
  --fg: #101010;
  --muted: rgba(16, 16, 16, 0.58);
  --line: rgba(16, 16, 16, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: "Helvetica Neue", "Avenir Next", "Segoe UI", sans-serif;
}

.page-shell {
  position: relative;
  height: 100vh;
  height: 100dvh;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  background: var(--bg);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-label,
.loader-progress {
  margin: 0;
  text-align: center;
}

.loader-label {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.loader-progress {
  font-size: 1.1rem;
}

.intro {
  position: fixed;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: min(60rem, calc(100vw - 3rem));
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition:
    opacity 240ms ease,
    visibility 240ms ease;
}

.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
}

h1 {
  margin: 0;
  font-family: "Monomakh", system-ui;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  color: #ffffff;
  line-height: 1;
  font-weight: 400;
}

.instruction {
  margin: 0.5rem auto 0;
  max-width: 60rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #ffffff;
}

.gallery-wrap {
  height: 100vh;
  height: 100dvh;
}

.gallery {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100vh;
  height: 100dvh;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  touch-action: pan-x;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  flex: 0 0 auto;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.gallery-item img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: center center;
}

.scrollbar-overlay {
  position: fixed;
  left: 1rem;
  right: 1rem;
  top: 0.7rem;
  z-index: 2;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0);
  opacity: 0.72;
}

.scrollbar-thumb {
  width: 20%;
  min-width: 3rem;
  height: 50%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.6);
  cursor: grab;
}

.scrollbar-thumb:active {
  cursor: grabbing;
}

.site-footer {
  position: fixed;
  left: 50%;
  bottom: 0.5rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-text {
  margin: 0;
  color: #ffffff;
}

.footer-text a {
  color: inherit;        /* same color as the text */
  text-decoration: none; /* remove underline */
}

.footer-text a:visited {
  color: inherit;        /* prevent purple visited color */
}

.footer-text a:hover {
  text-decoration: none; /* keep no underline on hover */
}

.footer-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  border-bottom: 1px solid white;
  color: #ffffff;
}

.footer-button:hover,
.footer-button:focus-visible {
  border-bottom-color: white;
  outline: none;
}



@media (max-width: 720px) {
  .intro {
    width: calc(100vw - 2rem);
  }

  .gallery-item {
    height: 100svh;
    height: 100dvh;
  }

  .site-footer {
    width: calc(100vw - 2rem);
    bottom: 1rem;
    flex-direction: column;
    gap: 0.45rem;
    text-align: center;
  }

  .scrollbar-overlay {
    left: 0.75rem;
    right: 0.75rem;
    top: 0.6rem;
  }
}
