@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;700&family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  --ink: #1f1a16;
  --glass: rgba(255, 255, 255, 0.6);
  --shadow: rgba(23, 17, 12, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100dvh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, #f6d18a 0%, #f1e0c4 38%, #cfe8f7 100%),
    radial-gradient(circle at 10% 14%, rgba(255, 168, 58, 0.75), transparent 54%),
    radial-gradient(circle at 92% 8%, rgba(82, 164, 212, 0.65), transparent 52%),
    radial-gradient(circle at 18% 84%, rgba(255, 132, 108, 0.55), transparent 56%),
    radial-gradient(circle at 82% 78%, rgba(135, 204, 170, 0.5), transparent 52%),
    radial-gradient(circle at 55% 45%, rgba(255, 210, 120, 0.5), transparent 46%);
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  /* Paper speckle for a printed postcard feel. */
  background-image: radial-gradient(
    rgba(31, 26, 22, 0.16) 0.9px,
    transparent 0.9px
  );
  background-size: 12px 12px;
  opacity: 0.35;
  mix-blend-mode: multiply;
}

body::after {
  background-image:
    radial-gradient(circle at center, transparent 50%, rgba(31, 26, 22, 0.26));
  opacity: 0.4;
  mix-blend-mode: multiply;
}

#root {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(36px, 5vh, 72px) clamp(24px, 4vw, 64px);
  /* Allow internal scroll only when needed. */
  overflow-y: hidden;
}

.mood-board-shell {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 20px);
  /* Center stack when there is extra vertical space. */
  margin-block: auto;
}

.mood-board-heading {
  text-align: center;
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  /* Subtle print emboss. */
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.35),
    0 12px 22px rgba(31, 26, 22, 0.2);
}

.mood-board {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2.6vw, 32px);
  padding: clamp(8px, 1.2vw, 14px);
  width: min(1180px, 100%);
  margin: 0 auto;
  background: var(--glass);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 30px 60px -40px var(--shadow);
  backdrop-filter: blur(14px);
  position: relative;
  justify-content: space-between;
  /* Let gaps scale with the board, not the viewport. */
  container-type: inline-size;
}

.mood-board::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 22px;
  border: 1px dashed rgba(31, 26, 22, 0.18);
  pointer-events: none;
}

.mood-board-item {
  --tilt: -1deg;
  border-radius: 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #fff;
  min-height: clamp(200px, 24vh, 245px);
  max-height: 260px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 45px -30px rgba(15, 10, 8, 0.6);
  transform: rotate(var(--tilt));
  transition: transform 200ms ease, box-shadow 200ms ease;
  flex: 1 1 calc(33.333% - 20px);
  max-width: clamp(260px, 30vw, 340px);
  min-width: 240px;
}

.mood-board-item::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Glossy highlight to mimic postcard. */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 45%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 55%);
  opacity: 0.9;
}

.mood-board-item::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.45);
}

.mood-board-item > * {
  position: relative;
  z-index: 1;
}

.mood-board-item:nth-child(2) {
  --tilt: 1.5deg;
}

.mood-board-item:nth-child(3) {
  --tilt: -2deg;
}

.mood-board-item:nth-child(4) {
  --tilt: 2deg;
}

.mood-board-item:nth-child(5) {
  --tilt: -1.2deg;
}

.mood-board-item:nth-child(6) {
  --tilt: 1.2deg;
}

.mood-board-item:hover {
  transform: translateY(-6px) rotate(0deg);
  box-shadow: 0 30px 50px -35px rgba(15, 10, 8, 0.7);
}

.mood-board-image {
  width: 100%;
  height: clamp(120px, 16vh, 150px);
  object-fit: cover;
  filter: saturate(1.2) contrast(1.05);
  animation: slow-pan 9s ease-in-out infinite alternate;
  transition: filter 200ms ease;
}

.mood-board-image-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(12, 8, 5, 0.25);
}

.mood-board-image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Color wash on images. */
  background: linear-gradient(135deg, rgba(255, 196, 128, 0.28), rgba(92, 164, 210, 0.22));
  mix-blend-mode: soft-light;
  opacity: 0.75;
  pointer-events: none;
}

.mood-board-item:hover .mood-board-image {
  filter: saturate(1.2) contrast(1.05) brightness(1.03);
}

.mood-board-item:nth-child(2) .mood-board-image {
  animation-delay: -2s;
}

.mood-board-item:nth-child(3) .mood-board-image {
  animation-delay: -4s;
}

.mood-board-item:nth-child(4) .mood-board-image {
  animation-delay: -6s;
}

.mood-board-item:nth-child(5) .mood-board-image {
  animation-delay: -3s;
}

.mood-board-item:nth-child(6) .mood-board-image {
  animation-delay: -5s;
}

@keyframes slow-pan {
  0% {
    transform: scale(1) translateY(0);
  }
  100% {
    transform: scale(1.05) translateY(-6px);
  }
}

.mood-board-text-block {
  margin: auto 12px 26px;
  text-align: center;
}

.mood-board-text {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  line-height: 1.1;
}

.mood-board-subtitle {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.3;
}

.mood-board-subtitle li + li {
  margin-top: 4px;
}

@media (max-width: 900px) {
  .mood-board {
    padding: clamp(10px, 2vw, 16px);
  }

  .mood-board-heading {
    letter-spacing: 0.08em;
  }

  .mood-board-item {
    flex-basis: calc(50% - 20px);
    max-width: calc(50% - 20px);
    min-width: 200px;
  }
}

@media (max-height: 800px) {
  #root {
    /* Allow vertical scroll on short viewports only. */
    overflow-y: auto;
  }
}

@supports (width: 1cqw) {
  .mood-board {
    gap: clamp(16px, 2.8cqw, 36px);
  }
}

@media (max-width: 600px) {
  #root {
    padding: 32px 16px 48px;
  }

  .mood-board-item {
    min-height: 240px;
    flex-basis: 100%;
    max-width: 100%;
    min-width: 0;
  }
}
