/* ==========================================================================
   INTRO ANIMATION - Pelet Soba Yakma Hikayesi (Kısa Versiyon ~3.5s)
   Animasyon Sırası:
   1. Yanmayan soba görünür (0-0.6s)
   2. Elli kürek sağdan gelir, soba sabit (0.6-1.4s)
   3. Kürek gider, pürmüz sağdan gelir (1.4-2.2s)
   4. Pürmüz gider, soba söner -> yanan soba belirir (2.2-3s)
   5. Marka belirir, intro kaybolur (3-3.8s)
   ========================================================================== */

/* ---- INTRO OVERLAY ---- */
#intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0d0d1a 60%, #000000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#intro-overlay.fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

/* ---- INTRO STAGE ---- */
.intro-stage {
  position: relative;
  width: 420px;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- SHARED IMAGE STYLES ---- */
.intro-stage img {
  position: absolute;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.6));
  will-change: transform, opacity;
}

/* ---- YANMAYAN SOBA (Her zaman merkez) ---- */
.intro-soba-off {
  width: 320px;
  opacity: 0;
  transform: scale(0.7);
  animation: sobaOffAppear 0.5s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             sobaOffExit 0.35s 2.4s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes sobaOffAppear {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes sobaOffExit {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.85);
  }
}

/* ---- ELLİ KÜREK (Sağdan gelir, daha küçük) ---- */
.intro-kurek {
  width: 180px;
  right: -60px;
  top: 50%;
  transform: translateY(-50%) translateX(200px) rotate(10deg);
  opacity: 0;
  z-index: 2;
  animation: kurekEnter 0.45s 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             kurekPour 0.3s 1.1s ease-in-out forwards,
             kurekExit 0.35s 1.4s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes kurekEnter {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(200px) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) translateX(0) rotate(-5deg);
  }
}

@keyframes kurekPour {
  0% {
    transform: translateY(-50%) translateX(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-45%) translateX(-15px) rotate(-25deg);
  }
  100% {
    transform: translateY(-50%) translateX(0) rotate(-5deg);
  }
}

@keyframes kurekExit {
  0% {
    opacity: 1;
    transform: translateY(-50%) translateX(0) rotate(-5deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) translateX(200px) rotate(15deg);
  }
}

/* ---- PÜRMÜZ (Sağdan gelir - kürekle aynı taraftan) ---- */
.intro-purmuz {
  width: 180px;
  right: -80px;
  top: 55%;
  transform: translateY(-50%) translateX(200px);
  opacity: 0;
  z-index: 2;
  animation: purmuzEnter 0.45s 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             purmuzFlame 0.25s 2.25s ease-in-out forwards,
             purmuzExit 0.35s 2.5s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes purmuzEnter {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(200px);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

@keyframes purmuzFlame {
  0% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-48%) translateX(-15px) scale(1.05);
    filter: drop-shadow(0 0 30px rgba(255, 150, 0, 0.6));
  }
  100% {
    transform: translateY(-50%) translateX(0);
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.6));
  }
}

@keyframes purmuzExit {
  0% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) translateX(200px);
  }
}

/* ---- YANAN SOBA (Son aşamada belirir) ---- */
.intro-soba-on {
  width: 320px;
  opacity: 0;
  transform: scale(0.85);
  animation: sobaOnAppear 0.7s 2.75s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes sobaOnAppear {
  0% {
    opacity: 0;
    transform: scale(0.85);
    filter: drop-shadow(0 0 0 rgba(255, 150, 0, 0));
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 80px rgba(255, 150, 0, 0.5)) drop-shadow(0 0 120px rgba(255, 100, 0, 0.3));
  }
}

/* ---- ATEŞ PARÇACIKLARI ---- */
.intro-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  animation: particlesAppear 0.4s 3s ease forwards;
}

@keyframes particlesAppear {
  to { opacity: 1; }
}

.intro-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffaa33, #ff6600);
  opacity: 0;
}

.intro-particle:nth-child(1) {
  left: 48%; top: 30%;
  animation: particleFloat 1.2s 3s ease-out infinite;
}
.intro-particle:nth-child(2) {
  left: 52%; top: 25%;
  animation: particleFloat 1s 3.1s ease-out infinite;
  width: 4px; height: 4px;
}
.intro-particle:nth-child(3) {
  left: 45%; top: 35%;
  animation: particleFloat 1.3s 3.05s ease-out infinite;
  width: 5px; height: 5px;
}
.intro-particle:nth-child(4) {
  left: 55%; top: 28%;
  animation: particleFloat 0.9s 3.15s ease-out infinite;
  width: 3px; height: 3px;
}
.intro-particle:nth-child(5) {
  left: 50%; top: 32%;
  animation: particleFloat 1.4s 3.08s ease-out infinite;
  width: 5px; height: 5px;
}
.intro-particle:nth-child(6) {
  left: 47%; top: 20%;
  animation: particleFloat 1.1s 3.2s ease-out infinite;
  width: 4px; height: 4px;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) translateX(calc(-20px + 40px * var(--drift, 0.5))) scale(0.3);
  }
}

.intro-particle:nth-child(1) { --drift: 0.2; }
.intro-particle:nth-child(2) { --drift: 0.8; }
.intro-particle:nth-child(3) { --drift: 0.3; }
.intro-particle:nth-child(4) { --drift: 0.7; }
.intro-particle:nth-child(5) { --drift: 0.5; }
.intro-particle:nth-child(6) { --drift: 0.6; }

/* ---- WARM GLOW ---- */
.intro-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 120, 0, 0.25) 0%, rgba(255, 80, 0, 0.08) 50%, transparent 70%);
  opacity: 0;
  z-index: 0;
  animation: glowPulse 0.8s 2.8s ease-in-out forwards;
}

@keyframes glowPulse {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
}

/* ---- MARKA ---- */
.intro-brand {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
  animation: brandAppear 0.5s 3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.intro-brand h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #ff8c00, #ffaa33, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro-brand p {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 2px;
  margin: 0;
}

@keyframes brandAppear {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ---- ATLAMA BUTONU ---- */
.intro-skip {
  position: absolute;
  bottom: 20px;
  right: 30px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  z-index: 10;
}

.intro-skip:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ---- İLERLEME ÇUBUĞU ---- */
.intro-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #ff6600, #ffaa33, #ff8c00);
  box-shadow: 0 0 15px rgba(255, 120, 0, 0.5);
  animation: progressBar 3.5s 0.1s linear forwards;
}

@keyframes progressBar {
  to { width: 100%; }
}

/* ---- STEP INDICATORS ---- */
.intro-steps {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.intro-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.4s ease;
}

.intro-step-dot.active {
  background: #ff8c00;
  border-color: #ffaa33;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

/* ---- ADIM ETİKETİ ---- */
.intro-step-label {
  position: absolute;
  top: 55px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.intro-step-label.visible {
  opacity: 1;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .intro-stage {
    width: 280px;
    height: 380px;
  }

  .intro-soba-off,
  .intro-soba-on {
    width: 220px;
  }

  .intro-kurek {
    width: 130px;
    right: -40px;
  }

  .intro-purmuz {
    width: 130px;
    right: -50px;
  }

  .intro-brand h2 {
    font-size: 1.3rem;
  }

  .intro-glow {
    width: 200px;
    height: 200px;
  }
}

/* ---- SAYFA İÇERİĞİ GİZLE ---- */
body.intro-active > *:not(#intro-overlay) {
  opacity: 0;
}

body.intro-done > *:not(#intro-overlay) {
  animation: contentReveal 0.6s ease forwards;
}

@keyframes contentReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
