/*
 * Slides - 35mm transparencies on light table
 * Cardboard mounts, backlit glow, Kodachrome labels
 */

:root {
  --light-table: #e8e4dc;
  --light-glow: #f5f3ed;
  --mount-white: #f0ede5;
  --mount-gray: #d8d4cc;
  --mount-shadow: rgba(0,0,0,0.15);
  --label-ink: #3a3a38;
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Courier New', monospace;
  background: var(--light-table);
  overflow: hidden;
}

/* Light table surface */
.light-table {
  width: 100%;
  height: 100dvh;
  position: relative;

  /* Backlit glow effect */
  background:
    radial-gradient(ellipse at center, var(--light-glow) 0%, var(--light-table) 70%);

  /* Subtle surface texture */
  background-image:
    radial-gradient(ellipse at center, var(--light-glow) 0%, var(--light-table) 70%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-blend-mode: normal, overlay;
  background-size: 100% 100%, 80px;
}

/* Individual slide */
.slide {
  position: absolute;
  left: var(--x, 0);
  top: var(--y, 0);
  transform: rotate(var(--rot, 0deg));
  cursor: pointer;
  transition: transform 0.2s ease, z-index 0s;
}

.slide:hover {
  transform: rotate(var(--rot, 0deg)) scale(1.05);
  z-index: 100;
}

/* Cardboard mount */
.mount {
  width: 182px;
  height: 182px;
  background: var(--mount-white);
  border-radius: 2px;
  position: relative;
  padding: 20px;

  /* Cardboard texture and shadow */
  box-shadow:
    2px 2px 4px var(--mount-shadow),
    4px 4px 12px var(--mount-shadow);

  /* Subtle cardboard grain */
  background-image:
    linear-gradient(var(--mount-white), var(--mount-gray)),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-blend-mode: normal, soft-light;
  background-size: 100% 100%, 30px;
}

/* Labels on mount */
.label {
  position: absolute;
  font-size: 6px;
  font-weight: bold;
  color: var(--label-ink);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.label.top-left {
  top: 5px;
  left: 6px;
}

.label.top-right {
  top: 5px;
  right: 6px;
}

.label.bottom {
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 5px;
  color: #c41e3a;
  letter-spacing: 0.1em;
}

/* Transparency window */
.transparency {
  width: 100%;
  height: 100%;
  background: #111;
  overflow: hidden;
  position: relative;

  /* Backlit glow around edges */
  box-shadow:
    inset 0 0 8px rgba(255,250,240,0.3),
    inset 0 0 20px rgba(255,250,240,0.1);
}

.transparency img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* Slight saturation boost like transparency */
  filter: saturate(1.15) contrast(1.05);

  /* Subtle backlit glow */
  mix-blend-mode: normal;
}

/* Backlit transparency effect */
.transparency::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(255,252,245,0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Different mount colors for variety */
.slide:nth-child(3n) .mount {
  background-image:
    linear-gradient(#e8e4dc, #d0ccc4),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.slide:nth-child(5n) .mount {
  background-image:
    linear-gradient(#f5f2ea, #e5e2da),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Responsive */
@media (max-width: 768px) {
  .mount {
    width: 130px;
    height: 130px;
    padding: 18px;
  }

  .label {
    font-size: 5px;
  }

  .label.bottom {
    font-size: 4px;
  }
}

@media (min-width: 1400px) {
  .mount {
    width: 220px;
    height: 220px;
    padding: 30px;
  }

  .label {
    font-size: 8px;
  }
}
