:root {
  --bg-color: #f3f2eb;
  --text-color: #1a1a1a;
  --text-muted: #a3a3a3;
  --border-color: #e5e4dd;
  --hover-bg: #eae9e2;
  --header-border: #dcdbd3;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUpCenter {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 30px)); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px dashed var(--header-border);
  position: sticky;
  top: 0;
  background-color: rgba(243, 242, 235, 0.9);
  backdrop-filter: blur(10px);
  z-index: 100;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.logo h1 {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 1px;
}

.logo p {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.center-nav {
  font-size: 1.1rem;
  font-weight: 500;
  transform: translateX(-20px);
}

.menu-btn {
  background-color: #000;
  color: #fff;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-radius: 2px;
}

.menu-btn:hover {
  background-color: #333;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hamburger span {
  width: 14px;
  height: 1.5px;
  background-color: #fff;
  display: block;
}

/* Intro Section */
.intro {
  padding: 4rem 4rem 4rem 2rem;
  display: flex;
  justify-content: flex-end;
  border-bottom: 1px solid var(--border-color);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.intro-text {
  max-width: 300px;
  font-size: 1.1rem;
  color: var(--text-color);
  font-weight: 400;
}

/* Film List Container */
.film-list-container {
  position: relative;
  width: 100%;
}

/* Film List - Adding padding to fix the scroll issue */
.film-list {
  list-style: none;
  width: 100%;
  padding-bottom: 55vh; /* Allows the last item to scroll into the center */
}

/* Fixed Image / Flip Card */
.fixed-image-container {
  position: fixed;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 380px;
  z-index: 10;
  perspective: 1000px; /* For 3D flip effect */
  opacity: 0;
  animation: fadeInUpCenter 0.8s ease 0.6s forwards;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1), opacity 0.3s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}

/* Flip Triggers */
@media (hover: hover) {
  .fixed-image-container:hover .flip-card-inner {
    transform: rotateY(180deg);
  }
}
.fixed-image-container.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border: 1px solid #333;
  background-color: #fff;
  padding: 6px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flip-card-back {
  transform: rotateY(180deg);
  background-color: var(--text-color);
  color: var(--bg-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  text-align: center;
}

.flip-card-back h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.flip-card-back p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #ccc;
}

/* List Items */
.film-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4.5rem 3rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

/* Dynamic Animation Delays for List Items */
.film-item:nth-child(1) { animation-delay: 0.4s; }
.film-item:nth-child(2) { animation-delay: 0.5s; }
.film-item:nth-child(3) { animation-delay: 0.6s; }
.film-item:nth-child(4) { animation-delay: 0.7s; }
.film-item:nth-child(5) { animation-delay: 0.8s; }
.film-item:nth-child(6) { animation-delay: 0.9s; }
.film-item:nth-child(7) { animation-delay: 1.0s; }

.film-item:nth-child(even) {
  background-color: #eeeada;
}

.film-item:hover {
  background-color: var(--hover-bg);
}

.film-item h2 {
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  max-width: 50%;
  transition: color 0.3s ease, transform 0.3s ease;
}

.film-item .quote {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
  transition: color 0.3s ease;
}

/* Active vs Inactive State */
.film-item.active h2 {
  color: #000;
  transform: translateX(10px);
}
.film-item:not(.active) h2 {
  color: #a3a3a3;
}

@media (max-width: 768px) {
  .intro {
    justify-content: flex-start;
    padding: 2rem;
  }
  .center-nav {
    display: none;
  }
  .fixed-image-container {
    width: 220px;
    height: 300px;
  }
  .film-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 3rem 2rem;
  }
  .film-item h2 {
    font-size: 1.5rem;
    max-width: 100%;
  }
}
