:root {
  color-scheme: dark;
  --bg: #080706;
  --text: #fff8f5;
  --muted: rgba(255, 248, 245, 0.58);
  --line: rgba(255, 255, 255, 0.16);
  --red: #ff4d45;
}

* { box-sizing: border-box; }

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

body {
  color: var(--text);
  background:
    radial-gradient(circle at 22% 34%, rgba(122, 22, 18, 0.44), transparent 32rem),
    radial-gradient(circle at 74% 66%, rgba(255, 77, 69, 0.14), transparent 34rem),
    linear-gradient(180deg, #120607 0%, #080706 48%, #060505 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.photo-wall-shell {
  position: relative;
  isolation: isolate;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  user-select: none;
}

.photo-wall-shell::before,
.photo-wall-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.photo-wall-shell::before {
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.9), transparent 16%, transparent 84%, rgba(5, 5, 5, 0.92)),
    linear-gradient(180deg, rgba(5, 5, 5, 0.78), transparent 25%, transparent 72%, rgba(5, 5, 5, 0.9));
}

.photo-wall-shell::after {
  opacity: 0.12;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 5px;
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 74%, transparent);
}

.photo-wall-chrome,
.photo-wall-footer {
  position: absolute;
  z-index: 5;
  left: clamp(28px, 4vw, 70px);
  right: clamp(28px, 4vw, 70px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: rgba(255, 248, 245, 0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.photo-wall-chrome {
  top: clamp(28px, 5vh, 54px);
}

.photo-wall-footer {
  bottom: clamp(28px, 5vh, 54px);
}

.photo-wall-brand {
  color: #fff;
  font-size: clamp(20px, 2.2vw, 34px);
  letter-spacing: -0.04em;
}

.photo-wall-about,
.photo-wall-footer a {
  color: rgba(255, 248, 245, 0.84);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.photo-wall-scale {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.photo-wall-scale i {
  width: 1px;
  height: 16px;
  background: rgba(255, 248, 245, 0.24);
}

.photo-wall-scale b {
  width: 28px;
  height: 14px;
  border: 1px solid rgba(255, 248, 245, 0.6);
}

.photo-wall-footer strong {
  position: absolute;
  left: 50%;
  max-width: min(560px, 46vw);
  overflow: hidden;
  color: #fff;
  font-size: clamp(16px, 2vw, 28px);
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
}

.photo-wall-stage {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: clamp(360px, 43vh, 500px);
  transform: translateY(-50%);
  cursor: grab;
  perspective: 1200px;
  touch-action: none;
}

.photo-wall-stage.is-dragging {
  cursor: grabbing;
}

.photo-wall-track {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.45vw, 10px);
  height: 100%;
  padding-inline: clamp(28px, 3.8vw, 74px);
  transform-style: preserve-3d;
  will-change: transform;
}

.photo-wall-card {
  position: relative;
  display: block;
  flex: 0 0 clamp(92px, 6.5vw, 128px);
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #151414;
  cursor: pointer;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.44);
  transform-origin: center center;
  backface-visibility: hidden;
  will-change: transform, filter, box-shadow;
  -webkit-user-drag: none;
}

.photo-wall-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.photo-wall-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 24%, rgba(0, 0, 0, 0.32));
  pointer-events: none;
}

.photo-wall-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 76px);
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

.photo-wall-lightbox[hidden] {
  display: none;
}

.photo-wall-lightbox img {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  height: auto;
  max-width: 95vw;
  max-height: 95vh;
  transform: translate(-50%, -50%) scale(0.12);
  object-fit: contain;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  opacity: 0;
  transition: transform 820ms cubic-bezier(0.16, 1, 0.3, 1), opacity 820ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.photo-wall-lightbox.is-active img {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.photo-wall-lightbox__close {
  position: fixed;
  top: clamp(20px, 4.5vh, 48px);
  right: clamp(20px, 4vw, 54px);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 28px;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: scale(0.6) rotate(-45deg);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), background 240ms ease, border-color 240ms ease;
}

.photo-wall-lightbox.is-active .photo-wall-lightbox__close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition-delay: 0.65s;
}

.photo-wall-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05) rotate(90deg);
}

.photo-wall-lightbox__meta {
  position: fixed;
  left: clamp(24px, 4vw, 68px);
  right: clamp(24px, 4vw, 68px);
  bottom: clamp(24px, 5vh, 54px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(20px, 4vw, 60px);
  pointer-events: auto;
}

.photo-wall-lightbox__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: clamp(280px, 50vw, 700px);
}

.photo-wall-lightbox__meta strong {
  display: block;
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: clamp(24px, 4.5vw, 48px);
  line-height: 1.1;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.photo-wall-lightbox__meta p {
  margin: 0;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: clamp(13px, 1.4vw, 16px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.photo-wall-lightbox__meta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 36px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 30px;
  color: #fff;
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.photo-wall-lightbox__meta a:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
  transform: scale(1.05);
}

/* Custom Text Reveal Transitions */
.photo-wall-reveal-wrap {
  overflow: hidden;
  display: block;
}

.photo-wall-reveal-item {
  display: inline-block;
  transform: translateY(102%);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.photo-wall-lightbox.is-active .photo-wall-reveal-item {
  transform: translateY(0);
}

/* Staggered transition delays when active */
.photo-wall-lightbox.is-active .photo-wall-lightbox__info .photo-wall-reveal-wrap:nth-child(1) .photo-wall-reveal-item {
  transition-delay: 0.3s;
}

.photo-wall-lightbox.is-active .photo-wall-lightbox__info .photo-wall-reveal-wrap:nth-child(2) .photo-wall-reveal-item {
  transition-delay: 0.42s;
}

.photo-wall-lightbox.is-active .photo-wall-reveal-wrap:last-child .photo-wall-reveal-item {
  transition-delay: 0.54s;
}

.photo-wall-bg-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  font-size: clamp(70px, 13vw, 220px);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.038);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  pointer-events: none;
  z-index: 1;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-wall-stage.has-selected .photo-wall-bg-title {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.04);
}

@keyframes photoWallFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .photo-wall-scale {
    display: none;
  }

  .photo-wall-stage {
    height: clamp(320px, 48vh, 430px);
  }

  .photo-wall-card {
    flex-basis: 84px;
  }

  .photo-wall-footer strong {
    display: none;
  }
}

.photo-wall-stage.has-selected ~ .photo-wall-footer {
  opacity: 0;
  pointer-events: none;
}

.photo-wall-footer {
  transition: opacity 0.5s ease;
}

#photo-wall-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.photo-wall-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(72px) brightness(0.25) saturate(0.85);
  opacity: 0.68;
  transition: background-image 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease;
  z-index: 0;
  pointer-events: none;
}
