/* Giriş ekranı: mühürlü zarf */
.giris {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 38px;
  padding: 20px;
  text-align: center;
  background: radial-gradient(70% 60% at 50% 42%, #4a1326, #17070e 75%);
  transition: opacity 1s ease 1.5s, visibility 0s linear 2.5s;
}
.giris.acik { opacity: 0; visibility: hidden; }

.giris-ust {
  font-family: var(--el);
  font-size: clamp(26px, 6vw, 38px);
  color: var(--pembe);
  animation: nefes 3s ease-in-out infinite;
}
.giris-alt {
  font-family: var(--el);
  font-size: 20px;
  color: rgba(251, 241, 228, 0.6);
}
.giris.acik .giris-ust,
.giris.acik .giris-alt { animation: none; opacity: 0; transition: opacity 0.4s ease; }

.zarf {
  position: relative;
  width: min(78vw, 340px);
  aspect-ratio: 3 / 2;
  margin-top: 30px;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 900px;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.55));
  animation: salin 4s ease-in-out infinite;
}
.zarf > span { position: absolute; }

.zarf-arka {
  inset: 0;
  border-radius: 8px;
  background: #e2c8ae;
}
.zarf-kart {
  inset: 8% 7%;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--krem);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 1s cubic-bezier(0.3, 0.8, 0.3, 1) 0.45s;
}
.zarf-kart em {
  font-family: var(--suslu);
  font-style: normal;
  font-size: clamp(32px, 10vw, 46px);
  color: var(--gul-koyu);
}
.zarf-on {
  inset: 0;
  z-index: 2;
  border-radius: 8px;
  background: linear-gradient(180deg, #f6e6d4, #edd5bd);
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
}
.zarf-kapak {
  inset: 0 0 auto 0;
  height: 58%;
  z-index: 3;
  background: linear-gradient(180deg, #f2dcc6, #e3c4a8);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  transition: transform 0.7s ease, z-index 0s linear 0.35s;
}
.muhur {
  left: 50%;
  top: 54%;
  z-index: 4;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f06a8a, #a81f47 70%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 0 0 4px rgba(255, 255, 255, 0.12);
  color: #ffe3ea;
  font-family: var(--suslu);
  font-size: 34px;
  animation: nabiz 1.6s ease-in-out infinite;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Açılış: mühür kaybolur, kapak kalkar, kart yukarı çıkar */
.giris.acik .zarf { animation: none; }
.giris.acik .muhur { animation: none; transform: scale(0); opacity: 0; }
.giris.acik .zarf-kapak { transform: rotateX(180deg); z-index: 0; }
.giris.acik .zarf-kart { transform: translateY(-62%); }

@keyframes salin {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-8px); }
}
