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

html, body {
  width: 100%; height: 100%;
  background: #111010;
  color: #d8d8d8;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

/* ── HEADER ── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  pointer-events: none;
}

header > * { pointer-events: auto; }

.logo { display: block; cursor: pointer; user-select: none; text-decoration: none; }
.logo img { height: 52px; display: block; }

/* ── MAIN NAV ── */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  display: inline-block;
  text-decoration: none;
  color: rgba(216,216,216,0.72);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  transition: opacity 0.22s ease;
  position: relative;
  cursor: pointer;
}

/* Dim siblings when nav is hovered */
.main-nav:hover .nav-link {
  opacity: 0.35;
}
.main-nav:hover .nav-link:hover {
  opacity: 1;
}

/* Active page underline */
.nav-link.is-active {
  color: rgba(216,216,216,0.9);
}
.nav-link.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -5px;
  height: 1px;
  background: rgba(216,216,216,0.45);
}

/* ── CHARACTER FLIP ── */
.flip-char {
  display: inline-block;
  overflow: clip;
  height: 1em;
  vertical-align: top;
}

.flip-inner {
  display: inline-block;
  position: relative;
  transition: transform 0.2s ease-in-out;
}

.nav-link:hover .flip-inner {
  transform: translateY(-1em);
}

.flip-clone {
  position: absolute;
  top: 1em;
  left: 0;
  display: block;
  user-select: none;
}

/* ── VIGNETTE — dark edges that fade toward center ── */
.vignette {
  position: fixed;
  left: 0; right: 0;
  z-index: 8;
  pointer-events: none;
}
.vignette-top {
  top: 0;
  height: 15%;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.85) 0%,
    transparent 100%
  );
}
.vignette-bottom {
  bottom: 0;
  height: 10%;
  background: linear-gradient(to top,
    rgba(0,0,0,0.85) 0%,
    transparent 100%
  );
}

/* ── GALLERY WRAPPER ── */
#gallery {
  position: fixed; inset: 0;
  cursor: grab;
}
#gallery.dragging { cursor: grabbing; }

#display {
  display: block; width: 100%; height: 100%;
}

/* ── BOTTOM HINT — fixed, above vignettes ── */
.hint-wrap {
  position: fixed;
  bottom: 26px; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.drag-pill {
  display: inline-flex; align-items: center;
  border: 1.5px solid rgba(255,255,255,.82);
  border-radius: 9999px;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(4px);
  color: white; font-size: 13px; overflow: hidden;
  pointer-events: auto;
}
.drag-pill span { padding: 5px 14px; }
.drag-pill-icon {
  width: 27px; height: 27px;
  border-left: 1.5px solid rgba(255,255,255,.82);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 300;
}

/* ── PRELOADER ── */
#background-loader {
  position: fixed; inset: 0;
  background: #111010;
  z-index: 100;
}
#preloader {
  position: fixed; inset: 0;
  display: flex;
  justify-content: center; align-items: center;
  z-index: 101;
  opacity: 0;
}
#logo-container {
  max-width: 600px; width: 100%;
  text-align: center;
}
#preloader-img {
  width: 100%; height: auto;
  max-height: 75px;
}
@media (min-width: 576px)  { #preloader-img { max-height: 90px;  } }
@media (min-width: 768px)  { #preloader-img { max-height: 100px; } }
@media (min-width: 992px)  { #preloader-img { max-height: 120px; } }
@media (min-width: 1200px) { #preloader-img { max-height: 135px; } }

/* ── GALLERY LOADING DOTS ── */
#loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 20; pointer-events: none;
}
.ld {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(216,216,216,.38); margin: 0 4px;
  animation: ldp 1.4s ease-in-out infinite;
}
.ld:nth-child(2) { animation-delay: .2s; }
.ld:nth-child(3) { animation-delay: .4s; }
@keyframes ldp {
  0%,80%,100% { transform: scale(.6); opacity: .22; }
  40%          { transform: scale(1);  opacity: 1;   }
}
