/* ==========================================================
   GÖKÇE & YALÇIN — CİNEMATİK OPENING
   styles/cinematic-opening.css
========================================================== */

/* ========================= OVERLAY ========================= */
#cinematic-opening {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 1.2s cubic-bezier(0.4,0,0.2,1),
              visibility 1.2s cubic-bezier(0.4,0,0.2,1);
}

#cinematic-opening.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ========================= BACKGROUND ========================= */
.opening-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.38) saturate(1.1);
  transform: scale(1.06);
  animation: openingZoom 20s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes openingZoom {
  from { transform: scale(1.03); }
  to   { transform: scale(1.1); }
}

/* ========================= OVERLAYS ========================= */
.opening-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,0.5) 0%,
      rgba(0,0,0,0.18) 40%,
      rgba(0,0,0,0.58) 100%
    ),
    radial-gradient(ellipse at center,
      rgba(201,169,110,0.07) 0%,
      transparent 65%
    );
}

/* ========================= PARTICLES ========================= */
.opening-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--gold, #c9a96e);
  opacity: 0;
  animation: particleDrift var(--dur, 8s) linear var(--delay, 0s) infinite;
}

@keyframes particleDrift {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(0.5);
  }
  10% { opacity: 0.7; }
  90% { opacity: 0.4; }
  100% {
    opacity: 0;
    transform: translateY(-120px) translateX(var(--drift, 20px)) scale(1.5);
  }
}

/* ========================= CONTENT ========================= */
.opening-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Tag / label */
.opening-tag {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.55rem, 1.2vw, 0.68rem);
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(201,169,110,0.9);
  margin-bottom: 2rem;
  opacity: 0;
  animation: openingFadeUp 1s ease both 0.4s;
}

/* Top line — Gökçe */
.opening-name-top {
  font-family: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  font-size: clamp(3rem, 10vw, 7.5rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: #f5efe6;
  line-height: 1;
  opacity: 0;
  animation: openingFadeUp 1.1s ease both 0.7s;
}

/* Middle — animated separator */
.opening-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.8rem 0;
  opacity: 0;
  animation: openingFadeIn 1.2s ease both 1.1s;
}

.opening-sep-line {
  width: clamp(40px, 8vw, 90px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.6));
}

.opening-sep-line.right {
  background: linear-gradient(90deg, rgba(201,169,110,0.6), transparent);
}

.opening-sep-heart {
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  color: #c9a96e;
  animation: heartBeatOpening 2.4s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(201,169,110,0.75));
  display: inline-block;
  line-height: 1;
}

@keyframes heartBeatOpening {
  0%   { transform: scale(1);    opacity: 1; }
  15%  { transform: scale(1.32); opacity: 1; }
  30%  { transform: scale(1);    opacity: 0.8; }
  45%  { transform: scale(1.16); opacity: 1; }
  60%  { transform: scale(1);    opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}

/* Bottom line — Yalçın */
.opening-name-bottom {
  font-family: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  font-size: clamp(3rem, 10vw, 7.5rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: #f5efe6;
  line-height: 1;
  opacity: 0;
  animation: openingFadeUp 1.1s ease both 1s;
}

/* Date */
.opening-date {
  font-family: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  font-size: clamp(0.85rem, 1.8vw, 1.1rem);
  font-weight: 300;
  letter-spacing: 0.28em;
  color: rgba(232,213,163,0.85);
  margin-top: 1.6rem;
  opacity: 0;
  animation: openingFadeUp 1s ease both 1.4s;
}

/* Divider */
.opening-divider {
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.55), transparent);
  margin: 1.4rem auto;
  opacity: 0;
  animation: openingFadeIn 1.2s ease both 1.6s;
}

/* CTA button */
.opening-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.58rem, 1.2vw, 0.7rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(201,169,110,0.9);
  background: transparent;
  border: 1px solid rgba(201,169,110,0.35);
  padding: 0.85rem 2.4rem;
  cursor: pointer;
  transition: all 0.35s ease;
  opacity: 0;
  animation: openingFadeIn 1.2s ease both 2s;
  position: relative;
  overflow: hidden;
}

.opening-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(201,169,110,0.08);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.opening-btn:hover {
  border-color: rgba(201,169,110,0.7);
  color: #e8d5a3;
}

.opening-btn:hover::before {
  transform: scaleX(1);
}

/* ========================= KEYFRAMES ========================= */
@keyframes openingFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes openingFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ========================= WEBKIT PREFIX ========================= */
.opening-tag,
.opening-name-top,
.opening-name-bottom,
.opening-separator,
.opening-date,
.opening-divider,
.opening-btn {
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

/* ========================= MOBILE ========================= */
@media (max-width: 600px) {
  .opening-name-top,
  .opening-name-bottom {
    font-size: clamp(2.6rem, 16vw, 4.5rem);
  }

  .opening-sep-line {
    width: 30px;
  }

  .opening-bg {
    animation: none;
  }
}
