:root {
  --background: #0a0a0a;
  --foreground: #fafafa;
  --font-display: "Playfair Display", Georgia, serif;
  --font-sans: "Geist", system-ui, -apple-system, sans-serif;
}

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

html,
body {
  margin: 0;
  height: 100%;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
}

.reel {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--background);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: grab;
  isolation: isolate;
}

.reel:active {
  cursor: grabbing;
}

/* Warped grid */
.grid-wrap {
  pointer-events: none;
  position: absolute;
  inset: 0;
  -webkit-mask-image: radial-gradient(ellipse 78% 82% at center, black 10%, transparent 92%);
  mask-image: radial-gradient(ellipse 78% 82% at center, black 10%, transparent 92%);
}

.grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--foreground);
}

/* Cards */
.cards {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
}

.card {
  position: absolute;
  top: 0;
  left: 0;
  width: 230px;
  height: 305px;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  will-change: transform;
  transform-origin: center center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  opacity: 0;
}

.card .tilt {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transform: scale(1.05);
  display: block;
}

.card .sheen {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0;
  mix-blend-mode: overlay;
  transition: opacity 0.4s ease-out;
}

/* Copy */
.copy {
  pointer-events: none;
  position: absolute;
  bottom: 24px;
  left: 20px;
  right: 20px;
  z-index: 40;
  max-width: 36rem;
  color: var(--foreground);
}

.eyebrow {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgb(250 250 250 / 0.6);
}

.eyebrow-line {
  height: 1px;
  width: 32px;
  background: rgb(250 250 250 / 0.4);
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.25rem;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.title .char {
  display: inline-block;
  white-space: pre;
  will-change: transform;
}

.title .italic {
  font-style: italic;
  color: rgb(250 250 250 / 0.8);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.35);
}

.lightbox[hidden] {
  display: none;
}

.lb-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  will-change: transform;
  transform-origin: center center;
  width: min(78vw, calc(82vh * 3 / 4));
  height: min(82vh, calc(78vw * 4 / 3));
}

.lb-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lb-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.1);
  color: rgb(255 255 255 / 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.15s;
}

.lb-btn:hover {
  background: rgb(255 255 255 / 0.2);
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 24px;
  line-height: 32px;
}

.lb-prev {
  left: 24px;
  z-index: 10;
}

.lb-next {
  right: 24px;
}

.lb-close {
  right: 24px;
  top: 24px;
  width: 40px;
  height: 40px;
  font-size: 18px;
  line-height: 28px;
}

.lb-play {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.15s;
}

.lb-play:hover {
  background: rgb(0 0 0 / 0.75);
}

@media (min-width: 640px) {
  .title {
    font-size: 3rem;
  }
}

@media (min-width: 768px) {
  .copy {
    bottom: 56px;
    left: 56px;
    right: auto;
  }
  .title {
    font-size: 3.75rem;
  }
}

@media (min-width: 1024px) {
  .title {
    font-size: 4.5rem;
  }
}
